Completed
Push — develop ( e6bcf2...351294 )
by Dmytro
06:18
created
install/setup.info.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
install/instprocessor.php 1 patch
Upper-Lower-Casing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
                     }
Please login to merge, or discard this patch.
manager/includes/tmplvars.commands.inc.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
                     $modx->setPlaceholder($rvKey, $rvValue);
56 56
                 }
57 57
                 $param = $modx->mergePlaceholderContent($param);
58
-                $rs = $modx->db->query("SELECT $param;");
58
+                $rs = $modx->db->query("select $param;");
59 59
                 $output = $rs;
60 60
                 break;
61 61
 
Please login to merge, or discard this patch.
manager/includes/document.parser.class.inc.php 1 patch
Upper-Lower-Casing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -2224,11 +2224,11 @@  discard block
 block discarded – undo
2224 2224
         if (isset($this->snippetCache[$snip_name])) {
2225 2225
             $snippetObject['name'] = $snip_name;
2226 2226
             $snippetObject['content'] = $this->snippetCache[$snip_name];
2227
-            if (isset($this->snippetCache["{$snip_name}Props"])) {
2228
-                if (!isset($this->snippetCache["{$snip_name}Props"])) {
2229
-                    $this->snippetCache["{$snip_name}Props"] = '';
2227
+            if (isset($this->snippetCache["{$snip_name}props"])) {
2228
+                if (!isset($this->snippetCache["{$snip_name}props"])) {
2229
+                    $this->snippetCache["{$snip_name}props"] = '';
2230 2230
                 }
2231
-                $snippetObject['properties'] = $this->snippetCache["{$snip_name}Props"];
2231
+                $snippetObject['properties'] = $this->snippetCache["{$snip_name}props"];
2232 2232
             }
2233 2233
         } elseif (substr($snip_name, 0, 1) === '@' && isset($this->pluginEvent[trim($snip_name, '@')])) {
2234 2234
             $snippetObject['name'] = trim($snip_name, '@');
@@ -2253,7 +2253,7 @@  discard block
 block discarded – undo
2253 2253
             $snippetObject['content'] = $snip_content;
2254 2254
             $snippetObject['properties'] = $snip_prop;
2255 2255
             $this->snippetCache[$snip_name] = $snip_content;
2256
-            $this->snippetCache["{$snip_name}Props"] = $snip_prop;
2256
+            $this->snippetCache["{$snip_name}props"] = $snip_prop;
2257 2257
         }
2258 2258
         return $snippetObject;
2259 2259
     }
@@ -3569,7 +3569,7 @@  discard block
 block discarded – undo
3569 3569
         }
3570 3570
         // build query
3571 3571
         $access = ($this->isFrontend() ? "sc.privateweb=0" : "1='" . $_SESSION['mgrRole'] . "' OR sc.privatemgr=0") . (!$docgrp ? "" : " OR dg.document_group IN ($docgrp)");
3572
-        $result = $this->db->select("DISTINCT {$fields}", "{$tblsc} sc
3572
+        $result = $this->db->select("distinct {$fields}", "{$tblsc} sc
3573 3573
                 LEFT JOIN {$tbldg} dg on dg.document = sc.id", "sc.parent = '{$id}' AND ({$access}) GROUP BY sc.id", "{$sort} {$dir}");
3574 3574
         $resourceArray = $this->db->makeArray($result);
3575 3575
         $this->tmpCache[__FUNCTION__][$cacheKey] = $resourceArray;
@@ -3606,7 +3606,7 @@  discard block
 block discarded – undo
3606 3606
         }
3607 3607
         // build query
3608 3608
         $access = ($this->isFrontend() ? "sc.privateweb=0" : "1='" . $_SESSION['mgrRole'] . "' OR sc.privatemgr=0") . (!$docgrp ? "" : " OR dg.document_group IN ($docgrp)");
3609
-        $result = $this->db->select("DISTINCT {$fields}", "{$tblsc} sc
3609
+        $result = $this->db->select("distinct {$fields}", "{$tblsc} sc
3610 3610
                 LEFT JOIN {$tbldg} dg on dg.document = sc.id", "sc.parent = '{$id}' AND sc.published=1 AND sc.deleted=0 AND ({$access}) GROUP BY sc.id", "{$sort} {$dir}");
3611 3611
         $resourceArray = $this->db->makeArray($result);
3612 3612
 
@@ -3662,7 +3662,7 @@  discard block
 block discarded – undo
3662 3662
         $tblsc = $this->getFullTableName('site_content');
3663 3663
         $tbldg = $this->getFullTableName('document_groups');
3664 3664
 
3665
-        $result = $this->db->select("DISTINCT {$fields}", "{$tblsc} sc
3665
+        $result = $this->db->select("distinct {$fields}", "{$tblsc} sc
3666 3666
                 LEFT JOIN {$tbldg} dg on dg.document = sc.id", "sc.parent = '{$parentid}' {$published} {$deleted} {$where} AND ({$access}) GROUP BY sc.id", ($sort ? "{$sort} {$dir}" : ""), $limit);
3667 3667
 
3668 3668
         $resourceArray = $this->db->makeArray($result);
@@ -3728,7 +3728,7 @@  discard block
 block discarded – undo
3728 3728
             $tblsc = $this->getFullTableName('site_content');
3729 3729
             $tbldg = $this->getFullTableName('document_groups');
3730 3730
 
3731
-            $result = $this->db->select("DISTINCT {$fields}", "{$tblsc} sc
3731
+            $result = $this->db->select("distinct {$fields}", "{$tblsc} sc
3732 3732
                     LEFT JOIN {$tbldg} dg on dg.document = sc.id", "(sc.id IN (" . implode(',', $ids) . ") {$published} {$deleted} {$where}) AND ({$access}) GROUP BY sc.id", ($sort ? "{$sort} {$dir}" : ""), $limit);
3733 3733
 
3734 3734
             $resourceArray = $this->db->makeArray($result);
@@ -4320,7 +4320,7 @@  discard block
 block discarded – undo
4320 4320
                 $template = $doc['content'];
4321 4321
                 break;
4322 4322
             case 'SELECT':
4323
-                $this->db->getValue($this->db->query("SELECT {$template}"));
4323
+                $this->db->getValue($this->db->query("select {$template}"));
4324 4324
                 break;
4325 4325
             default:
4326 4326
                 if (!($template = $this->getChunk($tpl))) {
Please login to merge, or discard this patch.
manager/includes/controls/contextmenu.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,4 +69,4 @@
 block discarded – undo
69 69
 		cm.style.visibility = 'hidden';
70 70
 	}
71 71
 </script>
72
-BLOCK;
72
+block;
Please login to merge, or discard this patch.
manager/includes/controls/phpmailer/POP3.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -288,11 +288,11 @@
 block discarded – undo
288 288
         }
289 289
 
290 290
         // Send the Username
291
-        $this->sendString("USER $username" . static::LE);
291
+        $this->sendString("user $username" . static::LE);
292 292
         $pop3_response = $this->getResponse();
293 293
         if ($this->checkResponse($pop3_response)) {
294 294
             // Send the Password
295
-            $this->sendString("PASS $password" . static::LE);
295
+            $this->sendString("pass $password" . static::LE);
296 296
             $pop3_response = $this->getResponse();
297 297
             if ($this->checkResponse($pop3_response)) {
298 298
                 return true;
Please login to merge, or discard this patch.
install/actions/action_summary.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@
 block discarded – undo
207 207
 
208 208
 
209 209
 // make sure we can use the database
210
-if ($installMode > 0 && !mysqli_query($conn, "USE {$dbase}")) {
210
+if ($installMode > 0 && !mysqli_query($conn, "use {$dbase}")) {
211 211
     $errors++;
212 212
     echo '<span class="notok">'.$_lang['database_use_failed'].'</span><p />'.$_lang["database_use_failed_note"].'</p>';
213 213
 }
Please login to merge, or discard this patch.
install/actions/action_options.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     case 1:
16 16
         include $base_path . MGR_DIR . '/includes/config.inc.php';
17 17
         if (@ $conn = mysqli_connect($database_server, $database_user, $database_password)) {
18
-            if (@ mysqli_query($conn, "USE {$dbase}")) {
18
+            if (@ mysqli_query($conn, "use {$dbase}")) {
19 19
                 if (!$rs = mysqli_query($conn, "show session variables like 'collation_database'")) {
20 20
                     $rs = mysqli_query($conn, "show session variables like 'collation_server'");
21 21
                 }
Please login to merge, or discard this patch.
manager/includes/extenders/dbapi.mysql.class.inc.php 1 patch
Upper-Lower-Casing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -280,13 +280,13 @@  discard block
 block discarded – undo
280 280
             $orderby = trim($orderby);
281 281
             $limit = trim($limit);
282 282
             if ($where !== '' && stripos($where, 'WHERE') !== 0) {
283
-                $where = "WHERE {$where}";
283
+                $where = "where {$where}";
284 284
             }
285 285
             if ($orderby !== '' && stripos($orderby, 'ORDER BY') !== 0) {
286 286
                 $orderby = "ORDER BY {$orderby}";
287 287
             }
288 288
             if ($limit !== '' && stripos($limit, 'LIMIT') !== 0) {
289
-                $limit = "LIMIT {$limit}";
289
+                $limit = "limit {$limit}";
290 290
             }
291 291
 
292 292
             return $this->query("DELETE FROM {$from} {$where} {$orderby} {$limit}");
@@ -322,16 +322,16 @@  discard block
 block discarded – undo
322 322
         $orderby = trim($orderby);
323 323
         $limit = trim($limit);
324 324
         if ($where !== '' && stripos($where, 'WHERE') !== 0) {
325
-            $where = "WHERE {$where}";
325
+            $where = "where {$where}";
326 326
         }
327 327
         if ($orderby !== '' && stripos($orderby, 'ORDER') !== 0) {
328 328
             $orderby = "ORDER BY {$orderby}";
329 329
         }
330 330
         if ($limit !== '' && stripos($limit, 'LIMIT') !== 0) {
331
-            $limit = "LIMIT {$limit}";
331
+            $limit = "limit {$limit}";
332 332
         }
333 333
 
334
-        return $this->query("SELECT {$fields} FROM {$from} {$where} {$orderby} {$limit}");
334
+        return $this->query("select {$fields} FROM {$from} {$where} {$orderby} {$limit}");
335 335
     }
336 336
 
337 337
     /**
@@ -358,10 +358,10 @@  discard block
 block discarded – undo
358 358
             }
359 359
             $where = trim($where);
360 360
             if ($where !== '' && stripos($where, 'WHERE') !== 0) {
361
-                $where = "WHERE {$where}";
361
+                $where = "where {$where}";
362 362
             }
363 363
 
364
-            return $this->query("UPDATE {$table} SET {$fields} {$where}");
364
+            return $this->query("update {$table} SET {$fields} {$where}");
365 365
         }
366 366
     }
367 367
 
@@ -390,10 +390,10 @@  discard block
 block discarded – undo
390 390
                         $where = trim($where);
391 391
                         $limit = trim($limit);
392 392
                         if ($where !== '' && stripos($where, 'WHERE') !== 0) {
393
-                            $where = "WHERE {$where}";
393
+                            $where = "where {$where}";
394 394
                         }
395 395
                         if ($limit !== '' && stripos($limit, 'LIMIT') !== 0) {
396
-                            $limit = "LIMIT {$limit}";
396
+                            $limit = "limit {$limit}";
397 397
                         }
398 398
                         $rt = $this->query("INSERT INTO {$intotable} {$fields} SELECT {$fromfields} FROM {$fromtable} {$where} {$limit}");
399 399
                     } else {
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
 
733 733
     public function truncate($table_name)
734 734
     {
735
-        $rs = $this->query("TRUNCATE {$table_name}");
735
+        $rs = $this->query("truncate {$table_name}");
736 736
 
737 737
         return $rs;
738 738
     }
Please login to merge, or discard this patch.