@@ -36,7 +36,7 @@ |
||
36 | 36 | $params['modx_category'], |
37 | 37 | $params['lock_template'], |
38 | 38 | array_key_exists('installset', $params) ? preg_split("/\s*,\s*/", $params['installset']) : false, |
39 | - isset($params['save_sql_id_as']) ? $params['save_sql_id_as'] : NULL // Nessecary to fix template-ID for demo-site |
|
39 | + isset($params['save_sql_id_as']) ? $params['save_sql_id_as'] : null // Nessecary to fix template-ID for demo-site |
|
40 | 40 | ); |
41 | 41 | } |
42 | 42 | } |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | } |
239 | 239 | |
240 | 240 | // write $somecontent to our opened file. |
241 | -if (@ fwrite($handle, $configString) === FALSE) { |
|
241 | +if (@ fwrite($handle, $configString) === false) { |
|
242 | 242 | $configFileFailed = true; |
243 | 243 | } |
244 | 244 | @ fclose($handle); |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | $rs = mysqli_query($sqlParser->conn, "SELECT * FROM $dbase.`" . $table_prefix . "site_templates` WHERE templatename='$name'"); |
327 | 327 | |
328 | 328 | if (mysqli_num_rows($rs)) { |
329 | - if (!mysqli_query($sqlParser->conn, "UPDATE $dbase.`" . $table_prefix . "site_templates` SET content='$template', description='$desc', category=$category_id, locked='$locked' WHERE templatename='$name' LIMIT 1;")) { |
|
329 | + if (!mysqli_query($sqlParser->conn, "update $dbase.`" . $table_prefix . "site_templates` SET content='$template', description='$desc', category=$category_id, locked='$locked' WHERE templatename='$name' LIMIT 1;")) { |
|
330 | 330 | $errors += 1; |
331 | 331 | echo "<p>" . mysqli_error($sqlParser->conn) . "</p>"; |
332 | 332 | return; |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | if (mysqli_num_rows($rs)) { |
383 | 383 | $insert = true; |
384 | 384 | while($row = mysqli_fetch_assoc($rs)) { |
385 | - if (!mysqli_query($sqlParser->conn, "UPDATE $dbase.`" . $table_prefix . "site_tmplvars` SET type='$input_type', caption='$caption', description='$desc', category=$category, locked=$locked, elements='$input_options', display='$output_widget', display_params='$output_widget_params', default_text='$input_default' WHERE id={$row['id']};")) { |
|
385 | + if (!mysqli_query($sqlParser->conn, "update $dbase.`" . $table_prefix . "site_tmplvars` SET type='$input_type', caption='$caption', description='$desc', category=$category, locked=$locked, elements='$input_options', display='$output_widget', display_params='$output_widget_params', default_text='$input_default' WHERE id={$row['id']};")) { |
|
386 | 386 | echo "<p>" . mysqli_error($sqlParser->conn) . "</p>"; |
387 | 387 | return; |
388 | 388 | } |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | } |
459 | 459 | $update = $count_original_name > 0 && $overwrite == 'true'; |
460 | 460 | if ($update) { |
461 | - if (!mysqli_query($sqlParser->conn, "UPDATE $dbase.`" . $table_prefix . "site_htmlsnippets` SET snippet='$chunk', description='$desc', category=$category_id WHERE name='$name';")) { |
|
461 | + if (!mysqli_query($sqlParser->conn, "update $dbase.`" . $table_prefix . "site_htmlsnippets` SET snippet='$chunk', description='$desc', category=$category_id WHERE name='$name';")) { |
|
462 | 462 | $errors += 1; |
463 | 463 | echo "<p>" . mysqli_error($sqlParser->conn) . "</p>"; |
464 | 464 | return; |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | if (mysqli_num_rows($rs)) { |
509 | 509 | $row = mysqli_fetch_assoc($rs); |
510 | 510 | $props = mysqli_real_escape_string($conn, propUpdate($properties,$row['properties'])); |
511 | - if (!mysqli_query($sqlParser->conn, "UPDATE $dbase.`" . $table_prefix . "site_modules` SET modulecode='$module', description='$desc', properties='$props', enable_sharedparams='$shared' WHERE name='$name';")) { |
|
511 | + if (!mysqli_query($sqlParser->conn, "update $dbase.`" . $table_prefix . "site_modules` SET modulecode='$module', description='$desc', properties='$props', enable_sharedparams='$shared' WHERE name='$name';")) { |
|
512 | 512 | echo "<p>" . mysqli_error($sqlParser->conn) . "</p>"; |
513 | 513 | return; |
514 | 514 | } |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | |
553 | 553 | // disable legacy versions based on legacy_names provided |
554 | 554 | if(!empty($leg_names)) { |
555 | - $update_query = "UPDATE $dbase.`" . $table_prefix . "site_plugins` SET disabled='1' WHERE name IN ($leg_names);"; |
|
555 | + $update_query = "update $dbase.`" . $table_prefix . "site_plugins` SET disabled='1' WHERE name IN ($leg_names);"; |
|
556 | 556 | $rs = mysqli_query($sqlParser->conn, $update_query); |
557 | 557 | } |
558 | 558 | |
@@ -568,13 +568,13 @@ discard block |
||
568 | 568 | while($row = mysqli_fetch_assoc($rs)) { |
569 | 569 | $props = mysqli_real_escape_string($conn, propUpdate($properties,$row['properties'])); |
570 | 570 | if($row['description'] == $desc){ |
571 | - if (! mysqli_query($sqlParser->conn, "UPDATE $dbase.`" . $table_prefix . "site_plugins` SET plugincode='$plugin', description='$desc', properties='$props' WHERE id={$row['id']};")) { |
|
571 | + if (! mysqli_query($sqlParser->conn, "update $dbase.`" . $table_prefix . "site_plugins` SET plugincode='$plugin', description='$desc', properties='$props' WHERE id={$row['id']};")) { |
|
572 | 572 | echo "<p>" . mysqli_error($sqlParser->conn) . "</p>"; |
573 | 573 | return; |
574 | 574 | } |
575 | 575 | $insert = false; |
576 | 576 | } else { |
577 | - if (!mysqli_query($sqlParser->conn, "UPDATE $dbase.`" . $table_prefix . "site_plugins` SET disabled='1' WHERE id={$row['id']};")) { |
|
577 | + if (!mysqli_query($sqlParser->conn, "update $dbase.`" . $table_prefix . "site_plugins` SET disabled='1' WHERE id={$row['id']};")) { |
|
578 | 578 | echo "<p>".mysqli_error($sqlParser->conn)."</p>"; |
579 | 579 | return; |
580 | 580 | } |
@@ -639,7 +639,7 @@ discard block |
||
639 | 639 | if (mysqli_num_rows($rs)) { |
640 | 640 | $row = mysqli_fetch_assoc($rs); |
641 | 641 | $props = mysqli_real_escape_string($conn, propUpdate($properties,$row['properties'])); |
642 | - if (!mysqli_query($sqlParser->conn, "UPDATE $dbase.`" . $table_prefix . "site_snippets` SET snippet='$snippet', description='$desc', properties='$props' WHERE name='$name';")) { |
|
642 | + if (!mysqli_query($sqlParser->conn, "update $dbase.`" . $table_prefix . "site_snippets` SET snippet='$snippet', description='$desc', properties='$props' WHERE name='$name';")) { |
|
643 | 643 | echo "<p>" . mysqli_error($sqlParser->conn) . "</p>"; |
644 | 644 | return; |
645 | 645 | } |
@@ -801,7 +801,7 @@ |
||
801 | 801 | $complete_name = $path . str_replace('\\', '/', $zip_entry_name); |
802 | 802 | if (!file_exists($complete_path)) { |
803 | 803 | $tmp = ''; |
804 | - foreach (explode('/', $complete_path) AS $k) { |
|
804 | + foreach (explode('/', $complete_path) as $k) { |
|
805 | 805 | $tmp .= $k . '/'; |
806 | 806 | if (!is_dir($tmp)) { |
807 | 807 | mkdir($tmp, 0777); |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | $id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0; |
13 | 13 | $origin = isset($_REQUEST['or']) ? intval($_REQUEST['or']) : 76; |
14 | -$originId = isset($_REQUEST['oid']) ? intval($_REQUEST['oid']) : NULL; |
|
14 | +$originId = isset($_REQUEST['oid']) ? intval($_REQUEST['oid']) : null; |
|
15 | 15 | |
16 | 16 | $tbl_site_tmplvars = $modx->getFullTableName('site_tmplvars'); |
17 | 17 | $tbl_site_templates = $modx->getFullTableName('site_templates'); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | }, |
108 | 108 | cancel: function() { |
109 | 109 | documentDirty = false; |
110 | - document.location.href = 'index.php?a=<?= $origin ?><?=($originId != NULL ? '&id=' . $originId : '') ?>'; |
|
110 | + document.location.href = 'index.php?a=<?= $origin ?><?=($originId != null ? '&id=' . $originId : '') ?>'; |
|
111 | 111 | } |
112 | 112 | }; |
113 | 113 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | } |
29 | 29 | |
30 | 30 | $parent = $modx->db->getValue($modx->db->select('parent', $tblsc, "id='{$this->document}'")); |
31 | - if($document == 0 && $parent == NULL && $udperms_allowroot == 1) return true; // User is allowed to create new document in root |
|
31 | + if($document == 0 && $parent == null && $udperms_allowroot == 1) return true; // User is allowed to create new document in root |
|
32 | 32 | if (($this->duplicateDoc==true || $document==0) && $parent==0 && $udperms_allowroot==0) { |
33 | 33 | return false; // deny duplicate || create new document at root if Allow Root is No |
34 | 34 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | } |
22 | 22 | elseif(is_writable($htaccess)) |
23 | 23 | { |
24 | - $_ = preg_replace('@RewriteBase.+@',"RewriteBase {$dir}", $_); |
|
24 | + $_ = preg_replace('@RewriteBase.+@',"rewritebase {$dir}", $_); |
|
25 | 25 | if(!@file_put_contents($htaccess,$_)) |
26 | 26 | { |
27 | 27 | $warnings[] = $_lang["settings_friendlyurls_alert2"]; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | elseif($modx->config['base_url']!=='/') |
38 | 38 | { |
39 | 39 | $_ = file_get_contents($htaccess); |
40 | - $_ = preg_replace('@RewriteBase.+@',"RewriteBase {$dir}", $_); |
|
40 | + $_ = preg_replace('@RewriteBase.+@',"rewritebase {$dir}", $_); |
|
41 | 41 | if(!@file_put_contents($htaccess,$_)) |
42 | 42 | { |
43 | 43 | $warnings[] = $_lang["settings_friendlyurls_alert2"]; |
@@ -239,7 +239,7 @@ |
||
239 | 239 | if(version_compare(PHP_VERSION, '5.2', '<')) { |
240 | 240 | setcookie('modx_remember_manager', $_SESSION['mgrShortname'], time() + 60 * 60 * 24 * 365, MODX_BASE_URL, '; HttpOnly', $secure); |
241 | 241 | } else { |
242 | - setcookie('modx_remember_manager', $_SESSION['mgrShortname'], time() + 60 * 60 * 24 * 365, MODX_BASE_URL, NULL, $secure, true); |
|
242 | + setcookie('modx_remember_manager', $_SESSION['mgrShortname'], time() + 60 * 60 * 24 * 365, MODX_BASE_URL, null, $secure, true); |
|
243 | 243 | } |
244 | 244 | } else { |
245 | 245 | $_SESSION['modx.mgr.session.cookie.lifetime'] = 0; |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | |
538 | 538 | $zip = new ZipArchive(); |
539 | 539 | $res = $zip->open($file, ZipArchive::CREATE); |
540 | - if ($res === TRUE) { |
|
540 | + if ($res === true) { |
|
541 | 541 | foreach ($zipFiles as $cfile) |
542 | 542 | $zip->addFile($cfile, basename($cfile)); |
543 | 543 | $zip->close(); |
@@ -579,7 +579,7 @@ discard block |
||
579 | 579 | |
580 | 580 | $zip = new ZipArchive(); |
581 | 581 | $res = $zip->open($file, ZipArchive::CREATE); |
582 | - if ($res === TRUE) { |
|
582 | + if ($res === true) { |
|
583 | 583 | foreach ($zipFiles as $cfile) |
584 | 584 | $zip->addFile($cfile, basename($cfile)); |
585 | 585 | $zip->close(); |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | // Socket extension |
643 | 643 | ) {} elseif (function_exists('socket_create')) { |
644 | 644 | $cmd = |
645 | - "GET $path " . strtoupper($protocol) . "/1.1\r\n" . |
|
645 | + "get $path " . strtoupper($protocol) . "/1.1\r\n" . |
|
646 | 646 | "Host: $host\r\n" . |
647 | 647 | "Connection: Close\r\n\r\n"; |
648 | 648 |
@@ -376,10 +376,10 @@ |
||
376 | 376 | if ($properties = $modx->db->getValue($res)) { |
377 | 377 | $properties = $modx->parseProperties($properties, 'TransAlias', 'plugin'); |
378 | 378 | } else { |
379 | - $properties = NULL; |
|
379 | + $properties = null; |
|
380 | 380 | } |
381 | 381 | } else { |
382 | - $properties = NULL; |
|
382 | + $properties = null; |
|
383 | 383 | } |
384 | 384 | return $properties; |
385 | 385 | } |