Completed
Push — develop ( d568f8...c061fc )
by Agel_Nash
06:25
created
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 1 patch
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.
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 1 patch
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.
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 1 patch
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.
manager/actions/mutate_tmplvars.dynamic.php 1 patch
Spacing   +23 added lines, -23 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('edit_template') && $modx->manager->action == '301') {
@@ -9,9 +9,9 @@  discard block
 block discarded – undo
9 9
     $modx->webAlertAndQuit($_lang["error_no_privileges"]);
10 10
 }
11 11
 
12
-$id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0;
13
-$origin = isset($_REQUEST['or']) ? (int)$_REQUEST['or'] : 76;
14
-$originId = isset($_REQUEST['oid']) ? (int)$_REQUEST['oid'] : null;
12
+$id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0;
13
+$origin = isset($_REQUEST['or']) ? (int) $_REQUEST['or'] : 76;
14
+$originId = isset($_REQUEST['oid']) ? (int) $_REQUEST['oid'] : null;
15 15
 
16 16
 $tbl_site_tmplvars = $modx->getFullTableName('site_tmplvars');
17 17
 $tbl_site_templates = $modx->getFullTableName('site_templates');
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     $rs = $modx->db->select('*', $tbl_site_tmplvars, "id='{$id}'");
34 34
     $content = $modx->db->getRow($rs);
35 35
     if (!$content) {
36
-        header("Location: " . MODX_SITE_URL . "index.php?id={$site_start}");
36
+        header("Location: ".MODX_SITE_URL."index.php?id={$site_start}");
37 37
     }
38 38
 
39 39
     $_SESSION['itemname'] = $content['caption'];
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     $content['name'] = $_REQUEST['itemname'];
45 45
 } else {
46 46
     $_SESSION['itemname'] = $_lang["new_tmplvars"];
47
-    $content['category'] = (int)$_REQUEST['catid'];
47
+    $content['category'] = (int) $_REQUEST['catid'];
48 48
 }
49 49
 
50 50
 if ($modx->manager->hasFormValues()) {
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 // Add lock-element JS-Script
57 57
 $lockElementId = $id;
58 58
 $lockElementType = 2;
59
-require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php');
59
+require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php');
60 60
 
61 61
 // get available RichText Editors
62 62
 $RTEditors = '';
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 		},
108 108
 		cancel: function() {
109 109
 			documentDirty = false;
110
-			document.location.href = 'index.php?a=<?= $origin ?><?=(empty($originId) ? '' : '&id=' . $originId) ?>';
110
+			document.location.href = 'index.php?a=<?= $origin ?><?=(empty($originId) ? '' : '&id='.$originId) ?>';
111 111
 		}
112 112
 	};
113 113
 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 	<input type="hidden" name="params" value="<?= $modx->htmlspecialchars($content['display_params']) ?>">
292 292
 
293 293
 	<h1>
294
-		<i class="fa fa-list-alt"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_tmplvars']) ?><i class="fa fa-question-circle help"></i>
294
+		<i class="fa fa-list-alt"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_tmplvars']) ?><i class="fa fa-question-circle help"></i>
295 295
 	</h1>
296 296
 
297 297
 	<?= $_style['actionbuttons']['dynamic']['element'] ?>
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 						<div class="form-control-name clearfix">
316 316
 							<input name="name" type="text" maxlength="50" value="<?= $modx->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" />
317 317
 							<?php if ($modx->hasPermission('save_role')): ?>
318
-								<label class="custom-control" title="<?= $_lang['lock_tmplvars'] . "\n" . $_lang['lock_tmplvars_msg'] ?>" tooltip>
318
+								<label class="custom-control" title="<?= $_lang['lock_tmplvars']."\n".$_lang['lock_tmplvars_msg'] ?>" tooltip>
319 319
 									<input name="locked" type="checkbox"<?= ($content['locked'] == 1 ? ' checked="checked"' : '') ?> />
320 320
 									<i class="fa fa-lock"></i>
321 321
 								</label>
@@ -343,9 +343,9 @@  discard block
 block discarded – undo
343 343
 						<select name="categoryid" class="form-control" onChange="documentDirty=true;">
344 344
 							<option>&nbsp;</option>
345 345
 							<?php
346
-                            include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php');
346
+                            include_once(MODX_MANAGER_PATH.'includes/categories.inc.php');
347 347
                             foreach (getCategories() as $n => $v) {
348
-                                echo "<option value='" . $v['id'] . "'" . ($content["category"] == $v["id"] ? " selected='selected'" : "") . ">" . $modx->htmlspecialchars($v["category"]) . "</option>";
348
+                                echo "<option value='".$v['id']."'".($content["category"] == $v["id"] ? " selected='selected'" : "").">".$modx->htmlspecialchars($v["category"])."</option>";
349 349
                             }
350 350
                             ?>
351 351
 						</select>
@@ -383,11 +383,11 @@  discard block
 block discarded – undo
383 383
 							<optgroup label="Custom Type">
384 384
 								<option value="custom_tv" <?= ($content['type'] == 'custom_tv' ? "selected='selected'" : "") ?>>Custom Input</option>
385 385
 								<?php
386
-                                $custom_tvs = scandir(MODX_BASE_PATH . 'assets/tvs');
386
+                                $custom_tvs = scandir(MODX_BASE_PATH.'assets/tvs');
387 387
                                 foreach ($custom_tvs as $ctv) {
388 388
                                     if (strpos($ctv, '.') !== 0 && $ctv != 'index.html') {
389
-                                        $selected = ($content['type'] == 'custom_tv:' . $ctv ? "selected='selected'" : "");
390
-                                        echo '<option value="custom_tv:' . $ctv . '"  ' . $selected . '>' . $ctv . '</option>';
389
+                                        $selected = ($content['type'] == 'custom_tv:'.$ctv ? "selected='selected'" : "");
390
+                                        echo '<option value="custom_tv:'.$ctv.'"  '.$selected.'>'.$ctv.'</option>';
391 391
                                     }
392 392
                                 }
393 393
                                 ?>
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
                     $row['category'] = stripslashes($row['category']); //pixelchutes
467 467
                     if ($preCat !== $row['category']) {
468 468
                         $tplList .= $insideUl ? '</ul>' : '';
469
-                        $tplList .= '<li><strong>' . $row['category'] . ($row['catid'] != '' ? ' <small>(' . $row['catid'] . ')</small>' : '') . '</strong><ul>';
469
+                        $tplList .= '<li><strong>'.$row['category'].($row['catid'] != '' ? ' <small>('.$row['catid'].')</small>' : '').'</strong><ul>';
470 470
                         $insideUl = 1;
471 471
                     }
472 472
 
@@ -481,8 +481,8 @@  discard block
 block discarded – undo
481 481
                     }
482 482
                     $selectable = !$row['selectable'] ? ' class="disabled"' : '';
483 483
                     $checked = $checked ? ' checked="checked"' : '';
484
-                    $tplId = '&nbsp;<small>(' . $row['id'] . ')</small>';
485
-                    $desc = !empty($row['tpldescription']) ? ' - ' . $row['tpldescription'] : '';
484
+                    $tplId = '&nbsp;<small>('.$row['id'].')</small>';
485
+                    $desc = !empty($row['tpldescription']) ? ' - '.$row['tpldescription'] : '';
486 486
 
487 487
                     $tplInfo = array();
488 488
                     if ($row['tpllocked']) {
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
                     if ($row['id'] == $modx->config['default_template']) {
492 492
                         $tplInfo[] = $_lang['defaulttemplate_title'];
493 493
                     }
494
-                    $tplInfo = !empty($tplInfo) ? ' <em>(' . implode(', ', $tplInfo) . ')</em>' : '';
494
+                    $tplInfo = !empty($tplInfo) ? ' <em>('.implode(', ', $tplInfo).')</em>' : '';
495 495
 
496 496
                     $tplList .= sprintf('<li><label%s><input name="template[]" value="%s" type="checkbox" %s onchange="documentDirty=true;"> %s%s%s%s</label></li>', $selectable, $row['id'], $checked, $row['templatename'], $tplId, $desc, $tplInfo);
497 497
                     $tplList .= '</li>';
@@ -549,17 +549,17 @@  discard block
 block discarded – undo
549 549
                                 if ($checked) {
550 550
                                     $notPublic = true;
551 551
                                 }
552
-                                $chks .= "<li><label><input type='checkbox' name='docgroups[]' value='" . $row['id'] . "' " . ($checked ? "checked='checked'" : '') . " onclick=\"makePublic(false)\" /> " . $row['name'] . "</label></li>";
552
+                                $chks .= "<li><label><input type='checkbox' name='docgroups[]' value='".$row['id']."' ".($checked ? "checked='checked'" : '')." onclick=\"makePublic(false)\" /> ".$row['name']."</label></li>";
553 553
                             } else {
554 554
                                 if ($checked) {
555
-                                    echo "<input type='hidden' name='docgroups[]'  value='" . $row['id'] . "' />";
555
+                                    echo "<input type='hidden' name='docgroups[]'  value='".$row['id']."' />";
556 556
                                 }
557 557
                             }
558 558
                         }
559 559
                         if ($modx->hasPermission('access_permissions')) {
560
-                            $chks = "<li><label><input type='checkbox' name='chkalldocs' " . (!$notPublic ? "checked='checked'" : '') . " onclick=\"makePublic(true)\" /> <span class='warning'>" . $_lang['all_doc_groups'] . "</span></label></li>" . $chks;
560
+                            $chks = "<li><label><input type='checkbox' name='chkalldocs' ".(!$notPublic ? "checked='checked'" : '')." onclick=\"makePublic(true)\" /> <span class='warning'>".$_lang['all_doc_groups']."</span></label></li>".$chks;
561 561
                         }
562
-                        echo '<ul>' . $chks . '</ul>'; ?>
562
+                        echo '<ul>'.$chks.'</ul>'; ?>
563 563
 					<?php
564 564
                     } ?>
565 565
 				<?php
Please login to merge, or discard this patch.