Completed
Push — develop ( d568f8...c061fc )
by Agel_Nash
06:25
created
manager/media/calendar/datepicker.inc.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
         $modx = evolutionCMS();
12 12
         global $_lang;
13 13
 
14
-        $tpl = file_get_contents(dirname(__FILE__) . '/datepicker.tpl');
14
+        $tpl = file_get_contents(dirname(__FILE__).'/datepicker.tpl');
15 15
         return $modx->parseText($tpl, $_lang, '[%', '%]');
16 16
     }
17 17
 }
Please login to merge, or discard this patch.
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-class DATEPICKER
4
-{
5
-    public function __construct()
6
-    {
3
+class DATEPICKER
4
+{
5
+    public function __construct()
6
+    {
7 7
     }
8 8
 
9
-    public function getDP()
10
-    {
9
+    public function getDP()
10
+    {
11 11
         $modx = evolutionCMS();
12 12
         global $_lang;
13 13
 
Please login to merge, or discard this patch.
manager/actions/mutate_menuindex_sort.dynamic.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@  discard block
 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
 if (!$modx->hasPermission('edit_document') || !$modx->hasPermission('save_document')) {
6 6
     $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9
-$id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : null;
9
+$id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : null;
10 10
 $reset = isset($_POST['reset']) && $_POST['reset'] == 'true' ? 1 : 0;
11 11
 $items = isset($_POST['list']) ? $_POST['list'] : '';
12 12
 $ressourcelist = '';
13 13
 $updateMsg = '';
14 14
 
15 15
 // check permissions on the document
16
-include_once MODX_MANAGER_PATH . "processors/user_documents_permissions.class.php";
16
+include_once MODX_MANAGER_PATH."processors/user_documents_permissions.class.php";
17 17
 $udperms = new udperms();
18 18
 $udperms->user = $modx->getLoginUserID();
19 19
 $udperms->document = $id;
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 }
25 25
 
26 26
 if (isset($_POST['listSubmitted'])) {
27
-    $updateMsg .= '<div class="text-success" id="updated">' . $_lang['sort_updated'] . '</div>';
27
+    $updateMsg .= '<div class="text-success" id="updated">'.$_lang['sort_updated'].'</div>';
28 28
     if (strlen($items) > 0) {
29 29
         $items = explode(';', $items);
30 30
         foreach ($items as $key => $value) {
@@ -44,15 +44,15 @@  discard block
 block discarded – undo
44 44
     $tblsc = $modx->getFullTableName('site_content');
45 45
     $tbldg = $modx->getFullTableName('document_groups');
46 46
 
47
-    $rs = $modx->db->select('pagetitle', $tblsc, 'id=' . $id . '');
47
+    $rs = $modx->db->select('pagetitle', $tblsc, 'id='.$id.'');
48 48
     $pagetitle = $modx->db->getValue($rs);
49 49
 
50 50
     $docgrp = (isset($_SESSION['mgrDocgroups']) && is_array($_SESSION['mgrDocgroups'])) ? implode(',', $_SESSION['mgrDocgroups']) : '';
51 51
     $docgrp_cond = $docgrp ? "OR dg.document_group IN ({$docgrp})" : '';
52
-    $mgrRole = (isset($_SESSION['mgrRole']) && (string)$_SESSION['mgrRole'] === '1') ? '1' : '0';
53
-    $access = " AND (1={$mgrRole} OR sc.privatemgr=0" . (!$docgrp ? ')' : " OR dg.document_group IN ({$docgrp}))");
52
+    $mgrRole = (isset($_SESSION['mgrRole']) && (string) $_SESSION['mgrRole'] === '1') ? '1' : '0';
53
+    $access = " AND (1={$mgrRole} OR sc.privatemgr=0".(!$docgrp ? ')' : " OR dg.document_group IN ({$docgrp}))");
54 54
 
55
-    $rs = $modx->db->select('sc.id, sc.pagetitle, sc.parent, sc.menuindex, sc.published, sc.hidemenu, sc.deleted, sc.isfolder', $tblsc . 'AS sc LEFT JOIN ' . $tbldg . ' dg ON dg.document=sc.id', 'sc.parent=' . $id . $access . ' GROUP BY sc.id', 'menuindex ASC');
55
+    $rs = $modx->db->select('sc.id, sc.pagetitle, sc.parent, sc.menuindex, sc.published, sc.hidemenu, sc.deleted, sc.isfolder', $tblsc.'AS sc LEFT JOIN '.$tbldg.' dg ON dg.document=sc.id', 'sc.parent='.$id.$access.' GROUP BY sc.id', 'menuindex ASC');
56 56
 
57 57
     if ($modx->db->getRecordCount($rs)) {
58 58
         $ressourcelist .= '<div class="clearfix"><ul id="sortlist" class="sortableList">';
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
             $classes .= ($row['hidemenu']) ? ' notInMenuNode ' : ' inMenuNode';
62 62
             $classes .= ($row['published']) ? ' publishedNode ' : ' unpublishedNode ';
63 63
             $classes = ($row['deleted']) ? ' deletedNode ' : $classes;
64
-            $icon = $row['isfolder'] ? '<i class="' . $_style['files_folder'] . '"></i> ' : ' <i class="' . $_style['files_page_html'] . '"></i> ';
65
-            $ressourcelist .= '<li id="item_' . $row['id'] . '" class="' . $classes . '">' . $icon . $row['pagetitle'] . ' <small>(' . $row['id'] . ')</small></li>';
64
+            $icon = $row['isfolder'] ? '<i class="'.$_style['files_folder'].'"></i> ' : ' <i class="'.$_style['files_page_html'].'"></i> ';
65
+            $ressourcelist .= '<li id="item_'.$row['id'].'" class="'.$classes.'">'.$icon.$row['pagetitle'].' <small>('.$row['id'].')</small></li>';
66 66
         }
67 67
         $ressourcelist .= '</ul></div>';
68 68
     } else {
69
-        $updateMsg = '<p class="text-danger">' . $_lang['sort_nochildren'] . '</p>';
69
+        $updateMsg = '<p class="text-danger">'.$_lang['sort_nochildren'].'</p>';
70 70
     }
71 71
 }
72 72
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 </script>
150 150
 
151 151
 <h1>
152
-    <i class="fa fa-sort-numeric-asc"></i><?= ($pagetitle ? $pagetitle . '<small>(' . $id . ')</small>' : $_lang['sort_menuindex']) ?>
152
+    <i class="fa fa-sort-numeric-asc"></i><?= ($pagetitle ? $pagetitle.'<small>('.$id.')</small>' : $_lang['sort_menuindex']) ?>
153 153
 </h1>
154 154
 
155 155
 <?= $_style['actionbuttons']['dynamic']['save'] ?>
Please login to merge, or discard this patch.
manager/actions/mutate_htmlsnippet.dynamic.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 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
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
         $modx->webAlertAndQuit($_lang["error_no_privileges"]);
19 19
 }
20 20
 
21
-$id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0;
21
+$id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0;
22 22
 
23 23
 // Get table names (alphabetical)
24 24
 $tbl_site_htmlsnippets = $modx->getFullTableName('site_htmlsnippets');
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     $content['name'] = $_REQUEST['itemname'];
48 48
 } else {
49 49
     $_SESSION['itemname'] = $_lang["new_htmlsnippet"];
50
-    $content['category'] = (int)$_REQUEST['catid'];
50
+    $content['category'] = (int) $_REQUEST['catid'];
51 51
 }
52 52
 
53 53
 if ($modx->manager->hasFormValues()) {
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 // Add lock-element JS-Script
66 66
 $lockElementId = $id;
67 67
 $lockElementType = 3;
68
-require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php');
68
+require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php');
69 69
 
70 70
 // Print RTE Javascript function
71 71
 ?>
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         <input type="hidden" name="mode" value="<?= $modx->manager->action ?>" />
137 137
 
138 138
         <h1>
139
-            <i class="fa fa-th-large"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_htmlsnippet']) ?><i class="fa fa-question-circle help"></i>
139
+            <i class="fa fa-th-large"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_htmlsnippet']) ?><i class="fa fa-question-circle help"></i>
140 140
         </h1>
141 141
 
142 142
         <?= $_style['actionbuttons']['dynamic']['element'] ?>
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                             <div class="form-control-name clearfix">
161 161
                                 <input name="name" type="text" maxlength="100" value="<?= $modx->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" />
162 162
                                 <?php if ($modx->hasPermission('save_role')): ?>
163
-                                    <label class="custom-control" title="<?= $_lang['lock_htmlsnippet'] . "\n" . $_lang['lock_htmlsnippet_msg'] ?>" tooltip>
163
+                                    <label class="custom-control" title="<?= $_lang['lock_htmlsnippet']."\n".$_lang['lock_htmlsnippet_msg'] ?>" tooltip>
164 164
                                         <input name="locked" type="checkbox" value="on"<?= ($content['locked'] == 1 || $content['locked'] == 'on' ? ' checked="checked"' : '') ?> />
165 165
                                         <i class="fa fa-lock"></i>
166 166
                                     </label>
@@ -184,9 +184,9 @@  discard block
 block discarded – undo
184 184
                             <select name="categoryid" class="form-control" onchange="documentDirty=true;">
185 185
                                 <option>&nbsp;</option>
186 186
                                 <?php
187
-                                include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php');
187
+                                include_once(MODX_MANAGER_PATH.'includes/categories.inc.php');
188 188
                                 foreach (getCategories() as $n => $v) {
189
-                                    echo "\t\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] || (empty($content['category']) && $_POST['categoryid'] == $v['id']) ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v['category']) . "</option>\n";
189
+                                    echo "\t\t\t\t".'<option value="'.$v['id'].'"'.($content['category'] == $v['id'] || (empty($content['category']) && $_POST['categoryid'] == $v['id']) ? ' selected="selected"' : '').'>'.$modx->htmlspecialchars($v['category'])."</option>\n";
190 190
                                 }
191 191
                                 ?>
192 192
                             </select>
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
                     </div>
201 201
                     <?php if ($_SESSION['mgrRole'] == 1): ?>
202 202
                         <div class="form-row">
203
-                            <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>" . $_lang['disabled'] . "</span>" : $_lang['disabled']) ?></label>
203
+                            <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>".$_lang['disabled']."</span>" : $_lang['disabled']) ?></label>
204 204
                         </div>
205 205
                     <?php endif; ?>
206 206
                 </div>
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
                             $evtOut = $modx->invokeEvent('OnRichTextEditorRegister');
217 217
                             if (is_array($evtOut)) {
218 218
                                 foreach ($evtOut as $i => $editor) {
219
-                                    echo "\t" . '<option value="' . $editor . '"' . ($which_editor == $editor ? ' selected="selected"' : '') . '>' . $editor . "</option>\n";
219
+                                    echo "\t".'<option value="'.$editor.'"'.($which_editor == $editor ? ' selected="selected"' : '').'>'.$editor."</option>\n";
220 220
                                 }
221 221
                             }
222 222
                             ?>
Please login to merge, or discard this patch.
manager/actions/help.static.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 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
 $helpBasePath = "actions/help/";
6 6
 ?>
7 7
 
8 8
 <h1>
9
-	<?php echo $_style['page_help'];  echo $_lang['help']; ?>
9
+	<?php echo $_style['page_help']; echo $_lang['help']; ?>
10 10
 </h1>
11 11
 
12 12
 <div class="sectionBody">
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 		<?php
19 19
         if ($handle = opendir('actions/help')) {
20 20
             while (false !== ($file = readdir($handle))) {
21
-                if ($file != "." && $file != ".." && $file != ".svn" && $file != 'index.html' && !is_dir($helpBasePath . $file)) {
21
+                if ($file != "." && $file != ".." && $file != ".svn" && $file != 'index.html' && !is_dir($helpBasePath.$file)) {
22 22
                     $help[] = $file;
23 23
                 }
24 24
             }
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
             $hnLower = strtolower($helpname);
39 39
             $helpname = isset($_lang[$hnLower]) ? $_lang[$hnLower] : str_replace('_', ' ', $helpname);
40 40
 
41
-            echo '<div class="tab-page" id="tab' . $k . 'Help">';
42
-            echo '<h2 class="tab">' . $helpname . '</h2>';
43
-            echo '<script type="text/javascript">tp.addTabPage( document.getElementById( "tab' . $k . 'Help" ) );</script>';
44
-            include_once($helpBasePath . "{$v}");
41
+            echo '<div class="tab-page" id="tab'.$k.'Help">';
42
+            echo '<h2 class="tab">'.$helpname.'</h2>';
43
+            echo '<script type="text/javascript">tp.addTabPage( document.getElementById( "tab'.$k.'Help" ) );</script>';
44
+            include_once($helpBasePath."{$v}");
45 45
             echo '</div>';
46 46
         }
47 47
         ?>
Please login to merge, or discard this patch.
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 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
 $helpBasePath = "actions/help/";
@@ -16,9 +16,9 @@  discard block
 block discarded – undo
16 16
 		</script>
17 17
 
18 18
 		<?php
19
-        if ($handle = opendir('actions/help')) {
20
-            while (false !== ($file = readdir($handle))) {
21
-                if ($file != "." && $file != ".." && $file != ".svn" && $file != 'index.html' && !is_dir($helpBasePath . $file)) {
19
+        if ($handle = opendir('actions/help')) {
20
+            while (false !== ($file = readdir($handle))) {
21
+                if ($file != "." && $file != ".." && $file != ".svn" && $file != 'index.html' && !is_dir($helpBasePath . $file)) {
22 22
                     $help[] = $file;
23 23
                 }
24 24
             }
@@ -27,11 +27,11 @@  discard block
 block discarded – undo
27 27
 
28 28
         natcasesort($help);
29 29
 
30
-        foreach ($help as $k => $v) {
30
+        foreach ($help as $k => $v) {
31 31
             $helpname = substr($v, 0, strrpos($v, '.'));
32 32
 
33 33
             $prefix = substr($helpname, 0, 2);
34
-            if (is_numeric($prefix)) {
34
+            if (is_numeric($prefix)) {
35 35
                 $helpname = substr($helpname, 2, strlen($helpname) - 1);
36 36
             }
37 37
 
Please login to merge, or discard this patch.
manager/actions/mutate_tv_rank.dynamic.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 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
 if (!$modx->hasPermission('save_template')) {
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 $updateMsg = '';
16 16
 
17 17
 if (isset($_POST['listSubmitted'])) {
18
-    $updateMsg .= '<span class="text-success" id="updated">' . $_lang['sort_updated'] . '</span>';
18
+    $updateMsg .= '<span class="text-success" id="updated">'.$_lang['sort_updated'].'</span>';
19 19
     foreach ($_POST as $listName => $listValue) {
20 20
         if ($listName == 'listSubmitted' || $listName == 'reset') {
21 21
             continue;
@@ -40,11 +40,11 @@  discard block
 block discarded – undo
40 40
     $sortableList = '<div class="clearfix"><ul id="sortlist" class="sortableList">';
41 41
     while ($row = $modx->db->getRow($rs)) {
42 42
         $caption = $row['caption'] != '' ? $row['caption'] : $row['name'];
43
-        $sortableList .= '<li id="item_' . $row['id'] . '"><i class="fa fa-list-alt"></i> ' . $caption . ' <small class="protectedNode" style="float:right">[*' . $row['name'] . '*]</small></li>';
43
+        $sortableList .= '<li id="item_'.$row['id'].'"><i class="fa fa-list-alt"></i> '.$caption.' <small class="protectedNode" style="float:right">[*'.$row['name'].'*]</small></li>';
44 44
     }
45 45
     $sortableList .= '</ul></div>';
46 46
 } else {
47
-    $updateMsg = '<p class="text-danger">' . $_lang['tmplvars_novars'] . '</p>';
47
+    $updateMsg = '<p class="text-danger">'.$_lang['tmplvars_novars'].'</p>';
48 48
 }
49 49
 ?>
50 50
 
Please login to merge, or discard this patch.
manager/actions/resources.static.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@  discard block
 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
 
6
-if (file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php')) {
7
-    include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php');
6
+if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/functions.inc.php')) {
7
+    include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/functions.inc.php');
8 8
 } else {
9
-    include_once(MODX_MANAGER_PATH . 'actions/resources/functions.inc.php');
9
+    include_once(MODX_MANAGER_PATH.'actions/resources/functions.inc.php');
10 10
 }
11
-if (file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php')) {
12
-    include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php');
11
+if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/mgrResources.class.php')) {
12
+    include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/mgrResources.class.php');
13 13
 } else {
14
-    include_once(MODX_MANAGER_PATH . 'actions/resources/mgrResources.class.php');
14
+    include_once(MODX_MANAGER_PATH.'actions/resources/mgrResources.class.php');
15 15
 }
16 16
 
17 17
 $resources = new mgrResources();
@@ -69,45 +69,45 @@  discard block
 block discarded – undo
69 69
 		</script>
70 70
 
71 71
 		<?php
72
-        if (file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php')) {
73
-            include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php');
72
+        if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab1_templates.inc.php')) {
73
+            include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab1_templates.inc.php');
74 74
         } else {
75
-            include_once(MODX_MANAGER_PATH . '/actions/resources/tab1_templates.inc.php');
75
+            include_once(MODX_MANAGER_PATH.'/actions/resources/tab1_templates.inc.php');
76 76
         }
77 77
 
78
-        if (file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php')) {
79
-            include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php');
78
+        if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab2_templatevars.inc.php')) {
79
+            include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab2_templatevars.inc.php');
80 80
         } else {
81
-            include_once(MODX_MANAGER_PATH . '/actions/resources/tab2_templatevars.inc.php');
81
+            include_once(MODX_MANAGER_PATH.'/actions/resources/tab2_templatevars.inc.php');
82 82
         }
83 83
 
84
-        if (file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php')) {
85
-            include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php');
84
+        if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab3_chunks.inc.php')) {
85
+            include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab3_chunks.inc.php');
86 86
         } else {
87
-            include_once(MODX_MANAGER_PATH . '/actions/resources/tab3_chunks.inc.php');
87
+            include_once(MODX_MANAGER_PATH.'/actions/resources/tab3_chunks.inc.php');
88 88
         }
89 89
 
90
-        if (file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php')) {
91
-            include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php');
90
+        if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab4_snippets.inc.php')) {
91
+            include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab4_snippets.inc.php');
92 92
         } else {
93
-            include_once(MODX_MANAGER_PATH . '/actions/resources/tab4_snippets.inc.php');
93
+            include_once(MODX_MANAGER_PATH.'/actions/resources/tab4_snippets.inc.php');
94 94
         }
95 95
 
96
-        if (file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php')) {
97
-            include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php');
96
+        if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab5_plugins.inc.php')) {
97
+            include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab5_plugins.inc.php');
98 98
         } else {
99
-            include_once(MODX_MANAGER_PATH . '/actions/resources/tab5_plugins.inc.php');
99
+            include_once(MODX_MANAGER_PATH.'/actions/resources/tab5_plugins.inc.php');
100 100
         }
101 101
 
102
-        if (file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php')) {
103
-            include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php');
102
+        if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab6_categoryview.inc.php')) {
103
+            include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab6_categoryview.inc.php');
104 104
         } else {
105
-            include_once(MODX_MANAGER_PATH . '/actions/resources/tab6_categoryview.inc.php');
105
+            include_once(MODX_MANAGER_PATH.'/actions/resources/tab6_categoryview.inc.php');
106 106
         }
107 107
 
108 108
 
109 109
         if (is_numeric($_GET['tab'])) {
110
-            echo '<script type="text/javascript"> tpResources.setSelectedIndex( ' . $_GET['tab'] . ' );</script>';
110
+            echo '<script type="text/javascript"> tpResources.setSelectedIndex( '.$_GET['tab'].' );</script>';
111 111
         }
112 112
         ?>
113 113
 	</div>
Please login to merge, or discard this patch.
manager/actions/eventlog.dynamic.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 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
 if (!$modx->hasPermission('view_eventlog')) {
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 $_PAGE['vs']['lm'] = $listmode;
32 32
 
33 33
 // context menu
34
-include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php";
34
+include_once MODX_MANAGER_PATH."includes/controls/contextmenu.php";
35 35
 $cm = new ContextMenu("cntxm", 150);
36 36
 $cm->addItem($_lang['view_log'], "js:menuAction(1)", $_style['actions_preview']);
37 37
 $cm->addSeparator();
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
 					<?php
128 128
                     $ds = $modx->db->select("el.id, ELT(el.type , 'text-info {$_style['actions_info']}' , 'text-warning {$_style['actions_triangle']}' , 'text-danger {$_style['actions_error']}' ) as icon, el.createdon, el.source, el.eventid,IFNULL(wu.username,mu.username) as username", "{$tbl_event_log} AS el 
129 129
 			LEFT JOIN {$tbl_manager_users} AS mu ON mu.id=el.user AND el.usertype=0
130
-			LEFT JOIN {$tbl_web_users} AS wu ON wu.id=el.user AND el.usertype=1", ($sqlQuery ? "" . (is_numeric($sqlQuery) ? "(eventid='{$sqlQuery}') OR " : '') . "(source LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "createdon DESC");
131
-                    include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
130
+			LEFT JOIN {$tbl_web_users} AS wu ON wu.id=el.user AND el.usertype=1", ($sqlQuery ? "".(is_numeric($sqlQuery) ? "(eventid='{$sqlQuery}') OR " : '')."(source LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "createdon DESC");
131
+                    include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php";
132 132
                     $grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items
133 133
                     $grd->pagerClass = '';
134 134
                     $grd->pageClass = 'page-item';
@@ -139,10 +139,10 @@  discard block
 block discarded – undo
139 139
                     $grd->itemClass = "tableItem";
140 140
                     $grd->altItemClass = "tableAltItem";
141 141
                     $grd->fields = "type,source,createdon,eventid,username";
142
-                    $grd->columns = $_lang['type'] . " ," . $_lang['source'] . " ," . $_lang['date'] . " ," . $_lang['event_id'] . " ," . $_lang['sysinfo_userid'];
142
+                    $grd->columns = $_lang['type']." ,".$_lang['source']." ,".$_lang['date']." ,".$_lang['event_id']." ,".$_lang['sysinfo_userid'];
143 143
                     $grd->colWidths = "1%,,1%,1%,1%";
144 144
                     $grd->colAligns = "center,,,center,center";
145
-                    $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang['click_to_context'] . "'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='" . $_lang['click_to_view_details'] . "'>[+source+]</a>||date: " . $modx->toDateFormat(null, 'formatOnly') . ' %I:%M %p';
145
+                    $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='".$_lang['click_to_context']."'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='".$_lang['click_to_view_details']."'>[+source+]</a>||date: ".$modx->toDateFormat(null, 'formatOnly').' %I:%M %p';
146 146
                     if ($listmode == '1') {
147 147
                         $grd->pageSize = 0;
148 148
                     }
Please login to merge, or discard this patch.
Braces   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 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
-if (!$modx->hasPermission('view_eventlog')) {
5
+if (!$modx->hasPermission('view_eventlog')) {
6 6
     $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -15,12 +15,12 @@  discard block
 block discarded – undo
15 15
 $modx->manager->initPageViewState();
16 16
 
17 17
 // get and save search string
18
-if ($_REQUEST['op'] == 'reset') {
18
+if ($_REQUEST['op'] == 'reset') {
19 19
     $sqlQuery = $query = '';
20 20
     $_PAGE['vs']['search'] = '';
21
-} else {
21
+} else {
22 22
     $sqlQuery = $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search'];
23
-    if (!is_numeric($sqlQuery)) {
23
+    if (!is_numeric($sqlQuery)) {
24 24
         $sqlQuery = $modx->db->escape($query);
25 25
     }
26 26
     $_PAGE['vs']['search'] = $query;
@@ -143,10 +143,10 @@  discard block
 block discarded – undo
143 143
                     $grd->colWidths = "1%,,1%,1%,1%";
144 144
                     $grd->colAligns = "center,,,center,center";
145 145
                     $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang['click_to_context'] . "'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='" . $_lang['click_to_view_details'] . "'>[+source+]</a>||date: " . $modx->toDateFormat(null, 'formatOnly') . ' %I:%M %p';
146
-                    if ($listmode == '1') {
146
+                    if ($listmode == '1') {
147 147
                         $grd->pageSize = 0;
148 148
                     }
149
-                    if ($_REQUEST['op'] == 'reset') {
149
+                    if ($_REQUEST['op'] == 'reset') {
150 150
                         $grd->pageNumber = 1;
151 151
                     }
152 152
                     // render grid
Please login to merge, or discard this patch.
manager/actions/phpinfo.static.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.dynamic.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 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 />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if (!$modx->hasPermission('settings')) {
6 6
     $modx->webAlertAndQuit($_lang['error_no_privileges']);
7 7
 }
8 8
 
9
-include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/functions.inc.php');
9
+include_once(MODX_MANAGER_PATH.'actions/mutate_settings/functions.inc.php');
10 10
 
11 11
 // check to see the edit settings page isn't locked
12
-$rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=17 AND internalKey!='" . $modx->getLoginUserID() . "'");
12
+$rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=17 AND internalKey!='".$modx->getLoginUserID()."'");
13 13
 if ($username = $modx->db->getValue($rs)) {
14 14
     $modx->webAlertAndQuit(sprintf($_lang['lock_settings_msg'], $username));
15 15
 }
@@ -18,13 +18,13 @@  discard block
 block discarded – undo
18 18
 // reload system settings from the database.
19 19
 // this will prevent user-defined settings from being saved as system setting
20 20
 $settings = array();
21
-include_once(MODX_MANAGER_PATH . 'includes/default_config.php');
21
+include_once(MODX_MANAGER_PATH.'includes/default_config.php');
22 22
 $rs = $modx->db->select('setting_name, setting_value', '[+prefix+]system_settings');
23 23
 while ($row = $modx->db->getRow($rs)) {
24 24
     $settings[$row['setting_name']] = $row['setting_value'];
25 25
 }
26
-$settings['filemanager_path'] = preg_replace('@^' . preg_quote(MODX_BASE_PATH) . '@', '[(base_path)]', $settings['filemanager_path']);
27
-$settings['rb_base_dir'] = preg_replace('@^' . preg_quote(MODX_BASE_PATH) . '@', '[(base_path)]', $settings['rb_base_dir']);
26
+$settings['filemanager_path'] = preg_replace('@^'.preg_quote(MODX_BASE_PATH).'@', '[(base_path)]', $settings['filemanager_path']);
27
+$settings['rb_base_dir'] = preg_replace('@^'.preg_quote(MODX_BASE_PATH).'@', '[(base_path)]', $settings['rb_base_dir']);
28 28
 
29 29
 extract($settings, EXTR_OVERWRITE);
30 30
 
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
 				</script>
81 81
 
82 82
 				<?php
83
-                include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab1_site_settings.inc.php');
84
-                include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab2_furl_settings.inc.php');
85
-                include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab3_user_settings.inc.php');
86
-                include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab4_manager_settings.inc.php');
87
-                include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab5_security_settings.inc.php');
88
-                include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab6_filemanager_settings.inc.php');
89
-                include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab7_filebrowser_settings.inc.php');
83
+                include_once(MODX_MANAGER_PATH.'actions/mutate_settings/tab1_site_settings.inc.php');
84
+                include_once(MODX_MANAGER_PATH.'actions/mutate_settings/tab2_furl_settings.inc.php');
85
+                include_once(MODX_MANAGER_PATH.'actions/mutate_settings/tab3_user_settings.inc.php');
86
+                include_once(MODX_MANAGER_PATH.'actions/mutate_settings/tab4_manager_settings.inc.php');
87
+                include_once(MODX_MANAGER_PATH.'actions/mutate_settings/tab5_security_settings.inc.php');
88
+                include_once(MODX_MANAGER_PATH.'actions/mutate_settings/tab6_filemanager_settings.inc.php');
89
+                include_once(MODX_MANAGER_PATH.'actions/mutate_settings/tab7_filebrowser_settings.inc.php');
90 90
                 ?>
91 91
 			</div>
92 92
 		</div>
@@ -134,5 +134,5 @@  discard block
 block discarded – undo
134 134
 	</script>
135 135
 <?php
136 136
 if (is_numeric($_GET['tab'])) {
137
-                    echo '<script type="text/javascript">tpSettings.setSelectedIndex( ' . $_GET['tab'] . ' );</script>';
137
+                    echo '<script type="text/javascript">tpSettings.setSelectedIndex( '.$_GET['tab'].' );</script>';
138 138
                 }
Please login to merge, or discard this patch.
Braces   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 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 />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if (!$modx->hasPermission('settings')) {
5
+if (!$modx->hasPermission('settings')) {
6 6
     $modx->webAlertAndQuit($_lang['error_no_privileges']);
7 7
 }
8 8
 
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 // check to see the edit settings page isn't locked
12 12
 $rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=17 AND internalKey!='" . $modx->getLoginUserID() . "'");
13
-if ($username = $modx->db->getValue($rs)) {
13
+if ($username = $modx->db->getValue($rs)) {
14 14
     $modx->webAlertAndQuit(sprintf($_lang['lock_settings_msg'], $username));
15 15
 }
16 16
 // end check for lock
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 $settings = array();
21 21
 include_once(MODX_MANAGER_PATH . 'includes/default_config.php');
22 22
 $rs = $modx->db->select('setting_name, setting_value', '[+prefix+]system_settings');
23
-while ($row = $modx->db->getRow($rs)) {
23
+while ($row = $modx->db->getRow($rs)) {
24 24
     $settings[$row['setting_name']] = $row['setting_value'];
25 25
 }
26 26
 $settings['filemanager_path'] = preg_replace('@^' . preg_quote(MODX_BASE_PATH) . '@', '[(base_path)]', $settings['filemanager_path']);
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
 // load languages and keys
32 32
 $lang_keys = array();
33 33
 $dir = dir('includes/lang');
34
-while ($file = $dir->read()) {
35
-    if (strpos($file, '.inc.php') > 0) {
34
+while ($file = $dir->read()) {
35
+    if (strpos($file, '.inc.php') > 0) {
36 36
         $endpos = strpos($file, '.');
37 37
         $languagename = substr($file, 0, $endpos);
38 38
         $lang_keys[$languagename] = get_lang_keys($file);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 			<input type="hidden" name="site_id" value="<?php echo $site_id; ?>" />
70 70
 			<input type="hidden" name="settings_version" value="<?php echo $modx->getVersionData('version'); ?>" />
71 71
 			<!-- this field is used to check site settings have been entered/ updated after install or upgrade -->
72
-			<?php if (!isset($settings_version) || $settings_version != $modx->getVersionData('version')) {
72
+			<?php if (!isset($settings_version) || $settings_version != $modx->getVersionData('version')) {
73 73
     ?>
74 74
 				<div class='sectionBody'><p class='element-edit-message-tab alert alert-warning'><?php echo $_lang['settings_after_install']; ?></p></div>
75 75
 			<?php
@@ -133,6 +133,6 @@  discard block
 block discarded – undo
133 133
 		});
134 134
 	</script>
135 135
 <?php
136
-if (is_numeric($_GET['tab'])) {
136
+if (is_numeric($_GET['tab'])) {
137 137
                     echo '<script type="text/javascript">tpSettings.setSelectedIndex( ' . $_GET['tab'] . ' );</script>';
138 138
                 }
Please login to merge, or discard this patch.