@@ -166,8 +166,8 @@ discard block |
||
166 | 166 | public $posxlabel; |
167 | 167 | public $posxup; |
168 | 168 | public $posxref; |
169 | - public $posxpicture; // For picture |
|
170 | - public $posxdesc; // For description |
|
169 | + public $posxpicture; // For picture |
|
170 | + public $posxdesc; // For description |
|
171 | 171 | public $posxqty; |
172 | 172 | public $posxpuht; |
173 | 173 | public $posxtva; |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | |
547 | 547 | if (get_class($object) == 'CommandeFournisseur') { |
548 | 548 | /** @var CommandeFournisseur $object*/ |
549 | - $object->date_validation = $object->date_valid; |
|
549 | + $object->date_validation = $object->date_valid; |
|
550 | 550 | $object->date_commande = $object->date; |
551 | 551 | } |
552 | 552 | $resarray = array( |
@@ -1500,7 +1500,7 @@ discard block |
||
1500 | 1500 | * @param stdClass $b |
1501 | 1501 | * @return int<-1,1> |
1502 | 1502 | */ |
1503 | - static function ($a, $b) { |
|
1503 | + static function($a, $b) { |
|
1504 | 1504 | return ($a->rank > $b->rank) ? 1 : -1; |
1505 | 1505 | } |
1506 | 1506 | ); |
@@ -113,7 +113,7 @@ |
||
113 | 113 | $out .= '<option value="' . $obj->rowid . '" selected>' . $labeltoshow . '</option>'; |
114 | 114 | } else { |
115 | 115 | $disabled = 0; |
116 | - if (!$obj->fk_statut > 0 && ! $draftonly) { |
|
116 | + if (!$obj->fk_statut > 0 && !$draftonly) { |
|
117 | 117 | $disabled = 1; |
118 | 118 | $labeltoshow .= ' (' . $langs->trans("Draft") . ')'; |
119 | 119 | } |
@@ -129,7 +129,7 @@ |
||
129 | 129 | $out .= '>' . $langs->trans("AutoDetectLang") . '</option>'; |
130 | 130 | } |
131 | 131 | |
132 | - asort($langs_available); // array('XX' => 'Language (Country)', ...) |
|
132 | + asort($langs_available); // array('XX' => 'Language (Country)', ...) |
|
133 | 133 | |
134 | 134 | foreach ($langs_available as $key => $value) { |
135 | 135 | $valuetoshow = $value; |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $posy = 0; |
108 | 108 | $lines = explode("\n", $content); |
109 | 109 | $nblines = count($lines); |
110 | - for ($i = 0 ; $i < $nblines ; $i++) { |
|
110 | + for ($i = 0; $i < $nblines; $i++) { |
|
111 | 111 | if (preg_match('/' . $poscursor['find'] . '/', $lines[$i])) { |
112 | 112 | $posy = $i; |
113 | 113 | break; |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | define('REQUIRE_CKEDITOR', '1'); |
177 | 177 | } |
178 | 178 | |
179 | - $skin = getDolGlobalString('FCKEDITOR_SKIN', 'moono-lisa'); // default with ckeditor 4.6 : moono-lisa |
|
179 | + $skin = getDolGlobalString('FCKEDITOR_SKIN', 'moono-lisa'); // default with ckeditor 4.6 : moono-lisa |
|
180 | 180 | |
181 | 181 | $pluginstodisable = 'elementspath,save,flash,div,anchor'; |
182 | 182 | if (!getDolGlobalString('FCKEDITOR_ENABLE_SPECIALCHAR')) { |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | filebrowserImageWindowWidth : \'900\', |
278 | 278 | filebrowserImageWindowHeight : \'500\''; |
279 | 279 | } |
280 | - $out .= ' })' . $morejs; // end CKEditor.replace |
|
280 | + $out .= ' })' . $morejs; // end CKEditor.replace |
|
281 | 281 | // Show the CKEditor javascript object once loaded is ready 'For debug) |
282 | 282 | //$out .= '; CKEDITOR.on(\'instanceReady\', function(ck) { ck.editor.removeMenuItem(\'maximize\'); ck.editor.removeMenuItem(\'Undo\'); ck.editor.removeMenuItem(\'undo\'); console.log(ck.editor); console.log(ck.editor.toolbar[0]); }); '; |
283 | 283 | $out .= '});' . "\n"; // end document.ready |
@@ -96,9 +96,9 @@ discard block |
||
96 | 96 | */ |
97 | 97 | public $revenuestamp; |
98 | 98 | |
99 | - public $totalpaid; // duplicate with sumpayed |
|
100 | - public $totaldeposits; // duplicate with sumdeposit |
|
101 | - public $totalcreditnotes; // duplicate with sumcreditnote |
|
99 | + public $totalpaid; // duplicate with sumpayed |
|
100 | + public $totaldeposits; // duplicate with sumdeposit |
|
101 | + public $totalcreditnotes; // duplicate with sumcreditnote |
|
102 | 102 | |
103 | 103 | public $sumpayed; |
104 | 104 | public $sumpayed_multicurrency; |
@@ -1140,7 +1140,7 @@ discard block |
||
1140 | 1140 | if ($this->status > self::STATUS_DRAFT && $this->paye == 0) { |
1141 | 1141 | // Get the default payment mode for BAN payment of the third party |
1142 | 1142 | require_once constant('DOL_DOCUMENT_ROOT') . '/societe/class/companybankaccount.class.php'; |
1143 | - $bac = new CompanyBankAccount($this->db); // Table societe_rib |
|
1143 | + $bac = new CompanyBankAccount($this->db); // Table societe_rib |
|
1144 | 1144 | $result = $bac->fetch(0, '', $this->socid, 1, 'ban'); |
1145 | 1145 | if ($result <= 0 || empty($bac->id)) { |
1146 | 1146 | $this->error = $langs->trans("ThirdpartyHasNoDefaultBanAccount"); |
@@ -1154,16 +1154,16 @@ discard block |
||
1154 | 1154 | $sql .= " FROM " . $this->db->prefix() . "prelevement_demande"; |
1155 | 1155 | $sql .= " WHERE rowid = " . ((int) $did); |
1156 | 1156 | if ($type != 'bank-transfer' && $type != 'credit-transfer') { |
1157 | - $sql .= " AND fk_facture = " . ((int) $this->id); // Add a protection to not pay another invoice than current one |
|
1157 | + $sql .= " AND fk_facture = " . ((int) $this->id); // Add a protection to not pay another invoice than current one |
|
1158 | 1158 | } |
1159 | 1159 | if ($type != 'direct-debit') { |
1160 | 1160 | if ($sourcetype == 'salary') { |
1161 | - $sql .= " AND fk_salary = " . ((int) $this->id); // Add a protection to not pay another salary than current one |
|
1161 | + $sql .= " AND fk_salary = " . ((int) $this->id); // Add a protection to not pay another salary than current one |
|
1162 | 1162 | } else { |
1163 | - $sql .= " AND fk_facture_fourn = " . ((int) $this->id); // Add a protection to not pay another invoice than current one |
|
1163 | + $sql .= " AND fk_facture_fourn = " . ((int) $this->id); // Add a protection to not pay another invoice than current one |
|
1164 | 1164 | } |
1165 | 1165 | } |
1166 | - $sql .= " AND traite = 0"; // To not process payment request that were already converted into a direct debit or credit transfer order (Note: fk_prelevement_bons is also empty when traite = 0) |
|
1166 | + $sql .= " AND traite = 0"; // To not process payment request that were already converted into a direct debit or credit transfer order (Note: fk_prelevement_bons is also empty when traite = 0) |
|
1167 | 1167 | |
1168 | 1168 | dol_syslog(get_class($this) . "::makeStripeSepaRequest load requests to process", LOG_DEBUG); |
1169 | 1169 | $resql = $this->db->query($sql); |
@@ -1179,7 +1179,7 @@ discard block |
||
1179 | 1179 | |
1180 | 1180 | if (is_numeric($amount) && $amount != 0) { |
1181 | 1181 | require_once constant('DOL_DOCUMENT_ROOT') . '/societe/class/companypaymentmode.class.php'; |
1182 | - $companypaymentmode = new CompanyPaymentMode($this->db); // table societe_rib |
|
1182 | + $companypaymentmode = new CompanyPaymentMode($this->db); // table societe_rib |
|
1183 | 1183 | $companypaymentmode->fetch($bac->id); |
1184 | 1184 | |
1185 | 1185 | $this->stripechargedone = 0; |
@@ -1189,7 +1189,7 @@ discard block |
||
1189 | 1189 | |
1190 | 1190 | $currency = $conf->currency; |
1191 | 1191 | |
1192 | - $errorforinvoice = 0; // We reset the $errorforinvoice at each invoice loop |
|
1192 | + $errorforinvoice = 0; // We reset the $errorforinvoice at each invoice loop |
|
1193 | 1193 | |
1194 | 1194 | $this->fetch_thirdparty(); |
1195 | 1195 | |
@@ -1208,7 +1208,7 @@ discard block |
||
1208 | 1208 | $amountstripe = $amountstripe * 100; |
1209 | 1209 | } |
1210 | 1210 | |
1211 | - $fk_bank_account = getDolGlobalInt('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'); // Bank account used for SEPA direct debit or credit transfer. Must be the Stripe account in Dolibarr. |
|
1211 | + $fk_bank_account = getDolGlobalInt('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'); // Bank account used for SEPA direct debit or credit transfer. Must be the Stripe account in Dolibarr. |
|
1212 | 1212 | if (!($fk_bank_account > 0)) { |
1213 | 1213 | $error++; |
1214 | 1214 | $errorforinvoice++; |
@@ -1269,7 +1269,7 @@ discard block |
||
1269 | 1269 | $thirdparty = new Societe($this->db); |
1270 | 1270 | $resultthirdparty = $thirdparty->fetch($this->socid); |
1271 | 1271 | |
1272 | - include_once DOL_DOCUMENT_ROOT . '/stripe/class/stripe.class.php'; // This include the include of htdocs/stripe/config.php |
|
1272 | + include_once DOL_DOCUMENT_ROOT . '/stripe/class/stripe.class.php'; // This include the include of htdocs/stripe/config.php |
|
1273 | 1273 | // So it inits or erases the $stripearrayofkeysbyenv |
1274 | 1274 | $stripe = new Stripe($this->db); |
1275 | 1275 | |
@@ -1282,26 +1282,26 @@ discard block |
||
1282 | 1282 | $foundalternativestripeaccount = ''; |
1283 | 1283 | |
1284 | 1284 | // Force stripe to another value (by default this value is empty) |
1285 | - if (! empty($forcestripe)) { |
|
1285 | + if (!empty($forcestripe)) { |
|
1286 | 1286 | dol_syslog("makeStripeSepaRequest A dedicated stripe account was forced, so we switch to it."); |
1287 | 1287 | |
1288 | 1288 | $tmparray = explode('@', $forcestripe); |
1289 | - if (! empty($tmparray[1])) { |
|
1289 | + if (!empty($tmparray[1])) { |
|
1290 | 1290 | $tmparray2 = explode(':', $tmparray[1]); |
1291 | - if (! empty($tmparray2[1])) { |
|
1291 | + if (!empty($tmparray2[1])) { |
|
1292 | 1292 | $stripearrayofkeysbyenv[$servicestatus]["publishable_key"] = $tmparray2[0]; |
1293 | 1293 | $stripearrayofkeysbyenv[$servicestatus]["secret_key"] = $tmparray2[1]; |
1294 | 1294 | |
1295 | 1295 | $stripearrayofkeys = $stripearrayofkeysbyenv[$servicestatus]; |
1296 | 1296 | \Stripe\Stripe::setApiKey($stripearrayofkeys['secret_key']); |
1297 | 1297 | |
1298 | - $foundalternativestripeaccount = $tmparray[0]; // Store the customer id |
|
1298 | + $foundalternativestripeaccount = $tmparray[0]; // Store the customer id |
|
1299 | 1299 | |
1300 | 1300 | dol_syslog("makeStripeSepaRequest We use now customer=" . $foundalternativestripeaccount . " publishable_key=" . $stripearrayofkeys['publishable_key'], LOG_DEBUG); |
1301 | 1301 | } |
1302 | 1302 | } |
1303 | 1303 | |
1304 | - if (! $foundalternativestripeaccount) { |
|
1304 | + if (!$foundalternativestripeaccount) { |
|
1305 | 1305 | $stripearrayofkeysbyenv = $savstripearrayofkeysbyenv; |
1306 | 1306 | |
1307 | 1307 | $stripearrayofkeys = $savstripearrayofkeysbyenv[$servicestatus]; |
@@ -1316,7 +1316,7 @@ discard block |
||
1316 | 1316 | dol_syslog("makeStripeSepaRequest No dedicated Stripe Account requested, so we use global one, so " . $stripearrayofkeys['publishable_key'], LOG_DEBUG); |
1317 | 1317 | } |
1318 | 1318 | |
1319 | - $stripeacc = $stripe->getStripeAccount($service, $this->socid); // Get Stripe OAuth connect account if it exists (no network access here) |
|
1319 | + $stripeacc = $stripe->getStripeAccount($service, $this->socid); // Get Stripe OAuth connect account if it exists (no network access here) |
|
1320 | 1320 | |
1321 | 1321 | if ($foundalternativestripeaccount) { |
1322 | 1322 | if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage |
@@ -1326,7 +1326,7 @@ discard block |
||
1326 | 1326 | } |
1327 | 1327 | } else { |
1328 | 1328 | $customer = $stripe->customerStripe($thirdparty, $stripeacc, $servicestatus, 0); |
1329 | - if (empty($customer) && ! empty($stripe->error)) { |
|
1329 | + if (empty($customer) && !empty($stripe->error)) { |
|
1330 | 1330 | $this->errors[] = $stripe->error; |
1331 | 1331 | } |
1332 | 1332 | /*if (!empty($customer) && empty($customer->sources)) { |
@@ -1382,7 +1382,7 @@ discard block |
||
1382 | 1382 | $charge->failure_message = $stripe->error; |
1383 | 1383 | $charge->failure_declinecode = $stripe->declinecode; |
1384 | 1384 | $stripefailurecode = $stripe->code; |
1385 | - $stripefailuremessage = 'Action required. Contact the support at ';// . $conf->global->SELLYOURSAAS_MAIN_EMAIL; |
|
1385 | + $stripefailuremessage = 'Action required. Contact the support at '; // . $conf->global->SELLYOURSAAS_MAIN_EMAIL; |
|
1386 | 1386 | $stripefailuredeclinecode = $stripe->declinecode; |
1387 | 1387 | } else { |
1388 | 1388 | dol_syslog(var_export($paymentintent, true), LOG_DEBUG); |
@@ -1523,18 +1523,18 @@ discard block |
||
1523 | 1523 | // Insert record of payment (success or error) |
1524 | 1524 | $actioncomm = new ActionComm($this->db); |
1525 | 1525 | |
1526 | - $actioncomm->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) |
|
1526 | + $actioncomm->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) |
|
1527 | 1527 | $actioncomm->code = 'AC_' . $actioncode; |
1528 | 1528 | $actioncomm->label = $description; |
1529 | 1529 | $actioncomm->note_private = implode(",\n", $postactionmessages); |
1530 | 1530 | $actioncomm->fk_project = $this->fk_project; |
1531 | 1531 | $actioncomm->datep = $now; |
1532 | 1532 | $actioncomm->datef = $now; |
1533 | - $actioncomm->percentage = -1; // Not applicable |
|
1533 | + $actioncomm->percentage = -1; // Not applicable |
|
1534 | 1534 | $actioncomm->socid = $thirdparty->id; |
1535 | 1535 | $actioncomm->contactid = 0; |
1536 | - $actioncomm->authorid = $user->id; // User saving action |
|
1537 | - $actioncomm->userownerid = $user->id; // Owner of action |
|
1536 | + $actioncomm->authorid = $user->id; // User saving action |
|
1537 | + $actioncomm->userownerid = $user->id; // Owner of action |
|
1538 | 1538 | // Fields when action is a real email (content is already into note) |
1539 | 1539 | /*$actioncomm->email_msgid = $object->email_msgid; |
1540 | 1540 | $actioncomm->email_from = $object->email_from; |
@@ -1670,10 +1670,10 @@ discard block |
||
1670 | 1670 | |
1671 | 1671 | // Add the standard elements to the QR code |
1672 | 1672 | $lines = [ |
1673 | - 'BCD', // Service Tag (optional) |
|
1674 | - '002', // Version (optional) |
|
1675 | - '1', // Character set (optional) |
|
1676 | - 'SCT', // Identification (optional) |
|
1673 | + 'BCD', // Service Tag (optional) |
|
1674 | + '002', // Version (optional) |
|
1675 | + '1', // Character set (optional) |
|
1676 | + 'SCT', // Identification (optional) |
|
1677 | 1677 | ]; |
1678 | 1678 | |
1679 | 1679 | // Add the bank account information |
@@ -1747,10 +1747,10 @@ discard block |
||
1747 | 1747 | $s .= pack('C1', 3) . pack('C1', strlen($datestring)) . $datestring; |
1748 | 1748 | $s .= pack('C1', 4) . pack('C1', strlen($pricewithtaxstring)) . $pricewithtaxstring; |
1749 | 1749 | $s .= pack('C1', 5) . pack('C1', strlen($pricetaxstring)) . $pricetaxstring; |
1750 | - $s .= ''; // Hash of xml invoice |
|
1751 | - $s .= ''; // ecda signature |
|
1752 | - $s .= ''; // ecda public key |
|
1753 | - $s .= ''; // ecda signature of public key stamp |
|
1750 | + $s .= ''; // Hash of xml invoice |
|
1751 | + $s .= ''; // ecda signature |
|
1752 | + $s .= ''; // ecda public key |
|
1753 | + $s .= ''; // ecda signature of public key stamp |
|
1754 | 1754 | |
1755 | 1755 | $s = base64_encode($s); |
1756 | 1756 | |
@@ -1818,8 +1818,8 @@ discard block |
||
1818 | 1818 | $s .= "S\n"; |
1819 | 1819 | $s .= dol_trunc($bankaccount->proprio, 70, 'right', 'UTF-8', 1) . "\n"; |
1820 | 1820 | $addresslinearray = explode("\n", $bankaccount->owner_address); |
1821 | - $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1) . "\n"; // address line 1 |
|
1822 | - $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1) . "\n"; // address line 2 |
|
1821 | + $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1) . "\n"; // address line 1 |
|
1822 | + $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1) . "\n"; // address line 2 |
|
1823 | 1823 | /*$s .= dol_trunc($mysoc->zip, 16, 'right', 'UTF-8', 1)."\n"; |
1824 | 1824 | $s .= dol_trunc($mysoc->town, 35, 'right', 'UTF-8', 1)."\n"; |
1825 | 1825 | $s .= dol_trunc($mysoc->country_code, 2, 'right', 'UTF-8', 1)."\n";*/ |
@@ -1827,8 +1827,8 @@ discard block |
||
1827 | 1827 | $s .= "S\n"; |
1828 | 1828 | $s .= dol_trunc($mysoc->name, 70, 'right', 'UTF-8', 1) . "\n"; |
1829 | 1829 | $addresslinearray = explode("\n", $mysoc->address); |
1830 | - $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1) . "\n"; // address line 1 |
|
1831 | - $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1) . "\n"; // address line 2 |
|
1830 | + $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1) . "\n"; // address line 1 |
|
1831 | + $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1) . "\n"; // address line 2 |
|
1832 | 1832 | $s .= dol_trunc($mysoc->zip, 16, 'right', 'UTF-8', 1) . "\n"; |
1833 | 1833 | $s .= dol_trunc($mysoc->town, 35, 'right', 'UTF-8', 1) . "\n"; |
1834 | 1834 | $s .= dol_trunc($mysoc->country_code, 2, 'right', 'UTF-8', 1) . "\n"; |
@@ -1848,14 +1848,14 @@ discard block |
||
1848 | 1848 | $s .= "S\n"; |
1849 | 1849 | $s .= dol_trunc($this->thirdparty->name, 70, 'right', 'UTF-8', 1) . "\n"; |
1850 | 1850 | $addresslinearray = explode("\n", $this->thirdparty->address); |
1851 | - $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1) . "\n"; // address line 1 |
|
1852 | - $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1) . "\n"; // address line 2 |
|
1851 | + $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1) . "\n"; // address line 1 |
|
1852 | + $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1) . "\n"; // address line 2 |
|
1853 | 1853 | $s .= dol_trunc($this->thirdparty->zip, 16, 'right', 'UTF-8', 1) . "\n"; |
1854 | 1854 | $s .= dol_trunc($this->thirdparty->town, 35, 'right', 'UTF-8', 1) . "\n"; |
1855 | 1855 | $s .= dol_trunc($this->thirdparty->country_code, 2, 'right', 'UTF-8', 1) . "\n"; |
1856 | 1856 | // ID of payment |
1857 | - $s .= "NON\n"; // NON or QRR |
|
1858 | - $s .= "\n"; // QR Code reference if previous field is QRR |
|
1857 | + $s .= "NON\n"; // NON or QRR |
|
1858 | + $s .= "\n"; // QR Code reference if previous field is QRR |
|
1859 | 1859 | // Free text |
1860 | 1860 | if ($complementaryinfo) { |
1861 | 1861 | $s .= $complementaryinfo . "\n"; |
@@ -133,14 +133,14 @@ discard block |
||
133 | 133 | if ($choice == 'allfiles') { |
134 | 134 | // Delete all files (except .lock and .unlock files, do not follow symbolic links) |
135 | 135 | if ($dolibarr_main_data_root) { |
136 | - $filesarray = dol_dir_list($dolibarr_main_data_root, "all", 0, '', '(\.lock|\.unlock)$', 'name', SORT_ASC, 0, 0, '', 1); // No need to use recursive, we will delete directory |
|
136 | + $filesarray = dol_dir_list($dolibarr_main_data_root, "all", 0, '', '(\.lock|\.unlock)$', 'name', SORT_ASC, 0, 0, '', 1); // No need to use recursive, we will delete directory |
|
137 | 137 | } |
138 | 138 | } |
139 | 139 | |
140 | 140 | if ($choice == 'allfilesold') { |
141 | 141 | // Delete all files (except .lock and .unlock files, do not follow symbolic links) |
142 | 142 | if ($dolibarr_main_data_root) { |
143 | - $filesarray = dol_dir_list($dolibarr_main_data_root, "files", 1, '', '(\.lock|\.unlock)$', 'name', SORT_ASC, 0, 0, '', 1, $nbsecondsold); // No need to use recursive, we will delete directory |
|
143 | + $filesarray = dol_dir_list($dolibarr_main_data_root, "files", 1, '', '(\.lock|\.unlock)$', 'name', SORT_ASC, 0, 0, '', 1, $nbsecondsold); // No need to use recursive, we will delete directory |
|
144 | 144 | } |
145 | 145 | } |
146 | 146 | |
@@ -1345,14 +1345,14 @@ discard block |
||
1345 | 1345 | } |
1346 | 1346 | if ($tmpfiles && is_array($tmpfiles)) { |
1347 | 1347 | foreach ($tmpfiles as $key => $val) { |
1348 | - if ($key == 'fullname') { |
|
1348 | + if ($key == 'fullname') { |
|
1349 | 1349 | $filepath = array($val); |
1350 | 1350 | $filesize = dol_filesize($val); |
1351 | 1351 | } |
1352 | - if ($key == 'type') { |
|
1352 | + if ($key == 'type') { |
|
1353 | 1353 | $mimetype = array($val); |
1354 | 1354 | } |
1355 | - if ($key == 'relativename') { |
|
1355 | + if ($key == 'relativename') { |
|
1356 | 1356 | $filename = array($val); |
1357 | 1357 | } |
1358 | 1358 | } |
@@ -1361,7 +1361,7 @@ discard block |
||
1361 | 1361 | if ($filepath) { |
1362 | 1362 | if ($filesize > $sizelimit) { |
1363 | 1363 | $message .= '<br>' . $langs->trans("BackupIsTooLargeSend"); |
1364 | - $documenturl = $dolibarr_main_url_root . '/document.php?modulepart=systemtools&atachement=1&file=backup/' . urlencode($filename[0]); |
|
1364 | + $documenturl = $dolibarr_main_url_root . '/document.php?modulepart=systemtools&atachement=1&file=backup/' . urlencode($filename[0]); |
|
1365 | 1365 | $message .= '<br><a href=' . $documenturl . '>Lien de téléchargement</a>'; |
1366 | 1366 | $filepath = ''; |
1367 | 1367 | $mimetype = ''; |
@@ -1433,7 +1433,7 @@ discard block |
||
1433 | 1433 | } |
1434 | 1434 | |
1435 | 1435 | $cron_job = new Cronjob($db); |
1436 | - $cron_job->fetchAll('DESC', 't.rowid', 100, 0, 1, [], 1); // Fetch jobs that are currently running |
|
1436 | + $cron_job->fetchAll('DESC', 't.rowid', 100, 0, 1, [], 1); // Fetch jobs that are currently running |
|
1437 | 1437 | |
1438 | 1438 | // Iterate over all jobs in processing (this can't be this job since his state is set to 0 before) |
1439 | 1439 | foreach ($cron_job->lines as $job_line) { |
@@ -1451,7 +1451,7 @@ discard block |
||
1451 | 1451 | } |
1452 | 1452 | |
1453 | 1453 | // Calling posix_kill with the 0 kill signal will return true if the process is running, false otherwise. |
1454 | - if (! posix_kill($job->pid, 0)) { |
|
1454 | + if (!posix_kill($job->pid, 0)) { |
|
1455 | 1455 | // Clean processing and pid values |
1456 | 1456 | $job->processing = 0; |
1457 | 1457 | $job->pid = null; |
@@ -78,7 +78,7 @@ |
||
78 | 78 | if (!empty($selected) && $selected == $key) { |
79 | 79 | $html .= '<option value="' . $key . '" selected>'; |
80 | 80 | } else { |
81 | - $html .= '<option value="' . $key . '">'; |
|
81 | + $html .= '<option value="' . $key . '">'; |
|
82 | 82 | } |
83 | 83 | $html .= $langs->trans($val); |
84 | 84 | $html .= '</option>'; |
@@ -58,12 +58,12 @@ discard block |
||
58 | 58 | return $this->$newProperty; |
59 | 59 | } |
60 | 60 | if ($this->isDynamicPropertiesEnabled()) { |
61 | - return null; // If the property is set, then __get is not called. |
|
61 | + return null; // If the property is set, then __get is not called. |
|
62 | 62 | } |
63 | 63 | $msg = "DolDeprecationHandler: Undefined property '" . $name . "'" . self::getCallerInfoString(); |
64 | 64 | dol_syslog($msg); |
65 | 65 | trigger_error($msg, E_USER_NOTICE); |
66 | - return $this->$name; // Returning value anyway (graceful degradation) |
|
66 | + return $this->$name; // Returning value anyway (graceful degradation) |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | if (!$this->isDynamicPropertiesEnabled()) { |
94 | 94 | $msg = "DolDeprecationHandler: Undefined property '" . $name . "'" . self::getCallerInfoString(); |
95 | 95 | trigger_error($msg, E_USER_NOTICE); |
96 | - $this->$name = $value; // Setting anyway for graceful degradation |
|
96 | + $this->$name = $value; // Setting anyway for graceful degradation |
|
97 | 97 | } else { |
98 | 98 | $this->$name = $value; |
99 | 99 | } |
@@ -290,7 +290,7 @@ |
||
290 | 290 | '@phan-var-force array<string,CommonHookActions> $modules'; |
291 | 291 | // Loop on each active hooks of module for this context |
292 | 292 | foreach ($modules as $module => $actionclassinstance) { |
293 | - $module = preg_replace('/^\d+:/', '', $module); // $module string is 'priority:module' |
|
293 | + $module = preg_replace('/^\d+:/', '', $module); // $module string is 'priority:module' |
|
294 | 294 | //print "Before hook ".get_class($actionclassinstance)." method=".$method." module=".$module." hooktype=".$hooktype." results=".count($actionclassinstance->results)." resprints=".count($actionclassinstance->resprints)." resaction=".$resaction."<br>\n"; |
295 | 295 | |
296 | 296 | // test to avoid running twice a hook, when a module implements several active contexts |