@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | if (dol_is_file($filetpl)) { |
| 155 | 155 | if ($backupold) { |
| 156 | 156 | $result = archiveOrBackupFile($filetpl); |
| 157 | - if (! $result) { |
|
| 157 | + if (!$result) { |
|
| 158 | 158 | return false; |
| 159 | 159 | } |
| 160 | 160 | } else { |
@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | |
| 334 | 334 | $tplcontent .= '<?php // BEGIN PHP'."\n"; |
| 335 | 335 | $tplcontent .= '} catch(Exception $e) { print $e->getMessage(); }'."\n"; |
| 336 | - $tplcontent .= '$tmp = ob_get_contents(); ob_end_clean();'."\n"; // replace with ob_get_clean ? |
|
| 336 | + $tplcontent .= '$tmp = ob_get_contents(); ob_end_clean();'."\n"; // replace with ob_get_clean ? |
|
| 337 | 337 | |
| 338 | 338 | $tplcontent .= "// Now fix the content for SEO or multilanguage\n"; |
| 339 | 339 | // Old method for custom SEO |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | $indexcontent .= " require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n"; |
| 465 | 465 | $indexcontent .= ' redirectToContainer($_GET[\'pageref\'], $_GET[\'pagealiasalt\'], $_GET[\'pageid\']);'."\n"; |
| 466 | 466 | $indexcontent .= "}\n"; |
| 467 | - $indexcontent .= "include_once '".$relpath."/".basename($filetpl)."'\n"; // use .. instead of . |
|
| 467 | + $indexcontent .= "include_once '".$relpath."/".basename($filetpl)."'\n"; // use .. instead of . |
|
| 468 | 468 | $indexcontent .= '// END PHP ?>'."\n"; |
| 469 | 469 | $result = file_put_contents($fileindexsub, $indexcontent); |
| 470 | 470 | if ($result === false) { |
@@ -823,7 +823,7 @@ discard block |
||
| 823 | 823 | //$forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("require", "include", "require_once", "include_once")); |
| 824 | 824 | if (!getDolGlobalString('WEBSITE_PHP_ALLOW_EXEC')) { // If option is not on, we disallow functions to execute commands |
| 825 | 825 | $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("exec", "passthru", "shell_exec", "system", "proc_open", "popen")); |
| 826 | - $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("dol_eval", "executeCLI", "verifCond")); // native dolibarr functions |
|
| 826 | + $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("dol_eval", "executeCLI", "verifCond")); // native dolibarr functions |
|
| 827 | 827 | $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("eval", "create_function", "assert", "mb_ereg_replace")); // function with eval capabilities |
| 828 | 828 | } |
| 829 | 829 | if (!getDolGlobalString('WEBSITE_PHP_ALLOW_WRITE')) { // If option is not on, we disallow functions to write files |
@@ -832,7 +832,7 @@ discard block |
||
| 832 | 832 | } |
| 833 | 833 | //$forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("require", "include")); |
| 834 | 834 | |
| 835 | - $forbiddenphpmethods = array('invoke', 'invokeArgs'); // Method of ReflectionFunction to execute a function |
|
| 835 | + $forbiddenphpmethods = array('invoke', 'invokeArgs'); // Method of ReflectionFunction to execute a function |
|
| 836 | 836 | |
| 837 | 837 | foreach ($forbiddenphpstrings as $forbiddenphpstring) { |
| 838 | 838 | if (preg_match('/'.preg_quote($forbiddenphpstring, '/').'/ims', $phpfullcodestring)) { |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | $tabpay[$obj->rowid] = array( |
| 132 | 132 | 'id' => $obj->rowid, |
| 133 | 133 | 'date' => $db->jdate($obj->do), |
| 134 | - 'type_payment' => $obj->fk_type,// CHQ, VIR, LIQ, CB, ... |
|
| 134 | + 'type_payment' => $obj->fk_type, // CHQ, VIR, LIQ, CB, ... |
|
| 135 | 135 | 'ref' => $obj->label, // by default, not unique. May be changed later |
| 136 | 136 | 'fk_bank_account' => $obj->fk_account, |
| 137 | 137 | 'objects' => array(), |
@@ -870,7 +870,7 @@ discard block |
||
| 870 | 870 | } else { |
| 871 | 871 | $sql .= " LEFT JOIN ".$db->prefix()."accounting_bookkeeping as ab ON ab.fk_doc=bu.fk_bank AND ab.fk_docdet=pv.rowid"; |
| 872 | 872 | } |
| 873 | - $sql .= " WHERE pv.entity IN (".getEntity('payment_various', 0).')'; // We don't share object for accountancy, we use source object sharing |
|
| 873 | + $sql .= " WHERE pv.entity IN (".getEntity('payment_various', 0).')'; // We don't share object for accountancy, we use source object sharing |
|
| 874 | 874 | $sql .= " AND bu.fk_bank IN (".$db->sanitize(implode(',', $ids)).")"; |
| 875 | 875 | // Not already in bookkeeping |
| 876 | 876 | if ($in_bookkeeping == 'notyet') { |
@@ -1256,7 +1256,7 @@ discard block |
||
| 1256 | 1256 | |
| 1257 | 1257 | if ($error >= $MAXNBERRORS) { |
| 1258 | 1258 | setEventMessages($langs->trans("ErrorTooManyErrorsProcessStopped").' (>'.$MAXNBERRORS.')', null, 'errors'); |
| 1259 | - break; // Break in the foreach |
|
| 1259 | + break; // Break in the foreach |
|
| 1260 | 1260 | } |
| 1261 | 1261 | } |
| 1262 | 1262 | } |
@@ -1267,7 +1267,7 @@ discard block |
||
| 1267 | 1267 | $db->rollback(); |
| 1268 | 1268 | |
| 1269 | 1269 | if ($error >= $MAXNBERRORS) { |
| 1270 | - break; // Break in the foreach |
|
| 1270 | + break; // Break in the foreach |
|
| 1271 | 1271 | } |
| 1272 | 1272 | } |
| 1273 | 1273 | } |