@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * \brief Module to show box of members by tags |
26 | 26 | */ |
27 | 27 | |
28 | -include_once DOL_DOCUMENT_ROOT . '/core/boxes/modules_boxes.php'; |
|
28 | +include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; |
|
29 | 29 | |
30 | 30 | |
31 | 31 | /** |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | $this->max = $max; |
86 | 86 | |
87 | - include_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php'; |
|
87 | + include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; |
|
88 | 88 | $staticmember = new Adherent($this->db); |
89 | 89 | |
90 | 90 | $now = dol_now(); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $stats = new AdherentStats($this->db, $user->socid, $user->id); |
100 | 100 | |
101 | 101 | // Show array |
102 | - $sumMembers= $stats->countMembersByTagAndStatus($numberyears); |
|
102 | + $sumMembers = $stats->countMembersByTagAndStatus($numberyears); |
|
103 | 103 | if ($sumMembers) { |
104 | 104 | $line = 0; |
105 | 105 | $this->info_box_contents[$line][] = array( |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $adhtag = new Categorie($this->db); |
153 | 153 | $adhtag->id = $key; |
154 | 154 | |
155 | - if ($key=='total') { |
|
155 | + if ($key == 'total') { |
|
156 | 156 | break; |
157 | 157 | } |
158 | 158 | $adhtag->label = $data['label']; |
@@ -165,32 +165,32 @@ discard block |
||
165 | 165 | ); |
166 | 166 | $this->info_box_contents[$line][] = array( |
167 | 167 | 'td' => 'class="right"', |
168 | - 'text' => (isset($data['members_draft']) && $data['members_draft'] > 0 ? $data['members_draft'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_DRAFT, 1, 0, 3), |
|
168 | + 'text' => (isset($data['members_draft']) && $data['members_draft'] > 0 ? $data['members_draft'] : '').' '.$staticmember->LibStatut(Adherent::STATUS_DRAFT, 1, 0, 3), |
|
169 | 169 | 'asis' => 1, |
170 | 170 | ); |
171 | 171 | $this->info_box_contents[$line][] = array( |
172 | 172 | 'td' => 'class="right"', |
173 | - 'text' => (isset($data['members_pending']) && $data['members_pending'] > 0 ? $data['members_pending'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_VALIDATED, 1, 0, 3), |
|
173 | + 'text' => (isset($data['members_pending']) && $data['members_pending'] > 0 ? $data['members_pending'] : '').' '.$staticmember->LibStatut(Adherent::STATUS_VALIDATED, 1, 0, 3), |
|
174 | 174 | 'asis' => 1, |
175 | 175 | ); |
176 | 176 | $this->info_box_contents[$line][] = array( |
177 | 177 | 'td' => 'class="right"', |
178 | - 'text' => (isset($data['members_uptodate']) && $data['members_uptodate'] > 0 ? $data['members_uptodate'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_VALIDATED, 0, $now + 86400, 3), |
|
178 | + 'text' => (isset($data['members_uptodate']) && $data['members_uptodate'] > 0 ? $data['members_uptodate'] : '').' '.$staticmember->LibStatut(Adherent::STATUS_VALIDATED, 0, $now + 86400, 3), |
|
179 | 179 | 'asis' => 1, |
180 | 180 | ); |
181 | 181 | $this->info_box_contents[$line][] = array( |
182 | 182 | 'td' => 'class="right"', |
183 | - 'text' => (isset($data['members_expired']) && $data['members_expired'] > 0 ? $data['members_expired'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_VALIDATED, 1, $now - 86400, 3), |
|
183 | + 'text' => (isset($data['members_expired']) && $data['members_expired'] > 0 ? $data['members_expired'] : '').' '.$staticmember->LibStatut(Adherent::STATUS_VALIDATED, 1, $now - 86400, 3), |
|
184 | 184 | 'asis' => 1, |
185 | 185 | ); |
186 | 186 | $this->info_box_contents[$line][] = array( |
187 | 187 | 'td' => 'class="right"', |
188 | - 'text' => (isset($data['members_excluded']) && $data['members_excluded'] > 0 ? $data['members_excluded'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_EXCLUDED, 1, $now, 3), |
|
188 | + 'text' => (isset($data['members_excluded']) && $data['members_excluded'] > 0 ? $data['members_excluded'] : '').' '.$staticmember->LibStatut(Adherent::STATUS_EXCLUDED, 1, $now, 3), |
|
189 | 189 | 'asis' => 1, |
190 | 190 | ); |
191 | 191 | $this->info_box_contents[$line][] = array( |
192 | 192 | 'td' => 'class="right"', |
193 | - 'text' => (isset($data['members_resiliated']) && $data['members_resiliated'] > 0 ? $data['members_resiliated'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_RESILIATED, 1, 0, 3), |
|
193 | + 'text' => (isset($data['members_resiliated']) && $data['members_resiliated'] > 0 ? $data['members_resiliated'] : '').' '.$staticmember->LibStatut(Adherent::STATUS_RESILIATED, 1, 0, 3), |
|
194 | 194 | 'asis' => 1, |
195 | 195 | ); |
196 | 196 | $this->info_box_contents[$line][] = array( |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * \brief Widget of scheduled jobs |
25 | 25 | */ |
26 | 26 | |
27 | -include_once DOL_DOCUMENT_ROOT . '/core/boxes/modules_boxes.php'; |
|
27 | +include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; |
|
28 | 28 | |
29 | 29 | |
30 | 30 | /** |
@@ -80,14 +80,14 @@ discard block |
||
80 | 80 | $this->info_box_head = array('text' => $langs->trans("BoxScheduledJobs", $max)); |
81 | 81 | |
82 | 82 | if ($user->hasRight('cron', 'read')) { |
83 | - include_once DOL_DOCUMENT_ROOT . '/cron/class/cronjob.class.php'; |
|
83 | + include_once DOL_DOCUMENT_ROOT.'/cron/class/cronjob.class.php'; |
|
84 | 84 | $cronstatic = new Cronjob($this->db); |
85 | 85 | $resultarray = array(); |
86 | 86 | |
87 | 87 | $result = 0; |
88 | 88 | $sql = "SELECT t.rowid, t.datelastrun, t.datenextrun, t.datestart,"; |
89 | 89 | $sql .= " t.label, t.status, t.test, t.lastresult, t.processing"; |
90 | - $sql .= " FROM " . MAIN_DB_PREFIX . "cronjob as t"; |
|
90 | + $sql .= " FROM ".MAIN_DB_PREFIX."cronjob as t"; |
|
91 | 91 | $sql .= " WHERE status <> ".$cronstatic::STATUS_DISABLED; |
92 | 92 | $sql .= " AND entity IN (0, ".$conf->entity.")"; |
93 | 93 | $sql .= $this->db->order("t.datelastrun", "DESC"); |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | $this->info_box_contents[0][0] = array( |
193 | 193 | 'td' => '', |
194 | 194 | 'maxlength' => 500, |
195 | - 'text' => ($this->db->lasterror() . ' sql=' . $sql) |
|
195 | + 'text' => ($this->db->lasterror().' sql='.$sql) |
|
196 | 196 | ); |
197 | 197 | } |
198 | 198 | } else { |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * \brief Module Dolibarr state base |
25 | 25 | */ |
26 | 26 | |
27 | -include_once DOL_DOCUMENT_ROOT . '/core/boxes/modules_boxes.php'; |
|
27 | +include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; |
|
28 | 28 | |
29 | 29 | |
30 | 30 | /** |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $hookmanager->initHooks(array('index')); |
81 | 81 | $object = new stdClass(); |
82 | 82 | $action = ''; |
83 | - $parameters =array(); |
|
83 | + $parameters = array(); |
|
84 | 84 | $hookmanager->executeHooks('addStatisticLine', $parameters, $object, $action); |
85 | 85 | $boxstatItems = array(); |
86 | 86 | $boxstatFromHook = ''; |
@@ -164,52 +164,52 @@ discard block |
||
164 | 164 | 'dolresource' => 'Dolresource' |
165 | 165 | ); |
166 | 166 | $includes = array( |
167 | - 'users' => DOL_DOCUMENT_ROOT . "/user/class/user.class.php", |
|
168 | - 'members' => DOL_DOCUMENT_ROOT . "/adherents/class/adherent.class.php", |
|
169 | - 'customers' => DOL_DOCUMENT_ROOT . "/societe/class/client.class.php", |
|
170 | - 'prospects' => DOL_DOCUMENT_ROOT . "/societe/class/client.class.php", |
|
171 | - 'suppliers' => DOL_DOCUMENT_ROOT . "/fourn/class/fournisseur.class.php", |
|
172 | - 'contacts' => DOL_DOCUMENT_ROOT . "/contact/class/contact.class.php", |
|
173 | - 'products' => DOL_DOCUMENT_ROOT . "/product/class/product.class.php", |
|
174 | - 'services' => DOL_DOCUMENT_ROOT . "/product/class/product.class.php", |
|
175 | - 'proposals' => DOL_DOCUMENT_ROOT . "/comm/propal/class/propal.class.php", |
|
176 | - 'orders' => DOL_DOCUMENT_ROOT . "/commande/class/commande.class.php", |
|
177 | - 'invoices' => DOL_DOCUMENT_ROOT . "/compta/facture/class/facture.class.php", |
|
178 | - 'donations' => DOL_DOCUMENT_ROOT . "/don/class/don.class.php", |
|
179 | - 'contracts' => DOL_DOCUMENT_ROOT . "/contrat/class/contrat.class.php", |
|
180 | - 'interventions' => DOL_DOCUMENT_ROOT . "/fichinter/class/fichinter.class.php", |
|
181 | - 'supplier_orders' => DOL_DOCUMENT_ROOT . "/fourn/class/fournisseur.commande.class.php", |
|
182 | - 'supplier_invoices' => DOL_DOCUMENT_ROOT . "/fourn/class/fournisseur.facture.class.php", |
|
183 | - 'supplier_proposals' => DOL_DOCUMENT_ROOT . "/supplier_proposal/class/supplier_proposal.class.php", |
|
184 | - 'projects' => DOL_DOCUMENT_ROOT . "/projet/class/project.class.php", |
|
185 | - 'expensereports' => DOL_DOCUMENT_ROOT . "/expensereport/class/expensereport.class.php", |
|
186 | - 'holidays' => DOL_DOCUMENT_ROOT . "/holiday/class/holiday.class.php", |
|
187 | - 'ticket' => DOL_DOCUMENT_ROOT . "/ticket/class/ticket.class.php", |
|
188 | - 'dolresource' => DOL_DOCUMENT_ROOT . "/resource/class/dolresource.class.php" |
|
167 | + 'users' => DOL_DOCUMENT_ROOT."/user/class/user.class.php", |
|
168 | + 'members' => DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php", |
|
169 | + 'customers' => DOL_DOCUMENT_ROOT."/societe/class/client.class.php", |
|
170 | + 'prospects' => DOL_DOCUMENT_ROOT."/societe/class/client.class.php", |
|
171 | + 'suppliers' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.class.php", |
|
172 | + 'contacts' => DOL_DOCUMENT_ROOT."/contact/class/contact.class.php", |
|
173 | + 'products' => DOL_DOCUMENT_ROOT."/product/class/product.class.php", |
|
174 | + 'services' => DOL_DOCUMENT_ROOT."/product/class/product.class.php", |
|
175 | + 'proposals' => DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php", |
|
176 | + 'orders' => DOL_DOCUMENT_ROOT."/commande/class/commande.class.php", |
|
177 | + 'invoices' => DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php", |
|
178 | + 'donations' => DOL_DOCUMENT_ROOT."/don/class/don.class.php", |
|
179 | + 'contracts' => DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php", |
|
180 | + 'interventions' => DOL_DOCUMENT_ROOT."/fichinter/class/fichinter.class.php", |
|
181 | + 'supplier_orders' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.commande.class.php", |
|
182 | + 'supplier_invoices' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.facture.class.php", |
|
183 | + 'supplier_proposals' => DOL_DOCUMENT_ROOT."/supplier_proposal/class/supplier_proposal.class.php", |
|
184 | + 'projects' => DOL_DOCUMENT_ROOT."/projet/class/project.class.php", |
|
185 | + 'expensereports' => DOL_DOCUMENT_ROOT."/expensereport/class/expensereport.class.php", |
|
186 | + 'holidays' => DOL_DOCUMENT_ROOT."/holiday/class/holiday.class.php", |
|
187 | + 'ticket' => DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php", |
|
188 | + 'dolresource' => DOL_DOCUMENT_ROOT."/resource/class/dolresource.class.php" |
|
189 | 189 | ); |
190 | 190 | $links = array( |
191 | - 'users' => DOL_URL_ROOT . '/user/list.php', |
|
192 | - 'members' => DOL_URL_ROOT . '/adherents/list.php?statut=1&mainmenu=members', |
|
193 | - 'customers' => DOL_URL_ROOT . '/societe/list.php?type=c&mainmenu=companies', |
|
194 | - 'prospects' => DOL_URL_ROOT . '/societe/list.php?type=p&mainmenu=companies', |
|
195 | - 'suppliers' => DOL_URL_ROOT . '/societe/list.php?type=f&mainmenu=companies', |
|
196 | - 'contacts' => DOL_URL_ROOT . '/contact/list.php?mainmenu=companies', |
|
197 | - 'products' => DOL_URL_ROOT . '/product/list.php?type=0&mainmenu=products', |
|
198 | - 'services' => DOL_URL_ROOT . '/product/list.php?type=1&mainmenu=products', |
|
199 | - 'proposals' => DOL_URL_ROOT . '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals', |
|
200 | - 'orders' => DOL_URL_ROOT . '/commande/list.php?mainmenu=commercial&leftmenu=orders', |
|
201 | - 'invoices' => DOL_URL_ROOT . '/compta/facture/list.php?mainmenu=billing&leftmenu=customers_bills', |
|
202 | - 'donations' => DOL_URL_ROOT . '/don/list.php?leftmenu=donations', |
|
203 | - 'contracts' => DOL_URL_ROOT . '/contrat/list.php?mainmenu=commercial&leftmenu=contracts', |
|
204 | - 'interventions' => DOL_URL_ROOT . '/fichinter/list.php?mainmenu=commercial&leftmenu=ficheinter', |
|
205 | - 'supplier_orders' => DOL_URL_ROOT . '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers', |
|
206 | - 'supplier_invoices' => DOL_URL_ROOT . '/fourn/facture/list.php?mainmenu=billing&leftmenu=suppliers_bills', |
|
207 | - 'supplier_proposals' => DOL_URL_ROOT . '/supplier_proposal/list.php?mainmenu=commercial&leftmenu=', |
|
208 | - 'projects' => DOL_URL_ROOT . '/projet/list.php?mainmenu=project', |
|
209 | - 'expensereports' => DOL_URL_ROOT . '/expensereport/list.php?mainmenu=hrm&leftmenu=expensereport', |
|
210 | - 'holidays' => DOL_URL_ROOT . '/holiday/list.php?mainmenu=hrm&leftmenu=holiday', |
|
211 | - 'ticket' => DOL_URL_ROOT . '/ticket/list.php?leftmenu=ticket', |
|
212 | - 'dolresource' => DOL_URL_ROOT . '/resource/list.php?mainmenu=agenda', |
|
191 | + 'users' => DOL_URL_ROOT.'/user/list.php', |
|
192 | + 'members' => DOL_URL_ROOT.'/adherents/list.php?statut=1&mainmenu=members', |
|
193 | + 'customers' => DOL_URL_ROOT.'/societe/list.php?type=c&mainmenu=companies', |
|
194 | + 'prospects' => DOL_URL_ROOT.'/societe/list.php?type=p&mainmenu=companies', |
|
195 | + 'suppliers' => DOL_URL_ROOT.'/societe/list.php?type=f&mainmenu=companies', |
|
196 | + 'contacts' => DOL_URL_ROOT.'/contact/list.php?mainmenu=companies', |
|
197 | + 'products' => DOL_URL_ROOT.'/product/list.php?type=0&mainmenu=products', |
|
198 | + 'services' => DOL_URL_ROOT.'/product/list.php?type=1&mainmenu=products', |
|
199 | + 'proposals' => DOL_URL_ROOT.'/comm/propal/list.php?mainmenu=commercial&leftmenu=propals', |
|
200 | + 'orders' => DOL_URL_ROOT.'/commande/list.php?mainmenu=commercial&leftmenu=orders', |
|
201 | + 'invoices' => DOL_URL_ROOT.'/compta/facture/list.php?mainmenu=billing&leftmenu=customers_bills', |
|
202 | + 'donations' => DOL_URL_ROOT.'/don/list.php?leftmenu=donations', |
|
203 | + 'contracts' => DOL_URL_ROOT.'/contrat/list.php?mainmenu=commercial&leftmenu=contracts', |
|
204 | + 'interventions' => DOL_URL_ROOT.'/fichinter/list.php?mainmenu=commercial&leftmenu=ficheinter', |
|
205 | + 'supplier_orders' => DOL_URL_ROOT.'/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers', |
|
206 | + 'supplier_invoices' => DOL_URL_ROOT.'/fourn/facture/list.php?mainmenu=billing&leftmenu=suppliers_bills', |
|
207 | + 'supplier_proposals' => DOL_URL_ROOT.'/supplier_proposal/list.php?mainmenu=commercial&leftmenu=', |
|
208 | + 'projects' => DOL_URL_ROOT.'/projet/list.php?mainmenu=project', |
|
209 | + 'expensereports' => DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&leftmenu=expensereport', |
|
210 | + 'holidays' => DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm&leftmenu=holiday', |
|
211 | + 'ticket' => DOL_URL_ROOT.'/ticket/list.php?leftmenu=ticket', |
|
212 | + 'dolresource' => DOL_URL_ROOT.'/resource/list.php?mainmenu=agenda', |
|
213 | 213 | ); |
214 | 214 | $titres = array( |
215 | 215 | 'users' => "Users", |
@@ -272,10 +272,10 @@ discard block |
||
272 | 272 | $langs->load(empty($langfile[$val]) ? $val : $langfile[$val]); |
273 | 273 | |
274 | 274 | $text = $langs->trans($titres[$val]); |
275 | - $boxstatItem .= '<a href="' . $links[$val] . '" class="boxstatsindicator thumbstat nobold nounderline">'; |
|
275 | + $boxstatItem .= '<a href="'.$links[$val].'" class="boxstatsindicator thumbstat nobold nounderline">'; |
|
276 | 276 | $boxstatItem .= '<div class="boxstats">'; |
277 | - $boxstatItem .= '<span class="boxstatstext" title="' . dol_escape_htmltag($text) . '">' . $text . '</span><br>'; |
|
278 | - $boxstatItem .= '<span class="boxstatsindicator">' . img_object("", $board->picto, 'class="inline-block"') . ' ' . (!empty($board->nb[$val]) ? $board->nb[$val] : 0) . '</span>'; |
|
277 | + $boxstatItem .= '<span class="boxstatstext" title="'.dol_escape_htmltag($text).'">'.$text.'</span><br>'; |
|
278 | + $boxstatItem .= '<span class="boxstatsindicator">'.img_object("", $board->picto, 'class="inline-block"').' '.(!empty($board->nb[$val]) ? $board->nb[$val] : 0).'</span>'; |
|
279 | 279 | $boxstatItem .= '</div>'; |
280 | 280 | $boxstatItem .= '</a>'; |
281 | 281 |
@@ -102,7 +102,7 @@ |
||
102 | 102 | $sql .= " AND u.statut = ".User::STATUS_ENABLED; |
103 | 103 | $sql .= dolSqlDateFilter('u.dateemployment', 0, $tmparray['mon'], 0); |
104 | 104 | $sql .= " AND u.dateemployment < '".$this->db->idate(dol_get_first_day($tmparray['year']))."'"; |
105 | - $sql .= " ORDER BY daya ASC"; // We want to have date of the month sorted by the day without taking into consideration the year |
|
105 | + $sql .= " ORDER BY daya ASC"; // We want to have date of the month sorted by the day without taking into consideration the year |
|
106 | 106 | $sql .= $this->db->plimit($max, 0); |
107 | 107 | |
108 | 108 | dol_syslog(get_class($this)."::loadBox", LOG_DEBUG); |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | } |
161 | 161 | } else { |
162 | 162 | dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO user not found for '".$usertotest."'", LOG_NOTICE); |
163 | - sleep(1); // Anti brut force protection. Must be same delay when password is not valid |
|
163 | + sleep(1); // Anti brut force protection. Must be same delay when password is not valid |
|
164 | 164 | |
165 | 165 | // Load translation files required by the page |
166 | 166 | $langs->loadLangs(array('main', 'errors')); |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | } |
175 | 175 | } else { |
176 | 176 | dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO Too many attempts", LOG_NOTICE); |
177 | - sleep(1); // Anti brut force protection. Must be same delay when password is not valid |
|
177 | + sleep(1); // Anti brut force protection. Must be same delay when password is not valid |
|
178 | 178 | // Load translation files required by the page |
179 | 179 | $langs->loadLangs(array('main', 'errors')); |
180 | 180 | $_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorTooManyAttempts"); |
@@ -75,12 +75,12 @@ |
||
75 | 75 | //global $dolibarr_main_url_root; |
76 | 76 | //$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); |
77 | 77 | //$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file |
78 | - $urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current |
|
78 | + $urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than current |
|
79 | 79 | |
80 | 80 | //$shortscope = 'userinfo_email,userinfo_profile'; |
81 | - $shortscope = 'openid,email,profile'; // For openid connect |
|
81 | + $shortscope = 'openid,email,profile'; // For openid connect |
|
82 | 82 | |
83 | - $oauthstateanticsrf = bin2hex(random_bytes(128/8)); |
|
83 | + $oauthstateanticsrf = bin2hex(random_bytes(128 / 8)); |
|
84 | 84 | $_SESSION['oauthstateanticsrf'] = $shortscope.'-'.$oauthstateanticsrf; |
85 | 85 | |
86 | 86 | $url = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?shortscope='.urlencode($shortscope).'&state='.urlencode('forlogin-'.$shortscope.'-'.$oauthstateanticsrf).'&username='.urlencode($usertotest); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | // Object card |
119 | 119 | // ------------------------------------------------------------ |
120 | - $linkback = '<a href="' . dol_buildpath('/asset/asset_list.php', 1) . '?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
120 | + $linkback = '<a href="'.dol_buildpath('/asset/asset_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
|
121 | 121 | |
122 | 122 | $morehtmlref = '<div class="refidno">'; |
123 | 123 | $morehtmlref .= '</div>'; |
@@ -130,10 +130,10 @@ discard block |
||
130 | 130 | print '<table class="border centpercent tableforfield">'; |
131 | 131 | |
132 | 132 | // Number of files |
133 | - print '<tr><td class="titlefield">' . $langs->trans("NbOfAttachedFiles") . '</td><td colspan="3">' . count($filearray) . '</td></tr>'; |
|
133 | + print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>'; |
|
134 | 134 | |
135 | 135 | // Total size |
136 | - print '<tr><td>' . $langs->trans("TotalSizeOfAttachedFiles") . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans("bytes") . '</td></tr>'; |
|
136 | + print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>'; |
|
137 | 137 | |
138 | 138 | print '</table>'; |
139 | 139 | |
@@ -146,12 +146,12 @@ discard block |
||
146 | 146 | // $permissiontoadd = 1; |
147 | 147 | $permtoedit = $user->hasRight('asset', 'write'); |
148 | 148 | // $permtoedit = 1; |
149 | - $param = '&id=' . $object->id; |
|
149 | + $param = '&id='.$object->id; |
|
150 | 150 | |
151 | 151 | //$relativepathwithnofile='asset/' . dol_sanitizeFileName($object->id).'/'; |
152 | - $relativepathwithnofile = dol_sanitizeFileName($object->ref) . '/'; |
|
152 | + $relativepathwithnofile = dol_sanitizeFileName($object->ref).'/'; |
|
153 | 153 | |
154 | - include DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; |
|
154 | + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; |
|
155 | 155 | } else { |
156 | 156 | accessforbidden('', 0, 1); |
157 | 157 | } |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | |
25 | 25 | // Load Dolibarr environment |
26 | 26 | require '../main.inc.php'; |
27 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/asset.lib.php'; |
|
28 | -require_once DOL_DOCUMENT_ROOT . '/asset/class/asset.class.php'; |
|
29 | -require_once DOL_DOCUMENT_ROOT . '/asset/class/assetaccountancycodes.class.php'; |
|
27 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php'; |
|
28 | +require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php'; |
|
29 | +require_once DOL_DOCUMENT_ROOT.'/asset/class/assetaccountancycodes.class.php'; |
|
30 | 30 | |
31 | 31 | // Load translation files required by the page |
32 | 32 | $langs->loadLangs(array("assets", "companies")); |
@@ -42,15 +42,15 @@ discard block |
||
42 | 42 | $object = new Asset($db); |
43 | 43 | $assetaccountancycodes = new AssetAccountancyCodes($db); |
44 | 44 | $extrafields = new ExtraFields($db); |
45 | -$diroutputmassaction = $conf->asset->dir_output . '/temp/massgeneration/' . $user->id; |
|
45 | +$diroutputmassaction = $conf->asset->dir_output.'/temp/massgeneration/'.$user->id; |
|
46 | 46 | $hookmanager->initHooks(array('assetaccountancycodes', 'globalcard')); // Note that conf->hooks_modules contains array |
47 | 47 | // Fetch optionals attributes and labels |
48 | 48 | $extrafields->fetch_name_optionals_label($object->table_element); |
49 | 49 | |
50 | 50 | // Load object |
51 | -include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals |
|
51 | +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals |
|
52 | 52 | if ($id > 0 || !empty($ref)) { |
53 | - $upload_dir = $conf->asset->multidir_output[$object->entity] . "/" . $object->id; |
|
53 | + $upload_dir = $conf->asset->multidir_output[$object->entity]."/".$object->id; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | $permissiontoadd = $user->hasRight('asset', 'write'); // Used by the include of actions_addupdatedelete.inc.php |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | $action = 'edit'; |
110 | 110 | } else { |
111 | 111 | setEventMessage($langs->trans('RecordSaved')); |
112 | - header("Location: " . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
112 | + header("Location: ".$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
113 | 113 | exit; |
114 | 114 | } |
115 | 115 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | |
132 | 132 | // Object card |
133 | 133 | // ------------------------------------------------------------ |
134 | - $linkback = '<a href="' . DOL_URL_ROOT . '/asset/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
134 | + $linkback = '<a href="'.DOL_URL_ROOT.'/asset/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
|
135 | 135 | |
136 | 136 | $morehtmlref = '<div class="refidno">'; |
137 | 137 | $morehtmlref .= '</div>'; |
@@ -143,19 +143,19 @@ discard block |
||
143 | 143 | print '</div>'; |
144 | 144 | |
145 | 145 | if ($action == 'edit') { |
146 | - print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '">'; |
|
147 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
146 | + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">'; |
|
147 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
148 | 148 | print '<input type="hidden" name="action" value="update">'; |
149 | 149 | if ($backtopage) { |
150 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
150 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
151 | 151 | } |
152 | 152 | if ($backtopageforcancel) { |
153 | - print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">'; |
|
153 | + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | print dol_get_fiche_head(array(), ''); |
157 | 157 | |
158 | - include DOL_DOCUMENT_ROOT . '/asset/tpl/accountancy_codes_edit.tpl.php'; |
|
158 | + include DOL_DOCUMENT_ROOT.'/asset/tpl/accountancy_codes_edit.tpl.php'; |
|
159 | 159 | |
160 | 160 | print dol_get_fiche_end(); |
161 | 161 | |
@@ -163,13 +163,13 @@ discard block |
||
163 | 163 | |
164 | 164 | print '</form>'; |
165 | 165 | } else { |
166 | - include DOL_DOCUMENT_ROOT . '/asset/tpl/accountancy_codes_view.tpl.php'; |
|
166 | + include DOL_DOCUMENT_ROOT.'/asset/tpl/accountancy_codes_view.tpl.php'; |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | print dol_get_fiche_end(); |
170 | 170 | |
171 | 171 | if ($action != 'edit') { |
172 | - print '<div class="tabsAction">' . "\n"; |
|
172 | + print '<div class="tabsAction">'."\n"; |
|
173 | 173 | $parameters = array(); |
174 | 174 | $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
175 | 175 | if ($reshook < 0) { |
@@ -178,10 +178,10 @@ discard block |
||
178 | 178 | |
179 | 179 | if (empty($reshook)) { |
180 | 180 | if ($object->status == $object::STATUS_DRAFT/* && !empty($object->enabled_modes)*/) { |
181 | - print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=edit&token=' . newToken(), '', $permissiontoadd); |
|
181 | + print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd); |
|
182 | 182 | } |
183 | 183 | } |
184 | - print '</div>' . "\n"; |
|
184 | + print '</div>'."\n"; |
|
185 | 185 | } |
186 | 186 | } |
187 | 187 |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | |
25 | 25 | // Load Dolibarr environment |
26 | 26 | require '../main.inc.php'; |
27 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/asset.lib.php'; |
|
28 | -require_once DOL_DOCUMENT_ROOT . '/asset/class/asset.class.php'; |
|
29 | -require_once DOL_DOCUMENT_ROOT . '/asset/class/assetdepreciationoptions.class.php'; |
|
27 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php'; |
|
28 | +require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php'; |
|
29 | +require_once DOL_DOCUMENT_ROOT.'/asset/class/assetdepreciationoptions.class.php'; |
|
30 | 30 | |
31 | 31 | // Load translation files required by the page |
32 | 32 | $langs->loadLangs(array("assets", "companies")); |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | $extrafields->fetch_name_optionals_label($object->table_element); |
49 | 49 | |
50 | 50 | // Load object |
51 | -include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals |
|
51 | +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals |
|
52 | 52 | if ($id > 0 || !empty($ref)) { |
53 | - $upload_dir = $conf->asset->multidir_output[$object->entity] . "/" . $object->id; |
|
53 | + $upload_dir = $conf->asset->multidir_output[$object->entity]."/".$object->id; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | $permissiontoadd = $user->hasRight('asset', 'write'); // Used by the include of actions_addupdatedelete.inc.php |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $action = 'edit'; |
112 | 112 | } else { |
113 | 113 | setEventMessage($langs->trans('RecordSaved')); |
114 | - header("Location: " . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
114 | + header("Location: ".$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
115 | 115 | exit; |
116 | 116 | } |
117 | 117 | } |
@@ -145,19 +145,19 @@ discard block |
||
145 | 145 | print '</div>'; |
146 | 146 | |
147 | 147 | if ($action == 'edit') { |
148 | - print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '">'; |
|
149 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
148 | + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">'; |
|
149 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
150 | 150 | print '<input type="hidden" name="action" value="update">'; |
151 | 151 | if ($backtopage) { |
152 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
152 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
153 | 153 | } |
154 | 154 | if ($backtopageforcancel) { |
155 | - print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">'; |
|
155 | + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | print dol_get_fiche_head(array(), ''); |
159 | 159 | |
160 | - include DOL_DOCUMENT_ROOT . '/asset/tpl/depreciation_options_edit.tpl.php'; |
|
160 | + include DOL_DOCUMENT_ROOT.'/asset/tpl/depreciation_options_edit.tpl.php'; |
|
161 | 161 | |
162 | 162 | print dol_get_fiche_end(); |
163 | 163 | |
@@ -165,13 +165,13 @@ discard block |
||
165 | 165 | |
166 | 166 | print '</form>'; |
167 | 167 | } else { |
168 | - include DOL_DOCUMENT_ROOT . '/asset/tpl/depreciation_options_view.tpl.php'; |
|
168 | + include DOL_DOCUMENT_ROOT.'/asset/tpl/depreciation_options_view.tpl.php'; |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | print dol_get_fiche_end(); |
172 | 172 | |
173 | 173 | if ($action != 'edit') { |
174 | - print '<div class="tabsAction">' . "\n"; |
|
174 | + print '<div class="tabsAction">'."\n"; |
|
175 | 175 | $parameters = array(); |
176 | 176 | $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
177 | 177 | if ($reshook < 0) { |
@@ -180,10 +180,10 @@ discard block |
||
180 | 180 | |
181 | 181 | if (empty($reshook)) { |
182 | 182 | if ($object->status == $object::STATUS_DRAFT/* && !empty($object->enabled_modes)*/) { |
183 | - print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=edit&token=' . newToken(), '', $permissiontoadd); |
|
183 | + print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd); |
|
184 | 184 | } |
185 | 185 | } |
186 | - print '</div>' . "\n"; |
|
186 | + print '</div>'."\n"; |
|
187 | 187 | } |
188 | 188 | } |
189 | 189 |