Completed
Push — develop ( 80f130...524d8a )
by Maxim
08:25
created
manager/media/style/common/moo-datepicker/datepicker.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2
-class DATEPICKER {
3
-    function __construct() {
2
+class DATEPICKER{
3
+    function __construct(){
4 4
     }
5
-    function getDP() {
5
+    function getDP(){
6 6
         $modx = evolutionCMS(); global$_lang;
7 7
 
8 8
         $tpl = file_get_contents(dirname(__FILE__).'/datepicker.tpl');
9
-        return $modx->parseText($tpl,$_lang,'[%','%]');
9
+        return $modx->parseText($tpl, $_lang, '[%', '%]');
10 10
     }
11 11
 }
Please login to merge, or discard this patch.
manager/media/script/air-datepicker/datepicker.inc.php 1 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.
manager/actions/help/version_notices/1.3.6.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 ?>
Please login to merge, or discard this patch.
manager/actions/help/version_notices/1.4.1.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 ?>
Please login to merge, or discard this patch.
manager/actions/help/version_notices/1.4.0.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 ?>
Please login to merge, or discard this patch.
manager/actions/mutate_settings/tab3_user_settings.inc.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
   <tr>
7 7
     <td nowrap class="warning"><?php echo $_lang['udperms_title'] ?><br><small>[(use_udperms)]</small></td>
8 8
     <td>
9
-        <?php echo wrap_label($_lang['yes'],form_radio('use_udperms', 1, 'id="udPermsOn"'));?><br />
10
-        <?php echo wrap_label($_lang['no'], form_radio('use_udperms', 0, 'id="udPermsOff"'));?>
9
+        <?php echo wrap_label($_lang['yes'], form_radio('use_udperms', 1, 'id="udPermsOn"')); ?><br />
10
+        <?php echo wrap_label($_lang['no'], form_radio('use_udperms', 0, 'id="udPermsOff"')); ?>
11 11
     </td>
12 12
   </tr>
13 13
   <tr>
@@ -17,16 +17,16 @@  discard block
 block discarded – undo
17 17
   <tr>
18 18
     <td colspan="2"><div class="split"></div></td>
19 19
   </tr>
20
-  <tr class="udPerms" <?php echo showHide($use_udperms==1);?>>
20
+  <tr class="udPerms" <?php echo showHide($use_udperms == 1); ?>>
21 21
     <td nowrap class="warning"><?php echo $_lang['udperms_allowroot_title'] ?><br><small>[(udperms_allowroot)]</small></td>
22 22
     <td>
23
-      <label><input type="radio" name="udperms_allowroot" value="1" <?php echo $udperms_allowroot=='1' ? 'checked="checked"' : "" ; ?> />
23
+      <label><input type="radio" name="udperms_allowroot" value="1" <?php echo $udperms_allowroot == '1' ? 'checked="checked"' : ""; ?> />
24 24
       <?php echo $_lang['yes']?></label><br />
25
-      <label><input type="radio" name="udperms_allowroot" value="0" <?php echo $udperms_allowroot=='0' ? 'checked="checked"' : "" ; ?> />
25
+      <label><input type="radio" name="udperms_allowroot" value="0" <?php echo $udperms_allowroot == '0' ? 'checked="checked"' : ""; ?> />
26 26
       <?php echo $_lang['no']?></label>
27 27
     </td>
28 28
   </tr>
29
-  <tr class="udPerms" <?php echo showHide($use_udperms==1);?>>
29
+  <tr class="udPerms" <?php echo showHide($use_udperms == 1); ?>>
30 30
     <td width="200">&nbsp;</td>
31 31
     <td class="comment"><?php echo $_lang['udperms_allowroot_message'] ?></td>
32 32
   </tr>
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
   <tr>
38 38
     <td nowrap class="warning"><?php echo $_lang['email_sender_method'] ?><br><small>[(email_sender_method)]</small></td>
39 39
     <td>
40
-      <label><input type="radio" name="email_sender_method" value="1" <?php echo $email_sender_method=='1' ? 'checked="checked"' : "" ; ?> />
40
+      <label><input type="radio" name="email_sender_method" value="1" <?php echo $email_sender_method == '1' ? 'checked="checked"' : ""; ?> />
41 41
       <?php echo $_lang['auto']?></label><br />
42
-      <label><input type="radio" name="email_sender_method" value="0" <?php echo $email_sender_method=='0' ? 'checked="checked"' : "" ; ?> />
42
+      <label><input type="radio" name="email_sender_method" value="0" <?php echo $email_sender_method == '0' ? 'checked="checked"' : ""; ?> />
43 43
       <?php echo $_lang['use_emailsender']?></label>
44 44
     </td>
45 45
   </tr>
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
   <tr>
56 56
     <td nowrap class="warning"><?php echo $_lang['email_method_title'] ?><br><small>[(email_method)]</small></td>
57 57
     <td>
58
-        <?php echo wrap_label($_lang['email_method_mail'],form_radio('email_method','mail','id="useMail"'));?><br />
59
-        <?php echo wrap_label($_lang['email_method_smtp'],form_radio('email_method','smtp','id="useSmtp"'));?>
60
-        <div class="smtpRow" <?php echo showHide($email_method=='smtp');?>>
61
-            <?php include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/snippet_smtp.inc.php'); ?>
58
+        <?php echo wrap_label($_lang['email_method_mail'], form_radio('email_method', 'mail', 'id="useMail"')); ?><br />
59
+        <?php echo wrap_label($_lang['email_method_smtp'], form_radio('email_method', 'smtp', 'id="useSmtp"')); ?>
60
+        <div class="smtpRow" <?php echo showHide($email_method == 'smtp'); ?>>
61
+            <?php include_once(MODX_MANAGER_PATH.'actions/mutate_settings/snippet_smtp.inc.php'); ?>
62 62
         </div>
63 63
     </td>
64 64
   </tr>
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
       <br />
71 71
       <p><?php echo $_lang['update_settings_from_language']; ?></p>
72 72
       <select name="reload_emailsubject" id="reload_emailsubject_select" onchange="confirmLangChange(this, 'emailsubject_default', 'emailsubject_field');">
73
-<?php echo get_lang_options('emailsubject_default');?>
73
+<?php echo get_lang_options('emailsubject_default'); ?>
74 74
       </select>
75 75
     </td>
76 76
     <td ><input id="emailsubject_field" name="emailsubject" onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" value="<?php echo $emailsubject; ?>" />
77
-        <input type="hidden" name="emailsubject_default" id="emailsubject_default_hidden" value="<?php echo addslashes($_lang['emailsubject_default']);?>" />
77
+        <input type="hidden" name="emailsubject_default" id="emailsubject_default_hidden" value="<?php echo addslashes($_lang['emailsubject_default']); ?>" />
78 78
     </td>
79 79
   </tr>
80 80
   <tr>
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
       <br />
90 90
       <p><?php echo $_lang['update_settings_from_language']; ?></p>
91 91
       <select name="reload_signupemail_message" id="reload_signupemail_message_select" onchange="confirmLangChange(this, 'system_email_signup', 'signupemail_message_textarea');">
92
-<?php echo get_lang_options('system_email_signup');?>
92
+<?php echo get_lang_options('system_email_signup'); ?>
93 93
       </select>
94 94
     </td>
95 95
     <td> <textarea id="signupemail_message_textarea" name="signupemail_message" style="width:100%; height: 120px;"><?php echo $signupemail_message; ?></textarea>
96
-        <input type="hidden" name="system_email_signup_default" id="system_email_signup_hidden" value="<?php echo addslashes($_lang['system_email_signup']);?>" />
96
+        <input type="hidden" name="system_email_signup_default" id="system_email_signup_hidden" value="<?php echo addslashes($_lang['system_email_signup']); ?>" />
97 97
     </td>
98 98
   </tr>
99 99
   <tr>
@@ -108,11 +108,11 @@  discard block
 block discarded – undo
108 108
       <br />
109 109
       <p><?php echo $_lang['update_settings_from_language']; ?></p>
110 110
       <select name="reload_websignupemail_message" id="reload_websignupemail_message_select" onchange="confirmLangChange(this, 'system_email_websignup', 'websignupemail_message_textarea');">
111
-<?php echo get_lang_options('system_email_websignup');?>
111
+<?php echo get_lang_options('system_email_websignup'); ?>
112 112
       </select>
113 113
     </td>
114 114
     <td> <textarea id="websignupemail_message_textarea" name="websignupemail_message" style="width:100%; height: 120px;"><?php echo $websignupemail_message; ?></textarea>
115
-        <input type="hidden" name="system_email_websignup_default" id="system_email_websignup_hidden" value="<?php echo addslashes($_lang['system_email_websignup']);?>" />
115
+        <input type="hidden" name="system_email_websignup_default" id="system_email_websignup_hidden" value="<?php echo addslashes($_lang['system_email_websignup']); ?>" />
116 116
     </td>
117 117
   </tr>
118 118
   <tr>
@@ -127,11 +127,11 @@  discard block
 block discarded – undo
127 127
       <br />
128 128
       <p><?php echo $_lang['update_settings_from_language']; ?></p>
129 129
       <select name="reload_system_email_webreminder_message" id="reload_system_email_webreminder_select" onchange="confirmLangChange(this, 'system_email_webreminder', 'system_email_webreminder_textarea');">
130
-<?php echo get_lang_options('system_email_webreminder');?>
130
+<?php echo get_lang_options('system_email_webreminder'); ?>
131 131
       </select>
132 132
     </td>
133 133
     <td> <textarea id="system_email_webreminder_textarea" name="webpwdreminder_message" style="width:100%; height: 120px;"><?php echo $webpwdreminder_message; ?></textarea>
134
-        <input type="hidden" name="system_email_webreminder_default" id="system_email_webreminder_hidden" value="<?php echo addslashes($_lang['system_email_webreminder']);?>" />
134
+        <input type="hidden" name="system_email_webreminder_default" id="system_email_webreminder_hidden" value="<?php echo addslashes($_lang['system_email_webreminder']); ?>" />
135 135
     </td>
136 136
   </tr>
137 137
   <tr>
@@ -144,8 +144,8 @@  discard block
 block discarded – undo
144 144
   <tr>
145 145
     <td nowrap class="warning" valign="top"><?php echo $_lang['allow_multiple_emails_title'] ?><br><small>[(allow_multiple_emails)]</small></td>
146 146
     <td>
147
-      <?php echo wrap_label($_lang['yes'],form_radio('allow_multiple_emails','1'));?><br />
148
-      <?php echo wrap_label($_lang['no'], form_radio('allow_multiple_emails','0'));?>
147
+      <?php echo wrap_label($_lang['yes'], form_radio('allow_multiple_emails', '1')); ?><br />
148
+      <?php echo wrap_label($_lang['no'], form_radio('allow_multiple_emails', '0')); ?>
149 149
     </td>
150 150
   </tr>
151 151
   <tr>
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         <?php
158 158
             // invoke OnUserSettingsRender event
159 159
             $evtOut = $modx->invokeEvent('OnUserSettingsRender');
160
-            if(is_array($evtOut)) echo implode("",$evtOut);
160
+            if (is_array($evtOut)) echo implode("", $evtOut);
161 161
         ?>
162 162
     </td>
163 163
   </tr>
Please login to merge, or discard this patch.
manager/actions/mutate_settings/tab6_filemanager_settings.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
         <?php
114 114
             // invoke OnMiscSettingsRender event
115 115
             $evtOut = $modx->invokeEvent('OnFileManagerSettingsRender');
116
-            if(is_array($evtOut)) echo implode("",$evtOut);
116
+            if (is_array($evtOut)) echo implode("", $evtOut);
117 117
         ?>
118 118
     </td>
119 119
   </tr>
Please login to merge, or discard this patch.
manager/includes/header.inc.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -20,28 +20,28 @@  discard block
 block discarded – undo
20 20
 $body_class = '';
21 21
 $theme_modes = array('', 'lightness', 'light', 'dark', 'darkness');
22 22
 if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) {
23
-    $body_class .= ' ' . $theme_modes[$_COOKIE['MODX_themeMode']];
23
+    $body_class .= ' '.$theme_modes[$_COOKIE['MODX_themeMode']];
24 24
 } elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) {
25
-    $body_class .= ' ' . $theme_modes[$modx->config['manager_theme_mode']];
25
+    $body_class .= ' '.$theme_modes[$modx->config['manager_theme_mode']];
26 26
 }
27 27
 
28
-$css = 'media/style/' . $modx->config['manager_theme'] . '/style.css?v=' . $lastInstallTime;
28
+$css = 'media/style/'.$modx->config['manager_theme'].'/style.css?v='.$lastInstallTime;
29 29
 
30 30
 if ($modx->config['manager_theme'] == 'default') {
31
-    if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')
32
-        && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) {
31
+    if (!file_exists(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css')
32
+        && is_writable(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css')) {
33 33
         $files = array(
34
-            'bootstrap' => MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css',
35
-            'font-awesome' => MODX_MANAGER_PATH . 'media/style/common/font-awesome/css/font-awesome.min.css',
36
-            'fonts' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/fonts.css',
37
-            'forms' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/forms.css',
38
-            'mainmenu' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/mainmenu.css',
39
-            'tree' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/tree.css',
40
-            'custom' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/custom.css',
41
-            'tabpane' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/tabpane.css',
42
-            'contextmenu' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/contextmenu.css',
43
-            'index' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/index.css',
44
-            'main' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/main.css'
34
+            'bootstrap' => MODX_MANAGER_PATH.'media/style/common/bootstrap/css/bootstrap.min.css',
35
+            'font-awesome' => MODX_MANAGER_PATH.'media/style/common/font-awesome/css/font-awesome.min.css',
36
+            'fonts' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/fonts.css',
37
+            'forms' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/forms.css',
38
+            'mainmenu' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/mainmenu.css',
39
+            'tree' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/tree.css',
40
+            'custom' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/custom.css',
41
+            'tabpane' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/tabpane.css',
42
+            'contextmenu' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/contextmenu.css',
43
+            'index' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/index.css',
44
+            'main' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/main.css'
45 45
         );
46 46
         $evtOut = $modx->invokeEvent('OnBeforeMinifyCss', array(
47 47
             'files' => $files,
@@ -58,16 +58,16 @@  discard block
 block discarded – undo
58 58
             default:
59 59
                 $modx->webAlertAndQuit(sprintf($_lang['invalid_event_response'], 'OnBeforeMinifyManagerCss'));
60 60
         }
61
-        require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php';
61
+        require_once MODX_BASE_PATH.'assets/lib/Formatter/CSSMinify.php';
62 62
         $minifier = new Formatter\CSSMinify($files);
63 63
         $css = $minifier->minify();
64 64
         file_put_contents(
65
-            MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css',
65
+            MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css',
66 66
             $css
67 67
         );
68 68
     }
69
-    if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
70
-        $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime;
69
+    if (file_exists(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css')) {
70
+        $css = 'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css?v='.$lastInstallTime;
71 71
     }
72 72
 }
73 73
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
83 83
     <link rel="stylesheet" type="text/css" href="<?= $css ?>"/>
84 84
     <script type="text/javascript" src="media/script/tabpane.js"></script>
85
-    <?= sprintf('<script type="text/javascript" src="%s"></script>' . "\n", $modx->config['mgr_jquery_path']) ?>
85
+    <?= sprintf('<script type="text/javascript" src="%s"></script>'."\n", $modx->config['mgr_jquery_path']) ?>
86 86
     <?php if ($modx->config['show_picker'] != "0") { ?>
87 87
         <script src="media/style/<?= $modx->config['manager_theme'] ?>/js/color.switcher.js"
88 88
                 type="text/javascript"></script>
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     <?php } ?>
96 96
 
97 97
     <!-- OnManagerMainFrameHeaderHTMLBlock -->
98
-    <?= $onManagerMainFrameHeaderHTMLBlock . "\n" ?>
98
+    <?= $onManagerMainFrameHeaderHTMLBlock."\n" ?>
99 99
 
100 100
     <script type="text/javascript">
101 101
       if (!evo) {
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     <script>
126 126
         <?php
127 127
         if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) {
128
-            echo 'doRefresh(' . $_REQUEST['r'] . ");\n";
128
+            echo 'doRefresh('.$_REQUEST['r'].");\n";
129 129
         }
130 130
         ?>
131 131
     </script>
Please login to merge, or discard this patch.
install/src/functions.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (! function_exists('getLangOptions')) {
2
+if (!function_exists('getLangOptions')) {
3 3
     /**
4 4
      * @param string $install_language
5 5
      * @return string
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
     function getLangOptions($install_language = 'english')
8 8
     {
9 9
         $langs = array();
10
-        if ($handle = opendir(__DIR__ . '/lang/')) {
10
+        if ($handle = opendir(__DIR__.'/lang/')) {
11 11
             while (false !== ($file = readdir($handle))) {
12 12
                 if (strpos($file, '.')) {
13 13
                     $langs[] = str_replace('.inc.php', '', $file);
@@ -21,14 +21,14 @@  discard block
 block discarded – undo
21 21
             $abrv_language = explode('-', $language);
22 22
             $selected = ($language === $install_language) ? 'selected' : '';
23 23
             $_[] = sprintf('<option value="%s" %s>%s</option>', $language, $selected,
24
-                    ucwords($abrv_language[0])) . "\n";
24
+                    ucwords($abrv_language[0]))."\n";
25 25
         }
26 26
 
27 27
         return implode("\n", $_);
28 28
     }
29 29
 }
30 30
 
31
-if (! function_exists('install_sessionCheck')) {
31
+if (!function_exists('install_sessionCheck')) {
32 32
     function install_sessionCheck()
33 33
     {
34 34
         global $_lang;
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 </head>
51 51
 <body>
52 52
 	<div class="install">
53
-		<p>' . $_lang["session_problem"] . '</p>
54
-		<p><a href="./">' . $_lang["session_problem_try_again"] . '</a></p>
53
+		<p>' . $_lang["session_problem"].'</p>
54
+		<p><a href="./">' . $_lang["session_problem_try_again"].'</a></p>
55 55
 	</div>
56 56
 </body>
57 57
 </html>';
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     function parse($src, $ph, $left = '[+', $right = '+]')
73 73
     {
74 74
         foreach ($ph as $k => $v) {
75
-            $k = $left . $k . $right;
75
+            $k = $left.$k.$right;
76 76
             $src = str_replace($k, $v, $src);
77 77
         }
78 78
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $ph['textdir'] = $modx_textdir ? ' id="rtl"' : '';
100 100
         $ph['help_link'] = $installmode == 0 ? $_lang['help_link_new'] : $_lang['help_link_upd'];
101 101
         $ph['version'] = $moduleVersion;
102
-        $ph['release_date'] = ($modx_textdir ? '&rlm;' : '') . $modx_release_date;
102
+        $ph['release_date'] = ($modx_textdir ? '&rlm;' : '').$modx_release_date;
103 103
         $ph['footer1'] = $_lang['modx_footer1'];
104 104
         $ph['footer2'] = $_lang['modx_footer2'];
105 105
         $ph['current_year'] = date('Y');
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
             $manager_language = "english";
185 185
         }
186 186
         $langs = array();
187
-        if ($handle = opendir(dirname(dirname(__DIR__)) . '/' . MGR_DIR . '/includes/lang')) {
187
+        if ($handle = opendir(dirname(dirname(__DIR__)).'/'.MGR_DIR.'/includes/lang')) {
188 188
             while (false !== ($file = readdir($handle))) {
189 189
                 if (strpos($file, '.inc.') !== false) {
190 190
                     $langs[] = $file;
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
             $i++;
251 251
         }
252 252
 
253
-        return (0 < count($_)) ? '<h3>[%templates%]</h3>' . implode("\n", $_) : '';
253
+        return (0 < count($_)) ? '<h3>[%templates%]</h3>'.implode("\n", $_) : '';
254 254
     }
255 255
 }
256 256
 
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
             $i++;
281 281
         }
282 282
 
283
-        return (0 < count($_)) ? '<h3>[%tvs%]</h3>' . implode("\n", $_) : '';
283
+        return (0 < count($_)) ? '<h3>[%tvs%]</h3>'.implode("\n", $_) : '';
284 284
     }
285 285
 }
286 286
 
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
             $i++;
312 312
         }
313 313
 
314
-        return (0 < count($_)) ? '<h3>[%chunks%]</h3>' . implode("\n", $_) : '';
314
+        return (0 < count($_)) ? '<h3>[%chunks%]</h3>'.implode("\n", $_) : '';
315 315
     }
316 316
 }
317 317
 
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
             $i++;
343 343
         }
344 344
 
345
-        return (0 < count($_)) ? '<h3>[%modules%]</h3>' . implode("\n", $_) : '';
345
+        return (0 < count($_)) ? '<h3>[%modules%]</h3>'.implode("\n", $_) : '';
346 346
     }
347 347
 }
348 348
 
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
             $i++;
378 378
         }
379 379
 
380
-        return (0 < count($_)) ? '<h3>[%plugins%]</h3>' . implode("\n", $_) : '';
380
+        return (0 < count($_)) ? '<h3>[%plugins%]</h3>'.implode("\n", $_) : '';
381 381
     }
382 382
 }
383 383
 
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
             $i++;
409 409
         }
410 410
 
411
-        return (0 < count($_)) ? '<h3>[%snippets%]</h3>' . implode("\n", $_) : '';
411
+        return (0 < count($_)) ? '<h3>[%snippets%]</h3>'.implode("\n", $_) : '';
412 412
     }
413 413
 }
414 414
 
@@ -419,46 +419,46 @@  discard block
 block discarded – undo
419 419
 
420 420
         // secure web documents - privateweb
421 421
         mysqli_query($sqlParser->conn,
422
-            "UPDATE `" . $sqlParser->prefix . "site_content` SET privateweb = 0 WHERE privateweb = 1");
422
+            "UPDATE `".$sqlParser->prefix."site_content` SET privateweb = 0 WHERE privateweb = 1");
423 423
         $sql = "SELECT DISTINCT sc.id
424
-             FROM `" . $sqlParser->prefix . "site_content` sc
425
-             LEFT JOIN `" . $sqlParser->prefix . "document_groups` dg ON dg.document = sc.id
426
-             LEFT JOIN `" . $sqlParser->prefix . "webgroup_access` wga ON wga.documentgroup = dg.document_group
424
+             FROM `" . $sqlParser->prefix."site_content` sc
425
+             LEFT JOIN `" . $sqlParser->prefix."document_groups` dg ON dg.document = sc.id
426
+             LEFT JOIN `" . $sqlParser->prefix."webgroup_access` wga ON wga.documentgroup = dg.document_group
427 427
              WHERE wga.id>0";
428 428
         $ds = mysqli_query($sqlParser->conn, $sql);
429 429
         if (!$ds) {
430
-            echo "An error occurred while executing a query: " . mysqli_error($sqlParser->conn);
430
+            echo "An error occurred while executing a query: ".mysqli_error($sqlParser->conn);
431 431
         } else {
432 432
             while ($r = mysqli_fetch_assoc($ds)) {
433 433
                 $ids[] = $r["id"];
434 434
             }
435 435
             if (count($ids) > 0) {
436 436
                 mysqli_query($sqlParser->conn,
437
-                    "UPDATE `" . $sqlParser->prefix . "site_content` SET privateweb = 1 WHERE id IN (" . implode(", ",
438
-                        $ids) . ")");
437
+                    "UPDATE `".$sqlParser->prefix."site_content` SET privateweb = 1 WHERE id IN (".implode(", ",
438
+                        $ids).")");
439 439
                 unset($ids);
440 440
             }
441 441
         }
442 442
 
443 443
         // secure manager documents privatemgr
444 444
         mysqli_query($sqlParser->conn,
445
-            "UPDATE `" . $sqlParser->prefix . "site_content` SET privatemgr = 0 WHERE privatemgr = 1");
445
+            "UPDATE `".$sqlParser->prefix."site_content` SET privatemgr = 0 WHERE privatemgr = 1");
446 446
         $sql = "SELECT DISTINCT sc.id
447
-             FROM `" . $sqlParser->prefix . "site_content` sc
448
-             LEFT JOIN `" . $sqlParser->prefix . "document_groups` dg ON dg.document = sc.id
449
-             LEFT JOIN `" . $sqlParser->prefix . "membergroup_access` mga ON mga.documentgroup = dg.document_group
447
+             FROM `" . $sqlParser->prefix."site_content` sc
448
+             LEFT JOIN `" . $sqlParser->prefix."document_groups` dg ON dg.document = sc.id
449
+             LEFT JOIN `" . $sqlParser->prefix."membergroup_access` mga ON mga.documentgroup = dg.document_group
450 450
              WHERE mga.id>0";
451 451
         $ds = mysqli_query($sqlParser->conn, $sql);
452 452
         if (!$ds) {
453
-            echo "An error occurred while executing a query: " . mysqli_error($sqlParser->conn);
453
+            echo "An error occurred while executing a query: ".mysqli_error($sqlParser->conn);
454 454
         } else {
455 455
             while ($r = mysqli_fetch_assoc($ds)) {
456 456
                 $ids[] = $r["id"];
457 457
             }
458 458
             if (count($ids) > 0) {
459 459
                 mysqli_query($sqlParser->conn,
460
-                    "UPDATE `" . $sqlParser->prefix . "site_content` SET privatemgr = 1 WHERE id IN (" . implode(", ",
461
-                        $ids) . ")");
460
+                    "UPDATE `".$sqlParser->prefix."site_content` SET privatemgr = 1 WHERE id IN (".implode(", ",
461
+                        $ids).")");
462 462
                 unset($ids);
463 463
             }
464 464
         }
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
     function parse_docblock($element_dir, $filename)
470 470
     {
471 471
         $params = array();
472
-        $fullpath = $element_dir . '/' . $filename;
472
+        $fullpath = $element_dir.'/'.$filename;
473 473
         if (is_readable($fullpath)) {
474 474
             $tpl = @fopen($fullpath, "r");
475 475
             if ($tpl) {
@@ -688,17 +688,17 @@  discard block
 block discarded – undo
688 688
     function getCreateDbCategory($category, $sqlParser)
689 689
     {
690 690
         $dbase = $sqlParser->dbname;
691
-        $dbase = '`' . trim($dbase, '`') . '`';
691
+        $dbase = '`'.trim($dbase, '`').'`';
692 692
         $table_prefix = $sqlParser->prefix;
693 693
         $category_id = 0;
694 694
         if (!empty($category)) {
695 695
             $category = mysqli_real_escape_string($sqlParser->conn, $category);
696 696
             $rs = mysqli_query($sqlParser->conn,
697
-                "SELECT id FROM $dbase.`" . $table_prefix . "categories` WHERE category = '" . $category . "'");
697
+                "SELECT id FROM $dbase.`".$table_prefix."categories` WHERE category = '".$category."'");
698 698
             if (mysqli_num_rows($rs) && ($row = mysqli_fetch_assoc($rs))) {
699 699
                 $category_id = $row['id'];
700 700
             } else {
701
-                $q = "INSERT INTO $dbase.`" . $table_prefix . "categories` (`category`) VALUES ('{$category}');";
701
+                $q = "INSERT INTO $dbase.`".$table_prefix."categories` (`category`) VALUES ('{$category}');";
702 702
                 $rs = mysqli_query($sqlParser->conn, $q);
703 703
                 if ($rs) {
704 704
                     $category_id = mysqli_insert_id($sqlParser->conn);
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
             default:
741 741
                 return $cleaned;
742 742
         };
743
-        if (substr(trim($cleaned), 0, $count) == $include . ' MODX_BASE_PATH.\'assets/' . $elm_name . '/') {
743
+        if (substr(trim($cleaned), 0, $count) == $include.' MODX_BASE_PATH.\'assets/'.$elm_name.'/') {
744 744
             return $cleaned;
745 745
         }
746 746
 
Please login to merge, or discard this patch.