Completed
Pull Request — develop (#716)
by Serg
06:34
created
manager/includes/extenders/phpass.class.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
         $this->portable_hashes = $portable_hashes;
50 50
 
51
-        $this->random_state = microtime() . uniqid(mt_rand(), true);
51
+        $this->random_state = microtime().uniqid(mt_rand(), true);
52 52
     }
53 53
 
54 54
     /**
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             $output = '';
69 69
             for ($i = 0; $i < $count; $i += 16) {
70 70
                 $this->random_state =
71
-                    md5(microtime() . $this->random_state);
71
+                    md5(microtime().$this->random_state);
72 72
                 $output .=
73 73
                     pack('H*', md5($this->random_state));
74 74
             }
@@ -160,9 +160,9 @@  discard block
 block discarded – undo
160 160
         // consequently in lower iteration counts and hashes that are
161 161
         // quicker to crack (by non-PHP code).
162 162
 
163
-        $hash = md5($salt . $password, true);
163
+        $hash = md5($salt.$password, true);
164 164
         do {
165
-            $hash = md5($hash . $password, true);
165
+            $hash = md5($hash.$password, true);
166 166
         } while (--$count);
167 167
 
168 168
         $output = substr($setting, 0, 12);
Please login to merge, or discard this patch.
manager/includes/extenders/deprecated.functions.inc.php 3 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -118,16 +118,16 @@  discard block
 block discarded – undo
118 118
         for ($i = 0; $i < $tablevel; $i++) {
119 119
             $tabs .= "\t";
120 120
         }
121
-        $listhtml = $ordered == true ? $tabs . "<ol class='$ulroot'$typestr>\n" : $tabs . "<ul class='$ulroot'$typestr>\n";
121
+        $listhtml = $ordered == true ? $tabs."<ol class='$ulroot'$typestr>\n" : $tabs."<ul class='$ulroot'$typestr>\n";
122 122
         foreach ($array as $key => $value) {
123 123
             if (is_array($value)) {
124
-                $listhtml .= $tabs . "\t<li>" . $key . "\n" . $this->makeList($value, $ulprefix . $ulroot, $ulprefix,
125
-                        $type, $ordered, $tablevel + 2) . $tabs . "\t</li>\n";
124
+                $listhtml .= $tabs."\t<li>".$key."\n".$this->makeList($value, $ulprefix.$ulroot, $ulprefix,
125
+                        $type, $ordered, $tablevel + 2).$tabs."\t</li>\n";
126 126
             } else {
127
-                $listhtml .= $tabs . "\t<li>" . $value . "</li>\n";
127
+                $listhtml .= $tabs."\t<li>".$value."</li>\n";
128 128
             }
129 129
         }
130
-        $listhtml .= $ordered == true ? $tabs . "</ol>\n" : $tabs . "</ul>\n";
130
+        $listhtml .= $ordered == true ? $tabs."</ol>\n" : $tabs."</ul>\n";
131 131
 
132 132
         return $listhtml;
133 133
     }
@@ -298,9 +298,9 @@  discard block
 block discarded – undo
298 298
         $msg = addslashes($modx->db->escape($msg));
299 299
         if (substr(strtolower($url), 0, 11) == "javascript:") {
300 300
             $act = "__WebAlert();";
301
-            $fnc = "function __WebAlert(){" . substr($url, 11) . "};";
301
+            $fnc = "function __WebAlert(){".substr($url, 11)."};";
302 302
         } else {
303
-            $act = ($url ? "window.location.href='" . addslashes($url) . "';" : "");
303
+            $act = ($url ? "window.location.href='".addslashes($url)."';" : "");
304 304
         }
305 305
         $html = "<script>$fnc window.setTimeout(\"alert('$msg');$act\",100);</script>";
306 306
         if ($modx->isFrontend()) {
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
      * @deprecated
73 73
      *
74 74
      * @param $rs
75
-     * @return int|mixed
75
+     * @return integer
76 76
      */
77 77
     public function insertId($rs)
78 78
     {
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -177,7 +177,8 @@
 block discarded – undo
177 177
      * @return bool|string
178 178
      */
179 179
     public function putChunk($chunkName)
180
-    { // alias name >.<
180
+    {
181
+// alias name >.<
181 182
         $modx = evolutionCMS();
182 183
 
183 184
         return $modx->getChunk($chunkName);
Please login to merge, or discard this patch.
manager/includes/extenders/ex_modifiers.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,6 +9,6 @@
 block discarded – undo
9 9
     return true;
10 10
 }
11 11
 
12
-include_once(MODX_MANAGER_PATH . 'includes/extenders/modifiers.class.inc.php');
12
+include_once(MODX_MANAGER_PATH.'includes/extenders/modifiers.class.inc.php');
13 13
 $this->filter = new MODIFIERS;
14 14
 return true;
Please login to merge, or discard this patch.
manager/includes/extenders/ex_managerapi.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
  * Time: 14:16
6 6
  */
7 7
 
8
-if (!include_once MODX_MANAGER_PATH . 'includes/extenders/manager.api.class.inc.php') {
8
+if (!include_once MODX_MANAGER_PATH.'includes/extenders/manager.api.class.inc.php') {
9 9
     return false;
10 10
 } else {
11 11
     $this->manager = new ManagerAPI;
Please login to merge, or discard this patch.
manager/includes/extenders/ex_modxmailer.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * Time: 14:17
7 7
  */
8 8
 
9
-if (!include_once(MODX_MANAGER_PATH . 'includes/extenders/modxmailer.class.inc.php')) {
9
+if (!include_once(MODX_MANAGER_PATH.'includes/extenders/modxmailer.class.inc.php')) {
10 10
     return false;
11 11
 } else {
12 12
     $this->mail = new MODxMailer;
Please login to merge, or discard this patch.
manager/includes/accesscontrol.inc.php 3 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,8 @@  discard block
 block discarded – undo
21 21
 if (file_exists(MODX_BASE_PATH . 'assets/cache/installProc.inc.php')) {
22 22
     include_once(MODX_BASE_PATH . 'assets/cache/installProc.inc.php');
23 23
     if (isset($installStartTime)) {
24
-        if ((time() - $installStartTime) > 5 * 60) { // if install flag older than 5 minutes, discard
24
+        if ((time() - $installStartTime) > 5 * 60) {
25
+// if install flag older than 5 minutes, discard
25 26
             unset($installStartTime);
26 27
             @ chmod(MODX_BASE_PATH . 'assets/cache/installProc.inc.php', 0755);
27 28
             unlink(MODX_BASE_PATH . 'assets/cache/installProc.inc.php');
@@ -163,7 +164,8 @@  discard block
 block discarded – undo
163 164
         } elseif (is_file($theme_path . 'templates/actions/login.tpl')) {
164 165
             $target = $theme_path . 'templates/actions/login.tpl';
165 166
             $login_tpl = file_get_contents($target);
166
-        } elseif (is_file($theme_path . 'html/login.html')) { // ClipperCMS compatible
167
+        } elseif (is_file($theme_path . 'html/login.html')) {
168
+// ClipperCMS compatible
167 169
             $target = $theme_path . 'html/login.html';
168 170
             $login_tpl = file_get_contents($target);
169 171
         } else {
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -102,19 +102,19 @@
 block discarded – undo
102 102
     $modx->setPlaceholder('login_form_position_class', 'loginbox-' . $modx->config['login_form_position']);
103 103
     
104 104
     switch ($modx->config['manager_theme_mode']) {
105
-      case '1':
105
+        case '1':
106 106
         $modx->setPlaceholder('manager_theme_style', 'lightness');
107 107
         break;
108
-      case '2':
108
+        case '2':
109 109
         $modx->setPlaceholder('manager_theme_style', 'light');
110 110
         break;
111
-      case '3':
111
+        case '3':
112 112
         $modx->setPlaceholder('manager_theme_style', 'dark');
113 113
         break;
114
-      case '4':
114
+        case '4':
115 115
         $modx->setPlaceholder('manager_theme_style', 'darkness');
116 116
         break;
117
-	}
117
+    }
118 118
 
119 119
     // andrazk 20070416 - notify user of install/update
120 120
     if (isset($_GET['installGoingOn'])) {
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -18,13 +18,13 @@  discard block
 block discarded – undo
18 18
 }
19 19
 
20 20
 // andrazk 20070416 - if installer is running, destroy active sessions
21
-if (file_exists(MODX_BASE_PATH . 'assets/cache/installProc.inc.php')) {
22
-    include_once(MODX_BASE_PATH . 'assets/cache/installProc.inc.php');
21
+if (file_exists(MODX_BASE_PATH.'assets/cache/installProc.inc.php')) {
22
+    include_once(MODX_BASE_PATH.'assets/cache/installProc.inc.php');
23 23
     if (isset($installStartTime)) {
24 24
         if ((time() - $installStartTime) > 5 * 60) { // if install flag older than 5 minutes, discard
25 25
             unset($installStartTime);
26
-            @ chmod(MODX_BASE_PATH . 'assets/cache/installProc.inc.php', 0755);
27
-            unlink(MODX_BASE_PATH . 'assets/cache/installProc.inc.php');
26
+            @ chmod(MODX_BASE_PATH.'assets/cache/installProc.inc.php', 0755);
27
+            unlink(MODX_BASE_PATH.'assets/cache/installProc.inc.php');
28 28
         } else {
29 29
             if ($_SERVER['REQUEST_METHOD'] != 'POST') {
30 30
                 if (isset($_COOKIE[session_name()])) {
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                         //						setcookie(session_name(), '', 0, MODX_BASE_URL);
51 51
                     }
52 52
                     header('HTTP/1.0 307 Redirect');
53
-                    header('Location: ' . MODX_MANAGER_URL . 'index.php?installGoingOn=2');
53
+                    header('Location: '.MODX_MANAGER_URL.'index.php?installGoingOn=2');
54 54
                 }
55 55
             }
56 56
         }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         // establish fallback to English default
63 63
         include_once "lang/english.inc.php";
64 64
         // include localized overrides
65
-        include_once "lang/" . $manager_language . ".inc.php";
65
+        include_once "lang/".$manager_language.".inc.php";
66 66
     } else {
67 67
         include_once "lang/english.inc.php";
68 68
     }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     $modx->setPlaceholder('modx_charset', $modx_manager_charset);
71 71
     $modx->setPlaceholder('theme', $manager_theme);
72 72
     $modx->setPlaceholder('favicon',
73
-        (file_exists(MODX_BASE_PATH . 'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/' . $modx->config['manager_theme'] . '/images/favicon.ico'));
73
+        (file_exists(MODX_BASE_PATH.'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/'.$modx->config['manager_theme'].'/images/favicon.ico'));
74 74
 
75 75
     // invoke OnManagerLoginFormPrerender event
76 76
     $evtOut = $modx->invokeEvent('OnManagerLoginFormPrerender');
@@ -81,25 +81,25 @@  discard block
 block discarded – undo
81 81
     $modx->setPlaceholder('manager_path', MGR_DIR);
82 82
     $modx->setPlaceholder('logo_slogan', $_lang["logo_slogan"]);
83 83
     $modx->setPlaceholder('login_message', $_lang["login_message"]);
84
-    $modx->setPlaceholder('manager_theme_url', MODX_MANAGER_URL . 'media/style/' . $modx->config['manager_theme'] . '/');
84
+    $modx->setPlaceholder('manager_theme_url', MODX_MANAGER_URL.'media/style/'.$modx->config['manager_theme'].'/');
85 85
     $modx->setPlaceholder('year', date('Y'));
86 86
 
87 87
     // set login logo image
88
-    if ( !empty($modx->config['login_logo']) ) {
89
-        $modx->setPlaceholder('login_logo', MODX_SITE_URL . $modx->config['login_logo']);
88
+    if (!empty($modx->config['login_logo'])) {
89
+        $modx->setPlaceholder('login_logo', MODX_SITE_URL.$modx->config['login_logo']);
90 90
     } else {
91
-        $modx->setPlaceholder('login_logo', MODX_MANAGER_URL . 'media/style/' . $modx->config['manager_theme'] . '/images/login/default/login-logo.png');
91
+        $modx->setPlaceholder('login_logo', MODX_MANAGER_URL.'media/style/'.$modx->config['manager_theme'].'/images/login/default/login-logo.png');
92 92
     }
93 93
 
94 94
     // set login background image
95
-    if ( !empty($modx->config['login_bg']) ) {
96
-        $modx->setPlaceholder('login_bg', MODX_SITE_URL . $modx->config['login_bg']);
95
+    if (!empty($modx->config['login_bg'])) {
96
+        $modx->setPlaceholder('login_bg', MODX_SITE_URL.$modx->config['login_bg']);
97 97
     } else {
98
-        $modx->setPlaceholder('login_bg', MODX_MANAGER_URL . 'media/style/' . $modx->config['manager_theme'] . '/images/login/default/login-background.jpg');
98
+        $modx->setPlaceholder('login_bg', MODX_MANAGER_URL.'media/style/'.$modx->config['manager_theme'].'/images/login/default/login-background.jpg');
99 99
     }
100 100
 
101 101
     // set form position css class
102
-    $modx->setPlaceholder('login_form_position_class', 'loginbox-' . $modx->config['login_form_position']);
102
+    $modx->setPlaceholder('login_form_position_class', 'loginbox-'.$modx->config['login_form_position']);
103 103
 
104 104
     switch ($modx->config['manager_theme_mode']) {
105 105
       case '1':
@@ -124,11 +124,11 @@  discard block
 block discarded – undo
124 124
         switch ($installGoingOn) {
125 125
             case 1 :
126 126
                 $modx->setPlaceholder('login_message',
127
-                    "<p><span class=\"fail\">" . $_lang["login_cancelled_install_in_progress"] . "</p><p>" . $_lang["login_message"] . "</p>");
127
+                    "<p><span class=\"fail\">".$_lang["login_cancelled_install_in_progress"]."</p><p>".$_lang["login_message"]."</p>");
128 128
                 break;
129 129
             case 2 :
130 130
                 $modx->setPlaceholder('login_message',
131
-                    "<p><span class=\"fail\">" . $_lang["login_cancelled_site_was_updated"] . "</p><p>" . $_lang["login_message"] . "</p>");
131
+                    "<p><span class=\"fail\">".$_lang["login_cancelled_site_was_updated"]."</p><p>".$_lang["login_message"]."</p>");
132 132
                 break;
133 133
         }
134 134
     }
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
     if ($modx->config['use_captcha'] == 1) {
137 137
         $modx->setPlaceholder('login_captcha_message', $_lang["login_captcha_message"]);
138 138
         $modx->setPlaceholder('captcha_image',
139
-            '<a href="' . MODX_MANAGER_URL . '" class="loginCaptcha"><img id="captcha_image" src="' . MODX_MANAGER_URL . 'captcha.php?rand=' . rand() . '" alt="' . $_lang["login_captcha_message"] . '" /></a>');
139
+            '<a href="'.MODX_MANAGER_URL.'" class="loginCaptcha"><img id="captcha_image" src="'.MODX_MANAGER_URL.'captcha.php?rand='.rand().'" alt="'.$_lang["login_captcha_message"].'" /></a>');
140 140
         $modx->setPlaceholder('captcha_input',
141
-            '<label>' . $_lang["captcha_code"] . '</label> <input type="text" name="captcha_code" tabindex="3" value="" />');
141
+            '<label>'.$_lang["captcha_code"].'</label> <input type="text" name="captcha_code" tabindex="3" value="" />');
142 142
     }
143 143
 
144 144
     // login info
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 
157 157
     // invoke OnManagerLoginFormRender event
158 158
     $evtOut = $modx->invokeEvent('OnManagerLoginFormRender');
159
-    $html = is_array($evtOut) ? '<div id="onManagerLoginFormRender">' . implode('', $evtOut) . '</div>' : '';
159
+    $html = is_array($evtOut) ? '<div id="onManagerLoginFormRender">'.implode('', $evtOut).'</div>' : '';
160 160
     $modx->setPlaceholder('OnManagerLoginFormRender', $html);
161 161
 
162 162
     // load template
@@ -174,29 +174,29 @@  discard block
 block discarded – undo
174 174
             $login_tpl = file_get_contents($target);
175 175
         }
176 176
     } else {
177
-        $theme_path = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/';
178
-        if (is_file($theme_path . 'style.php')) {
179
-            include($theme_path . 'style.php');
177
+        $theme_path = MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/';
178
+        if (is_file($theme_path.'style.php')) {
179
+            include($theme_path.'style.php');
180 180
         }
181 181
         $chunk = $modx->getChunk($target);
182 182
         if ($chunk !== false && !empty($chunk)) {
183 183
             $login_tpl = $chunk;
184
-        } elseif (is_file(MODX_BASE_PATH . $target)) {
185
-            $target = MODX_BASE_PATH . $target;
184
+        } elseif (is_file(MODX_BASE_PATH.$target)) {
185
+            $target = MODX_BASE_PATH.$target;
186 186
             $login_tpl = file_get_contents($target);
187 187
         } elseif (is_file($target)) {
188 188
             $login_tpl = file_get_contents($target);
189
-        } elseif (is_file($theme_path . 'login.tpl')) {
190
-            $target = $theme_path . 'login.tpl';
189
+        } elseif (is_file($theme_path.'login.tpl')) {
190
+            $target = $theme_path.'login.tpl';
191 191
             $login_tpl = file_get_contents($target);
192
-        } elseif (is_file($theme_path . 'templates/actions/login.tpl')) {
193
-            $target = $theme_path . 'templates/actions/login.tpl';
192
+        } elseif (is_file($theme_path.'templates/actions/login.tpl')) {
193
+            $target = $theme_path.'templates/actions/login.tpl';
194 194
             $login_tpl = file_get_contents($target);
195
-        } elseif (is_file($theme_path . 'html/login.html')) { // ClipperCMS compatible
196
-            $target = $theme_path . 'html/login.html';
195
+        } elseif (is_file($theme_path.'html/login.html')) { // ClipperCMS compatible
196
+            $target = $theme_path.'html/login.html';
197 197
             $login_tpl = file_get_contents($target);
198 198
         } else {
199
-            $target = MODX_MANAGER_PATH . 'media/style/common/login.tpl';
199
+            $target = MODX_MANAGER_PATH.'media/style/common/login.tpl';
200 200
             $login_tpl = file_get_contents($target);
201 201
         }
202 202
     }
@@ -216,17 +216,17 @@  discard block
 block discarded – undo
216 216
     $modx->updateValidatedUserSession();
217 217
 
218 218
     // Update last action in table active_users
219
-    $itemid = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : '';
219
+    $itemid = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : '';
220 220
     $lasthittime = time();
221
-    $action = isset($_REQUEST['a']) ? (int)$_REQUEST['a'] : 1;
221
+    $action = isset($_REQUEST['a']) ? (int) $_REQUEST['a'] : 1;
222 222
 
223 223
     if ($action !== 1) {
224
-        if ((int)$itemid <= 0) {
224
+        if ((int) $itemid <= 0) {
225 225
             $itemid = null;
226 226
         }
227 227
         $sql = sprintf("REPLACE INTO %s (sid, internalKey, username, lasthit, action, id) VALUES ('%s', %d, '%s', %d, '%s', %s)",
228 228
             $modx->getFullTableName('active_users') // Table
229
-            , session_id(), $modx->getLoginUserID(), $_SESSION['mgrShortname'], $lasthittime, (string)$action,
229
+            , session_id(), $modx->getLoginUserID(), $_SESSION['mgrShortname'], $lasthittime, (string) $action,
230 230
             $itemid == null ? var_export(null, true) : $itemid);
231 231
         $modx->db->query($sql);
232 232
     }
Please login to merge, or discard this patch.
manager/includes/mutate_settings.ajax.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
7 7
 }
8 8
 
9
-require_once(dirname(__FILE__) . '/protect.inc.php');
9
+require_once(dirname(__FILE__).'/protect.inc.php');
10 10
 
11 11
 $action = preg_replace('/[^A-Za-z0-9_\-\.\/]/', '', $_POST['action']);
12 12
 $lang = preg_replace('/[^A-Za-z0-9_\s\+\-\.\/]/', '', $_POST['lang']);
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
23 23
 
24 24
 switch (true) {
25 25
     case ($action == 'get' && preg_match('/^[A-z0-9_-]+$/',
26
-            $lang) && file_exists(dirname(__FILE__) . '/lang/' . $lang . '.inc.php')): {
27
-        include(dirname(__FILE__) . '/lang/' . $lang . '.inc.php');
26
+            $lang) && file_exists(dirname(__FILE__).'/lang/'.$lang.'.inc.php')): {
27
+        include(dirname(__FILE__).'/lang/'.$lang.'.inc.php');
28 28
         $str = isset($key, $_lang, $_lang[$key]) ? $_lang[$key] : "";
29 29
         break;
30 30
     }
31 31
     case ($action == 'setsetting' && !empty($key) && !empty($value)): {
32
-        $sql = "REPLACE INTO " . $modx->getFullTableName("system_settings") . " (setting_name, setting_value) VALUES('{$key}', '{$value}');";
32
+        $sql = "REPLACE INTO ".$modx->getFullTableName("system_settings")." (setting_name, setting_value) VALUES('{$key}', '{$value}');";
33 33
         $str = "true";
34 34
         $modx->db->query($sql);
35 35
         $emptyCache = true;
Please login to merge, or discard this patch.
manager/includes/rss.inc.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 ---------------------------------------------- */
28 28
 
29 29
 // include MagPieRSS
30
-require_once(MODX_MANAGER_PATH . 'media/rss/rss_fetch.inc');
30
+require_once(MODX_MANAGER_PATH.'media/rss/rss_fetch.inc');
31 31
 /**
32 32
  * Convert relative path into absolute url
33 33
  *
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     $tmp = parse_url($base);
42 42
     extract($tmp);
43 43
     if (strpos($rel, "//") === 0) {
44
-        return $scheme . ':' . $rel;
44
+        return $scheme.':'.$rel;
45 45
     }
46 46
     // return if already absolute URL
47 47
     if (parse_url($rel, PHP_URL_SCHEME) != '') {
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     }
50 50
     // queries and anchors
51 51
     if ($rel[0] == '#' || $rel[0] == '?') {
52
-        return $base . $rel;
52
+        return $base.$rel;
53 53
     }
54 54
     // remove non-directory element from path
55 55
     $path = preg_replace('#/[^/]*$#', '', $path);
@@ -58,13 +58,13 @@  discard block
 block discarded – undo
58 58
         $path = '';
59 59
     }
60 60
     // dirty absolute URL
61
-    $abs = $host . $path . "/" . $rel;
61
+    $abs = $host.$path."/".$rel;
62 62
     // replace '//' or  '/./' or '/foo/../' with '/'
63 63
     $abs = preg_replace("/(\/\.?\/)/", "/", $abs);
64 64
     $abs = preg_replace("/\/(?!\.\.)[^\/]+\/\.\.\//", "/", $abs);
65 65
 
66 66
     // absolute URL is ready!
67
-    return $scheme . '://' . $abs;
67
+    return $scheme.'://'.$abs;
68 68
 }
69 69
 
70 70
 $feedData = array();
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     $output = '';
75 75
     $rss = @fetch_rss($url);
76 76
     if (!$rss) {
77
-        $feedData[$section] = 'Failed to retrieve ' . $url;
77
+        $feedData[$section] = 'Failed to retrieve '.$url;
78 78
         continue;
79 79
     }
80 80
     $output .= '<ul>';
@@ -88,9 +88,9 @@  discard block
 block discarded – undo
88 88
         $description = strip_tags($item['description']);
89 89
         if (strlen($description) > 199) {
90 90
             $description = substr($description, 0, 200);
91
-            $description .= '...<br />Read <a href="' . $href . '" target="_blank">more</a>.';
91
+            $description .= '...<br />Read <a href="'.$href.'" target="_blank">more</a>.';
92 92
         }
93
-        $output .= '<li><a href="' . $href . '" target="_blank">' . $title . '</a> - <b>' . $pubdate . '</b><br />' . $description . '</li>';
93
+        $output .= '<li><a href="'.$href.'" target="_blank">'.$title.'</a> - <b>'.$pubdate.'</b><br />'.$description.'</li>';
94 94
     }
95 95
 
96 96
     $output .= '</ul>';
Please login to merge, or discard this patch.
manager/includes/categories.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     $newCat = $modx->db->escape($newCat);
35 35
     $cats = $modx->db->select('id', $modx->getFullTableName('categories'), "category='{$newCat}'");
36 36
     if ($cat = $modx->db->getValue($cats)) {
37
-        return (int)$cat;
37
+        return (int) $cat;
38 38
     }
39 39
 
40 40
     return 0;
Please login to merge, or discard this patch.