@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | print $langs->trans("Text"); |
289 | 289 | print '</td><td>'; |
290 | 290 | require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; |
291 | - $extendededitor = 0; // We force no WYSIWYG editor |
|
291 | + $extendededitor = 0; // We force no WYSIWYG editor |
|
292 | 292 | $doleditor = new DolEditor('USER_PUBLIC_MORE', getDolUserString('USER_PUBLIC_MORE', '', $object), '', 160, 'dolibarr_notes', '', false, false, $extendededitor, ROWS_5, '90%'); |
293 | 293 | $doleditor->Create(); |
294 | 294 | print "</td></tr>\n"; |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | |
303 | 303 | print '<br>'; |
304 | 304 | |
305 | - print '</div>'; // End hide/show |
|
305 | + print '</div>'; // End hide/show |
|
306 | 306 | |
307 | 307 | print '<br>'; |
308 | 308 |
@@ -116,7 +116,7 @@ |
||
116 | 116 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BarcodeValue")), null, 'errors'); |
117 | 117 | $error++; |
118 | 118 | } |
119 | - $MAXLENGTH = 51200; // Limit set to 50Ko |
|
119 | + $MAXLENGTH = 51200; // Limit set to 50Ko |
|
120 | 120 | if (dol_strlen($forbarcode) > $MAXLENGTH) { // barcode value |
121 | 121 | setEventMessages($langs->trans("ErrorFieldTooLong", $langs->transnoentitiesnoconv("BarcodeValue")).' ('.$langs->trans("RequireXStringMax", $MAXLENGTH).')', null, 'errors'); |
122 | 122 | $error++; |
@@ -39,8 +39,8 @@ |
||
39 | 39 | |
40 | 40 | $id = GETPOST('id', 'int'); |
41 | 41 | $ref = GETPOST('ref', 'alpha'); |
42 | -$batch = GETPOST('batch', 'alpha'); |
|
43 | -$objectid = GETPOST('productid', 'int'); |
|
42 | +$batch = GETPOST('batch', 'alpha'); |
|
43 | +$objectid = GETPOST('productid', 'int'); |
|
44 | 44 | |
45 | 45 | // Security check |
46 | 46 | $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | |
260 | 260 | $motmp = new Mo($db); |
261 | 261 | |
262 | - $total_consumed=$total_produced=0; |
|
262 | + $total_consumed = $total_produced = 0; |
|
263 | 263 | |
264 | 264 | if ($num > 0) { |
265 | 265 | while ($i < min($num, $limit)) { |
@@ -269,8 +269,8 @@ discard block |
||
269 | 269 | $motmp->ref = $objp->ref; |
270 | 270 | $motmp->status = $objp->status; |
271 | 271 | |
272 | - $total_consumed+=$objp->nb_consumed; |
|
273 | - $total_produced+=$objp->nb_produced; |
|
272 | + $total_consumed += $objp->nb_consumed; |
|
273 | + $total_produced += $objp->nb_produced; |
|
274 | 274 | |
275 | 275 | print '<tr class="oddeven">'; |
276 | 276 | print '<td>'; |
@@ -29,11 +29,11 @@ discard block |
||
29 | 29 | // Load Dolibarr environment |
30 | 30 | require '../main.inc.php'; |
31 | 31 | |
32 | -require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; |
|
33 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php'; |
|
34 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; |
|
35 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; |
|
36 | -require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php'; |
|
32 | +require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; |
|
33 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; |
|
34 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; |
|
35 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php'; |
|
36 | +require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_job.lib.php'; |
|
37 | 37 | |
38 | 38 | // Load translation files required by the page |
39 | 39 | $langs->loadLangs(array('hrm', 'other')); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $linkback = '<a href="'.dol_buildpath('/hrm/job_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
152 | 152 | |
153 | 153 | $morehtmlref = '<div class="refid">'; |
154 | - $morehtmlref.= $object->label; |
|
154 | + $morehtmlref .= $object->label; |
|
155 | 155 | $morehtmlref .= '</div>'; |
156 | 156 | |
157 | 157 |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; |
35 | 35 | require_once DOL_DOCUMENT_ROOT.'/hrm/class/position.class.php'; |
36 | 36 | require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_position.lib.php'; |
37 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; |
|
37 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php'; |
|
38 | 38 | |
39 | 39 | |
40 | 40 | // Load translation files required by the page |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | $filters['search_agenda_label'] = $search_agenda_label; |
228 | 228 | $filters['search_rowid'] = $search_rowid; |
229 | 229 | |
230 | - $object->fields['label']=array(); // Usefull to get only agenda events linked to position (this object doesn't need label of ref field, but show_actions_done() needs it to work correctly) |
|
230 | + $object->fields['label'] = array(); // Usefull to get only agenda events linked to position (this object doesn't need label of ref field, but show_actions_done() needs it to work correctly) |
|
231 | 231 | |
232 | 232 | // TODO Replace this with same code than into list.php |
233 | 233 | show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder, $object->module); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | |
37 | 37 | $langs->load("bookmarks"); |
38 | 38 | |
39 | - $authorized_var=array('limit','optioncss','contextpage'); |
|
39 | + $authorized_var = array('limit', 'optioncss', 'contextpage'); |
|
40 | 40 | $url = $_SERVER["PHP_SELF"]; |
41 | 41 | $url_param = array(); |
42 | 42 | if (!empty($_SERVER["QUERY_STRING"])) { |
@@ -916,7 +916,7 @@ |
||
916 | 916 | * Latest orders |
917 | 917 | */ |
918 | 918 | if (isModEnabled('commande') && $user->hasRight('commande', 'lire')) { |
919 | - $param =""; |
|
919 | + $param = ""; |
|
920 | 920 | |
921 | 921 | $sql = "SELECT s.nom, s.rowid"; |
922 | 922 | $sql .= ", c.rowid as cid, c.entity, c.total_ht"; |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | - If you're having problems creating your postgres dump, make sure you use "--format p --inserts" |
62 | 62 | - Default output engine if not specified is InnoDB |
63 | 63 | |
64 | -XHTML; |
|
64 | +xhtml; |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | function formatsize($s) |
101 | 101 | { |
102 | 102 | if ($s < pow(2, 14)) { |
103 | - return "{$s}B"; |
|
103 | + return "{$s}b"; |
|
104 | 104 | } elseif ($s < pow(2, 20)) { |
105 | 105 | return sprintf("%.1f", round($s / 1024, 1)) . "K"; |
106 | 106 | } elseif ($s < pow(2, 30)) { |
@@ -28,12 +28,12 @@ discard block |
||
28 | 28 | |
29 | 29 | $sapi_type = php_sapi_name(); |
30 | 30 | $script_file = basename(__FILE__); |
31 | -$path = dirname(__FILE__) . '/'; |
|
31 | +$path = dirname(__FILE__).'/'; |
|
32 | 32 | |
33 | 33 | // Test si mode batch |
34 | 34 | $sapi_type = php_sapi_name(); |
35 | 35 | if (substr($sapi_type, 0, 3) == 'cgi') { |
36 | - echo "Error: You are using PHP for CGI. To execute " . $script_file . " from command line, you must use PHP for CLI mode.\n"; |
|
36 | + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; |
|
37 | 37 | exit(); |
38 | 38 | } |
39 | 39 | |
@@ -102,11 +102,11 @@ discard block |
||
102 | 102 | if ($s < pow(2, 14)) { |
103 | 103 | return "{$s}B"; |
104 | 104 | } elseif ($s < pow(2, 20)) { |
105 | - return sprintf("%.1f", round($s / 1024, 1)) . "K"; |
|
105 | + return sprintf("%.1f", round($s / 1024, 1))."K"; |
|
106 | 106 | } elseif ($s < pow(2, 30)) { |
107 | - return sprintf("%.1f", round($s / 1024 / 1024, 1)) . "M"; |
|
107 | + return sprintf("%.1f", round($s / 1024 / 1024, 1))."M"; |
|
108 | 108 | } else { |
109 | - return sprintf("%.1f", round($s / 1024 / 1024 / 1024, 1)) . "G"; |
|
109 | + return sprintf("%.1f", round($s / 1024 / 1024 / 1024, 1))."G"; |
|
110 | 110 | } |
111 | 111 | } |
112 | 112 | |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | } |
139 | 139 | |
140 | 140 | $fs = filesize($infilename); |
141 | - echo "Filesize: " . formatsize($fs) . "\n"; |
|
141 | + echo "Filesize: ".formatsize($fs)."\n"; |
|
142 | 142 | |
143 | 143 | while ($instr = fgets($infp)) { |
144 | 144 | $linenum++; |
@@ -215,13 +215,13 @@ discard block |
||
215 | 215 | |
216 | 216 | fputs($outfp, "\n"); |
217 | 217 | |
218 | - fputs($outfp, '/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;' . "\n"); |
|
219 | - fputs($outfp, '/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;' . "\n"); |
|
220 | - fputs($outfp, '/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;' . "\n"); |
|
221 | - fputs($outfp, '/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;' . "\n"); |
|
222 | - fputs($outfp, '/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;' . "\n"); |
|
223 | - fputs($outfp, '/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;' . "\n"); |
|
224 | - fputs($outfp, '/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;' . "\n"); |
|
218 | + fputs($outfp, '/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;'."\n"); |
|
219 | + fputs($outfp, '/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;'."\n"); |
|
220 | + fputs($outfp, '/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;'."\n"); |
|
221 | + fputs($outfp, '/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;'."\n"); |
|
222 | + fputs($outfp, '/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;'."\n"); |
|
223 | + fputs($outfp, '/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;'."\n"); |
|
224 | + fputs($outfp, '/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;'."\n"); |
|
225 | 225 | |
226 | 226 | printf("Completed! %9d lines %9d sql chunks\n\n", $linenum, $chunkcount); |
227 | 227 | |
@@ -250,8 +250,8 @@ discard block |
||
250 | 250 | } |
251 | 251 | |
252 | 252 | if ($header) { |
253 | - $output = "-- Converted with " . PRODUCT . "-" . VERSION . "\n"; |
|
254 | - $output .= "-- Converted on " . date("r") . "\n"; |
|
253 | + $output = "-- Converted with ".PRODUCT."-".VERSION."\n"; |
|
254 | + $output .= "-- Converted on ".date("r")."\n"; |
|
255 | 255 | $output .= "\n"; |
256 | 256 | |
257 | 257 | $output .= "/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n"; |
@@ -282,8 +282,8 @@ discard block |
||
282 | 282 | |
283 | 283 | $reg = array(); |
284 | 284 | if (preg_match('/CREATE SEQUENCE (?:public\.)(.*)_(id|rowid|id_comment)_seq/', $line, $reg)) { |
285 | - $outputatend .= '-- Make field ' . $reg[2] . ' auto_increment for table ' . $reg[1] . "\n"; |
|
286 | - $outputatend .= 'ALTER TABLE ' . $reg[1] . ' CHANGE COLUMN ' . $reg[2] . ' ' . $reg[2] . ' INTEGER NOT NULL AUTO_INCREMENT;' . "\n\n"; |
|
285 | + $outputatend .= '-- Make field '.$reg[2].' auto_increment for table '.$reg[1]."\n"; |
|
286 | + $outputatend .= 'ALTER TABLE '.$reg[1].' CHANGE COLUMN '.$reg[2].' '.$reg[2].' INTEGER NOT NULL AUTO_INCREMENT;'."\n\n"; |
|
287 | 287 | // var_dump($outputatend); |
288 | 288 | } |
289 | 289 | |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | |
300 | 300 | $reg2 = array(); |
301 | 301 | if (preg_match('/CREATE TABLE ([^\s]+)/', $line, $reg2)) { |
302 | - $output .= 'DROP TABLE IF EXISTS `' . $reg2[1] . '`;' . "\n"; |
|
302 | + $output .= 'DROP TABLE IF EXISTS `'.$reg2[1].'`;'."\n"; |
|
303 | 303 | } |
304 | 304 | $output .= $line; |
305 | 305 | $linenumber++; |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | $arrayofprimaryalreadyintabledef[$in_create_table] = $in_create_table; |
380 | 380 | } |
381 | 381 | |
382 | - $specialfields = array("repeat","status","type","call"); |
|
382 | + $specialfields = array("repeat", "status", "type", "call"); |
|
383 | 383 | |
384 | 384 | $field = getfieldname($line); |
385 | 385 | if (in_array($field, $specialfields)) { |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | $lastchr = substr($output, -2, 1); |
399 | 399 | // echo "lastchr=$lastchr"; |
400 | 400 | if ($lastchr == ",") { |
401 | - $output = substr($output, 0, -2) . "\n"; |
|
401 | + $output = substr($output, 0, -2)."\n"; |
|
402 | 402 | } |
403 | 403 | } |
404 | 404 | |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | $after = str_replace(" (E'", " ('", $after); |
424 | 424 | $after = str_replace(", E'", ", '", $after); |
425 | 425 | |
426 | - $output .= $before . " VALUES " . $after; |
|
426 | + $output .= $before." VALUES ".$after; |
|
427 | 427 | $linenumber++; |
428 | 428 | continue; |
429 | 429 | } else { |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | $inquotes = false; |
452 | 452 | } |
453 | 453 | |
454 | - $output .= $before . " VALUES " . $after; |
|
454 | + $output .= $before." VALUES ".$after; |
|
455 | 455 | do { |
456 | 456 | $linenumber++; |
457 | 457 | |
@@ -501,14 +501,14 @@ discard block |
||
501 | 501 | $output .= str_replace("\n", "", $pkey); |
502 | 502 | // the postgres and mysql syntax for this is (at least, in the example im looking at) |
503 | 503 | // identical, so we can just add it as is. |
504 | - $output .= $line . "\n"; |
|
504 | + $output .= $line."\n"; |
|
505 | 505 | } else { |
506 | - $output .= '-- ' . str_replace("\n", "", $pkey); |
|
507 | - $output .= '-- ' . $line . "\n"; |
|
506 | + $output .= '-- '.str_replace("\n", "", $pkey); |
|
507 | + $output .= '-- '.$line."\n"; |
|
508 | 508 | } |
509 | 509 | } else { |
510 | - $output .= '-- ' . str_replace("\n", "", $pkey); |
|
511 | - $output .= '-- ' . $line . "\n"; |
|
510 | + $output .= '-- '.str_replace("\n", "", $pkey); |
|
511 | + $output .= '-- '.$line."\n"; |
|
512 | 512 | } |
513 | 513 | } |
514 | 514 | } |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | $tablename = str_replace('public.', '', $matches[2]); |
523 | 523 | $columns = $matches[3]; |
524 | 524 | if ($tablename && $columns) { |
525 | - $output .= "ALTER TABLE `" . $tablename . "` ADD INDEX " . $indexname . "( {$columns} ) ;\n"; |
|
525 | + $output .= "ALTER TABLE `".$tablename."` ADD INDEX ".$indexname."( {$columns} ) ;\n"; |
|
526 | 526 | } |
527 | 527 | } |
528 | 528 | } |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | $tablename = str_replace('public.', '', $matches[2]); |
535 | 535 | $columns = str_replace('"', '', $matches[3]); |
536 | 536 | if ($tablename && $columns) { |
537 | - $output .= "ALTER TABLE `" . $tablename . "` ADD UNIQUE INDEX " . $indexname . " ( {$columns} ) ;\n"; |
|
537 | + $output .= "ALTER TABLE `".$tablename."` ADD UNIQUE INDEX ".$indexname." ( {$columns} ) ;\n"; |
|
538 | 538 | } |
539 | 539 | } |
540 | 540 | } |
@@ -565,16 +565,16 @@ discard block |
||
565 | 565 | if ($line == "\\.\n") { |
566 | 566 | $in_insert = false; |
567 | 567 | if ($values) { |
568 | - $output .= "INSERT INTO $heads VALUES\n" . implode(",\n", $values) . ";\n\n"; |
|
568 | + $output .= "INSERT INTO $heads VALUES\n".implode(",\n", $values).";\n\n"; |
|
569 | 569 | } |
570 | 570 | } else { |
571 | 571 | $vals = explode(' ', $line); |
572 | 572 | foreach ($vals as $i => $val) { |
573 | - $vals[$i] = ($val == '\\N') ? 'NULL' : "'" . str_replace("'", "\\'", trim($val)) . "'"; |
|
573 | + $vals[$i] = ($val == '\\N') ? 'NULL' : "'".str_replace("'", "\\'", trim($val))."'"; |
|
574 | 574 | } |
575 | - $values[] = '(' . implode(',', $vals) . ')'; |
|
575 | + $values[] = '('.implode(',', $vals).')'; |
|
576 | 576 | if (count($values) >= 1000) { |
577 | - $output .= "INSERT INTO $heads VALUES\n" . implode(",\n", $values) . ";\n"; |
|
577 | + $output .= "INSERT INTO $heads VALUES\n".implode(",\n", $values).";\n"; |
|
578 | 578 | $values = array(); |
579 | 579 | } |
580 | 580 | } |
@@ -583,5 +583,5 @@ discard block |
||
583 | 583 | $linenumber++; |
584 | 584 | } |
585 | 585 | |
586 | - return array('output' => $output,'outputatend' => $outputatend); |
|
586 | + return array('output' => $output, 'outputatend' => $outputatend); |
|
587 | 587 | } |