@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | } |
189 | 189 | |
190 | 190 | |
191 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
191 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
192 | 192 | /** |
193 | 193 | * Clean sensible object datas |
194 | 194 | * |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | */ |
198 | 198 | protected function _cleanObjectDatas($object) |
199 | 199 | { |
200 | - // phpcs:enable |
|
200 | + // phpcs:enable |
|
201 | 201 | $object = parent::_cleanObjectDatas($object); |
202 | 202 | |
203 | 203 | unset($object->name); |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | } |
229 | 229 | |
230 | 230 | // Number of supplier proposals open (expired) |
231 | - if (isModEnabled('supplier_proposal') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('supplier_proposal', 'lire')) { |
|
231 | + if (isModEnabled('supplier_proposal') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('supplier_proposal', 'lire')) { |
|
232 | 232 | $langs->load("supplier_proposal"); |
233 | 233 | $board = new SupplierProposal($db); |
234 | 234 | $dashboardlines[$board->element . '_opened'] = $board->load_board($user, "opened"); |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | } |
238 | 238 | |
239 | 239 | // Number of sales orders |
240 | - if (isModEnabled('order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight('commande', 'lire')) { |
|
240 | + if (isModEnabled('order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight('commande', 'lire')) { |
|
241 | 241 | $board = new Commande($db); |
242 | 242 | // Number of customer orders to be shipped (validated and in progress) |
243 | 243 | $dashboardlines[$board->element . '_toship'] = $board->load_board($user, 'toship'); |
@@ -250,14 +250,14 @@ discard block |
||
250 | 250 | } |
251 | 251 | |
252 | 252 | // Number of suppliers orders |
253 | - if (isModEnabled('supplier_order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('fournisseur', 'commande', 'lire')) { |
|
253 | + if (isModEnabled('supplier_order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('fournisseur', 'commande', 'lire')) { |
|
254 | 254 | $board = new CommandeFournisseur($db); |
255 | 255 | $dashboardlines[$board->element . '_opened'] = $board->load_board($user, "opened"); |
256 | 256 | $dashboardlines[$board->element . '_awaiting'] = $board->load_board($user, 'awaiting'); |
257 | 257 | } |
258 | 258 | |
259 | 259 | // Number of contract / services enabled (delayed) |
260 | - if (isModEnabled('contract') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CONTRACT') && $user->hasRight('contrat', 'lire')) { |
|
260 | + if (isModEnabled('contract') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CONTRACT') && $user->hasRight('contrat', 'lire')) { |
|
261 | 261 | $board = new Contrat($db); |
262 | 262 | $dashboardlines[$board->element . '_inactive'] = $board->load_board($user, "inactive"); |
263 | 263 | // Number of active services (expired) |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | } |
266 | 266 | |
267 | 267 | // Number of tickets open |
268 | - if (isModEnabled('ticket') && !getDolGlobalString('MAIN_DISABLE_BLOCK_TICKET') && $user->hasRight('ticket', 'read')) { |
|
268 | + if (isModEnabled('ticket') && !getDolGlobalString('MAIN_DISABLE_BLOCK_TICKET') && $user->hasRight('ticket', 'read')) { |
|
269 | 269 | $board = new Ticket($db); |
270 | 270 | $dashboardlines[$board->element . '_opened'] = $board->load_board($user, "opened"); |
271 | 271 | // Number of active services (expired) |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | } |
286 | 286 | |
287 | 287 | // Number of transactions to conciliate |
288 | - if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) { |
|
288 | + if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) { |
|
289 | 289 | $board = new Account($db); |
290 | 290 | $nb = $board->countAccountToReconcile(); // Get nb of account to reconciliate |
291 | 291 | if ($nb > 0) { |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | |
296 | 296 | |
297 | 297 | // Number of cheque to send |
298 | - if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) { |
|
298 | + if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) { |
|
299 | 299 | if (!getDolGlobalString('BANK_DISABLE_CHECK_DEPOSIT')) { |
300 | 300 | $board = new RemiseCheque($db); |
301 | 301 | $dashboardlines[$board->element] = $board->load_board($user); |
@@ -311,26 +311,26 @@ discard block |
||
311 | 311 | } |
312 | 312 | |
313 | 313 | // Number of foundation members |
314 | - if (isModEnabled('member') && !getDolGlobalString('MAIN_DISABLE_BLOCK_ADHERENT') && $user->hasRight('adherent', 'lire') && !$user->socid) { |
|
314 | + if (isModEnabled('member') && !getDolGlobalString('MAIN_DISABLE_BLOCK_ADHERENT') && $user->hasRight('adherent', 'lire') && !$user->socid) { |
|
315 | 315 | $board = new Adherent($db); |
316 | 316 | $dashboardlines[$board->element . '_shift'] = $board->load_board($user, 'shift'); |
317 | 317 | $dashboardlines[$board->element . '_expired'] = $board->load_board($user, 'expired'); |
318 | 318 | } |
319 | 319 | |
320 | 320 | // Number of expense reports to approve |
321 | - if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'approve')) { |
|
321 | + if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'approve')) { |
|
322 | 322 | $board = new ExpenseReport($db); |
323 | 323 | $dashboardlines[$board->element . '_toapprove'] = $board->load_board($user, 'toapprove'); |
324 | 324 | } |
325 | 325 | |
326 | 326 | // Number of expense reports to pay |
327 | - if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'to_paid')) { |
|
327 | + if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'to_paid')) { |
|
328 | 328 | $board = new ExpenseReport($db); |
329 | 329 | $dashboardlines[$board->element . '_topay'] = $board->load_board($user, 'topay'); |
330 | 330 | } |
331 | 331 | |
332 | 332 | // Number of holidays to approve |
333 | - if (isModEnabled('holiday') && !getDolGlobalString('MAIN_DISABLE_BLOCK_HOLIDAY') && $user->hasRight('holiday', 'approve')) { |
|
333 | + if (isModEnabled('holiday') && !getDolGlobalString('MAIN_DISABLE_BLOCK_HOLIDAY') && $user->hasRight('holiday', 'approve')) { |
|
334 | 334 | $board = new Holiday($db); |
335 | 335 | $dashboardlines[$board->element] = $board->load_board($user); |
336 | 336 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | } |
151 | 151 | |
152 | 152 | |
153 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
153 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
154 | 154 | /** |
155 | 155 | * Function to build pdf onto disk |
156 | 156 | * |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | */ |
165 | 165 | public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) |
166 | 166 | { |
167 | - // phpcs:enable |
|
167 | + // phpcs:enable |
|
168 | 168 | global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines; |
169 | 169 | |
170 | 170 | dol_syslog("write_file outputlangs->defaultlang=" . (is_object($outputlangs) ? $outputlangs->defaultlang : 'null')); |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | if (file_exists($dir)) { |
281 | 281 | // Add pdfgeneration hook |
282 | 282 | if (!is_object($hookmanager)) { |
283 | - $hookmanager = new HookManager($this->db); |
|
283 | + $hookmanager = new HookManager($this->db); |
|
284 | 284 | } |
285 | 285 | $hookmanager->initHooks(array('pdfgeneration')); |
286 | 286 | $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); |
@@ -824,7 +824,7 @@ discard block |
||
824 | 824 | } |
825 | 825 | } |
826 | 826 | |
827 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
827 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
828 | 828 | /** |
829 | 829 | * Return list of active generation modules |
830 | 830 | * |
@@ -834,11 +834,11 @@ discard block |
||
834 | 834 | */ |
835 | 835 | public static function liste_modeles($db, $maxfilenamelength = 0) |
836 | 836 | { |
837 | - // phpcs:enable |
|
837 | + // phpcs:enable |
|
838 | 838 | return parent::liste_modeles($db, $maxfilenamelength); // TODO: Change the autogenerated stub |
839 | 839 | } |
840 | 840 | |
841 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
841 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
842 | 842 | /** |
843 | 843 | * Show table for lines |
844 | 844 | * |
@@ -899,7 +899,7 @@ discard block |
||
899 | 899 | } |
900 | 900 | } |
901 | 901 | |
902 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
902 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
903 | 903 | /** |
904 | 904 | * Show top header of page. |
905 | 905 | * |
@@ -912,7 +912,7 @@ discard block |
||
912 | 912 | */ |
913 | 913 | protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis = null) |
914 | 914 | { |
915 | - // phpcs:enable |
|
915 | + // phpcs:enable |
|
916 | 916 | global $conf, $langs; |
917 | 917 | |
918 | 918 | $ltrdirection = 'L'; |
@@ -1163,7 +1163,7 @@ discard block |
||
1163 | 1163 | return $top_shift; |
1164 | 1164 | } |
1165 | 1165 | |
1166 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1166 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1167 | 1167 | /** |
1168 | 1168 | * Show footer of page. Need this->emetteur object |
1169 | 1169 | * |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | $this->note_public = $obj->note_public; |
609 | 609 | $this->note_private = $obj->note_private; |
610 | 610 | |
611 | - $this->statut = $obj->status; // deprecated |
|
611 | + $this->statut = $obj->status; // deprecated |
|
612 | 612 | $this->status = $obj->status; |
613 | 613 | |
614 | 614 | $this->photo = $obj->photo; |
@@ -735,7 +735,7 @@ discard block |
||
735 | 735 | if (getDolGlobalString('MAIN_ENABLE_DEFAULT_VALUES')) { |
736 | 736 | // Load user->default_values for user. TODO Save this in memcached ? |
737 | 737 | $defaultValues = new DefaultValues($this->db); |
738 | - $result = $defaultValues->fetchAll('', '', 0, 0, '(t.user_id:in:0,' . $this->id . ') AND (entity:in:' . (isset($this->entity) ? $this->entity : $conf->entity) . ',' . $conf->entity . ')'); // User 0 (all) + me (if defined) |
|
738 | + $result = $defaultValues->fetchAll('', '', 0, 0, '(t.user_id:in:0,' . $this->id . ') AND (entity:in:' . (isset($this->entity) ? $this->entity : $conf->entity) . ',' . $conf->entity . ')'); // User 0 (all) + me (if defined) |
|
739 | 739 | //$result = $defaultValues->fetchAll('', '', 0, 0, array('t.user_id'=>array(0, $this->id), 'entity'=>array((isset($this->entity) ? $this->entity : $conf->entity), $conf->entity))); // User 0 (all) + me (if defined) |
740 | 740 | |
741 | 741 | if (!is_array($result) && $result < 0) { |
@@ -849,16 +849,16 @@ discard block |
||
849 | 849 | // Special case for external user |
850 | 850 | if (!empty($this->socid)) { |
851 | 851 | if ($module == 'societe' && ($permlevel1 == 'creer' || $permlevel1 == 'write')) { |
852 | - return 0; // An external user never has the permission ->societe->write to see all thirdparties (always restricted to himself) |
|
852 | + return 0; // An external user never has the permission ->societe->write to see all thirdparties (always restricted to himself) |
|
853 | 853 | } |
854 | 854 | if ($module == 'societe' && $permlevel1 == 'client' && $permlevel2 == 'voir') { |
855 | - return 0; // An external user never has the permission ->societe->client->voir to see all thirdparties (always restricted to himself) |
|
855 | + return 0; // An external user never has the permission ->societe->client->voir to see all thirdparties (always restricted to himself) |
|
856 | 856 | } |
857 | 857 | if ($module == 'societe' && $permlevel1 == 'export') { |
858 | - return 0; // An external user never has the permission ->societe->export to see all thirdparties (always restricted to himself) |
|
858 | + return 0; // An external user never has the permission ->societe->export to see all thirdparties (always restricted to himself) |
|
859 | 859 | } |
860 | 860 | if ($module == 'societe' && ($permlevel1 == 'supprimer' || $permlevel1 == 'delete')) { |
861 | - return 0; // An external user never has the permission ->societe->delete to see all thirdparties (always restricted to himself) |
|
861 | + return 0; // An external user never has the permission ->societe->delete to see all thirdparties (always restricted to himself) |
|
862 | 862 | } |
863 | 863 | } |
864 | 864 | |
@@ -1006,7 +1006,7 @@ discard block |
||
1006 | 1006 | $sql .= " FROM " . $this->db->prefix() . "rights_def"; |
1007 | 1007 | $sql .= " WHERE entity = " . ((int) $entity); |
1008 | 1008 | if (!empty($whereforadd) && $whereforadd != 'allmodules') { |
1009 | - $sql .= " AND (" . $whereforadd . ")"; // Note: parenthesis are important because whereforadd can contains OR. Also note that $whereforadd is already sanitized |
|
1009 | + $sql .= " AND (" . $whereforadd . ")"; // Note: parenthesis are important because whereforadd can contains OR. Also note that $whereforadd is already sanitized |
|
1010 | 1010 | } |
1011 | 1011 | |
1012 | 1012 | $sqldelete = "DELETE FROM " . $this->db->prefix() . "user_rights"; |
@@ -1142,7 +1142,7 @@ discard block |
||
1142 | 1142 | $sql .= " FROM " . $this->db->prefix() . "rights_def"; |
1143 | 1143 | $sql .= " WHERE entity IN (" . $this->db->sanitize($entity, 0, 0, 0, 0) . ")"; |
1144 | 1144 | if (!empty($wherefordel) && $wherefordel != 'allmodules') { |
1145 | - $sql .= " AND (" . $wherefordel . ")"; // Note: parenthesis are important because wherefordel can contains OR. Also note that $wherefordel is already sanitized |
|
1145 | + $sql .= " AND (" . $wherefordel . ")"; // Note: parenthesis are important because wherefordel can contains OR. Also note that $wherefordel is already sanitized |
|
1146 | 1146 | } |
1147 | 1147 | |
1148 | 1148 | // avoid admin to remove his own important rights |
@@ -1316,12 +1316,12 @@ discard block |
||
1316 | 1316 | $sql .= " AND r.entity = " . ((int) $conf->entity); |
1317 | 1317 | } |
1318 | 1318 | } else { |
1319 | - $sql .= " AND gr.entity = " . ((int) $conf->entity); // Only groups created in current entity |
|
1319 | + $sql .= " AND gr.entity = " . ((int) $conf->entity); // Only groups created in current entity |
|
1320 | 1320 | // The entity on the table gu=usergroup_user should be useless and should never be used because it is already into gr and r. |
1321 | 1321 | // but when using MULTICOMPANY_TRANSVERSE_MODE, we may have inserted record that make rubbish result here due to the duplicate record of |
1322 | 1322 | // other entities, so we are forced to add a filter on gu here |
1323 | 1323 | $sql .= " AND gu.entity IN (0," . $conf->entity . ")"; |
1324 | - $sql .= " AND r.entity = " . ((int) $conf->entity); // Only permission of modules enabled in current entity |
|
1324 | + $sql .= " AND r.entity = " . ((int) $conf->entity); // Only permission of modules enabled in current entity |
|
1325 | 1325 | } |
1326 | 1326 | // End of strange business rule |
1327 | 1327 | $sql .= " AND gr.fk_usergroup = gu.fk_usergroup"; |
@@ -2794,7 +2794,7 @@ discard block |
||
2794 | 2794 | $sql .= " WHERE fk_user = " . ((int) $this->id); |
2795 | 2795 | $sql .= " AND fk_usergroup = " . ((int) $group); |
2796 | 2796 | if (empty($entity)) { |
2797 | - $sql .= " AND entity IN (0, 1)"; // group may be in entity 0 (so $entity=0) and link with user into entity 1. |
|
2797 | + $sql .= " AND entity IN (0, 1)"; // group may be in entity 0 (so $entity=0) and link with user into entity 1. |
|
2798 | 2798 | } else { |
2799 | 2799 | $sql .= " AND entity = " . ((int) $entity); |
2800 | 2800 | } |
@@ -3514,7 +3514,7 @@ discard block |
||
3514 | 3514 | $this->iplastlogin = '127.0.0.1'; |
3515 | 3515 | $this->datepreviouslogin = $now; |
3516 | 3516 | $this->ippreviouslogin = '127.0.0.1'; |
3517 | - $this->statut = 1; // deprecated |
|
3517 | + $this->statut = 1; // deprecated |
|
3518 | 3518 | $this->status = 1; |
3519 | 3519 | |
3520 | 3520 | $this->entity = 1; |
@@ -1764,7 +1764,7 @@ discard block |
||
1764 | 1764 | } |
1765 | 1765 | |
1766 | 1766 | |
1767 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1767 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1768 | 1768 | /** |
1769 | 1769 | * Create a user from a contact object. User will be internal but if contact is linked to a third party, user will be external |
1770 | 1770 | * |
@@ -1775,7 +1775,7 @@ discard block |
||
1775 | 1775 | */ |
1776 | 1776 | public function create_from_contact($contact, $login = '', $password = '') |
1777 | 1777 | { |
1778 | - // phpcs:enable |
|
1778 | + // phpcs:enable |
|
1779 | 1779 | global $conf, $user, $langs; |
1780 | 1780 | |
1781 | 1781 | $error = 0; |
@@ -1850,7 +1850,7 @@ discard block |
||
1850 | 1850 | } |
1851 | 1851 | } |
1852 | 1852 | |
1853 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1853 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1854 | 1854 | /** |
1855 | 1855 | * Create a user into database from a member object. |
1856 | 1856 | * If $member->fk_soc is set, it will be an external user. |
@@ -1861,7 +1861,7 @@ discard block |
||
1861 | 1861 | */ |
1862 | 1862 | public function create_from_member($member, $login = '') |
1863 | 1863 | { |
1864 | - // phpcs:enable |
|
1864 | + // phpcs:enable |
|
1865 | 1865 | global $user; |
1866 | 1866 | |
1867 | 1867 | // Set properties on new user |
@@ -1939,7 +1939,7 @@ discard block |
||
1939 | 1939 | } |
1940 | 1940 | } |
1941 | 1941 | |
1942 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1942 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1943 | 1943 | /** |
1944 | 1944 | * Assign rights by default |
1945 | 1945 | * |
@@ -1947,7 +1947,7 @@ discard block |
||
1947 | 1947 | */ |
1948 | 1948 | public function set_default_rights() |
1949 | 1949 | { |
1950 | - // phpcs:enable |
|
1950 | + // phpcs:enable |
|
1951 | 1951 | global $conf; |
1952 | 1952 | |
1953 | 1953 | $rd = array(); |
@@ -2336,7 +2336,7 @@ discard block |
||
2336 | 2336 | } |
2337 | 2337 | } |
2338 | 2338 | |
2339 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2339 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2340 | 2340 | /** |
2341 | 2341 | * Update the user's last login date in the database. |
2342 | 2342 | * Function called when a new connection is made by the user |
@@ -2345,7 +2345,7 @@ discard block |
||
2345 | 2345 | */ |
2346 | 2346 | public function update_last_login_date() |
2347 | 2347 | { |
2348 | - // phpcs:enable |
|
2348 | + // phpcs:enable |
|
2349 | 2349 | $now = dol_now(); |
2350 | 2350 | |
2351 | 2351 | $userremoteip = getUserRemoteIP(); |
@@ -2516,7 +2516,7 @@ discard block |
||
2516 | 2516 | } |
2517 | 2517 | } |
2518 | 2518 | |
2519 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2519 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2520 | 2520 | /** |
2521 | 2521 | * Send a new password (or instructions to reset it) by email |
2522 | 2522 | * |
@@ -2527,7 +2527,7 @@ discard block |
||
2527 | 2527 | */ |
2528 | 2528 | public function send_password($user, $password = '', $changelater = 0) |
2529 | 2529 | { |
2530 | - // phpcs:enable |
|
2530 | + // phpcs:enable |
|
2531 | 2531 | global $conf, $langs, $mysoc; |
2532 | 2532 | global $dolibarr_main_url_root; |
2533 | 2533 | |
@@ -2644,7 +2644,7 @@ discard block |
||
2644 | 2644 | } |
2645 | 2645 | |
2646 | 2646 | |
2647 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2647 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2648 | 2648 | /** |
2649 | 2649 | * Read clicktodial information for user |
2650 | 2650 | * |
@@ -2652,7 +2652,7 @@ discard block |
||
2652 | 2652 | */ |
2653 | 2653 | public function fetch_clicktodial() |
2654 | 2654 | { |
2655 | - // phpcs:enable |
|
2655 | + // phpcs:enable |
|
2656 | 2656 | $sql = "SELECT url, login, pass, poste "; |
2657 | 2657 | $sql .= " FROM " . $this->db->prefix() . "user_clicktodial as u"; |
2658 | 2658 | $sql .= " WHERE u.fk_user = " . ((int) $this->id); |
@@ -2678,7 +2678,7 @@ discard block |
||
2678 | 2678 | } |
2679 | 2679 | } |
2680 | 2680 | |
2681 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2681 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2682 | 2682 | /** |
2683 | 2683 | * Update clicktodial info |
2684 | 2684 | * |
@@ -2686,7 +2686,7 @@ discard block |
||
2686 | 2686 | */ |
2687 | 2687 | public function update_clicktodial() |
2688 | 2688 | { |
2689 | - // phpcs:enable |
|
2689 | + // phpcs:enable |
|
2690 | 2690 | $this->db->begin(); |
2691 | 2691 | |
2692 | 2692 | $sql = "DELETE FROM " . $this->db->prefix() . "user_clicktodial"; |
@@ -2716,7 +2716,7 @@ discard block |
||
2716 | 2716 | } |
2717 | 2717 | |
2718 | 2718 | |
2719 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2719 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2720 | 2720 | /** |
2721 | 2721 | * Add user into a group |
2722 | 2722 | * |
@@ -2727,7 +2727,7 @@ discard block |
||
2727 | 2727 | */ |
2728 | 2728 | public function SetInGroup($group, $entity, $notrigger = 0) |
2729 | 2729 | { |
2730 | - // phpcs:enable |
|
2730 | + // phpcs:enable |
|
2731 | 2731 | global $conf, $langs, $user; |
2732 | 2732 | |
2733 | 2733 | $error = 0; |
@@ -2772,7 +2772,7 @@ discard block |
||
2772 | 2772 | } |
2773 | 2773 | } |
2774 | 2774 | |
2775 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2775 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2776 | 2776 | /** |
2777 | 2777 | * Remove a user from a group |
2778 | 2778 | * |
@@ -2783,7 +2783,7 @@ discard block |
||
2783 | 2783 | */ |
2784 | 2784 | public function RemoveFromGroup($group, $entity, $notrigger = 0) |
2785 | 2785 | { |
2786 | - // phpcs:enable |
|
2786 | + // phpcs:enable |
|
2787 | 2787 | global $conf, $langs, $user; |
2788 | 2788 | |
2789 | 2789 | $error = 0; |
@@ -3176,7 +3176,7 @@ discard block |
||
3176 | 3176 | return $this->LibStatut(isset($this->statut) ? (int) $this->statut : (int) $this->status, $mode); |
3177 | 3177 | } |
3178 | 3178 | |
3179 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3179 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3180 | 3180 | /** |
3181 | 3181 | * Return the label of a status of user (active, inactive) |
3182 | 3182 | * |
@@ -3186,7 +3186,7 @@ discard block |
||
3186 | 3186 | */ |
3187 | 3187 | public function LibStatut($status, $mode = 0) |
3188 | 3188 | { |
3189 | - // phpcs:enable |
|
3189 | + // phpcs:enable |
|
3190 | 3190 | global $langs; |
3191 | 3191 | |
3192 | 3192 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
@@ -3278,8 +3278,8 @@ discard block |
||
3278 | 3278 | } |
3279 | 3279 | |
3280 | 3280 | |
3281 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
3282 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3281 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
3282 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3283 | 3283 | /** |
3284 | 3284 | * Retourne chaine DN complete dans l'annuaire LDAP pour l'objet |
3285 | 3285 | * |
@@ -3291,7 +3291,7 @@ discard block |
||
3291 | 3291 | */ |
3292 | 3292 | public function _load_ldap_dn($info, $mode = 0) |
3293 | 3293 | { |
3294 | - // phpcs:enable |
|
3294 | + // phpcs:enable |
|
3295 | 3295 | global $conf; |
3296 | 3296 | $dn = ''; |
3297 | 3297 | if ($mode == 0) { |
@@ -3304,8 +3304,8 @@ discard block |
||
3304 | 3304 | return $dn; |
3305 | 3305 | } |
3306 | 3306 | |
3307 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
3308 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3307 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
3308 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3309 | 3309 | /** |
3310 | 3310 | * Initialize the info array (array of LDAP values) that will be used to call LDAP functions |
3311 | 3311 | * |
@@ -3313,7 +3313,7 @@ discard block |
||
3313 | 3313 | */ |
3314 | 3314 | public function _load_ldap_info() |
3315 | 3315 | { |
3316 | - // phpcs:enable |
|
3316 | + // phpcs:enable |
|
3317 | 3317 | global $conf, $langs; |
3318 | 3318 | |
3319 | 3319 | $info = array(); |
@@ -3619,7 +3619,7 @@ discard block |
||
3619 | 3619 | } |
3620 | 3620 | } |
3621 | 3621 | |
3622 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3622 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3623 | 3623 | /** |
3624 | 3624 | * Update user using data from the LDAP |
3625 | 3625 | * |
@@ -3628,7 +3628,7 @@ discard block |
||
3628 | 3628 | */ |
3629 | 3629 | public function update_ldap2dolibarr(&$ldapuser) |
3630 | 3630 | { |
3631 | - // phpcs:enable |
|
3631 | + // phpcs:enable |
|
3632 | 3632 | // TODO: Voir pourquoi le update met à jour avec toutes les valeurs vide (global $user écrase ?) |
3633 | 3633 | global $user, $conf; |
3634 | 3634 | |
@@ -3673,7 +3673,7 @@ discard block |
||
3673 | 3673 | } |
3674 | 3674 | |
3675 | 3675 | |
3676 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3676 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3677 | 3677 | /** |
3678 | 3678 | * Return and array with all instantiated first level children users of current user |
3679 | 3679 | * |
@@ -3682,7 +3682,7 @@ discard block |
||
3682 | 3682 | */ |
3683 | 3683 | public function get_children() |
3684 | 3684 | { |
3685 | - // phpcs:enable |
|
3685 | + // phpcs:enable |
|
3686 | 3686 | $sql = "SELECT rowid FROM " . $this->db->prefix() . "user"; |
3687 | 3687 | $sql .= " WHERE fk_user = " . ((int) $this->id); |
3688 | 3688 | |
@@ -3733,7 +3733,7 @@ discard block |
||
3733 | 3733 | } |
3734 | 3734 | } |
3735 | 3735 | |
3736 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3736 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3737 | 3737 | /** |
3738 | 3738 | * Build the hierarchy/tree of users into an array. |
3739 | 3739 | * Set and return this->users that is an array sorted according to tree with arrays of: |
@@ -3749,7 +3749,7 @@ discard block |
||
3749 | 3749 | */ |
3750 | 3750 | public function get_full_tree($deleteafterid = 0, $filter = '') |
3751 | 3751 | { |
3752 | - // phpcs:enable |
|
3752 | + // phpcs:enable |
|
3753 | 3753 | global $conf, $user; |
3754 | 3754 | global $hookmanager; |
3755 | 3755 | |
@@ -3878,7 +3878,7 @@ discard block |
||
3878 | 3878 | return $childids; |
3879 | 3879 | } |
3880 | 3880 | |
3881 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3881 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3882 | 3882 | /** |
3883 | 3883 | * For user id_user and its children available in this->users, define property fullpath and fullname. |
3884 | 3884 | * Function called by get_full_tree(). |
@@ -3889,7 +3889,7 @@ discard block |
||
3889 | 3889 | */ |
3890 | 3890 | public function build_path_from_id_user($id_user, $protection = 0) |
3891 | 3891 | { |
3892 | - // phpcs:enable |
|
3892 | + // phpcs:enable |
|
3893 | 3893 | //dol_syslog(get_only_class($this)."::build_path_from_id_user id_user=".$id_user." protection=".$protection, LOG_DEBUG); |
3894 | 3894 | |
3895 | 3895 | if (!empty($this->users[$id_user]['fullpath'])) { |
@@ -4009,7 +4009,7 @@ discard block |
||
4009 | 4009 | return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); |
4010 | 4010 | } |
4011 | 4011 | |
4012 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
4012 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
4013 | 4013 | /** |
4014 | 4014 | * Return property of user from its id |
4015 | 4015 | * |
@@ -4019,7 +4019,7 @@ discard block |
||
4019 | 4019 | */ |
4020 | 4020 | public function user_get_property($rowid, $mode) |
4021 | 4021 | { |
4022 | - // phpcs:enable |
|
4022 | + // phpcs:enable |
|
4023 | 4023 | $user_property = ''; |
4024 | 4024 | |
4025 | 4025 | if (empty($rowid)) { |
@@ -1488,7 +1488,7 @@ discard block |
||
1488 | 1488 | return $this->LibStatut($this->status, $mode, $this->date_debut); |
1489 | 1489 | } |
1490 | 1490 | |
1491 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1491 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1492 | 1492 | /** |
1493 | 1493 | * Returns the label of a status |
1494 | 1494 | * |
@@ -1499,7 +1499,7 @@ discard block |
||
1499 | 1499 | */ |
1500 | 1500 | public function LibStatut($status, $mode = 0, $startdate = '') |
1501 | 1501 | { |
1502 | - // phpcs:enable |
|
1502 | + // phpcs:enable |
|
1503 | 1503 | global $langs; |
1504 | 1504 | |
1505 | 1505 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
@@ -2041,7 +2041,7 @@ discard block |
||
2041 | 2041 | } |
2042 | 2042 | |
2043 | 2043 | |
2044 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2044 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2045 | 2045 | /** |
2046 | 2046 | * Return list of people with permission to validate leave requests. |
2047 | 2047 | * Search for permission "approve leave requests" |
@@ -2050,7 +2050,7 @@ discard block |
||
2050 | 2050 | */ |
2051 | 2051 | public function fetch_users_approver_holiday() |
2052 | 2052 | { |
2053 | - // phpcs:enable |
|
2053 | + // phpcs:enable |
|
2054 | 2054 | $users_validator = array(); |
2055 | 2055 | |
2056 | 2056 | $sql = "SELECT DISTINCT ur.fk_user"; |
@@ -2431,7 +2431,7 @@ discard block |
||
2431 | 2431 | } |
2432 | 2432 | } |
2433 | 2433 | |
2434 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2434 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2435 | 2435 | /** |
2436 | 2436 | * Load indicators for dashboard (this->nbtodo and this->nbtodolate) |
2437 | 2437 | * |
@@ -2440,7 +2440,7 @@ discard block |
||
2440 | 2440 | */ |
2441 | 2441 | public function load_board($user) |
2442 | 2442 | { |
2443 | - // phpcs:enable |
|
2443 | + // phpcs:enable |
|
2444 | 2444 | global $conf, $langs; |
2445 | 2445 | |
2446 | 2446 | if ($user->socid) { |
@@ -451,7 +451,7 @@ |
||
451 | 451 | $this->date_fin_gmt = $this->db->jdate($obj->date_fin, 1); |
452 | 452 | $this->halfday = $obj->halfday; |
453 | 453 | $this->status = $obj->status; |
454 | - $this->statut = $obj->status; // deprecated |
|
454 | + $this->statut = $obj->status; // deprecated |
|
455 | 455 | $this->fk_validator = $obj->fk_validator; |
456 | 456 | $this->date_valid = $this->db->jdate($obj->date_valid); |
457 | 457 | $this->fk_user_valid = $obj->fk_user_valid; |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | //! Numero d'erreur Plage 1024-1279 |
60 | 60 | public $errno; |
61 | 61 | |
62 | - public $type = 'CHQ'; // 'CHQ', 'TRA', ... |
|
62 | + public $type = 'CHQ'; // 'CHQ', 'TRA', ... |
|
63 | 63 | |
64 | 64 | public $amount; |
65 | 65 | public $date_bordereau; |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_account as ba ON bc.fk_bank_account = ba.rowid"; |
106 | 106 | $sql .= " WHERE bc.entity = " . $conf->entity; |
107 | 107 | if ($id) { |
108 | - $sql .= " AND bc.rowid = " . ((int)$id); |
|
108 | + $sql .= " AND bc.rowid = " . ((int) $id); |
|
109 | 109 | } |
110 | 110 | if ($ref) { |
111 | 111 | $sql .= " AND bc.ref = '" . $this->db->escape($ref) . "'"; |
@@ -183,12 +183,12 @@ discard block |
||
183 | 183 | $sql .= ") VALUES ("; |
184 | 184 | $sql .= "'" . $this->db->idate($now) . "'"; |
185 | 185 | $sql .= ", '" . $this->db->idate($now) . "'"; |
186 | - $sql .= ", " . ((int)$user->id); |
|
187 | - $sql .= ", " . ((int)$account_id); |
|
186 | + $sql .= ", " . ((int) $user->id); |
|
187 | + $sql .= ", " . ((int) $account_id); |
|
188 | 188 | $sql .= ", 0"; |
189 | 189 | $sql .= ", 0"; |
190 | 190 | $sql .= ", 0"; |
191 | - $sql .= ", " . ((int)$conf->entity); |
|
191 | + $sql .= ", " . ((int) $conf->entity); |
|
192 | 192 | $sql .= ", 0"; |
193 | 193 | $sql .= ", ''"; |
194 | 194 | $sql .= ", '" . $this->db->escape($this->type) . "'"; |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | if ($this->id > 0 && $this->errno == 0) { |
206 | 206 | $sql = "UPDATE " . MAIN_DB_PREFIX . "bordereau_cheque"; |
207 | 207 | $sql .= " SET ref = '(PROV" . $this->id . ")'"; |
208 | - $sql .= " WHERE rowid=" . ((int)$this->id); |
|
208 | + $sql .= " WHERE rowid=" . ((int) $this->id); |
|
209 | 209 | |
210 | 210 | $resql = $this->db->query($sql); |
211 | 211 | if (!$resql) { |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | $sql .= " WHERE b.fk_type = '" . $this->db->escape($this->type) . "'"; |
223 | 223 | $sql .= " AND b.amount > 0"; |
224 | 224 | $sql .= " AND b.fk_bordereau = 0"; |
225 | - $sql .= " AND b.fk_account = " . ((int)$account_id); |
|
225 | + $sql .= " AND b.fk_account = " . ((int) $account_id); |
|
226 | 226 | if ($limit) { |
227 | 227 | $sql .= $this->db->plimit($limit); |
228 | 228 | } |
@@ -251,8 +251,8 @@ discard block |
||
251 | 251 | |
252 | 252 | if ($checkremise) { |
253 | 253 | $sql = "UPDATE " . MAIN_DB_PREFIX . "bank"; |
254 | - $sql .= " SET fk_bordereau = " . ((int)$this->id); |
|
255 | - $sql .= " WHERE rowid = " . ((int)$lineid); |
|
254 | + $sql .= " SET fk_bordereau = " . ((int) $this->id); |
|
255 | + $sql .= " WHERE rowid = " . ((int) $lineid); |
|
256 | 256 | |
257 | 257 | $resql = $this->db->query($sql); |
258 | 258 | if (!$resql) { |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | $this->db->begin(); |
307 | 307 | |
308 | 308 | $sql = "DELETE FROM " . MAIN_DB_PREFIX . "bordereau_cheque"; |
309 | - $sql .= " WHERE rowid = " . ((int)$this->id); |
|
309 | + $sql .= " WHERE rowid = " . ((int) $this->id); |
|
310 | 310 | $sql .= " AND entity = " . $conf->entity; |
311 | 311 | |
312 | 312 | $resql = $this->db->query($sql); |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | if ($this->errno === 0) { |
322 | 322 | $sql = "UPDATE " . MAIN_DB_PREFIX . "bank"; |
323 | 323 | $sql .= " SET fk_bordereau = 0"; |
324 | - $sql .= " WHERE fk_bordereau = " . ((int)$this->id); |
|
324 | + $sql .= " WHERE fk_bordereau = " . ((int) $this->id); |
|
325 | 325 | |
326 | 326 | $resql = $this->db->query($sql); |
327 | 327 | if (!$resql) { |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | if ($this->errno == 0 && $numref) { |
361 | 361 | $sql = "UPDATE " . MAIN_DB_PREFIX . "bordereau_cheque"; |
362 | 362 | $sql .= " SET statut = 1, ref = '" . $this->db->escape($numref) . "'"; |
363 | - $sql .= " WHERE rowid = " . ((int)$this->id); |
|
363 | + $sql .= " WHERE rowid = " . ((int) $this->id); |
|
364 | 364 | $sql .= " AND entity = " . $conf->entity; |
365 | 365 | $sql .= " AND statut = 0"; |
366 | 366 | |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | $classname = getDolGlobalString('CHEQUERECEIPTS_ADDON'); |
422 | 422 | |
423 | 423 | // Include file with class |
424 | - $dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']); |
|
424 | + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); |
|
425 | 425 | |
426 | 426 | foreach ($dirmodels as $reldir) { |
427 | 427 | $dir = dol_buildpath($reldir . "core/modules/cheque/"); |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | $sql .= ", " . MAIN_DB_PREFIX . "bordereau_cheque as bc"; |
604 | 604 | $sql .= " WHERE b.fk_account = ba.rowid"; |
605 | 605 | $sql .= " AND b.fk_bordereau = bc.rowid"; |
606 | - $sql .= " AND bc.rowid = " . ((int)$this->id); |
|
606 | + $sql .= " AND bc.rowid = " . ((int) $this->id); |
|
607 | 607 | $sql .= " AND bc.entity = " . $conf->entity; |
608 | 608 | $sql .= " ORDER BY b.dateo ASC, b.rowid ASC"; |
609 | 609 | |
@@ -666,7 +666,7 @@ discard block |
||
666 | 666 | $nb = 0; |
667 | 667 | $sql = "SELECT amount "; |
668 | 668 | $sql .= " FROM " . MAIN_DB_PREFIX . "bank"; |
669 | - $sql .= " WHERE fk_bordereau = " . ((int)$this->id); |
|
669 | + $sql .= " WHERE fk_bordereau = " . ((int) $this->id); |
|
670 | 670 | |
671 | 671 | $resql = $this->db->query($sql); |
672 | 672 | if ($resql) { |
@@ -679,9 +679,9 @@ discard block |
||
679 | 679 | |
680 | 680 | $sql = "UPDATE " . MAIN_DB_PREFIX . "bordereau_cheque"; |
681 | 681 | $sql .= " SET amount = " . price2num($total); |
682 | - $sql .= ", nbcheque = " . ((int)$nb); |
|
683 | - $sql .= " WHERE rowid = " . ((int)$this->id); |
|
684 | - $sql .= " AND entity = " . ((int)$conf->entity); |
|
682 | + $sql .= ", nbcheque = " . ((int) $nb); |
|
683 | + $sql .= " WHERE rowid = " . ((int) $this->id); |
|
684 | + $sql .= " AND entity = " . ((int) $conf->entity); |
|
685 | 685 | |
686 | 686 | $resql = $this->db->query($sql); |
687 | 687 | if (!$resql) { |
@@ -716,8 +716,8 @@ discard block |
||
716 | 716 | if ($this->id > 0) { |
717 | 717 | $sql = "UPDATE " . MAIN_DB_PREFIX . "bank"; |
718 | 718 | $sql .= " SET fk_bordereau = 0"; |
719 | - $sql .= " WHERE rowid = " . ((int)$account_id); |
|
720 | - $sql .= " AND fk_bordereau = " . ((int)$this->id); |
|
719 | + $sql .= " WHERE rowid = " . ((int) $account_id); |
|
720 | + $sql .= " AND fk_bordereau = " . ((int) $this->id); |
|
721 | 721 | |
722 | 722 | $resql = $this->db->query($sql); |
723 | 723 | if ($resql) { |
@@ -765,7 +765,7 @@ discard block |
||
765 | 765 | // Get invoices list to reopen them |
766 | 766 | $sql = 'SELECT pf.fk_facture, pf.amount'; |
767 | 767 | $sql .= ' FROM ' . MAIN_DB_PREFIX . 'paiement_facture as pf'; |
768 | - $sql .= ' WHERE pf.fk_paiement = ' . ((int)$payment->id); |
|
768 | + $sql .= ' WHERE pf.fk_paiement = ' . ((int) $payment->id); |
|
769 | 769 | |
770 | 770 | $resql = $this->db->query($sql); |
771 | 771 | if ($resql) { |
@@ -830,7 +830,7 @@ discard block |
||
830 | 830 | if ($user->hasRight('banque', 'cheque')) { |
831 | 831 | $sql = "UPDATE " . MAIN_DB_PREFIX . "bordereau_cheque"; |
832 | 832 | $sql .= " SET date_bordereau = " . ($date ? "'" . $this->db->idate($date) . "'" : 'null'); |
833 | - $sql .= " WHERE rowid = " . ((int)$this->id); |
|
833 | + $sql .= " WHERE rowid = " . ((int) $this->id); |
|
834 | 834 | |
835 | 835 | dol_syslog("RemiseCheque::set_date", LOG_DEBUG); |
836 | 836 | $resql = $this->db->query($sql); |
@@ -861,7 +861,7 @@ discard block |
||
861 | 861 | if ($user->hasRight('banque', 'cheque')) { |
862 | 862 | $sql = "UPDATE " . MAIN_DB_PREFIX . "bordereau_cheque"; |
863 | 863 | $sql .= " SET ref = '" . $this->db->escape($ref) . "'"; |
864 | - $sql .= " WHERE rowid = " . ((int)$this->id); |
|
864 | + $sql .= " WHERE rowid = " . ((int) $this->id); |
|
865 | 865 | |
866 | 866 | dol_syslog("RemiseCheque::set_number", LOG_DEBUG); |
867 | 867 | $resql = $this->db->query($sql); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | } |
118 | 118 | |
119 | 119 | if (!$error) { |
120 | - $sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element . ' WHERE rowid=' . ((int)$this->id); |
|
120 | + $sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element . ' WHERE rowid=' . ((int) $this->id); |
|
121 | 121 | |
122 | 122 | $res = $this->db->query($sql); |
123 | 123 | if (!$res) { |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $sql .= ' p.ref as product_ref, p.fk_product_type as fk_product_type, p.label as product_label, p.description as product_desc'; |
158 | 158 | $sql .= ' FROM ' . MAIN_DB_PREFIX . 'facturedet_rec as l'; |
159 | 159 | $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'product as p ON l.fk_product = p.rowid'; |
160 | - $sql .= ' WHERE l.rowid = ' . ((int)$rowid); |
|
160 | + $sql .= ' WHERE l.rowid = ' . ((int) $rowid); |
|
161 | 161 | $sql .= ' ORDER BY l.rang'; |
162 | 162 | |
163 | 163 | dol_syslog('FactureRec::fetch', LOG_DEBUG); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | include_once DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php'; |
246 | 246 | |
247 | 247 | $sql = "UPDATE " . MAIN_DB_PREFIX . "facturedet_rec SET"; |
248 | - $sql .= " fk_facture = " . ((int)$this->fk_facture); |
|
248 | + $sql .= " fk_facture = " . ((int) $this->fk_facture); |
|
249 | 249 | $sql .= ", fk_parent_line=" . ($this->fk_parent_line > 0 ? $this->fk_parent_line : "null"); |
250 | 250 | $sql .= ", label=" . (!empty($this->label) ? "'" . $this->db->escape($this->label) . "'" : "null"); |
251 | 251 | $sql .= ", description='" . $this->db->escape($this->desc) . "'"; |
@@ -258,12 +258,12 @@ discard block |
||
258 | 258 | $sql .= ", localtax2_tx=" . price2num($this->localtax2_tx); |
259 | 259 | $sql .= ", localtax2_type='" . $this->db->escape($this->localtax2_type) . "'"; |
260 | 260 | $sql .= ", fk_product=" . ($this->fk_product > 0 ? $this->fk_product : "null"); |
261 | - $sql .= ", product_type=" . ((int)$this->product_type); |
|
261 | + $sql .= ", product_type=" . ((int) $this->product_type); |
|
262 | 262 | $sql .= ", remise_percent=" . price2num($this->remise_percent); |
263 | 263 | $sql .= ", subprice=" . price2num($this->subprice); |
264 | 264 | $sql .= ", info_bits=" . price2num($this->info_bits); |
265 | - $sql .= ", date_start_fill=" . (int)$this->date_start_fill; |
|
266 | - $sql .= ", date_end_fill=" . (int)$this->date_end_fill; |
|
265 | + $sql .= ", date_start_fill=" . (int) $this->date_start_fill; |
|
266 | + $sql .= ", date_end_fill=" . (int) $this->date_end_fill; |
|
267 | 267 | if (empty($this->skip_update_total)) { |
268 | 268 | $sql .= ", total_ht=" . price2num($this->total_ht); |
269 | 269 | $sql .= ", total_tva=" . price2num($this->total_tva); |
@@ -271,11 +271,11 @@ discard block |
||
271 | 271 | $sql .= ", total_localtax2=" . price2num($this->total_localtax2); |
272 | 272 | $sql .= ", total_ttc=" . price2num($this->total_ttc); |
273 | 273 | } |
274 | - $sql .= ", rang=" . ((int)$this->rang); |
|
275 | - $sql .= ", special_code=" . ((int)$this->special_code); |
|
274 | + $sql .= ", rang=" . ((int) $this->rang); |
|
275 | + $sql .= ", special_code=" . ((int) $this->special_code); |
|
276 | 276 | $sql .= ", fk_unit=" . ($this->fk_unit ? "'" . $this->db->escape($this->fk_unit) . "'" : "null"); |
277 | 277 | $sql .= ", fk_contract_line=" . ($this->fk_contract_line ? $this->fk_contract_line : "null"); |
278 | - $sql .= " WHERE rowid = " . ((int)$this->id); |
|
278 | + $sql .= " WHERE rowid = " . ((int) $this->id); |
|
279 | 279 | |
280 | 280 | $this->db->begin(); |
281 | 281 |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | } |
637 | 637 | } |
638 | 638 | |
639 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
639 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
640 | 640 | /** |
641 | 641 | * Load the project with id $this->fk_project into this->project |
642 | 642 | * |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | */ |
645 | 645 | public function fetch_projet() |
646 | 646 | { |
647 | - // phpcs:enable |
|
647 | + // phpcs:enable |
|
648 | 648 | |
649 | 649 | if (empty($this->fk_project) && !empty($this->fk_projet)) { |
650 | 650 | $this->fk_project = $this->fk_projet; // For backward compatibility |
@@ -863,7 +863,7 @@ discard block |
||
863 | 863 | return $this->LibStatut($this->status, $mode); |
864 | 864 | } |
865 | 865 | |
866 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
866 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
867 | 867 | /** |
868 | 868 | * Return the status |
869 | 869 | * |
@@ -873,7 +873,7 @@ discard block |
||
873 | 873 | */ |
874 | 874 | public function LibStatut($status, $mode = 0) |
875 | 875 | { |
876 | - // phpcs:enable |
|
876 | + // phpcs:enable |
|
877 | 877 | global $langs; |
878 | 878 | |
879 | 879 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | |
355 | 355 | $sql = 'SELECT rowid, type, rulevalue, status'; |
356 | 356 | $sql .= ' FROM ' . MAIN_DB_PREFIX . 'emailcollector_emailcollectorfilter'; |
357 | - $sql .= ' WHERE fk_emailcollector = ' . ((int)$this->id); |
|
357 | + $sql .= ' WHERE fk_emailcollector = ' . ((int) $this->id); |
|
358 | 358 | //$sql.= ' ORDER BY position'; |
359 | 359 | |
360 | 360 | $resql = $this->db->query($sql); |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | |
387 | 387 | $sql = 'SELECT rowid, type, actionparam, status'; |
388 | 388 | $sql .= ' FROM ' . MAIN_DB_PREFIX . 'emailcollector_emailcollectoraction'; |
389 | - $sql .= ' WHERE fk_emailcollector = ' . ((int)$this->id); |
|
389 | + $sql .= ' WHERE fk_emailcollector = ' . ((int) $this->id); |
|
390 | 390 | $sql .= ' ORDER BY position'; |
391 | 391 | |
392 | 392 | $resql = $this->db->query($sql); |
@@ -617,7 +617,7 @@ discard block |
||
617 | 617 | $sql = 'SELECT rowid, date_creation as datec, tms as datem,'; |
618 | 618 | $sql .= ' fk_user_creat, fk_user_modif'; |
619 | 619 | $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t'; |
620 | - $sql .= ' WHERE t.rowid = ' . ((int)$id); |
|
620 | + $sql .= ' WHERE t.rowid = ' . ((int) $id); |
|
621 | 621 | $result = $this->db->query($sql); |
622 | 622 | if ($result) { |
623 | 623 | if ($this->db->num_rows($result)) { |
@@ -1125,7 +1125,7 @@ discard block |
||
1125 | 1125 | } |
1126 | 1126 | |
1127 | 1127 | if ($rule['type'] == 'from') { |
1128 | - $tmprulevaluearray = explode('*', $rule['rulevalue']); // Search on abc*def means searching on 'abc' and on 'def' |
|
1128 | + $tmprulevaluearray = explode('*', $rule['rulevalue']); // Search on abc*def means searching on 'abc' and on 'def' |
|
1129 | 1129 | if (count($tmprulevaluearray) >= 2) { |
1130 | 1130 | foreach ($tmprulevaluearray as $tmprulevalue) { |
1131 | 1131 | $search .= ($search ? ' ' : '') . $not . 'FROM "' . str_replace('"', '', $tmprulevalue) . '"'; |
@@ -1135,7 +1135,7 @@ discard block |
||
1135 | 1135 | } |
1136 | 1136 | } |
1137 | 1137 | if ($rule['type'] == 'to') { |
1138 | - $tmprulevaluearray = explode('*', $rule['rulevalue']); // Search on abc*def means searching on 'abc' and on 'def' |
|
1138 | + $tmprulevaluearray = explode('*', $rule['rulevalue']); // Search on abc*def means searching on 'abc' and on 'def' |
|
1139 | 1139 | if (count($tmprulevaluearray) >= 2) { |
1140 | 1140 | foreach ($tmprulevaluearray as $tmprulevalue) { |
1141 | 1141 | $search .= ($search ? ' ' : '') . $not . 'TO "' . str_replace('"', '', $tmprulevalue) . '"'; |
@@ -1322,7 +1322,7 @@ discard block |
||
1322 | 1322 | } |
1323 | 1323 | } |
1324 | 1324 | |
1325 | - $arrayofemailtodelete = array(); // Track email to delete to make the deletion at end. |
|
1325 | + $arrayofemailtodelete = array(); // Track email to delete to make the deletion at end. |
|
1326 | 1326 | |
1327 | 1327 | // Loop on each email found |
1328 | 1328 | if (!$error && !empty($arrayofemail) && count($arrayofemail) > 0) { |
@@ -1392,7 +1392,7 @@ discard block |
||
1392 | 1392 | // $operationslog .= " - ".dol_escape_htmltag((string) $imapemail); |
1393 | 1393 | $msgid = str_replace(array('<', '>'), '', $overview['message_id']); |
1394 | 1394 | } else { |
1395 | - $operationslog .= " - " . dol_escape_htmltag((string)$imapemail); |
|
1395 | + $operationslog .= " - " . dol_escape_htmltag((string) $imapemail); |
|
1396 | 1396 | $msgid = str_replace(array('<', '>'), '', $overview[0]->message_id); |
1397 | 1397 | } |
1398 | 1398 | $operationslog .= " - MsgId: " . $msgid . " - References: " . dol_escape_htmltag($headers['References'] ?? '') . " - Subject: " . dol_escape_htmltag($headers['Subject']); |
@@ -1654,15 +1654,15 @@ discard block |
||
1654 | 1654 | $tmpdate = $overview['date']->toDate(); |
1655 | 1655 | $tmptimezone = $tmpdate->getTimezone()->getName(); |
1656 | 1656 | |
1657 | - $dateemail = dol_stringtotime((string)$overview['date'], 'gmt'); // if $overview['timezone'] is "+00:00" |
|
1657 | + $dateemail = dol_stringtotime((string) $overview['date'], 'gmt'); // if $overview['timezone'] is "+00:00" |
|
1658 | 1658 | if (preg_match('/^([+\-])(\d\d):(\d\d)/', $tmptimezone, $reg)) { |
1659 | 1659 | if ($reg[1] == '+' && ($reg[2] != '00' || $reg[3] != '00')) { |
1660 | - $dateemail -= (3600 * (int)$reg[2]); |
|
1661 | - $dateemail -= (60 * (int)$reg[3]); |
|
1660 | + $dateemail -= (3600 * (int) $reg[2]); |
|
1661 | + $dateemail -= (60 * (int) $reg[3]); |
|
1662 | 1662 | } |
1663 | 1663 | if ($reg[1] == '-' && ($reg[2] != '00' || $reg[3] != '00')) { |
1664 | - $dateemail += (3600 * (int)$reg[2]); |
|
1665 | - $dateemail += (60 * (int)$reg[3]); |
|
1664 | + $dateemail += (3600 * (int) $reg[2]); |
|
1665 | + $dateemail += (60 * (int) $reg[3]); |
|
1666 | 1666 | } |
1667 | 1667 | } |
1668 | 1668 | $subject = $overview['subject']; |
@@ -1674,7 +1674,7 @@ discard block |
||
1674 | 1674 | $to = $overview[0]->to; |
1675 | 1675 | $sendtocc = !empty($overview[0]->cc) ? $overview[0]->cc : ''; |
1676 | 1676 | $sendtobcc = !empty($overview[0]->bcc) ? $overview[0]->bcc : ''; |
1677 | - $dateemail = dol_stringtotime((string)$overview[0]->udate, 'gmt'); |
|
1677 | + $dateemail = dol_stringtotime((string) $overview[0]->udate, 'gmt'); |
|
1678 | 1678 | $subject = $overview[0]->subject; |
1679 | 1679 | //var_dump($msgid);exit; |
1680 | 1680 | } |
@@ -1739,15 +1739,15 @@ discard block |
||
1739 | 1739 | foreach ($arrayofreferences as $reference) { |
1740 | 1740 | //print "Process mail ".$iforemailloop." email_msgid ".$msgid.", date ".dol_print_date($dateemail, 'dayhour', 'gmt').", subject ".$subject.", reference ".dol_escape_htmltag($reference)."<br>\n"; |
1741 | 1741 | if (!empty($trackidfoundintorecipienttype)) { |
1742 | - $resultsearchtrackid = -1; // trackid found |
|
1742 | + $resultsearchtrackid = -1; // trackid found |
|
1743 | 1743 | $reg[1] = $trackidfoundintorecipienttype; |
1744 | 1744 | $reg[2] = $trackidfoundintorecipientid; |
1745 | 1745 | } elseif (!empty($trackidfoundintomsgidtype)) { |
1746 | - $resultsearchtrackid = -1; // trackid found |
|
1746 | + $resultsearchtrackid = -1; // trackid found |
|
1747 | 1747 | $reg[1] = $trackidfoundintomsgidtype; |
1748 | 1748 | $reg[2] = $trackidfoundintomsgidid; |
1749 | 1749 | } else { |
1750 | - $resultsearchtrackid = preg_match('/dolibarr-([a-z]+)([0-9]+)@' . preg_quote($host, '/') . '/', $reference, $reg); // trackid found or not |
|
1750 | + $resultsearchtrackid = preg_match('/dolibarr-([a-z]+)([0-9]+)@' . preg_quote($host, '/') . '/', $reference, $reg); // trackid found or not |
|
1751 | 1751 | if (empty($resultsearchtrackid) && getDolGlobalString('EMAIL_ALTERNATIVE_HOST_SIGNATURE')) { |
1752 | 1752 | $resultsearchtrackid = preg_match('/dolibarr-([a-z]+)([0-9]+)@' . preg_quote(getDolGlobalString('EMAIL_ALTERNATIVE_HOST_SIGNATURE'), '/') . '/', $reference, $reg); // trackid found |
1753 | 1753 | } |
@@ -2045,7 +2045,7 @@ discard block |
||
2045 | 2045 | |
2046 | 2046 | // Make Operation |
2047 | 2047 | dol_syslog("Execute action " . $operation['type'] . " actionparam=" . $operation['actionparam'] . ' thirdpartystatic->id=' . $thirdpartystatic->id . ' contactstatic->id=' . $contactstatic->id . ' projectstatic->id=' . $projectstatic->id); |
2048 | - dol_syslog("Execute action fk_element_id=" . $fk_element_id . " fk_element_type=" . $fk_element_type); // If a Dolibarr tracker id is found, we should now the id of object |
|
2048 | + dol_syslog("Execute action fk_element_id=" . $fk_element_id . " fk_element_type=" . $fk_element_type); // If a Dolibarr tracker id is found, we should now the id of object |
|
2049 | 2049 | |
2050 | 2050 | // Try to guess if this is an email in or out. |
2051 | 2051 | $actioncode = 'EMAIL_IN'; |
@@ -2098,7 +2098,7 @@ discard block |
||
2098 | 2098 | $operationslog .= '<br>Ticket not found using trackid=' . $trackid . ' or msgid=' . $msgid; |
2099 | 2099 | $ticketalreadyexists = 0; |
2100 | 2100 | } else { |
2101 | - $operationslog .= '<br>Ticket already found using trackid=' . $trackid . ' or msgid=' . $msgid; // We change the operation type to do |
|
2101 | + $operationslog .= '<br>Ticket already found using trackid=' . $trackid . ' or msgid=' . $msgid; // We change the operation type to do |
|
2102 | 2102 | $ticketalreadyexists = 1; |
2103 | 2103 | $operation['type'] = 'recordevent'; |
2104 | 2104 | } |
@@ -2472,8 +2472,8 @@ discard block |
||
2472 | 2472 | $actioncomm->label = $langs->trans("ActionAC_" . $actioncode) . ' - ' . $langs->trans("MailFrom") . ' ' . $from; |
2473 | 2473 | $actioncomm->note_private = $descriptionfull; |
2474 | 2474 | $actioncomm->fk_project = $projectstatic->id; |
2475 | - $actioncomm->datep = $dateemail; // date of email |
|
2476 | - $actioncomm->datef = $dateemail; // date of email |
|
2475 | + $actioncomm->datep = $dateemail; // date of email |
|
2476 | + $actioncomm->datef = $dateemail; // date of email |
|
2477 | 2477 | $actioncomm->percentage = -1; // Not applicable |
2478 | 2478 | $actioncomm->socid = $thirdpartystatic->id; |
2479 | 2479 | $actioncomm->contact_id = $contactstatic->id; |
@@ -2671,7 +2671,7 @@ discard block |
||
2671 | 2671 | } |
2672 | 2672 | $hookmanager->initHooks(array('emailcolector')); |
2673 | 2673 | $parameters = array('arrayobject' => $arrayobject); |
2674 | - $reshook = $hookmanager->executeHooks('addmoduletoeamailcollectorjoinpiece', $parameters); // Note that $action and $object may have been modified by some hooks |
|
2674 | + $reshook = $hookmanager->executeHooks('addmoduletoeamailcollectorjoinpiece', $parameters); // Note that $action and $object may have been modified by some hooks |
|
2675 | 2675 | if ($reshook > 0) { |
2676 | 2676 | $arrayobject = $hookmanager->resArray; |
2677 | 2677 | } |
@@ -2760,7 +2760,7 @@ discard block |
||
2760 | 2760 | $percent_opp_status = dol_getIdFromCode($this->db, 'PROSP', 'c_lead_status', 'code', 'percent'); |
2761 | 2761 | |
2762 | 2762 | $projecttocreate->title = $subject; |
2763 | - $projecttocreate->date_start = $date; // date of email |
|
2763 | + $projecttocreate->date_start = $date; // date of email |
|
2764 | 2764 | $projecttocreate->date_end = 0; |
2765 | 2765 | $projecttocreate->opp_status = $id_opp_status; |
2766 | 2766 | $projecttocreate->opp_percent = $percent_opp_status; |
@@ -2785,7 +2785,7 @@ discard block |
||
2785 | 2785 | $file = ''; |
2786 | 2786 | $classname = ''; |
2787 | 2787 | $reldir = ''; |
2788 | - $dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']); |
|
2788 | + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); |
|
2789 | 2789 | foreach ($dirmodels as $reldir) { |
2790 | 2790 | $file = dol_buildpath($reldir . "core/modules/project/" . $modele . '.php', 0); |
2791 | 2791 | if (file_exists($file)) { |
@@ -2840,7 +2840,7 @@ discard block |
||
2840 | 2840 | if (getDolGlobalString('MAIN_IMAP_USE_PHPIMAP')) { |
2841 | 2841 | foreach ($attachments as $attachment) { |
2842 | 2842 | // $attachment->save($destdir.'/'); |
2843 | - $typeattachment = (string)$attachment->getDisposition(); |
|
2843 | + $typeattachment = (string) $attachment->getDisposition(); |
|
2844 | 2844 | $filename = $attachment->getFilename(); |
2845 | 2845 | $content = $attachment->getContent(); |
2846 | 2846 | $this->saveAttachment($destdir, $filename, $content); |
@@ -2925,7 +2925,7 @@ discard block |
||
2925 | 2925 | $file = ''; |
2926 | 2926 | $classname = ''; |
2927 | 2927 | $reldir = ''; |
2928 | - $dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']); |
|
2928 | + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); |
|
2929 | 2929 | foreach ($dirmodels as $reldir) { |
2930 | 2930 | $file = dol_buildpath($reldir . "core/modules/ticket/" . $modele . '.php', 0); |
2931 | 2931 | if (file_exists($file)) { |
@@ -2975,7 +2975,7 @@ discard block |
||
2975 | 2975 | if (getDolGlobalString('MAIN_IMAP_USE_PHPIMAP')) { |
2976 | 2976 | foreach ($attachments as $attachment) { |
2977 | 2977 | // $attachment->save($destdir.'/'); |
2978 | - $typeattachment = (string)$attachment->getDisposition(); |
|
2978 | + $typeattachment = (string) $attachment->getDisposition(); |
|
2979 | 2979 | $filename = $attachment->getFilename(); |
2980 | 2980 | $content = $attachment->getContent(); |
2981 | 2981 | $this->saveAttachment($destdir, $filename, $content); |
@@ -3022,7 +3022,7 @@ discard block |
||
3022 | 3022 | $candidaturetocreate->note_private = $descriptionfull; |
3023 | 3023 | $candidaturetocreate->entity = $conf->entity; |
3024 | 3024 | $candidaturetocreate->email_msgid = $msgid; |
3025 | - $candidaturetocreate->email_date = $date; // date of email |
|
3025 | + $candidaturetocreate->email_date = $date; // date of email |
|
3026 | 3026 | $candidaturetocreate->status = $candidaturetocreate::STATUS_DRAFT; |
3027 | 3027 | //$candidaturetocreate->fk_contact = $contactstatic->id; |
3028 | 3028 | |
@@ -3324,8 +3324,8 @@ discard block |
||
3324 | 3324 | { |
3325 | 3325 | if (function_exists('mb_convert_encoding')) { |
3326 | 3326 | // change spaces by entropy because mb_convert fail with spaces |
3327 | - $str = preg_replace("/ /", "xxxSPACExxx", $str); // the replacement string must be valid in utf7 so _ can't be used |
|
3328 | - $str = preg_replace("/\[Gmail\]/", "xxxGMAILxxx", $str); // the replacement string must be valid in utf7 so _ can't be used |
|
3327 | + $str = preg_replace("/ /", "xxxSPACExxx", $str); // the replacement string must be valid in utf7 so _ can't be used |
|
3328 | + $str = preg_replace("/\[Gmail\]/", "xxxGMAILxxx", $str); // the replacement string must be valid in utf7 so _ can't be used |
|
3329 | 3329 | // if mb_convert work |
3330 | 3330 | if ($str = mb_convert_encoding($str, "UTF-7")) { |
3331 | 3331 | // change characters |
@@ -3851,7 +3851,7 @@ discard block |
||
3851 | 3851 | if (is_object($imapemail)) { |
3852 | 3852 | return $imapemail->getAttributes()["uid"]; |
3853 | 3853 | } else { |
3854 | - return (string)$imapemail; |
|
3854 | + return (string) $imapemail; |
|
3855 | 3855 | } |
3856 | 3856 | } |
3857 | 3857 | } |