Completed
Push — develop ( b2c942...8bfc17 )
by Serg
05:46
created
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.
manager/media/script/air-datepicker/datepicker.inc.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
         $load_script = file_get_contents(dirname(__FILE__).'/datepicker.tpl');
10 10
         if(!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode();
11
-		$modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy';
11
+        $modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy';
12 12
         return $modx->mergeSettingsContent($load_script);
13 13
     }
14 14
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2
-class DATEPICKER {
2
+class DATEPICKER{
3 3
     /**
4 4
      * @return string
5 5
      */
6
-    public function getDP() {
6
+    public function getDP(){
7 7
         $modx = evolutionCMS();
8 8
 
9 9
         $load_script = file_get_contents(dirname(__FILE__).'/datepicker.tpl');
10
-        if(!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode();
10
+        if (!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode();
11 11
 		$modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy';
12 12
         return $modx->mergeSettingsContent($load_script);
13 13
     }
@@ -15,14 +15,14 @@  discard block
 block discarded – undo
15 15
     /**
16 16
      * @return string
17 17
      */
18
-    public function getLangCode() {
18
+    public function getLangCode(){
19 19
         $modx = evolutionCMS(); global $modx_lang_attribute;
20 20
 
21
-        if(!$modx_lang_attribute) return 'en';
21
+        if (!$modx_lang_attribute) return 'en';
22 22
 
23 23
         $lc = $modx_lang_attribute;
24
-        if($lc === 'uk') return 'ru';
25
-        $dp_path = str_replace('\\','/',dirname(__FILE__));
24
+        if ($lc === 'uk') return 'ru';
25
+        $dp_path = str_replace('\\', '/', dirname(__FILE__));
26 26
 
27 27
         return (is_file("{$dp_path}/i18n/datepicker.{$lc}.js")) ? $modx_lang_attribute : 'en';
28 28
     }
Please login to merge, or discard this patch.
Braces   +15 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,13 +1,17 @@  discard block
 block discarded – undo
1 1
 <?php
2
-class DATEPICKER {
2
+class DATEPICKER
3
+{
3 4
     /**
4 5
      * @return string
5 6
      */
6
-    public function getDP() {
7
+    public function getDP()
8
+    {
7 9
         $modx = evolutionCMS();
8 10
 
9 11
         $load_script = file_get_contents(dirname(__FILE__).'/datepicker.tpl');
10
-        if(!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode();
12
+        if(!isset($modx->config['lang_code'])) {
13
+            $modx->config['lang_code'] = $this->getLangCode();
14
+        }
11 15
 		$modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy';
12 16
         return $modx->mergeSettingsContent($load_script);
13 17
     }
@@ -15,13 +19,18 @@  discard block
 block discarded – undo
15 19
     /**
16 20
      * @return string
17 21
      */
18
-    public function getLangCode() {
22
+    public function getLangCode()
23
+    {
19 24
         $modx = evolutionCMS(); global $modx_lang_attribute;
20 25
 
21
-        if(!$modx_lang_attribute) return 'en';
26
+        if(!$modx_lang_attribute) {
27
+            return 'en';
28
+        }
22 29
 
23 30
         $lc = $modx_lang_attribute;
24
-        if($lc === 'uk') return 'ru';
31
+        if($lc === 'uk') {
32
+            return 'ru';
33
+        }
25 34
         $dp_path = str_replace('\\','/',dirname(__FILE__));
26 35
 
27 36
         return (is_file("{$dp_path}/i18n/datepicker.{$lc}.js")) ? $modx_lang_attribute : 'en';
Please login to merge, or discard this patch.
index.php 3 patches
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -50,17 +50,23 @@  discard block
 block discarded – undo
50 50
 	include_once($autoloader);
51 51
 }
52 52
 
53
-if(!isset($_SERVER['REQUEST_TIME_FLOAT'])) $_SERVER['REQUEST_TIME_FLOAT'] = microtime(true);
53
+if(!isset($_SERVER['REQUEST_TIME_FLOAT'])) {
54
+    $_SERVER['REQUEST_TIME_FLOAT'] = microtime(true);
55
+}
54 56
 
55 57
 $base_path = str_replace('\\','/',dirname(__FILE__)) . '/';
56
-if(is_file($base_path . 'assets/cache/siteManager.php'))
58
+if(is_file($base_path . 'assets/cache/siteManager.php')) {
57 59
     include_once($base_path . 'assets/cache/siteManager.php');
58
-if(!defined('MGR_DIR') && is_dir("{$base_path}manager"))
60
+}
61
+if(!defined('MGR_DIR') && is_dir("{$base_path}manager")) {
59 62
 	define('MGR_DIR', 'manager');
60
-if(is_file($base_path . 'assets/cache/siteHostnames.php'))
63
+}
64
+if(is_file($base_path . 'assets/cache/siteHostnames.php')) {
61 65
     include_once($base_path . 'assets/cache/siteHostnames.php');
62
-if(!defined('MODX_SITE_HOSTNAMES'))
66
+}
67
+if(!defined('MODX_SITE_HOSTNAMES')) {
63 68
 	define('MODX_SITE_HOSTNAMES', '');
69
+}
64 70
 
65 71
 // get start time
66 72
 $mstart = memory_get_usage();
@@ -129,7 +135,7 @@  discard block
 block discarded – undo
129 135
     @ini_set("display_errors","0");
130 136
 }
131 137
 
132
-if(MODX_CLI){
138
+if(MODX_CLI) {
133 139
     @set_time_limit(0);
134 140
     @ini_set('max_execution_time',0);
135 141
 }
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
 $autoloader = __DIR__.'/vendor/autoload.php';
49 49
 if (file_exists($autoloader) && is_readable($autoloader)) {
50
-	include_once($autoloader);
50
+    include_once($autoloader);
51 51
 }
52 52
 
53 53
 if(!isset($_SERVER['REQUEST_TIME_FLOAT'])) $_SERVER['REQUEST_TIME_FLOAT'] = microtime(true);
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
 if(is_file($base_path . 'assets/cache/siteManager.php'))
57 57
     include_once($base_path . 'assets/cache/siteManager.php');
58 58
 if(!defined('MGR_DIR') && is_dir("{$base_path}manager"))
59
-	define('MGR_DIR', 'manager');
59
+    define('MGR_DIR', 'manager');
60 60
 if(is_file($base_path . 'assets/cache/siteHostnames.php'))
61 61
     include_once($base_path . 'assets/cache/siteHostnames.php');
62 62
 if(!defined('MODX_SITE_HOSTNAMES'))
63
-	define('MODX_SITE_HOSTNAMES', '');
63
+    define('MODX_SITE_HOSTNAMES', '');
64 64
 
65 65
 // get start time
66 66
 $mstart = memory_get_usage();
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
 define('IN_PARSER_MODE', true);
86 86
 if ( ! defined('IN_MANAGER_MODE')) {
87
-	define('IN_MANAGER_MODE', false);
87
+    define('IN_MANAGER_MODE', false);
88 88
 }
89 89
 if (!defined('MODX_API_MODE')) {
90 90
     define('MODX_API_MODE', false);
@@ -108,11 +108,11 @@  discard block
 block discarded – undo
108 108
 
109 109
 // initiate a new document parser
110 110
 if (isset($coreClass) && class_exists($coreClass)) {
111
-	$modx = new $coreClass;
111
+    $modx = new $coreClass;
112 112
 }
113 113
 if (!isset($modx) || !($modx instanceof \DocumentParser)) {
114
-	include_once(MODX_MANAGER_PATH.'includes/document.parser.class.inc.php');
115
-	$modx = DocumentParser::getInstance();
114
+    include_once(MODX_MANAGER_PATH.'includes/document.parser.class.inc.php');
115
+    $modx = DocumentParser::getInstance();
116 116
 }
117 117
 
118 118
 // set some parser options
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -50,16 +50,16 @@  discard block
 block discarded – undo
50 50
 	include_once($autoloader);
51 51
 }
52 52
 
53
-if(!isset($_SERVER['REQUEST_TIME_FLOAT'])) $_SERVER['REQUEST_TIME_FLOAT'] = microtime(true);
53
+if (!isset($_SERVER['REQUEST_TIME_FLOAT'])) $_SERVER['REQUEST_TIME_FLOAT'] = microtime(true);
54 54
 
55
-$base_path = str_replace('\\','/',dirname(__FILE__)) . '/';
56
-if(is_file($base_path . 'assets/cache/siteManager.php'))
57
-    include_once($base_path . 'assets/cache/siteManager.php');
58
-if(!defined('MGR_DIR') && is_dir("{$base_path}manager"))
55
+$base_path = str_replace('\\', '/', dirname(__FILE__)).'/';
56
+if (is_file($base_path.'assets/cache/siteManager.php'))
57
+    include_once($base_path.'assets/cache/siteManager.php');
58
+if (!defined('MGR_DIR') && is_dir("{$base_path}manager"))
59 59
 	define('MGR_DIR', 'manager');
60
-if(is_file($base_path . 'assets/cache/siteHostnames.php'))
61
-    include_once($base_path . 'assets/cache/siteHostnames.php');
62
-if(!defined('MODX_SITE_HOSTNAMES'))
60
+if (is_file($base_path.'assets/cache/siteHostnames.php'))
61
+    include_once($base_path.'assets/cache/siteHostnames.php');
62
+if (!defined('MODX_SITE_HOSTNAMES'))
63 63
 	define('MODX_SITE_HOSTNAMES', '');
64 64
 
65 65
 // get start time
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 // set some settings, and address some IE issues
72 72
 @ini_set('url_rewriter.tags', '');
73 73
 @ini_set('session.use_trans_sid', 0);
74
-@ini_set('session.use_only_cookies',1);
74
+@ini_set('session.use_only_cookies', 1);
75 75
 session_cache_limiter('');
76 76
 header('P3P: CP="NOI NID ADMa OUR IND UNI COM NAV"'); // header for weird cookie stuff. Blame IE.
77 77
 header('Cache-Control: private, must-revalidate');
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
  */
84 84
 
85 85
 define('IN_PARSER_MODE', true);
86
-if ( ! defined('IN_MANAGER_MODE')) {
86
+if (!defined('IN_MANAGER_MODE')) {
87 87
 	define('IN_MANAGER_MODE', false);
88 88
 }
89 89
 if (!defined('MODX_API_MODE')) {
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
 }
92 92
 
93 93
 // get the required includes
94
-if(! isset($database_user) || $database_user==="") {
95
-    $rt = @include_once(__DIR__ . '/' . MGR_DIR . '/includes/config.inc.php');
94
+if (!isset($database_user) || $database_user === "") {
95
+    $rt = @include_once(__DIR__.'/'.MGR_DIR.'/includes/config.inc.php');
96 96
     $path = 'install/src/template/not_installed.tpl';
97 97
     // Be sure config.inc.php is there and that it contains some important values
98 98
     if (!$rt || !$database_type || !$database_server || !$database_user || !$dbase) {
@@ -128,13 +128,13 @@  discard block
 block discarded – undo
128 128
 $modx->stopOnNotice = false;
129 129
 
130 130
 // Don't show PHP errors to the public
131
-if(!isset($_SESSION['mgrValidated']) || !$_SESSION['mgrValidated']) {
132
-    @ini_set("display_errors","0");
131
+if (!isset($_SESSION['mgrValidated']) || !$_SESSION['mgrValidated']) {
132
+    @ini_set("display_errors", "0");
133 133
 }
134 134
 
135
-if(MODX_CLI){
135
+if (MODX_CLI) {
136 136
     @set_time_limit(0);
137
-    @ini_set('max_execution_time',0);
137
+    @ini_set('max_execution_time', 0);
138 138
 }
139 139
 
140 140
 // execute the parser if index.php was not included
Please login to merge, or discard this patch.