Completed
Push — develop ( 053968...47dc8d )
by Maxim
12s
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/modxmailer.class.inc.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
 use PHPMailer\PHPMailer\PHPMailer;
12 12
 use PHPMailer\PHPMailer\Exception as PHPMailerException;
13 13
 
14
-require MODX_MANAGER_PATH . 'includes/controls/phpmailer/Exception.php';
15
-require MODX_MANAGER_PATH . 'includes/controls/phpmailer/PHPMailer.php';
16
-require MODX_MANAGER_PATH . 'includes/controls/phpmailer/SMTP.php';
14
+require MODX_MANAGER_PATH.'includes/controls/phpmailer/Exception.php';
15
+require MODX_MANAGER_PATH.'includes/controls/phpmailer/PHPMailer.php';
16
+require MODX_MANAGER_PATH.'includes/controls/phpmailer/SMTP.php';
17 17
 
18 18
 /**
19 19
  * Class MODxMailer
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     public function init(DocumentParser $modx)
47 47
     {
48 48
         $this->modx = $modx;
49
-        $this->PluginDir = MODX_MANAGER_PATH . 'includes/controls/phpmailer/';
49
+        $this->PluginDir = MODX_MANAGER_PATH.'includes/controls/phpmailer/';
50 50
 
51 51
         switch ($modx->config['email_method']) {
52 52
             case 'smtp':
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             mb_language($this->mb_language);
111 111
             mb_internal_encoding($modx->config['modx_charset']);
112 112
         }
113
-        $exconf = MODX_MANAGER_PATH . 'includes/controls/phpmailer/config.inc.php';
113
+        $exconf = MODX_MANAGER_PATH.'includes/controls/phpmailer/config.inc.php';
114 114
         if (is_file($exconf)) {
115 115
             include($exconf);
116 116
         }
@@ -178,12 +178,12 @@  discard block
 block discarded – undo
178 178
         }
179 179
 
180 180
         if ($this->modx->debug) {
181
-            $debug_info = 'CharSet = ' . $this->CharSet . "\n";
182
-            $debug_info .= 'Encoding = ' . $this->Encoding . "\n";
183
-            $debug_info .= 'mb_language = ' . $this->mb_language . "\n";
184
-            $debug_info .= 'encode_header_method = ' . $this->encode_header_method . "\n";
181
+            $debug_info = 'CharSet = '.$this->CharSet."\n";
182
+            $debug_info .= 'Encoding = '.$this->Encoding."\n";
183
+            $debug_info .= 'mb_language = '.$this->mb_language."\n";
184
+            $debug_info .= 'encode_header_method = '.$this->encode_header_method."\n";
185 185
             $debug_info .= "send_mode = {$mode}\n";
186
-            $debug_info .= 'Subject = ' . $this->Subject . "\n";
186
+            $debug_info .= 'Subject = '.$this->Subject."\n";
187 187
             $log = "<pre>{$debug_info}\n{$header}\n{$org_body}</pre>";
188 188
             $this->modx->logEvent(1, 1, $log, 'MODxMailer debug information');
189 189
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
             ini_set('sendmail_from', $old_from);
250 250
         }
251 251
         if (!$rt) {
252
-            $msg = $this->Lang('instantiate') . "<br />\n";
252
+            $msg = $this->Lang('instantiate')."<br />\n";
253 253
             $msg .= "{$this->Subject}<br />\n";
254 254
             $msg .= "{$this->FromName}&lt;{$this->From}&gt;<br />\n";
255 255
             $msg .= mb_convert_encoding($body, $this->modx->config['modx_charset'], $this->CharSet);
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
      */
269 269
     public function SetError($msg)
270 270
     {
271
-        $msg .= '<pre>' . print_r(get_object_vars($this), true) . '</pre>';
271
+        $msg .= '<pre>'.print_r(get_object_vars($this), true).'</pre>';
272 272
         $this->modx->config['send_errormail'] = '0';
273 273
         $this->modx->logEvent(0, 3, $msg, 'phpmailer');
274 274
 
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.