Completed
Push — develop ( 24de57...08354f )
by Dmytro
14s
created
manager/includes/extenders/ex_export_site.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:24
6 6
  */
7 7
 
8
-if (include_once(MODX_MANAGER_PATH . 'includes/extenders/export.class.inc.php')) {
8
+if (include_once(MODX_MANAGER_PATH.'includes/extenders/export.class.inc.php')) {
9 9
     $this->export = new EXPORT_SITE;
10 10
 
11 11
     return true;
Please login to merge, or discard this patch.
manager/includes/extenders/export.class.inc.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         $this->count = 0;
58 58
         $this->setUrlMode();
59 59
         $this->generate_mode = 'crawl';
60
-        $this->targetDir = $modx->config['base_path'] . 'temp/export';
60
+        $this->targetDir = $modx->config['base_path'].'temp/export';
61 61
         if (!isset($this->total)) {
62 62
             $this->getTotal();
63 63
         }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
         $ignore_ids = array_filter(array_map('intval', explode(',', $ignore_ids)));
114 114
         if (count($ignore_ids) > 0) {
115
-            $ignore_ids = "AND NOT id IN ('" . implode("','", $ignore_ids) . "')";
115
+            $ignore_ids = "AND NOT id IN ('".implode("','", $ignore_ids)."')";
116 116
         } else {
117 117
             $ignore_ids = '';
118 118
         }
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         $noncache = ($noncache == 1) ? '' : 'AND cacheable=1';
123 123
         $where = "deleted=0 AND ((published=1 AND type='document') OR (isfolder=1)) {$noncache} {$ignore_ids}";
124 124
         $rs = $modx->db->select('count(id)', $tbl_site_content, $where);
125
-        $this->total = (int)$modx->db->getValue($rs);
125
+        $this->total = (int) $modx->db->getValue($rs);
126 126
 
127 127
         return $this->total;
128 128
     }
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         } elseif (!is_readable($directory)) {
152 152
             return $rs;
153 153
         } else {
154
-            $files = glob($directory . '/*');
154
+            $files = glob($directory.'/*');
155 155
             if (!empty($files)) {
156 156
                 foreach ($files as $path) {
157 157
                     $rs = is_dir($path) ? $this->removeDirectoryAll($path) : unlink($path);
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 
181 181
             $_lang = $back_lang;
182 182
         } else {
183
-            $src = $this->curl_get_contents(MODX_SITE_URL . "index.php?id={$docid}");
183
+            $src = $this->curl_get_contents(MODX_SITE_URL."index.php?id={$docid}");
184 184
         }
185 185
 
186 186
 
@@ -215,12 +215,12 @@  discard block
 block discarded – undo
215 215
         global $modx;
216 216
 
217 217
         if ($alias === '') {
218
-            $filename = $prefix . $docid . $suffix;
218
+            $filename = $prefix.$docid.$suffix;
219 219
         } else {
220 220
             if ($modx->config['suffix_mode'] === '1' && strpos($alias, '.') !== false) {
221 221
                 $suffix = '';
222 222
             }
223
-            $filename = $prefix . $alias . $suffix;
223
+            $filename = $prefix.$alias.$suffix;
224 224
         }
225 225
 
226 226
         return $filename;
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
         $tbl_site_content = $modx->getFullTableName('site_content');
239 239
 
240 240
         $ignore_ids = $this->ignore_ids;
241
-        $dirpath = $this->targetDir . '/';
241
+        $dirpath = $this->targetDir.'/';
242 242
 
243 243
         $prefix = $modx->config['friendly_url_prefix'];
244 244
         $suffix = $modx->config['friendly_url_suffix'];
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 
249 249
         $ph['status'] = 'fail';
250 250
         $ph['msg1'] = $_lang['export_site_failed'];
251
-        $ph['msg2'] = $_lang["export_site_failed_no_write"] . ' - ' . $dirpath;
251
+        $ph['msg2'] = $_lang["export_site_failed_no_write"].' - '.$dirpath;
252 252
         $msg_failed_no_write = $this->parsePlaceholder($tpl, $ph);
253 253
 
254 254
         $ph['msg2'] = $_lang["export_site_failed_no_retrieve"];
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 
282 282
             if (!$row['wasNull']) { // needs writing a document
283 283
                 $docname = $this->getFileName($row['id'], $row['alias'], $prefix, $suffix);
284
-                $filename = $dirpath . $docname;
284
+                $filename = $dirpath.$docname;
285 285
                 if (!is_file($filename)) {
286 286
                     if ($row['published'] === '1') {
287 287
                         $status = $this->makeFile($row['id'], $filename);
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
             if ($row['isfolder'] === '1' && ($modx->config['suffix_mode'] !== '1' || strpos($row['alias'],
310 310
                         '.') === false)) { // needs making a folder
311 311
                 $end_dir = ($row['alias'] !== '') ? $row['alias'] : $row['id'];
312
-                $dir_path = $dirpath . $end_dir;
312
+                $dir_path = $dirpath.$end_dir;
313 313
                 if (strpos($dir_path, MODX_BASE_PATH) === false) {
314 314
                     return false;
315 315
                 }
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 
326 326
                 if ($modx->config['make_folders'] === '1' && $row['published'] === '1') {
327 327
                     if (!empty($filename) && is_file($filename)) {
328
-                        rename($filename, $dir_path . '/index.html');
328
+                        rename($filename, $dir_path.'/index.html');
329 329
                     }
330 330
                 }
331 331
                 $this->targetDir = $dir_path;
@@ -349,8 +349,8 @@  discard block
 block discarded – undo
349 349
 
350 350
         $ch = curl_init();
351 351
         curl_setopt($ch, CURLOPT_URL, $url);
352
-        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);    // 0 = DO NOT VERIFY AUTHENTICITY OF SSL-CERT
353
-        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);    // 2 = CERT MUST INDICATE BEING CONNECTED TO RIGHT SERVER
352
+        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // 0 = DO NOT VERIFY AUTHENTICITY OF SSL-CERT
353
+        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); // 2 = CERT MUST INDICATE BEING CONNECTED TO RIGHT SERVER
354 354
         curl_setopt($ch, CURLOPT_HEADER, false);
355 355
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
356 356
         curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -279,7 +279,8 @@  discard block
 block discarded – undo
279 279
             $row['count'] = $this->count;
280 280
             $row['url'] = $modx->makeUrl($row['id']);
281 281
 
282
-            if (!$row['wasNull']) { // needs writing a document
282
+            if (!$row['wasNull']) {
283
+// needs writing a document
283 284
                 $docname = $this->getFileName($row['id'], $row['alias'], $prefix, $suffix);
284 285
                 $filename = $dirpath . $docname;
285 286
                 if (!is_file($filename)) {
@@ -307,7 +308,8 @@  discard block
 block discarded – undo
307 308
                 $this->output[] = $this->parsePlaceholder($_lang['export_site_exporting_document'], $row);
308 309
             }
309 310
             if ($row['isfolder'] === '1' && ($modx->config['suffix_mode'] !== '1' || strpos($row['alias'],
310
-                        '.') === false)) { // needs making a folder
311
+                        '.') === false)) {
312
+// needs making a folder
311 313
                 $end_dir = ($row['alias'] !== '') ? $row['alias'] : $row['id'];
312 314
                 $dir_path = $dirpath . $end_dir;
313 315
                 if (strpos($dir_path, MODX_BASE_PATH) === false) {
Please login to merge, or discard this patch.
manager/includes/extenders/ex_phpass.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
     return true;
10 10
 }
11 11
 
12
-if (!include_once(MODX_MANAGER_PATH . 'includes/extenders/phpass.class.inc.php')) {
12
+if (!include_once(MODX_MANAGER_PATH.'includes/extenders/phpass.class.inc.php')) {
13 13
     return false;
14 14
 } else {
15 15
     $this->phpass = new PasswordHash;
Please login to merge, or discard this patch.
manager/includes/extenders/ex_maketable.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:38
6 6
  */
7 7
 
8
-if (!include_once MODX_MANAGER_PATH . 'includes/extenders/maketable.class.php') {
8
+if (!include_once MODX_MANAGER_PATH.'includes/extenders/maketable.class.php') {
9 9
     return false;
10 10
 } else {
11 11
     $this->table = new MakeTable;
Please login to merge, or discard this patch.
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 2 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.
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
         global $modx;
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.