Completed
Pull Request — develop (#725)
by Agel_Nash
08:07
created
manager/processors/duplicate_tmplvars.processor.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,11 @@
 block discarded – undo
14 14
 // count duplicates
15 15
 $name = $modx->getDatabase()->getValue($modx->getDatabase()->select('name', $modx->getFullTableName('site_tmplvars'), "id='{$id}'"));
16 16
 $count = $modx->getDatabase()->getRecordCount($modx->getDatabase()->select('name', $modx->getFullTableName('site_tmplvars'), "name LIKE '{$name} {$_lang['duplicated_el_suffix']}%'"));
17
-if($count>=1) $count = ' '.($count+1);
18
-else $count = '';
17
+if($count>=1) {
18
+    $count = ' '.($count+1);
19
+} else {
20
+    $count = '';
21
+}
19 22
 
20 23
 // duplicate TV
21 24
 $newid = $modx->getDatabase()->insert(
Please login to merge, or discard this patch.
index.php 1 patch
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,17 +44,23 @@  discard block
 block discarded – undo
44 44
  * Initialize Document Parsing
45 45
  * -----------------------------
46 46
  */
47
-if(!isset($_SERVER['REQUEST_TIME_FLOAT'])) $_SERVER['REQUEST_TIME_FLOAT'] = microtime(true);
47
+if(!isset($_SERVER['REQUEST_TIME_FLOAT'])) {
48
+    $_SERVER['REQUEST_TIME_FLOAT'] = microtime(true);
49
+}
48 50
 
49 51
 $base_path = str_replace('\\','/',dirname(__FILE__)) . '/';
50
-if(is_file($base_path . 'assets/cache/siteManager.php'))
52
+if(is_file($base_path . 'assets/cache/siteManager.php')) {
51 53
     include_once($base_path . 'assets/cache/siteManager.php');
52
-if(!defined('MGR_DIR') && is_dir("{$base_path}manager"))
54
+}
55
+if(!defined('MGR_DIR') && is_dir("{$base_path}manager")) {
53 56
 	define('MGR_DIR', 'manager');
54
-if(is_file($base_path . 'assets/cache/siteHostnames.php'))
57
+}
58
+if(is_file($base_path . 'assets/cache/siteHostnames.php')) {
55 59
     include_once($base_path . 'assets/cache/siteHostnames.php');
56
-if(!defined('MODX_SITE_HOSTNAMES'))
60
+}
61
+if(!defined('MODX_SITE_HOSTNAMES')) {
57 62
 	define('MODX_SITE_HOSTNAMES', '');
63
+}
58 64
 
59 65
 // get start time
60 66
 $mstart = memory_get_usage();
@@ -126,7 +132,7 @@  discard block
 block discarded – undo
126 132
     @ini_set("display_errors","0");
127 133
 }
128 134
 
129
-if(MODX_CLI){
135
+if(MODX_CLI) {
130 136
     @set_time_limit(0);
131 137
     @ini_set('max_execution_time',0);
132 138
 }
Please login to merge, or discard this patch.