@@ -589,7 +589,7 @@ discard block |
||
| 589 | 589 | $this->date_end = $this->db->jdate($obj->date_end); |
| 590 | 590 | $this->fk_user_creat = $obj->fk_user_creat; |
| 591 | 591 | $this->fk_user_valid = $obj->fk_user_valid; |
| 592 | - $this->status = $obj->status; |
|
| 592 | + $this->status = $obj->status; |
|
| 593 | 593 | $this->progress = $obj->progress; |
| 594 | 594 | $this->budget_amount = $obj->budget_amount; |
| 595 | 595 | $this->priority = $obj->priority; |
@@ -724,7 +724,7 @@ discard block |
||
| 724 | 724 | * @param Task $task |
| 725 | 725 | * @return bool |
| 726 | 726 | */ |
| 727 | - static function ($allTasksCompleted, $task) { |
|
| 727 | + static function($allTasksCompleted, $task) { |
|
| 728 | 728 | return $allTasksCompleted && $task->progress >= 100; |
| 729 | 729 | }, |
| 730 | 730 | 1 |
@@ -1358,14 +1358,14 @@ discard block |
||
| 1358 | 1358 | $tasks[$i]->billed = $obj->billed; |
| 1359 | 1359 | } |
| 1360 | 1360 | |
| 1361 | - $tasks[$i]->progress = $obj->progress; |
|
| 1361 | + $tasks[$i]->progress = $obj->progress; |
|
| 1362 | 1362 | $tasks[$i]->fk_statut = $obj->status; |
| 1363 | - $tasks[$i]->status = $obj->status; |
|
| 1363 | + $tasks[$i]->status = $obj->status; |
|
| 1364 | 1364 | $tasks[$i]->public = $obj->public; |
| 1365 | 1365 | $tasks[$i]->date_start = $this->db->jdate($obj->date_start); |
| 1366 | 1366 | $tasks[$i]->date_end = $this->db->jdate($obj->date_end); |
| 1367 | 1367 | $tasks[$i]->rang = $obj->rang; |
| 1368 | - $tasks[$i]->priority = $obj->priority; |
|
| 1368 | + $tasks[$i]->priority = $obj->priority; |
|
| 1369 | 1369 | |
| 1370 | 1370 | $tasks[$i]->socid = $obj->thirdparty_id; // For backward compatibility |
| 1371 | 1371 | $tasks[$i]->thirdparty_id = $obj->thirdparty_id; |
@@ -1709,7 +1709,7 @@ discard block |
||
| 1709 | 1709 | } |
| 1710 | 1710 | |
| 1711 | 1711 | // Update hourly rate of this time spent entry |
| 1712 | - $resql_thm_user = $this->db->query("SELECT thm FROM " . MAIN_DB_PREFIX . "user WHERE rowid = " . ((int) $timespent->fk_user)); |
|
| 1712 | + $resql_thm_user = $this->db->query("SELECT thm FROM ".MAIN_DB_PREFIX."user WHERE rowid = ".((int) $timespent->fk_user)); |
|
| 1713 | 1713 | if (!empty($resql_thm_user)) { |
| 1714 | 1714 | $obj_thm_user = $this->db->fetch_object($resql_thm_user); |
| 1715 | 1715 | $timespent->thm = $obj_thm_user->thm; |
@@ -1790,8 +1790,8 @@ discard block |
||
| 1790 | 1790 | $newobj->fk_project = $obj->project_id; |
| 1791 | 1791 | $newobj->project_ref = $obj->project_ref; |
| 1792 | 1792 | $newobj->project_label = $obj->project_label; |
| 1793 | - $newobj->project_public = $obj->project_public; |
|
| 1794 | - $newobj->public = $obj->project_public; // deprecated |
|
| 1793 | + $newobj->project_public = $obj->project_public; |
|
| 1794 | + $newobj->public = $obj->project_public; // deprecated |
|
| 1795 | 1795 | |
| 1796 | 1796 | $newobj->fk_task = $obj->task_id; |
| 1797 | 1797 | $newobj->task_ref = $obj->task_ref; |
@@ -1804,7 +1804,7 @@ discard block |
||
| 1804 | 1804 | $newobj->timespent_line_withhour = $obj->task_date_withhour; |
| 1805 | 1805 | $newobj->timespent_line_duration = $obj->task_duration; |
| 1806 | 1806 | $newobj->timespent_line_fk_user = $obj->fk_user; |
| 1807 | - $newobj->timespent_line_thm = $obj->thm; // hourly rate |
|
| 1807 | + $newobj->timespent_line_thm = $obj->thm; // hourly rate |
|
| 1808 | 1808 | $newobj->timespent_line_note = $obj->note; |
| 1809 | 1809 | |
| 1810 | 1810 | $arrayres[] = $newobj; |
@@ -2043,7 +2043,7 @@ discard block |
||
| 2043 | 2043 | $newobj->timespent_withhour = $obj->task_date_withhour; |
| 2044 | 2044 | $newobj->timespent_duration = $obj->task_duration; |
| 2045 | 2045 | $newobj->timespent_fk_user = $obj->fk_user; |
| 2046 | - $newobj->timespent_thm = $obj->thm; // hourly rate |
|
| 2046 | + $newobj->timespent_thm = $obj->thm; // hourly rate |
|
| 2047 | 2047 | $newobj->timespent_note = $obj->note; |
| 2048 | 2048 | |
| 2049 | 2049 | $arrayres[] = $newobj; |
@@ -2140,14 +2140,14 @@ discard block |
||
| 2140 | 2140 | if ($ret == 1 && (($this->timespent_old_duration != $this->timespent_duration) || getDolGlobalString('TIMESPENT_ALWAYS_UPDATE_THM'))) { |
| 2141 | 2141 | if ($this->timespent_old_duration != $this->timespent_duration) { |
| 2142 | 2142 | // Recalculate amount of time spent for task and update denormalized field |
| 2143 | - $sql = "UPDATE " . MAIN_DB_PREFIX . "projet_task"; |
|
| 2144 | - $sql .= " SET duration_effective = (SELECT SUM(element_duration) FROM " . MAIN_DB_PREFIX . "element_time as ptt where ptt.elementtype = 'task' AND ptt.fk_element = " . ((int) $this->id) . ")"; |
|
| 2143 | + $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task"; |
|
| 2144 | + $sql .= " SET duration_effective = (SELECT SUM(element_duration) FROM ".MAIN_DB_PREFIX."element_time as ptt where ptt.elementtype = 'task' AND ptt.fk_element = ".((int) $this->id).")"; |
|
| 2145 | 2145 | if (isset($this->progress)) { |
| 2146 | - $sql .= ", progress = " . ((float) $this->progress); // Do not overwrite value if not provided |
|
| 2146 | + $sql .= ", progress = ".((float) $this->progress); // Do not overwrite value if not provided |
|
| 2147 | 2147 | } |
| 2148 | - $sql .= " WHERE rowid = " . ((int) $this->id); |
|
| 2148 | + $sql .= " WHERE rowid = ".((int) $this->id); |
|
| 2149 | 2149 | |
| 2150 | - dol_syslog(get_class($this) . "::updateTimeSpent", LOG_DEBUG); |
|
| 2150 | + dol_syslog(get_class($this)."::updateTimeSpent", LOG_DEBUG); |
|
| 2151 | 2151 | if (!$this->db->query($sql)) { |
| 2152 | 2152 | $this->error = $this->db->lasterror(); |
| 2153 | 2153 | $this->db->rollback(); |
@@ -2158,7 +2158,7 @@ discard block |
||
| 2158 | 2158 | // Update hourly rate of this time spent entry, but only if it was not set initially |
| 2159 | 2159 | $res_update = 1; |
| 2160 | 2160 | if (empty($timespent->thm) || getDolGlobalString('TIMESPENT_ALWAYS_UPDATE_THM')) { |
| 2161 | - $resql_thm_user = $this->db->query("SELECT thm FROM " . MAIN_DB_PREFIX . "user WHERE rowid = " . ((int) $timespent->fk_user)); |
|
| 2161 | + $resql_thm_user = $this->db->query("SELECT thm FROM ".MAIN_DB_PREFIX."user WHERE rowid = ".((int) $timespent->fk_user)); |
|
| 2162 | 2162 | if (!empty($resql_thm_user)) { |
| 2163 | 2163 | $obj_thm_user = $this->db->fetch_object($resql_thm_user); |
| 2164 | 2164 | $timespent->thm = $obj_thm_user->thm; |
@@ -2295,8 +2295,8 @@ discard block |
||
| 2295 | 2295 | |
| 2296 | 2296 | $defaultref = ''; |
| 2297 | 2297 | $obj = !getDolGlobalString('PROJECT_TASK_ADDON') ? 'mod_task_simple' : $conf->global->PROJECT_TASK_ADDON; |
| 2298 | - if (getDolGlobalString('PROJECT_TASK_ADDON') && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/" . getDolGlobalString('PROJECT_TASK_ADDON').".php")) { |
|
| 2299 | - require_once DOL_DOCUMENT_ROOT."/core/modules/project/task/" . getDolGlobalString('PROJECT_TASK_ADDON').'.php'; |
|
| 2298 | + if (getDolGlobalString('PROJECT_TASK_ADDON') && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/".getDolGlobalString('PROJECT_TASK_ADDON').".php")) { |
|
| 2299 | + require_once DOL_DOCUMENT_ROOT."/core/modules/project/task/".getDolGlobalString('PROJECT_TASK_ADDON').'.php'; |
|
| 2300 | 2300 | $modTask = new $obj(); |
| 2301 | 2301 | '@phan-var-force ModeleNumRefTask $modTask'; |
| 2302 | 2302 | $defaultref = $modTask->getNextValue(null, $clone_task); |
@@ -2346,7 +2346,7 @@ discard block |
||
| 2346 | 2346 | } |
| 2347 | 2347 | // End |
| 2348 | 2348 | if ($error) { |
| 2349 | - $clone_task_id = 0; // For static tool check |
|
| 2349 | + $clone_task_id = 0; // For static tool check |
|
| 2350 | 2350 | } else { |
| 2351 | 2351 | $clone_task_id = $clone_task->id; |
| 2352 | 2352 | $clone_task_ref = $clone_task->ref; |
@@ -2786,7 +2786,7 @@ discard block |
||
| 2786 | 2786 | global $langs, $hookmanager, $user, $action; |
| 2787 | 2787 | |
| 2788 | 2788 | $error = 0; |
| 2789 | - $task_origin = new Task($this->db); // The thirdparty that we will delete |
|
| 2789 | + $task_origin = new Task($this->db); // The thirdparty that we will delete |
|
| 2790 | 2790 | |
| 2791 | 2791 | dol_syslog("mergeTask merge task id=".$task_origin_id." (will be deleted) into the task id=".$this->id); |
| 2792 | 2792 | |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | if (getDolGlobalString('CONTRACT_ADDON')) { |
| 318 | 318 | $mybool = false; |
| 319 | 319 | |
| 320 | - $file = getDolGlobalString('CONTRACT_ADDON') . ".php"; |
|
| 320 | + $file = getDolGlobalString('CONTRACT_ADDON').".php"; |
|
| 321 | 321 | $classname = getDolGlobalString('CONTRACT_ADDON'); |
| 322 | 322 | |
| 323 | 323 | // Include file with class |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | if ($contratline->statut != ContratLigne::STATUS_OPEN) { |
| 429 | 429 | $contratline->context = $this->context; |
| 430 | 430 | |
| 431 | - $result = $contratline->active_line($user, $date_start, !empty($date_end) ? $date_end : -1, $comment); // This call trigger LINECONTRACT_ACTIVATE |
|
| 431 | + $result = $contratline->active_line($user, $date_start, !empty($date_end) ? $date_end : -1, $comment); // This call trigger LINECONTRACT_ACTIVATE |
|
| 432 | 432 | if ($result < 0) { |
| 433 | 433 | $error++; |
| 434 | 434 | $this->setErrorsFromObject($contratline); |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | // Close lines not already closed |
| 481 | 481 | if ($contratline->statut != ContratLigne::STATUS_CLOSED) { |
| 482 | 482 | $contratline->date_end_real = $now; |
| 483 | - $contratline->date_cloture = $now; // For backward compatibility |
|
| 483 | + $contratline->date_cloture = $now; // For backward compatibility |
|
| 484 | 484 | $contratline->user_closing_id = $user->id; |
| 485 | 485 | $contratline->statut = ContratLigne::STATUS_CLOSED; |
| 486 | 486 | |
@@ -626,7 +626,7 @@ discard block |
||
| 626 | 626 | if (!$error) { |
| 627 | 627 | $this->ref = $num; |
| 628 | 628 | $this->status = self::STATUS_VALIDATED; |
| 629 | - $this->statut = self::STATUS_VALIDATED; // deprecated |
|
| 629 | + $this->statut = self::STATUS_VALIDATED; // deprecated |
|
| 630 | 630 | $this->date_validation = $now; |
| 631 | 631 | } |
| 632 | 632 | } else { |
@@ -902,10 +902,10 @@ discard block |
||
| 902 | 902 | $line->localtax2_tx = $objp->localtax2_tx; |
| 903 | 903 | $line->localtax1_type = $objp->localtax1_type; |
| 904 | 904 | $line->localtax2_type = $objp->localtax2_type; |
| 905 | - $line->subprice = $objp->subprice; |
|
| 905 | + $line->subprice = $objp->subprice; |
|
| 906 | 906 | $line->statut = $objp->status; // For backward compatibility |
| 907 | 907 | $line->status = $objp->status; |
| 908 | - $line->remise_percent = $objp->remise_percent; |
|
| 908 | + $line->remise_percent = $objp->remise_percent; |
|
| 909 | 909 | $line->total_ht = $objp->total_ht; |
| 910 | 910 | $line->total_tva = $objp->total_tva; |
| 911 | 911 | $line->total_localtax1 = $objp->total_localtax1; |
@@ -1417,7 +1417,7 @@ discard block |
||
| 1417 | 1417 | } |
| 1418 | 1418 | |
| 1419 | 1419 | if (!$error) { |
| 1420 | - $result = $this->insertExtraFields(); // This delete and reinsert extrafields |
|
| 1420 | + $result = $this->insertExtraFields(); // This delete and reinsert extrafields |
|
| 1421 | 1421 | if ($result < 0) { |
| 1422 | 1422 | $error++; |
| 1423 | 1423 | } |
@@ -2043,7 +2043,7 @@ discard block |
||
| 2043 | 2043 | } |
| 2044 | 2044 | $datas['customer'] = '<br><b>'.$langs->trans('Customer').':</b> '.$this->thirdparty->getNomUrl(1, '', 0, 1); |
| 2045 | 2045 | } |
| 2046 | - $datas['refcustomer'] = '<br><b>'.$langs->trans('RefCustomer').':</b> '. $this->ref_customer; |
|
| 2046 | + $datas['refcustomer'] = '<br><b>'.$langs->trans('RefCustomer').':</b> '.$this->ref_customer; |
|
| 2047 | 2047 | if (!$nofetch) { |
| 2048 | 2048 | $langs->load('project'); |
| 2049 | 2049 | if (is_null($this->project) || (is_object($this->project) && $this->project->isEmpty())) { |
@@ -2082,7 +2082,7 @@ discard block |
||
| 2082 | 2082 | |
| 2083 | 2083 | $result = ''; |
| 2084 | 2084 | |
| 2085 | - $baseurl = DOL_URL_ROOT . '/contrat/card.php'; |
|
| 2085 | + $baseurl = DOL_URL_ROOT.'/contrat/card.php'; |
|
| 2086 | 2086 | $query = ['id' => $this->id]; |
| 2087 | 2087 | |
| 2088 | 2088 | //if ($option !== 'nolink') |
@@ -2473,7 +2473,7 @@ discard block |
||
| 2473 | 2473 | $this->note_public = 'This is a comment (public)'; |
| 2474 | 2474 | $this->fk_project = 0; |
| 2475 | 2475 | // Lines |
| 2476 | - $nbp = min(1000, GETPOSTINT('nblines') ? GETPOSTINT('nblines') : 5); // We can force the nb of lines to test from command line (but not more than 1000) |
|
| 2476 | + $nbp = min(1000, GETPOSTINT('nblines') ? GETPOSTINT('nblines') : 5); // We can force the nb of lines to test from command line (but not more than 1000) |
|
| 2477 | 2477 | $xnbp = 0; |
| 2478 | 2478 | while ($xnbp < $nbp) { |
| 2479 | 2479 | $line = new ContratLigne($this->db); |
@@ -2519,7 +2519,7 @@ discard block |
||
| 2519 | 2519 | global $user; |
| 2520 | 2520 | |
| 2521 | 2521 | $ticket = new Ticket($this->db); |
| 2522 | - $nbTicket = $ticket->fetchAll($user, 'ASC', 't.datec', 0, 0, 0, array('t.fk_contract' => $this->id)); |
|
| 2522 | + $nbTicket = $ticket->fetchAll($user, 'ASC', 't.datec', 0, 0, 0, array('t.fk_contract' => $this->id)); |
|
| 2523 | 2523 | |
| 2524 | 2524 | return ($nbTicket < 0 ? $nbTicket : $ticket->lines); |
| 2525 | 2525 | } |
@@ -2541,7 +2541,7 @@ discard block |
||
| 2541 | 2541 | global $conf, $langs; |
| 2542 | 2542 | |
| 2543 | 2543 | if (!dol_strlen($modele)) { |
| 2544 | - $modele = ''; // No doc template/generation by default |
|
| 2544 | + $modele = ''; // No doc template/generation by default |
|
| 2545 | 2545 | |
| 2546 | 2546 | if (!empty($this->model_pdf)) { |
| 2547 | 2547 | $modele = $this->model_pdf; |
@@ -2639,14 +2639,14 @@ discard block |
||
| 2639 | 2639 | } |
| 2640 | 2640 | } |
| 2641 | 2641 | |
| 2642 | - if (!getDolGlobalString('CONTRACT_ADDON') || !is_readable(DOL_DOCUMENT_ROOT."/core/modules/contract/" . getDolGlobalString('CONTRACT_ADDON').".php")) { |
|
| 2642 | + if (!getDolGlobalString('CONTRACT_ADDON') || !is_readable(DOL_DOCUMENT_ROOT."/core/modules/contract/".getDolGlobalString('CONTRACT_ADDON').".php")) { |
|
| 2643 | 2643 | $this->error = 'ErrorSetupNotComplete'; |
| 2644 | 2644 | dol_syslog($this->error); |
| 2645 | 2645 | return -1; |
| 2646 | 2646 | } |
| 2647 | 2647 | |
| 2648 | 2648 | // Set ref |
| 2649 | - require_once DOL_DOCUMENT_ROOT."/core/modules/contract/" . getDolGlobalString('CONTRACT_ADDON').'.php'; |
|
| 2649 | + require_once DOL_DOCUMENT_ROOT."/core/modules/contract/".getDolGlobalString('CONTRACT_ADDON').'.php'; |
|
| 2650 | 2650 | $obj = getDolGlobalString('CONTRACT_ADDON'); |
| 2651 | 2651 | $modContract = new $obj(); |
| 2652 | 2652 | '@phan-var-force ModelNumRefContracts $modContract'; |
@@ -2768,7 +2768,7 @@ discard block |
||
| 2768 | 2768 | |
| 2769 | 2769 | // Load contract |
| 2770 | 2770 | $object = new Contrat($this->db); |
| 2771 | - $object->fetch($obj->rowid); // fetch also lines |
|
| 2771 | + $object->fetch($obj->rowid); // fetch also lines |
|
| 2772 | 2772 | |
| 2773 | 2773 | if ($object->id <= 0) { |
| 2774 | 2774 | $error++; |
@@ -2814,7 +2814,7 @@ discard block |
||
| 2814 | 2814 | if ($expirationdate && $expirationdate < $enddatetoscan) { |
| 2815 | 2815 | dol_syslog("Define the newdate of end of services from expirationdate=".$expirationdate); |
| 2816 | 2816 | $newdate = $expirationdate; |
| 2817 | - $protecti = 0; // $protecti is to avoid infinite loop |
|
| 2817 | + $protecti = 0; // $protecti is to avoid infinite loop |
|
| 2818 | 2818 | while ($newdate < $enddatetoscan && $protecti < 1000) { |
| 2819 | 2819 | $newdate = dol_time_plus_duree($newdate, (int) $duration_value, $duration_unit); |
| 2820 | 2820 | $protecti++; |
@@ -2853,21 +2853,21 @@ discard block |
||
| 2853 | 2853 | |
| 2854 | 2854 | // Create an event |
| 2855 | 2855 | $actioncomm = new ActionComm($this->db); |
| 2856 | - $actioncomm->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) |
|
| 2856 | + $actioncomm->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) |
|
| 2857 | 2857 | $actioncomm->code = 'AC_'.$actioncode; |
| 2858 | 2858 | $actioncomm->label = $label; |
| 2859 | 2859 | $actioncomm->datep = $now; |
| 2860 | 2860 | $actioncomm->datef = $now; |
| 2861 | - $actioncomm->percentage = -1; // Not applicable |
|
| 2861 | + $actioncomm->percentage = -1; // Not applicable |
|
| 2862 | 2862 | $actioncomm->socid = $object->socid; |
| 2863 | - $actioncomm->authorid = $user->id; // User saving action |
|
| 2864 | - $actioncomm->userownerid = $user->id; // Owner of action |
|
| 2863 | + $actioncomm->authorid = $user->id; // User saving action |
|
| 2864 | + $actioncomm->userownerid = $user->id; // Owner of action |
|
| 2865 | 2865 | $actioncomm->fk_element = $object->id; |
| 2866 | 2866 | $actioncomm->elementid = $object->id; |
| 2867 | 2867 | $actioncomm->elementtype = 'contract'; |
| 2868 | 2868 | $actioncomm->note_private = $comment; |
| 2869 | 2869 | |
| 2870 | - $ret = $actioncomm->create($user); // User creating action |
|
| 2870 | + $ret = $actioncomm->create($user); // User creating action |
|
| 2871 | 2871 | } else { |
| 2872 | 2872 | $contracterror[$object->id] = $object->ref; |
| 2873 | 2873 | |
@@ -2876,7 +2876,7 @@ discard block |
||
| 2876 | 2876 | $this->error = $this->db->lasterror(); |
| 2877 | 2877 | } |
| 2878 | 2878 | |
| 2879 | - if (! $errorforlocaltransaction) { |
|
| 2879 | + if (!$errorforlocaltransaction) { |
|
| 2880 | 2880 | $this->db->commit(); |
| 2881 | 2881 | } else { |
| 2882 | 2882 | $this->db->rollback(); |
@@ -2934,7 +2934,7 @@ discard block |
||
| 2934 | 2934 | $return .= img_picto('', $this->picto); |
| 2935 | 2935 | $return .= '</span>'; |
| 2936 | 2936 | $return .= '<div class="info-box-content">'; |
| 2937 | - $return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">' . $this->getNomUrl() . '</span>'; |
|
| 2937 | + $return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.$this->getNomUrl().'</span>'; |
|
| 2938 | 2938 | if ($selected >= 0) { |
| 2939 | 2939 | $return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>'; |
| 2940 | 2940 | } |
@@ -41,11 +41,11 @@ discard block |
||
| 41 | 41 | $langs->loadLangs(array("resource", "companies", "other")); |
| 42 | 42 | |
| 43 | 43 | // Get parameters |
| 44 | -$id = GETPOSTINT('id'); |
|
| 44 | +$id = GETPOSTINT('id'); |
|
| 45 | 45 | $action = GETPOST('action', 'alpha'); |
| 46 | 46 | $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) |
| 47 | 47 | $confirm = GETPOST('confirm', 'alpha'); |
| 48 | -$toselect = GETPOST('toselect', 'array:int'); |
|
| 48 | +$toselect = GETPOST('toselect', 'array:int'); |
|
| 49 | 49 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'interventionlist'; |
| 50 | 50 | |
| 51 | 51 | $lineid = GETPOSTINT('lineid'); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $optioncss = GETPOST('optioncss', 'alpha'); |
| 59 | 59 | |
| 60 | 60 | // Initialize context for list |
| 61 | -$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'resourcelist'; |
|
| 61 | +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'resourcelist'; |
|
| 62 | 62 | |
| 63 | 63 | // Initialize a technical objects |
| 64 | 64 | $object = new Dolresource($db); |
@@ -70,18 +70,18 @@ discard block |
||
| 70 | 70 | if (!is_array($search_array_options)) { |
| 71 | 71 | $search_array_options = array(); |
| 72 | 72 | } |
| 73 | -$search_all = trim(GETPOST('search_all', 'alphanohtml')); |
|
| 73 | +$search_all = trim(GETPOST('search_all', 'alphanohtml')); |
|
| 74 | 74 | $search_ref = GETPOST("search_ref", 'alpha'); |
| 75 | 75 | $search_type = GETPOST("search_type", 'alpha'); |
| 76 | -$search_address = GETPOST("search_address", 'alpha'); |
|
| 76 | +$search_address = GETPOST("search_address", 'alpha'); |
|
| 77 | 77 | $search_zip = GETPOST("search_zip", 'alpha'); |
| 78 | 78 | $search_town = GETPOST("search_town", 'alpha'); |
| 79 | 79 | $search_state = GETPOST("search_state", 'alpha'); |
| 80 | -$search_country = GETPOST("search_country", 'alpha'); |
|
| 80 | +$search_country = GETPOST("search_country", 'alpha'); |
|
| 81 | 81 | $search_phone = GETPOST("search_phone", 'alpha'); |
| 82 | 82 | $search_email = GETPOST("search_email", 'alpha'); |
| 83 | -$search_max_users = GETPOST("search_max_users", 'alpha'); |
|
| 84 | -$search_url = GETPOST("search_url", 'alpha'); |
|
| 83 | +$search_max_users = GETPOST("search_max_users", 'alpha'); |
|
| 84 | +$search_url = GETPOST("search_url", 'alpha'); |
|
| 85 | 85 | |
| 86 | 86 | $filter = array(); |
| 87 | 87 | |
@@ -95,9 +95,9 @@ discard block |
||
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | // Load variable for pagination |
| 98 | -$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; |
|
| 98 | +$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; |
|
| 99 | 99 | |
| 100 | -$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page"); |
|
| 100 | +$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page"); |
|
| 101 | 101 | if (empty($page) || $page == -1) { |
| 102 | 102 | $page = 0; |
| 103 | 103 | } // If $page is not defined, or '' or -1 |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | |
| 377 | 377 | // Output page |
| 378 | 378 | |
| 379 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-resource page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
| 379 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-resource page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
| 380 | 380 | |
| 381 | 381 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
| 382 | 382 | |
@@ -63,26 +63,25 @@ discard block |
||
| 63 | 63 | $dolibarr_main_cookie_cryptkey; // This is loaded by filefunc.inc.php |
| 64 | 64 | |
| 65 | 65 | $tmp_instance_unique_id = empty($dolibarr_main_instance_unique_id) ? |
| 66 | - (empty($dolibarr_main_cookie_cryptkey) ? '' : |
|
| 67 | - $dolibarr_main_cookie_cryptkey) : $dolibarr_main_instance_unique_id; |
|
| 66 | + (empty($dolibarr_main_cookie_cryptkey) ? '' : $dolibarr_main_cookie_cryptkey) : $dolibarr_main_instance_unique_id; |
|
| 68 | 67 | // Unique id of instance |
| 69 | 68 | |
| 70 | 69 | // The recommended value (may be not defined for old versions) |
| 71 | 70 | if (!empty($tmp_instance_unique_id)) { |
| 72 | - return sha1('webportal' . $tmp_instance_unique_id); |
|
| 71 | + return sha1('webportal'.$tmp_instance_unique_id); |
|
| 73 | 72 | } else { |
| 74 | - return sha1('webportal' . $_SERVER['SERVER_NAME'].$_SERVER['DOCUMENT_ROOT'].DOL_DOCUMENT_ROOT); |
|
| 73 | + return sha1('webportal'.$_SERVER['SERVER_NAME'].$_SERVER['DOCUMENT_ROOT'].DOL_DOCUMENT_ROOT); |
|
| 75 | 74 | } |
| 76 | 75 | } |
| 77 | 76 | } |
| 78 | 77 | |
| 79 | 78 | include __DIR__.'/../../main.inc.php'; |
| 80 | -require_once DOL_DOCUMENT_ROOT . '/user/class/user.class.php'; |
|
| 81 | -require_once DOL_DOCUMENT_ROOT . '/societe/class/societeaccount.class.php'; |
|
| 82 | -require_once DOL_DOCUMENT_ROOT . '/public/webportal/lib/webportal.lib.php'; |
|
| 83 | -require_once DOL_DOCUMENT_ROOT . '/webportal/class/context.class.php'; |
|
| 84 | -require_once DOL_DOCUMENT_ROOT . '/webportal/class/webportalmember.class.php'; |
|
| 85 | -require_once DOL_DOCUMENT_ROOT . '/webportal/class/webportalpartnership.class.php'; |
|
| 79 | +require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; |
|
| 80 | +require_once DOL_DOCUMENT_ROOT.'/societe/class/societeaccount.class.php'; |
|
| 81 | +require_once DOL_DOCUMENT_ROOT.'/public/webportal/lib/webportal.lib.php'; |
|
| 82 | +require_once DOL_DOCUMENT_ROOT.'/webportal/class/context.class.php'; |
|
| 83 | +require_once DOL_DOCUMENT_ROOT.'/webportal/class/webportalmember.class.php'; |
|
| 84 | +require_once DOL_DOCUMENT_ROOT.'/webportal/class/webportalpartnership.class.php'; |
|
| 86 | 85 | /** |
| 87 | 86 | * @var Conf $conf |
| 88 | 87 | * @var DoliDB $db |
@@ -119,7 +118,7 @@ discard block |
||
| 119 | 118 | |
| 120 | 119 | if (!defined('WEBPORTAL_NOREQUIRETRAN') || (!defined('WEBPORTAL_NOLOGIN') && !empty($context->controllerInstance->accessNeedLoggedUser))) { |
| 121 | 120 | if (!is_object($langs)) { // This can occurs when calling page with NOREQUIRETRAN defined, however we need langs for error messages. |
| 122 | - include_once DOL_DOCUMENT_ROOT . '/core/class/translate.class.php'; |
|
| 121 | + include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php'; |
|
| 123 | 122 | $langs = new Translate("", $conf); |
| 124 | 123 | $langcode = (GETPOST('lang', 'aZ09', 1) ? GETPOST('lang', 'aZ09', 1) : (empty($logged_user->conf->MAIN_LANG_DEFAULT) ? getDolGlobalString('MAIN_LANG_DEFAULT', 'auto') : $logged_user->conf->MAIN_LANG_DEFAULT)); |
| 125 | 124 | if (defined('MAIN_LANG_DEFAULT')) { |
@@ -135,7 +134,7 @@ discard block |
||
| 135 | 134 | */ |
| 136 | 135 | if (getDolGlobalInt('WEBPORTAL_LOGIN_BY_MODULE') && !empty($conf->modules_parts['webportallogin']) && is_array($conf->modules_parts['webportallogin'])) { |
| 137 | 136 | foreach ($conf->modules_parts['webportallogin'] as $module => $file) { |
| 138 | - $path=dol_buildpath("/$module/$file"); |
|
| 137 | + $path = dol_buildpath("/$module/$file"); |
|
| 139 | 138 | include_once $path; |
| 140 | 139 | break; |
| 141 | 140 | } |
@@ -295,7 +294,7 @@ discard block |
||
| 295 | 294 | if (!$error) { |
| 296 | 295 | if ($logged_thirdparty->default_lang != $langs->defaultlang && !defined('WEBPORTAL_NOREQUIRETRAN')) { |
| 297 | 296 | if (!is_object($langs)) { // This can occurs when calling page with NOREQUIRETRAN defined, however we need langs for error messages. |
| 298 | - include_once DOL_DOCUMENT_ROOT . '/core/class/translate.class.php'; |
|
| 297 | + include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php'; |
|
| 299 | 298 | $langs = new Translate("", $conf); |
| 300 | 299 | $langs->setDefaultLang($logged_thirdparty->default_lang); |
| 301 | 300 | } |