@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $flowChunkSize = GETPOST('flowChunkSize', 'alpha'); |
57 | 57 | $flowTotalSize = GETPOST('flowTotalSize', 'alpha'); |
58 | 58 | |
59 | -$result = restrictedArea($user, $module, 0, '', 0, 'fk_soc', 'rowid', 0, 1); // Call with mode return |
|
59 | +$result = restrictedArea($user, $module, 0, '', 0, 'fk_soc', 'rowid', 0, 1); // Call with mode return |
|
60 | 60 | |
61 | 61 | if ($action != 'upload') { |
62 | 62 | httponly_accessforbidden("Param action must be 'upload'"); |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | |
164 | 164 | // check that all the parts are present |
165 | 165 | // the size of the last part is between chunkSize and 2*$chunkSize |
166 | - if ($total_files * $chunkSize >= ($totalSize - $chunkSize + 1)) { |
|
166 | + if ($total_files * $chunkSize >= ($totalSize - $chunkSize + 1)) { |
|
167 | 167 | // create the final destination file |
168 | 168 | if (($fp = fopen($upload_dir . '/' . $fileName, 'w')) !== false) { |
169 | 169 | for ($i = 1; $i <= $total_files; $i++) { |
@@ -93,9 +93,9 @@ |
||
93 | 93 | $vartmp = (empty($InfoFieldList[3]) ? '' : $InfoFieldList[3]); |
94 | 94 | $reg = array(); |
95 | 95 | if (preg_match('/^.*:(\w*)$/', $vartmp, $reg)) { |
96 | - $InfoFieldList[4] = $reg[1]; // take the sort field |
|
96 | + $InfoFieldList[4] = $reg[1]; // take the sort field |
|
97 | 97 | } |
98 | - $InfoFieldList[3] = preg_replace('/:\w*$/', '', $vartmp); // take the filter field |
|
98 | + $InfoFieldList[3] = preg_replace('/:\w*$/', '', $vartmp); // take the filter field |
|
99 | 99 | |
100 | 100 | $classname = $InfoFieldList[0]; |
101 | 101 | $classpath = $InfoFieldList[1]; |
@@ -117,7 +117,7 @@ |
||
117 | 117 | if (isModEnabled('supplier_proposal') && !getDolGlobalString('MAIN_SEARCHFORM_SUPPLIER_PROPAL_DISABLED') && $user->hasRight('supplier_proposal', 'lire')) { |
118 | 118 | $arrayresult['searchintosupplierpropal'] = array('position' => 100, 'img' => 'object_supplier_proposal', 'label' => $langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text' => img_picto('', 'object_supplier_proposal', 'class="pictofixedwidth"') . ' ' . $langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url' => DOL_URL_ROOT . '/supplier_proposal/list.php' . ($search_boxvalue ? '?search_all=' . urlencode($search_boxvalue) : '')); |
119 | 119 | } |
120 | -if (((isModEnabled('fournisseur') && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight('fournisseur', 'commande', 'lire')) || (isModEnabled('supplier_order') && $user->hasRight('supplier_order', 'lire'))) && !getDolGlobalString('MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED')) { |
|
120 | +if (((isModEnabled('fournisseur') && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight('fournisseur', 'commande', 'lire')) || (isModEnabled('supplier_order') && $user->hasRight('supplier_order', 'lire'))) && !getDolGlobalString('MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED')) { |
|
121 | 121 | $arrayresult['searchintosupplierorder'] = array('position' => 110, 'img' => 'object_supplier_order', 'label' => $langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text' => img_picto('', 'object_supplier_order', 'class="pictofixedwidth"') . ' ' . $langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url' => DOL_URL_ROOT . '/fourn/commande/list.php' . ($search_boxvalue ? '?search_all=' . urlencode($search_boxvalue) : '')); |
122 | 122 | } |
123 | 123 | if (((isModEnabled('fournisseur') && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight('fournisseur', 'facture', 'lire')) || (isModEnabled('supplier_invoice') && $user->hasRight('supplier_invoice', 'lire'))) && !getDolGlobalString('MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED')) { |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | // Load object according to $id and $element |
55 | 55 | $object = fetchObjectByElement($id, $element); |
56 | 56 | if (!is_object($object)) { |
57 | - httponly_accessforbidden("Bad value for combination of parameters element/field: Object not found."); // This includes the exit. |
|
57 | + httponly_accessforbidden("Bad value for combination of parameters element/field: Object not found."); // This includes the exit. |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | $object->fields[$field] = array('type' => $format, 'enabled' => 1); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | if (!empty($user->socid)) { |
73 | 73 | $socid = $user->socid; |
74 | 74 | if (!empty($object->socid) && $socid != $object->socid) { |
75 | - httponly_accessforbidden("Access on object not allowed for this external user."); // This includes the exit. |
|
75 | + httponly_accessforbidden("Access on object not allowed for this external user."); // This includes the exit. |
|
76 | 76 | } |
77 | 77 | } |
78 | 78 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | } elseif ($element == 'product' && in_array($field, array('tosell', 'tobuy', 'tobatch'))) { // Special case for products |
84 | 84 | restrictedArea($user, 'produit|service', $object, 'product&product', '', '', 'rowid'); |
85 | 85 | } else { |
86 | - httponly_accessforbidden("Bad value for combination of parameters element/field: Field not supported."); // This includes the exit. |
|
86 | + httponly_accessforbidden("Bad value for combination of parameters element/field: Field not supported."); // This includes the exit. |
|
87 | 87 | } |
88 | 88 | |
89 | 89 |
@@ -131,7 +131,7 @@ |
||
131 | 131 | $sql .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'actioncomm_reminder as ar ON a.id = ar.fk_actioncomm AND ar.fk_user = ' . ((int) $user->id); |
132 | 132 | $sql .= " AND ar.typeremind = 'browser' AND ar.dateremind < '" . $db->idate(dol_now()) . "'"; |
133 | 133 | $sql .= " AND ar.status = 0"; |
134 | - $sql .= " AND ar.entity = " . ((int) $conf->entity); // No sharing of entity for alerts |
|
134 | + $sql .= " AND ar.entity = " . ((int) $conf->entity); // No sharing of entity for alerts |
|
135 | 135 | $sql .= $db->order('datep', 'ASC'); |
136 | 136 | $sql .= $db->plimit(10); // Avoid too many notification at once |
137 | 137 |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | |
61 | 61 | $signature = GETPOST('signaturebase64'); |
62 | 62 | $ref = GETPOST('ref', 'aZ09'); |
63 | -$mode = GETPOST('mode', 'aZ09'); // 'proposal', ... |
|
63 | +$mode = GETPOST('mode', 'aZ09'); // 'proposal', ... |
|
64 | 64 | $SECUREKEY = GETPOST("securekey"); // Secure key |
65 | 65 | $online_sign_name = GETPOST("onlinesignname") ? GETPOST("onlinesignname") : ''; |
66 | 66 | |
@@ -114,8 +114,8 @@ discard block |
||
114 | 114 | $upload_dir = !empty($conf->propal->multidir_output[$object->entity]) ? $conf->propal->multidir_output[$object->entity] : $conf->propal->dir_output; |
115 | 115 | $upload_dir .= '/' . dol_sanitizeFileName($object->ref) . '/'; |
116 | 116 | |
117 | - $default_font_size = pdf_getPDFFontSize($langs); // Must be after pdf_getInstance |
|
118 | - $default_font = pdf_getPDFFont($langs); // Must be after pdf_getInstance |
|
117 | + $default_font_size = pdf_getPDFFontSize($langs); // Must be after pdf_getInstance |
|
118 | + $default_font = pdf_getPDFFont($langs); // Must be after pdf_getInstance |
|
119 | 119 | $langs->loadLangs(array("main", "companies")); |
120 | 120 | |
121 | 121 | $date = dol_print_date(dol_now(), "%Y%m%d%H%M%S"); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | if (!$error) { |
139 | 139 | // Defined modele of doc |
140 | 140 | $last_main_doc_file = $object->last_main_doc; |
141 | - $directdownloadlink = $object->getLastMainDocLink('proposal'); // url to download the $object->last_main_doc |
|
141 | + $directdownloadlink = $object->getLastMainDocLink('proposal'); // url to download the $object->last_main_doc |
|
142 | 142 | |
143 | 143 | if (preg_match('/\.pdf/i', $last_main_doc_file)) { |
144 | 144 | // TODO Use the $last_main_doc_file to defined the $newpdffilename and $sourcefile |
@@ -159,13 +159,13 @@ discard block |
||
159 | 159 | } |
160 | 160 | |
161 | 161 | //$pdf->Open(); |
162 | - $pagecount = $pdf->setSourceFile($sourcefile); // original PDF |
|
162 | + $pagecount = $pdf->setSourceFile($sourcefile); // original PDF |
|
163 | 163 | |
164 | 164 | $param = array(); |
165 | 165 | $param['online_sign_name'] = $online_sign_name; |
166 | 166 | $param['pathtoimage'] = $upload_dir . $filename; |
167 | 167 | |
168 | - $s = array(); // Array with size of each page. Example array(w'=>210, 'h'=>297); |
|
168 | + $s = array(); // Array with size of each page. Example array(w'=>210, 'h'=>297); |
|
169 | 169 | for ($i = 1; $i < ($pagecount + 1); $i++) { |
170 | 170 | try { |
171 | 171 | $tppl = $pdf->importPage($i); |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | if (!$error) { |
297 | 297 | // Defined modele of doc |
298 | 298 | $last_main_doc_file = $object->last_main_doc; |
299 | - $directdownloadlink = $object->getLastMainDocLink('contrat'); // url to download the $object->last_main_doc |
|
299 | + $directdownloadlink = $object->getLastMainDocLink('contrat'); // url to download the $object->last_main_doc |
|
300 | 300 | if (preg_match('/\.pdf/i', $last_main_doc_file)) { |
301 | 301 | // TODO Use the $last_main_doc_file to defined the $newpdffilename and $sourcefile |
302 | 302 | $newpdffilename = $upload_dir . $ref . "_signed-" . $date . ".pdf"; |
@@ -316,13 +316,13 @@ discard block |
||
316 | 316 | } |
317 | 317 | |
318 | 318 | //$pdf->Open(); |
319 | - $pagecount = $pdf->setSourceFile($sourcefile); // original PDF |
|
319 | + $pagecount = $pdf->setSourceFile($sourcefile); // original PDF |
|
320 | 320 | |
321 | 321 | $param = array(); |
322 | 322 | $param['online_sign_name'] = $online_sign_name; |
323 | 323 | $param['pathtoimage'] = $upload_dir . $filename; |
324 | 324 | |
325 | - $s = array(); // Array with size of each page. Example array(w'=>210, 'h'=>297); |
|
325 | + $s = array(); // Array with size of each page. Example array(w'=>210, 'h'=>297); |
|
326 | 326 | for ($i = 1; $i < ($pagecount + 1); $i++) { |
327 | 327 | try { |
328 | 328 | $tppl = $pdf->importPage($i); |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | |
387 | 387 | $langs->loadLangs(array("main", "companies")); |
388 | 388 | |
389 | - $default_font_size = pdf_getPDFFontSize($langs); // Must be after pdf_getInstance |
|
389 | + $default_font_size = pdf_getPDFFontSize($langs); // Must be after pdf_getInstance |
|
390 | 390 | $default_font = pdf_getPDFFont($langs); // Must be |
391 | 391 | |
392 | 392 | $date = dol_print_date(dol_now(), "%Y%m%d%H%M%S"); |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | if (!$error) { |
410 | 410 | // Defined modele of doc |
411 | 411 | $last_main_doc_file = $object->last_main_doc; |
412 | - $directdownloadlink = $object->getLastMainDocLink('fichinter'); // url to download the $object->last_main_doc |
|
412 | + $directdownloadlink = $object->getLastMainDocLink('fichinter'); // url to download the $object->last_main_doc |
|
413 | 413 | if (preg_match('/\.pdf/i', $last_main_doc_file)) { |
414 | 414 | // TODO Use the $last_main_doc_file to defined the $newpdffilename and $sourcefile |
415 | 415 | $newpdffilename = $upload_dir . $ref . "_signed-" . $date . ".pdf"; |
@@ -429,13 +429,13 @@ discard block |
||
429 | 429 | } |
430 | 430 | |
431 | 431 | //$pdf->Open(); |
432 | - $pagecount = $pdf->setSourceFile($sourcefile); // original PDF |
|
432 | + $pagecount = $pdf->setSourceFile($sourcefile); // original PDF |
|
433 | 433 | |
434 | 434 | $param = array(); |
435 | 435 | $param['online_sign_name'] = $online_sign_name; |
436 | 436 | $param['pathtoimage'] = $upload_dir . $filename; |
437 | 437 | |
438 | - $s = array(); // Array with size of each page. Example array(w'=>210, 'h'=>297); |
|
438 | + $s = array(); // Array with size of each page. Example array(w'=>210, 'h'=>297); |
|
439 | 439 | for ($i = 1; $i < ($pagecount + 1); $i++) { |
440 | 440 | try { |
441 | 441 | $tppl = $pdf->importPage($i); |
@@ -501,8 +501,8 @@ discard block |
||
501 | 501 | |
502 | 502 | $upload_dir = $conf->societe->multidir_output[$object->thirdparty->entity] . '/' . dol_sanitizeFileName($object->thirdparty->id) . '/'; |
503 | 503 | |
504 | - $default_font_size = pdf_getPDFFontSize($langs); // Must be after pdf_getInstance |
|
505 | - $default_font = pdf_getPDFFont($langs); // Must be after pdf_getInstance |
|
504 | + $default_font_size = pdf_getPDFFontSize($langs); // Must be after pdf_getInstance |
|
505 | + $default_font = pdf_getPDFFont($langs); // Must be after pdf_getInstance |
|
506 | 506 | $langs->loadLangs(array("main", "companies")); |
507 | 507 | |
508 | 508 | $date = dol_print_date(dol_now(), "%Y%m%d%H%M%S"); |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | // Defined modele of doc |
527 | 527 | $last_main_doc_file = $object->last_main_doc; |
528 | 528 | $last_modelpdf = $object->model_pdf; |
529 | - $directdownloadlink = $object->getLastMainDocLink('company'); // url to download the $object->last_main_doc |
|
529 | + $directdownloadlink = $object->getLastMainDocLink('company'); // url to download the $object->last_main_doc |
|
530 | 530 | |
531 | 531 | if (preg_match('/\.pdf/i', $last_main_doc_file)) { |
532 | 532 | $sourcefile = ''; |
@@ -549,9 +549,9 @@ discard block |
||
549 | 549 | } |
550 | 550 | |
551 | 551 | //$pdf->Open(); |
552 | - $pagecount = $pdf->setSourceFile($sourcefile); // original PDF |
|
552 | + $pagecount = $pdf->setSourceFile($sourcefile); // original PDF |
|
553 | 553 | |
554 | - $s = array(); // Array with size of each page. Example array(w'=>210, 'h'=>297); |
|
554 | + $s = array(); // Array with size of each page. Example array(w'=>210, 'h'=>297); |
|
555 | 555 | for ($i = 1; $i < ($pagecount + 1); $i++) { |
556 | 556 | try { |
557 | 557 | $tppl = $pdf->importPage($i); |
@@ -703,7 +703,7 @@ discard block |
||
703 | 703 | */ |
704 | 704 | function dolPrintSignatureImage(TCPDF $pdf, $langs, $params) |
705 | 705 | { |
706 | - $default_font_size = pdf_getPDFFontSize($langs); // Must be after pdf_getInstance |
|
706 | + $default_font_size = pdf_getPDFFontSize($langs); // Must be after pdf_getInstance |
|
707 | 707 | $default_font = pdf_getPDFFont($langs); // Must be |
708 | 708 | $xforimgstart = $params['xforimgstart']; |
709 | 709 | $yforimgstart = $params['yforimgstart']; |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | // Security check |
48 | 48 | if (!isModEnabled('incoterm')) { |
49 | - httponly_accessforbidden("Module incoterm not enabled"); // This includes the exit. |
|
49 | + httponly_accessforbidden("Module incoterm not enabled"); // This includes the exit. |
|
50 | 50 | } |
51 | 51 | // There is no other permission on this component. Everybody connected can read content of the incoterm table |
52 | 52 |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | if ($reshook > 0) { |
140 | 140 | $perm = $hookmanager->resArray['perm']; |
141 | 141 | } |
142 | - if (! $perm) { |
|
142 | + if (!$perm) { |
|
143 | 143 | // We should not be here. If we are not allowed to reorder rows, feature should not be visible on script. |
144 | 144 | // If we are here, it is a hack attempt, so we report a warning. |
145 | 145 | print 'Bad permission to modify position of lines for object in table ' . $table_element_line; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | |
162 | 162 | // Reorder line to have position of children lines sharing same counter than parent lines |
163 | 163 | // This should be useless because there is no need to have children sharing same counter than parent, but well, it's cleaner into database. |
164 | - if (in_array($fk_element, array('fk_facture', 'fk_propal', 'fk_commande','fk_contrat'))) { |
|
164 | + if (in_array($fk_element, array('fk_facture', 'fk_propal', 'fk_commande', 'fk_contrat'))) { |
|
165 | 165 | $result = $row->line_order(true); |
166 | 166 | } |
167 | 167 | } else { |
@@ -81,19 +81,19 @@ discard block |
||
81 | 81 | $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim(getDolGlobalString($keyforuploaddir)))); |
82 | 82 | |
83 | 83 | foreach ($listofdir as $key => $tmpdir) { |
84 | - $tmpdir = preg_replace('/DOL_DATA_ROOT\/*/', '', $tmpdir); // Clean string if we found a hardcoded DOL_DATA_ROOT |
|
84 | + $tmpdir = preg_replace('/DOL_DATA_ROOT\/*/', '', $tmpdir); // Clean string if we found a hardcoded DOL_DATA_ROOT |
|
85 | 85 | if (!$tmpdir) { |
86 | 86 | unset($listofdir[$key]); |
87 | 87 | continue; |
88 | 88 | } |
89 | - $tmpdir = DOL_DATA_ROOT . '/' . $tmpdir; // Complete with DOL_DATA_ROOT. Only files into DOL_DATA_ROOT can be reach/set |
|
89 | + $tmpdir = DOL_DATA_ROOT . '/' . $tmpdir; // Complete with DOL_DATA_ROOT. Only files into DOL_DATA_ROOT can be reach/set |
|
90 | 90 | if (!is_dir($tmpdir)) { |
91 | 91 | if (empty($nomessageinsetmoduleoptions)) { |
92 | 92 | setEventMessages($langs->trans("ErrorDirNotFound", $tmpdir), null, 'warnings'); |
93 | 93 | } |
94 | 94 | } else { |
95 | 95 | $upload_dir = $tmpdir; |
96 | - break; // So we take the first directory found into setup $conf->global->$keyforuploaddir |
|
96 | + break; // So we take the first directory found into setup $conf->global->$keyforuploaddir |
|
97 | 97 | } |
98 | 98 | } |
99 | 99 | |
@@ -133,19 +133,19 @@ discard block |
||
133 | 133 | |
134 | 134 | foreach ($listofdir as $key => $tmpdir) { |
135 | 135 | $tmpdir = trim($tmpdir); |
136 | - $tmpdir = preg_replace('/DOL_DATA_ROOT\/*/', '', $tmpdir); // Clean string if we found a hardcoded DOL_DATA_ROOT |
|
136 | + $tmpdir = preg_replace('/DOL_DATA_ROOT\/*/', '', $tmpdir); // Clean string if we found a hardcoded DOL_DATA_ROOT |
|
137 | 137 | if (!$tmpdir) { |
138 | 138 | unset($listofdir[$key]); |
139 | 139 | continue; |
140 | 140 | } |
141 | - $tmpdir = DOL_DATA_ROOT . '/' . $tmpdir; // Complete with DOL_DATA_ROOT. Only files into DOL_DATA_ROOT can be reach/set |
|
141 | + $tmpdir = DOL_DATA_ROOT . '/' . $tmpdir; // Complete with DOL_DATA_ROOT. Only files into DOL_DATA_ROOT can be reach/set |
|
142 | 142 | if (!is_dir($tmpdir)) { |
143 | 143 | if (empty($nomessageinsetmoduleoptions)) { |
144 | 144 | setEventMessages($langs->trans("ErrorDirNotFound", $tmpdir), null, 'warnings'); |
145 | 145 | } |
146 | 146 | } else { |
147 | 147 | $upload_dir = $tmpdir; |
148 | - break; // So we take the first directory found into setup $conf->global->$keyforuploaddir |
|
148 | + break; // So we take the first directory found into setup $conf->global->$keyforuploaddir |
|
149 | 149 | } |
150 | 150 | } |
151 | 151 |