Completed
Push — develop ( d568f8...c061fc )
by Agel_Nash
06:25
created
manager/actions/mutate_role.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
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
         $modx->webAlertAndQuit($_lang["error_no_privileges"]);
19 19
 }
20 20
 
21
-$role = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0;
21
+$role = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0;
22 22
 
23 23
 $tbl_user_roles = $modx->getFullTableName('user_roles');
24 24
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 // Add lock-element JS-Script
47 47
 $lockElementId = $role;
48 48
 $lockElementType = 8;
49
-require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php');
49
+require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php');
50 50
 ?>
51 51
 	<script type="text/javascript">
52 52
 		function changestate(element) {
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 		<input type="hidden" name="id" value="<?= $_GET['id'] ?>">
83 83
 
84 84
 		<h1>
85
-            <i class="fa fa-legal"></i><?= ($roledata['name'] ? $roledata['name'] . '<small>(' . $roledata['id'] . ')</small>' : $_lang['role_title']) ?>
85
+            <i class="fa fa-legal"></i><?= ($roledata['name'] ? $roledata['name'].'<small>('.$roledata['id'].')</small>' : $_lang['role_title']) ?>
86 86
         </h1>
87 87
 
88 88
 		<?= $_style['actionbuttons']['dynamic']['savedelete'] ?>
Please login to merge, or discard this patch.
manager/actions/sysinfo.static.php 1 patch
Spacing   +14 added lines, -14 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('logs')) {
@@ -12,14 +12,14 @@  discard block
 block discarded – undo
12 12
 $collation = $modx->db->getRow($res, 'num');
13 13
 
14 14
 $serverArr = array(
15
-    $_lang['modx_version'] => $modx->getVersionData('version') . ' ' . $newversiontext,
15
+    $_lang['modx_version'] => $modx->getVersionData('version').' '.$newversiontext,
16 16
     $_lang['release_date'] => $modx->getVersionData('release_date'),
17 17
     'PHP Version' => phpversion(),
18
-    'phpInfo()' => '<a class="text-underline" href="javascript:;" onclick="viewPHPInfo();return false;">' . $_lang['view'] . '</a>',
18
+    'phpInfo()' => '<a class="text-underline" href="javascript:;" onclick="viewPHPInfo();return false;">'.$_lang['view'].'</a>',
19 19
     $_lang['access_permissions'] => ($use_udperms == 1 ? $_lang['enabled'] : $_lang['disabled']),
20 20
     $_lang['servertime'] => strftime('%H:%M:%S', time()),
21 21
     $_lang['localtime'] => strftime('%H:%M:%S', time() + $server_offset_time),
22
-    $_lang['serveroffset'] => $server_offset_time / (60 * 60) . ' h',
22
+    $_lang['serveroffset'] => $server_offset_time / (60 * 60).' h',
23 23
     $_lang['database_name'] => trim($dbase, '`'),
24 24
     $_lang['database_server'] => $database_server,
25 25
     $_lang['database_version'] => $modx->db->getVersion(),
@@ -95,33 +95,33 @@  discard block
 block discarded – undo
95 95
                     </thead>
96 96
                     <tbody>
97 97
                     <?php
98
-                    $sql = "SHOW TABLE STATUS FROM $dbase LIKE '" . $modx->db->escape($modx->db->config['table_prefix']) . "%';";
98
+                    $sql = "SHOW TABLE STATUS FROM $dbase LIKE '".$modx->db->escape($modx->db->config['table_prefix'])."%';";
99 99
                     $rs = $modx->db->query($sql);
100 100
                     $i = 0;
101 101
                     while ($log_status = $modx->db->getRow($rs)) {
102 102
                         ?>
103 103
                         <tr>
104 104
                             <td class="text-primary"><b><?= $log_status['Name'] ?></b></td>
105
-                            <td class="text-xs-center"><?= (!empty($log_status['Comment']) ? '<i class="' . $_style['actions_help'] . '" data-tooltip="' . $log_status['Comment'] . '"></i>' : '') ?></td>
105
+                            <td class="text-xs-center"><?= (!empty($log_status['Comment']) ? '<i class="'.$_style['actions_help'].'" data-tooltip="'.$log_status['Comment'].'"></i>' : '') ?></td>
106 106
                             <td class="text-xs-right"><?= $log_status['Rows'] ?></td>
107 107
 
108 108
                             <?php
109 109
                             $truncateable = array(
110
-                                $modx->db->config['table_prefix'] . 'event_log',
111
-                                $modx->db->config['table_prefix'] . 'manager_log',
110
+                                $modx->db->config['table_prefix'].'event_log',
111
+                                $modx->db->config['table_prefix'].'manager_log',
112 112
                             );
113 113
                         if ($modx->hasPermission('settings') && in_array($log_status['Name'], $truncateable)) {
114 114
                             echo "<td class=\"text-xs-right\">";
115
-                            echo "<a class=\"text-danger\" href='index.php?a=54&mode=$action&u=" . $log_status['Name'] . "' title='" . $_lang['truncate_table'] . "'>" . $modx->nicesize($log_status['Data_length'] + $log_status['Data_free']) . "</a>";
115
+                            echo "<a class=\"text-danger\" href='index.php?a=54&mode=$action&u=".$log_status['Name']."' title='".$_lang['truncate_table']."'>".$modx->nicesize($log_status['Data_length'] + $log_status['Data_free'])."</a>";
116 116
                             echo "</td>";
117 117
                         } else {
118
-                            echo "<td class=\"text-xs-right\">" . $modx->nicesize($log_status['Data_length'] + $log_status['Data_free']) . "</td>";
118
+                            echo "<td class=\"text-xs-right\">".$modx->nicesize($log_status['Data_length'] + $log_status['Data_free'])."</td>";
119 119
                         }
120 120
 
121 121
                         if ($modx->hasPermission('settings')) {
122
-                            echo "<td class=\"text-xs-right\">" . ($log_status['Data_free'] > 0 ? "<a class=\"text-danger\" href='index.php?a=54&mode=$action&t=" . $log_status['Name'] . "' title='" . $_lang['optimize_table'] . "' ><span>" . $modx->nicesize($log_status['Data_free']) . "</span></a>" : "-") . "</td>";
122
+                            echo "<td class=\"text-xs-right\">".($log_status['Data_free'] > 0 ? "<a class=\"text-danger\" href='index.php?a=54&mode=$action&t=".$log_status['Name']."' title='".$_lang['optimize_table']."' ><span>".$modx->nicesize($log_status['Data_free'])."</span></a>" : "-")."</td>";
123 123
                         } else {
124
-                            echo "<td class=\"text-xs-right\">" . ($log_status['Data_free'] > 0 ? $modx->nicesize($log_status['Data_free']) : "-") . "</td>";
124
+                            echo "<td class=\"text-xs-right\">".($log_status['Data_free'] > 0 ? $modx->nicesize($log_status['Data_free']) : "-")."</td>";
125 125
                         } ?>
126 126
                             <td class="text-xs-right"><?= $modx->nicesize($log_status['Data_length'] - $log_status['Data_free']) ?></td>
127 127
                             <td class="text-xs-right"><?= $modx->nicesize($log_status['Index_length']) ?></td>
@@ -135,9 +135,9 @@  discard block
 block discarded – undo
135 135
                     <tr class="unstyled">
136 136
                         <td class="text-xs-right"><?= $_lang['database_table_totals'] ?></td>
137 137
                         <td colspan="3">&nbsp;</td>
138
-                        <td class="text-xs-right"><?= $totaloverhead > 0 ? "<b class=\"text-danger\">" . $modx->nicesize($totaloverhead) . "</b><br />(" . number_format($totaloverhead) . " B)" : "-" ?></td>
138
+                        <td class="text-xs-right"><?= $totaloverhead > 0 ? "<b class=\"text-danger\">".$modx->nicesize($totaloverhead)."</b><br />(".number_format($totaloverhead)." B)" : "-" ?></td>
139 139
                         <td colspan="2">&nbsp;</td>
140
-                        <td class="text-xs-right"><?= "<b>" . $modx->nicesize($total) . "</b><br />(" . number_format($total) . " B)" ?></td>
140
+                        <td class="text-xs-right"><?= "<b>".$modx->nicesize($total)."</b><br />(".number_format($total)." B)" ?></td>
141 141
                     </tr>
142 142
                     </tbody>
143 143
                 </table>
Please login to merge, or discard this patch.
manager/actions/export_site.static.php 1 patch
Spacing   +2 added lines, -2 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('export_static')) {
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 		<div class="container container-body">
37 37
 			<?php
38 38
             if (isset($_POST['export'])) {
39
-                $rs = include_once(MODX_MANAGER_PATH . 'processors/export_site.processor.php');
39
+                $rs = include_once(MODX_MANAGER_PATH.'processors/export_site.processor.php');
40 40
                 echo $rs;
41 41
             } else {
42 42
                 ?>
Please login to merge, or discard this patch.
manager/actions/mutate_content.dynamic.php 1 patch
Spacing   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  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 6
 /********************/
7
-$sd = isset($_REQUEST['dir']) ? '&dir=' . $_REQUEST['dir'] : '&dir=DESC';
8
-$sb = isset($_REQUEST['sort']) ? '&sort=' . $_REQUEST['sort'] : '&sort=createdon';
9
-$pg = isset($_REQUEST['page']) ? '&page=' . (int) $_REQUEST['page'] : '';
10
-$add_path = $sd . $sb . $pg;
7
+$sd = isset($_REQUEST['dir']) ? '&dir='.$_REQUEST['dir'] : '&dir=DESC';
8
+$sb = isset($_REQUEST['sort']) ? '&sort='.$_REQUEST['sort'] : '&sort=createdon';
9
+$pg = isset($_REQUEST['page']) ? '&page='.(int) $_REQUEST['page'] : '';
10
+$add_path = $sd.$sb.$pg;
11 11
 /*******************/
12 12
 
13 13
 // check permissions
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
             $modx->webAlertAndQuit($_lang["error_no_privileges"]);
25 25
         } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '0') {
26 26
             // check user has permissions for parent
27
-            include_once(MODX_MANAGER_PATH . 'processors/user_documents_permissions.class.php');
27
+            include_once(MODX_MANAGER_PATH.'processors/user_documents_permissions.class.php');
28 28
             $udperms = new udperms();
29 29
             $udperms->user = $modx->getLoginUserID();
30 30
             $udperms->document = empty($_REQUEST['pid']) ? 0 : $_REQUEST['pid'];
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         $modx->webAlertAndQuit($_lang["error_no_privileges"]);
39 39
 }
40 40
 
41
-$id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0;
41
+$id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0;
42 42
 
43 43
 // Get table names (alphabetical)
44 44
 $tbl_categories = $modx->getFullTableName('categories');
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 if ($modx->manager->action == 27) {
57 57
     //editing an existing document
58 58
     // check permissions on the document
59
-    include_once(MODX_MANAGER_PATH . 'processors/user_documents_permissions.class.php');
59
+    include_once(MODX_MANAGER_PATH.'processors/user_documents_permissions.class.php');
60 60
     $udperms = new udperms();
61 61
     $udperms->user = $modx->getLoginUserID();
62 62
     $udperms->document = $id;
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         $modx->config['auto_menuindex'] = 1;
137 137
     }
138 138
     if ($modx->config['auto_menuindex']) {
139
-        $pid = (int)$_REQUEST['pid'];
139
+        $pid = (int) $_REQUEST['pid'];
140 140
         $rs = $modx->db->select('count(*)', $tbl_site_content, "parent='{$pid}'");
141 141
         $content['menuindex'] = $modx->db->getValue($rs);
142 142
     } else {
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 // Add lock-element JS-Script
152 152
 $lockElementId = $id;
153 153
 $lockElementType = 7;
154
-require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php');
154
+require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php');
155 155
 ?>
156 156
 	<script type="text/javascript">
157 157
 		/* <![CDATA[ */
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 			},
182 182
 			cancel: function() {
183 183
 				documentDirty = false;
184
-				document.location.href = 'index.php?<?=($id == 0 ? 'a=2' : 'a=3&r=1&id=' . $id . $add_path) ?>';
184
+				document.location.href = 'index.php?<?=($id == 0 ? 'a=2' : 'a=3&r=1&id='.$id.$add_path) ?>';
185 185
 			},
186 186
 			duplicate: function() {
187 187
 				if(confirm("<?= $_lang['confirm_resource_duplicate']?>") === true) {
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 				}
190 190
 			},
191 191
 			view: function() {
192
-				window.open('<?= ($modx->config['friendly_urls'] == '1') ? $modx->makeUrl($id) : $modx->config['site_url'] . 'index.php?id=' . $id ?>', 'previeWin');
192
+				window.open('<?= ($modx->config['friendly_urls'] == '1') ? $modx->makeUrl($id) : $modx->config['site_url'].'index.php?id='.$id ?>', 'previeWin');
193 193
 			}
194 194
 		};
195 195
 
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
 
578 578
 			<h1>
579 579
 				<i class="fa fa-pencil-square-o"></i><?php if (isset($_REQUEST['id'])) {
580
-            echo iconv_substr($content['pagetitle'], 0, 50, $modx->config['modx_charset']) . (iconv_strlen($content['pagetitle'], $modx->config['modx_charset']) > 50 ? '...' : '') . '<small>(' . $_REQUEST['id'] . ')</small>';
580
+            echo iconv_substr($content['pagetitle'], 0, 50, $modx->config['modx_charset']).(iconv_strlen($content['pagetitle'], $modx->config['modx_charset']) > 50 ? '...' : '').'<small>('.$_REQUEST['id'].')</small>';
581 581
         } else {
582 582
             if ($modx->manager->action == '4') {
583 583
                 echo $_lang['add_resource'];
@@ -614,15 +614,15 @@  discard block
 block discarded – undo
614 614
                         $rs = $modx->db->select('id, pagetitle', $tbl_site_content, "id IN ({$parents})", $where);
615 615
                         while ($row = $modx->db->getRow($rs)) {
616 616
                             $out .= '<li class="breadcrumbs__li">
617
-                                <a href="index.php?a=27&id=' . $row['id'] . '" class="breadcrumbs__a">' . htmlspecialchars($row['pagetitle'], ENT_QUOTES, $modx->config['modx_charset']) . '</a>
617
+                                <a href="index.php?a=27&id=' . $row['id'].'" class="breadcrumbs__a">'.htmlspecialchars($row['pagetitle'], ENT_QUOTES, $modx->config['modx_charset']).'</a>
618 618
                                 <span class="breadcrumbs__sep">&gt;</span>
619 619
                             </li>';
620 620
                         }
621 621
                     }
622 622
                 }
623 623
 
624
-                $out .= '<li class="breadcrumbs__li breadcrumbs__li_current">' . $title . '</li>';
625
-                echo '<ul class="breadcrumbs">' . $out . '</ul>';
624
+                $out .= '<li class="breadcrumbs__li breadcrumbs__li_current">'.$title.'</li>';
625
+                echo '<ul class="breadcrumbs">'.$out.'</ul>';
626 626
             }
627 627
             ?>
628 628
 
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
 
752 752
                             $selectedtext = ($row['id'] == $content['template']) ? ' selected="selected"' : '';
753 753
 
754
-                            echo "\t\t\t\t\t" . '<option value="' . $row['id'] . '"' . $selectedtext . '>' . $row['templatename'] . "</option>\n";
754
+                            echo "\t\t\t\t\t".'<option value="'.$row['id'].'"'.$selectedtext.'>'.$row['templatename']."</option>\n";
755 755
                             $currentCategory = $thisCategory;
756 756
                         }
757 757
                         if ($thisCategory != '') {
@@ -900,7 +900,7 @@  discard block
 block discarded – undo
900 900
                                                     $richtexteditorIds[$modx->config['which_editor']][] = 'ta';
901 901
                                                     $richtexteditorOptions[$modx->config['which_editor']]['ta'] = '';
902 902
                                                 } else {
903
-                                                    echo "\t" . '<div><textarea class="phptextarea" id="ta" name="ta" rows="20" wrap="soft" onchange="documentDirty=true;">', $modx->htmlspecialchars($content['content']), '</textarea></div>' . "\n";
903
+                                                    echo "\t".'<div><textarea class="phptextarea" id="ta" name="ta" rows="20" wrap="soft" onchange="documentDirty=true;">', $modx->htmlspecialchars($content['content']), '</textarea></div>'."\n";
904 904
                                                 } ?>
905 905
 											</div>
906 906
 										</td>
@@ -916,7 +916,7 @@  discard block
 block discarded – undo
916 916
 
917 917
                         if (($content['type'] == 'document' || $modx->manager->action == '4') || ($content['type'] == 'reference' || $modx->manager->action == 72)) {
918 918
                             $template = $default_template;
919
-                            $group_tvs = empty($modx->config['group_tvs']) ? 0 : (int)$modx->config['group_tvs'];
919
+                            $group_tvs = empty($modx->config['group_tvs']) ? 0 : (int) $modx->config['group_tvs'];
920 920
                             if (isset($_REQUEST['newtemplate'])) {
921 921
                                 $template = $_REQUEST['newtemplate'];
922 922
                             } else {
@@ -944,17 +944,17 @@  discard block
 block discarded – undo
944 944
                                 );
945 945
                             $sort = 'tvtpl.rank,tv.rank, tv.id';
946 946
                             if ($group_tvs) {
947
-                                $field .= ', IFNULL(tv.category,0) as category_id, IFNULL(cat.category,"' . $_lang['no_category'] . '") AS category, IFNULL(cat.rank,0) AS category_rank';
947
+                                $field .= ', IFNULL(tv.category,0) as category_id, IFNULL(cat.category,"'.$_lang['no_category'].'") AS category, IFNULL(cat.rank,0) AS category_rank';
948 948
                                 $from .= '
949
-                                    LEFT JOIN ' . $tbl_categories . ' AS cat ON cat.id=tv.category';
950
-                                $sort = 'cat.rank,cat.id,' . $sort;
949
+                                    LEFT JOIN ' . $tbl_categories.' AS cat ON cat.id=tv.category';
950
+                                $sort = 'cat.rank,cat.id,'.$sort;
951 951
                             }
952 952
                             $where = vsprintf("tvtpl.templateid='%s' AND (1='%s' OR ISNULL(tva.documentgroup) %s)", $vs);
953 953
                             $rs = $modx->db->select($field, $from, $where, $sort);
954 954
                             if ($modx->db->getRecordCount($rs)) {
955 955
                                 $tvsArray = $modx->db->makeArray($rs, 'name');
956
-                                require_once(MODX_MANAGER_PATH . 'includes/tmplvars.inc.php');
957
-                                require_once(MODX_MANAGER_PATH . 'includes/tmplvars.commands.inc.php');
956
+                                require_once(MODX_MANAGER_PATH.'includes/tmplvars.inc.php');
957
+                                require_once(MODX_MANAGER_PATH.'includes/tmplvars.commands.inc.php');
958 958
 
959 959
                                 $templateVariablesOutput = '';
960 960
                                 $templateVariablesGeneral = '';
@@ -968,8 +968,8 @@  discard block
 block discarded – undo
968 968
                                             if ($group_tvs == 1 || $group_tvs == 3) {
969 969
                                                 if ($i === 0) {
970 970
                                                     $templateVariablesOutput .= '
971
-                            <div class="tab-section" id="tabTV_' . $row['category_id'] . '">
972
-                                <div class="tab-header">' . $row['category'] . '</div>
971
+                            <div class="tab-section" id="tabTV_' . $row['category_id'].'">
972
+                                <div class="tab-header">' . $row['category'].'</div>
973 973
                                 <div class="tab-body tmplvars">
974 974
                                     <table>' . "\n";
975 975
                                                 } else {
@@ -978,17 +978,17 @@  discard block
 block discarded – undo
978 978
                                 </div>
979 979
                             </div>
980 980
                             
981
-                            <div class="tab-section" id="tabTV_' . $row['category_id'] . '">
982
-                                <div class="tab-header">' . $row['category'] . '</div>
981
+                            <div class="tab-section" id="tabTV_' . $row['category_id'].'">
982
+                                <div class="tab-header">' . $row['category'].'</div>
983 983
                                 <div class="tab-body tmplvars">
984 984
                                     <table>';
985 985
                                                 }
986 986
                                             } elseif ($group_tvs == 2 || $group_tvs == 4) {
987 987
                                                 if ($i === 0) {
988 988
                                                     $templateVariablesOutput .= '
989
-                            <div id="tabTV_' . $row['category_id'] . '" class="tab-page tmplvars">
990
-                                <h2 class="tab">' . $row['category'] . '</h2>
991
-                                <script type="text/javascript">tpTemplateVariables.addTabPage(document.getElementById(\'tabTV_' . $row['category_id'] . '\'));</script>
989
+                            <div id="tabTV_' . $row['category_id'].'" class="tab-page tmplvars">
990
+                                <h2 class="tab">' . $row['category'].'</h2>
991
+                                <script type="text/javascript">tpTemplateVariables.addTabPage(document.getElementById(\'tabTV_' . $row['category_id'].'\'));</script>
992 992
                                 
993 993
                                 <div class="tab-body tmplvars">
994 994
                                     <table>';
@@ -998,9 +998,9 @@  discard block
 block discarded – undo
998 998
                                 </div>
999 999
                             </div>
1000 1000
                             
1001
-                            <div id="tabTV_' . $row['category_id'] . '" class="tab-page tmplvars">
1002
-                                <h2 class="tab">' . $row['category'] . '</h2>
1003
-                                <script type="text/javascript">tpTemplateVariables.addTabPage(document.getElementById(\'tabTV_' . $row['category_id'] . '\'));</script>
1001
+                            <div id="tabTV_' . $row['category_id'].'" class="tab-page tmplvars">
1002
+                                <h2 class="tab">' . $row['category'].'</h2>
1003
+                                <script type="text/javascript">tpTemplateVariables.addTabPage(document.getElementById(\'tabTV_' . $row['category_id'].'\'));</script>
1004 1004
                                 
1005 1005
                                 <div class="tab-body tmplvars">
1006 1006
                                     <table>';
@@ -1008,18 +1008,18 @@  discard block
 block discarded – undo
1008 1008
                                             } elseif ($group_tvs == 5) {
1009 1009
                                                 if ($i === 0) {
1010 1010
                                                     $templateVariablesOutput .= '
1011
-                                <div id="tabTV_' . $row['category_id'] . '" class="tab-page tmplvars">
1012
-                                    <h2 class="tab">' . $row['category'] . '</h2>
1013
-                                    <script type="text/javascript">tpSettings.addTabPage(document.getElementById(\'tabTV_' . $row['category_id'] . '\'));</script>
1011
+                                <div id="tabTV_' . $row['category_id'].'" class="tab-page tmplvars">
1012
+                                    <h2 class="tab">' . $row['category'].'</h2>
1013
+                                    <script type="text/javascript">tpSettings.addTabPage(document.getElementById(\'tabTV_' . $row['category_id'].'\'));</script>
1014 1014
                                     <table>';
1015 1015
                                                 } else {
1016 1016
                                                     $templateVariablesOutput .= '
1017 1017
                                     </table>
1018 1018
                                 </div>
1019 1019
                                 
1020
-                                <div id="tabTV_' . $row['category_id'] . '" class="tab-page tmplvars">
1021
-                                    <h2 class="tab">' . $row['category'] . '</h2>
1022
-                                    <script type="text/javascript">tpSettings.addTabPage(document.getElementById(\'tabTV_' . $row['category_id'] . '\'));</script>
1020
+                                <div id="tabTV_' . $row['category_id'].'" class="tab-page tmplvars">
1021
+                                    <h2 class="tab">' . $row['category'].'</h2>
1022
+                                    <script type="text/javascript">tpSettings.addTabPage(document.getElementById(\'tabTV_' . $row['category_id'].'\'));</script>
1023 1023
                                     
1024 1024
                                     <table>';
1025 1025
                                                 }
@@ -1039,8 +1039,8 @@  discard block
 block discarded – undo
1039 1039
                                             $editor = isset($tvOptions['editor']) ? $tvOptions['editor'] : $modx->config['which_editor'];
1040 1040
                                         };
1041 1041
                                         // Add richtext editor to the list
1042
-                                        $richtexteditorIds[$editor][] = "tv" . $row['id'];
1043
-                                        $richtexteditorOptions[$editor]["tv" . $row['id']] = $tvOptions;
1042
+                                        $richtexteditorIds[$editor][] = "tv".$row['id'];
1043
+                                        $richtexteditorOptions[$editor]["tv".$row['id']] = $tvOptions;
1044 1044
                                     }
1045 1045
 
1046 1046
                                     $templateVariablesTmp = '';
@@ -1057,24 +1057,24 @@  discard block
 block discarded – undo
1057 1057
                                     }
1058 1058
 
1059 1059
                                     // post back value
1060
-                                    if (array_key_exists('tv' . $row['id'], $_POST)) {
1061
-                                        if (is_array($_POST['tv' . $row['id']])) {
1062
-                                            $tvPBV = implode('||', $_POST['tv' . $row['id']]);
1060
+                                    if (array_key_exists('tv'.$row['id'], $_POST)) {
1061
+                                        if (is_array($_POST['tv'.$row['id']])) {
1062
+                                            $tvPBV = implode('||', $_POST['tv'.$row['id']]);
1063 1063
                                         } else {
1064
-                                            $tvPBV = $_POST['tv' . $row['id']];
1064
+                                            $tvPBV = $_POST['tv'.$row['id']];
1065 1065
                                         }
1066 1066
                                     } else {
1067 1067
                                         $tvPBV = $row['value'];
1068 1068
                                     }
1069 1069
 
1070
-                                    $tvDescription = (!empty($row['description'])) ? '<br /><span class="comment">' . $row['description'] . '</span>' : '';
1071
-                                    $tvInherited = (substr($tvPBV, 0, 8) == '@INHERIT') ? '<br /><span class="comment inherited">(' . $_lang['tmplvars_inherited'] . ')</span>' : '';
1072
-                                    $tvName = $modx->hasPermission('edit_template') ? '<br/><small class="protectedNode">[*' . $row['name'] . '*]</small>' : '';
1070
+                                    $tvDescription = (!empty($row['description'])) ? '<br /><span class="comment">'.$row['description'].'</span>' : '';
1071
+                                    $tvInherited = (substr($tvPBV, 0, 8) == '@INHERIT') ? '<br /><span class="comment inherited">('.$_lang['tmplvars_inherited'].')</span>' : '';
1072
+                                    $tvName = $modx->hasPermission('edit_template') ? '<br/><small class="protectedNode">[*'.$row['name'].'*]</small>' : '';
1073 1073
 
1074 1074
                                     $templateVariablesTmp .= '
1075 1075
                                         <tr>
1076
-                                            <td><span class="warning">' . $row['caption'] . $tvName . '</span>' . $tvDescription . $tvInherited . '</td>
1077
-                                            <td><div style="position:relative;' . ($row['type'] == 'date' ? '' : '') . '">' . renderFormElement($row['type'], $row['id'], $row['default_text'], $row['elements'], $tvPBV, '', $row, $tvsArray) . '</div></td>
1076
+                                            <td><span class="warning">' . $row['caption'].$tvName.'</span>'.$tvDescription.$tvInherited.'</td>
1077
+                                            <td><div style="position:relative;' . ($row['type'] == 'date' ? '' : '').'">'.renderFormElement($row['type'], $row['id'], $row['default_text'], $row['elements'], $tvPBV, '', $row, $tvsArray).'</div></td>
1078 1078
                                         </tr>';
1079 1079
 
1080 1080
                                     if ($group_tvs && $row['category_id'] == 0) {
@@ -1088,38 +1088,38 @@  discard block
 block discarded – undo
1088 1088
                                 }
1089 1089
 
1090 1090
                                 if ($templateVariablesGeneral) {
1091
-                                    echo '<table id="tabTV_0" class="tmplvars"><tbody>' . $templateVariablesGeneral . '</tbody></table>';
1091
+                                    echo '<table id="tabTV_0" class="tmplvars"><tbody>'.$templateVariablesGeneral.'</tbody></table>';
1092 1092
                                 }
1093 1093
 
1094 1094
                                 $templateVariables .= '
1095 1095
                         <!-- Template Variables -->' . "\n";
1096 1096
                                 if (!$group_tvs) {
1097 1097
                                     $templateVariables .= '
1098
-                                    <div class="sectionHeader" id="tv_header">' . $_lang['settings_templvars'] . '</div>
1098
+                                    <div class="sectionHeader" id="tv_header">' . $_lang['settings_templvars'].'</div>
1099 1099
                                         <div class="sectionBody tmplvars">
1100 1100
                                             <table>';
1101 1101
                                 } elseif ($group_tvs == 2) {
1102 1102
                                     $templateVariables .= '
1103 1103
                     <div class="tab-section">
1104
-                        <div class="tab-header" id="tv_header">' . $_lang['settings_templvars'] . '</div>
1104
+                        <div class="tab-header" id="tv_header">' . $_lang['settings_templvars'].'</div>
1105 1105
                         <div class="tab-pane" id="paneTemplateVariables">
1106 1106
                             <script type="text/javascript">
1107
-                                tpTemplateVariables = new WebFXTabPane(document.getElementById(\'paneTemplateVariables\'), ' . ($modx->config['remember_last_tab'] == 1 ? 'true' : 'false') . ');
1107
+                                tpTemplateVariables = new WebFXTabPane(document.getElementById(\'paneTemplateVariables\'), ' . ($modx->config['remember_last_tab'] == 1 ? 'true' : 'false').');
1108 1108
                             </script>';
1109 1109
                                 } elseif ($group_tvs == 3) {
1110 1110
                                     $templateVariables .= '
1111 1111
                         <div id="templateVariables" class="tab-page tmplvars">
1112
-                            <h2 class="tab">' . $_lang['settings_templvars'] . '</h2>
1112
+                            <h2 class="tab">' . $_lang['settings_templvars'].'</h2>
1113 1113
                             <script type="text/javascript">tpSettings.addTabPage(document.getElementById(\'templateVariables\'));</script>';
1114 1114
                                 } elseif ($group_tvs == 4) {
1115 1115
                                     $templateVariables .= '
1116 1116
                     <div id="templateVariables" class="tab-page tmplvars">
1117
-                        <h2 class="tab">' . $_lang['settings_templvars'] . '</h2>
1117
+                        <h2 class="tab">' . $_lang['settings_templvars'].'</h2>
1118 1118
                         <script type="text/javascript">tpSettings.addTabPage(document.getElementById(\'templateVariables\'));</script>
1119 1119
                         
1120 1120
                         <div class="tab-pane" id="paneTemplateVariables">
1121 1121
                             <script type="text/javascript">
1122
-                                tpTemplateVariables = new WebFXTabPane(document.getElementById(\'paneTemplateVariables\'), ' . ($modx->config['remember_last_tab'] == 1 ? 'true' : 'false') . ');
1122
+                                tpTemplateVariables = new WebFXTabPane(document.getElementById(\'paneTemplateVariables\'), ' . ($modx->config['remember_last_tab'] == 1 ? 'true' : 'false').');
1123 1123
                             </script>';
1124 1124
                                 }
1125 1125
                                 $templateVariables .= $templateVariablesOutput;
@@ -1239,7 +1239,7 @@  discard block
 block discarded – undo
1239 1239
                                     $custom_contenttype = (isset($custom_contenttype) ? $custom_contenttype : "text/html,text/plain,text/xml");
1240 1240
                                     $ct = explode(",", $custom_contenttype);
1241 1241
                                     for ($i = 0; $i < count($ct); $i++) {
1242
-                                        echo "\t\t\t\t\t" . '<option value="' . $ct[$i] . '"' . ($content['contentType'] == $ct[$i] ? ' selected="selected"' : '') . '>' . $ct[$i] . "</option>\n";
1242
+                                        echo "\t\t\t\t\t".'<option value="'.$ct[$i].'"'.($content['contentType'] == $ct[$i] ? ' selected="selected"' : '').'>'.$ct[$i]."</option>\n";
1243 1243
                                     } ?>
1244 1244
 											</select>
1245 1245
 										</td>
@@ -1374,7 +1374,7 @@  discard block
 block discarded – undo
1374 1374
                             // Load up, the permissions from the parent (if new document) or existing document
1375 1375
                             $rs = $modx->db->select('id, document_group', $tbl_document_groups, "document='{$documentId}'");
1376 1376
                             while ($currentgroup = $modx->db->getRow($rs)) {
1377
-                                $groupsarray[] = $currentgroup['document_group'] . ',' . $currentgroup['id'];
1377
+                                $groupsarray[] = $currentgroup['document_group'].','.$currentgroup['id'];
1378 1378
                             }
1379 1379
 
1380 1380
                             // Load up the current permissions and names
@@ -1413,8 +1413,8 @@  discard block
 block discarded – undo
1413 1413
                         while ($row = $modx->db->getRow($rs)) {
1414 1414
 
1415 1415
                             // Create an inputValue pair (group ID and group link (if it exists))
1416
-                            $inputValue = $row['id'] . ',' . ($row['link_id'] ? $row['link_id'] : 'new');
1417
-                            $inputId = 'group-' . $row['id'];
1416
+                            $inputValue = $row['id'].','.($row['link_id'] ? $row['link_id'] : 'new');
1417
+                            $inputId = 'group-'.$row['id'];
1418 1418
 
1419 1419
                             $checked = in_array($inputValue, $groupsarray);
1420 1420
                             if ($checked) {
@@ -1438,11 +1438,11 @@  discard block
 block discarded – undo
1438 1438
                             // Create attribute string list
1439 1439
                             $inputString = array();
1440 1440
                             foreach ($inputAttributes as $k => $v) {
1441
-                                $inputString[] = $k . '="' . $v . '"';
1441
+                                $inputString[] = $k.'="'.$v.'"';
1442 1442
                             }
1443 1443
 
1444 1444
                             // Make the <input> HTML
1445
-                            $inputHTML = '<input ' . implode(' ', $inputString) . ' />';
1445
+                            $inputHTML = '<input '.implode(' ', $inputString).' />';
1446 1446
 
1447 1447
                             // does user have this permission?
1448 1448
                             $from = "{$tbl_membergroup_access} AS mga, {$tbl_member_groups} AS mg";
@@ -1458,7 +1458,7 @@  discard block
 block discarded – undo
1458 1458
                             } else {
1459 1459
                                 ++$permissions_no;
1460 1460
                             }
1461
-                            $permissions[] = "\t\t" . '<li>' . $inputHTML . '<label for="' . $inputId . '">' . $row['name'] . '</label></li>';
1461
+                            $permissions[] = "\t\t".'<li>'.$inputHTML.'<label for="'.$inputId.'">'.$row['name'].'</label></li>';
1462 1462
                         }
1463 1463
                         // if mgr user doesn't have access to any of the displayable permissions, forget about them and make doc public
1464 1464
                         if ($_SESSION['mgrRole'] != 1 && ($permissions_yes == 0 && $permissions_no > 0)) {
@@ -1469,7 +1469,7 @@  discard block
 block discarded – undo
1469 1469
                         if (!empty($permissions)) {
1470 1470
                             // Add the "All Document Groups" item if we have rights in both contexts
1471 1471
                             if ($isManager && $isWeb) {
1472
-                                array_unshift($permissions, "\t\t" . '<li><input type="checkbox" class="checkbox" name="chkalldocs" id="groupall"' . (!$notPublic ? ' checked="checked"' : '') . ' onclick="makePublic(true);" /><label for="groupall" class="warning">' . $_lang['all_doc_groups'] . '</label></li>');
1472
+                                array_unshift($permissions, "\t\t".'<li><input type="checkbox" class="checkbox" name="chkalldocs" id="groupall"'.(!$notPublic ? ' checked="checked"' : '').' onclick="makePublic(true);" /><label for="groupall" class="warning">'.$_lang['all_doc_groups'].'</label></li>');
1473 1473
                             }
1474 1474
                             // Output the permissions list...
1475 1475
                             ?>
@@ -1502,7 +1502,7 @@  discard block
 block discarded – undo
1502 1502
 								</script>
1503 1503
 								<p><?= $_lang['access_permissions_docs_message'] ?></p>
1504 1504
 								<ul>
1505
-									<?= implode("\n", $permissions) . "\n" ?>
1505
+									<?= implode("\n", $permissions)."\n" ?>
1506 1506
 								</ul>
1507 1507
 							</div><!--div class="tab-page" id="tabAccess"-->
1508 1508
 							<?php
Please login to merge, or discard this patch.
manager/actions/mutate_snippet.dynamic.php 1 patch
Spacing   +12 added lines, -12 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_module_depobj = $modx->getFullTableName('site_module_depobj');
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     $rs = $modx->db->select('*', $tbl_site_snippets, "id='{$id}'");
40 40
     $content = $modx->db->getRow($rs);
41 41
     if (!$content) {
42
-        header("Location: " . MODX_SITE_URL . "index.php?id=" . $site_start);
42
+        header("Location: ".MODX_SITE_URL."index.php?id=".$site_start);
43 43
     }
44 44
     $_SESSION['itemname'] = $content['name'];
45 45
     if ($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) {
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     $content['name'] = $_REQUEST['itemname'];
51 51
 } else {
52 52
     $_SESSION['itemname'] = $_lang["new_snippet"];
53
-    $content['category'] = (int)$_REQUEST['catid'];
53
+    $content['category'] = (int) $_REQUEST['catid'];
54 54
 }
55 55
 
56 56
 if ($modx->manager->hasFormValues()) {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 // Add lock-element JS-Script
63 63
 $lockElementId = $id;
64 64
 $lockElementType = 4;
65
-require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php');
65
+require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php');
66 66
 ?>
67 67
 <script type="text/javascript">
68 68
 
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
     <input type="hidden" name="mode" value="<?= $modx->manager->action ?>">
432 432
 
433 433
     <h1 class="pagetitle">
434
-        <i class="fa fa-code"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_snippet']) ?><i class="fa fa-question-circle help"></i>
434
+        <i class="fa fa-code"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_snippet']) ?><i class="fa fa-question-circle help"></i>
435 435
     </h1>
436 436
 
437 437
     <?= $_style['actionbuttons']['dynamic']['element'] ?>
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
                             <div class="form-control-name clearfix">
458 458
                                 <input name="name" type="text" maxlength="100" value="<?= $modx->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" />
459 459
                                 <?php if ($modx->hasPermission('save_role')): ?>
460
-                                    <label class="custom-control" title="<?= $_lang['lock_snippet'] . "\n" . $_lang['lock_snippet_msg'] ?>" tooltip>
460
+                                    <label class="custom-control" title="<?= $_lang['lock_snippet']."\n".$_lang['lock_snippet_msg'] ?>" tooltip>
461 461
                                         <input name="locked" type="checkbox"<?= ($content['locked'] == 1 ? ' checked="checked"' : '') ?> />
462 462
                                         <i class="fa fa-lock"></i>
463 463
                                     </label>
@@ -481,9 +481,9 @@  discard block
 block discarded – undo
481 481
                             <select name="categoryid" class="form-control" onchange="documentDirty=true;">
482 482
                                 <option>&nbsp;</option>
483 483
                                 <?php
484
-                                include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php');
484
+                                include_once(MODX_MANAGER_PATH.'includes/categories.inc.php');
485 485
                                 foreach (getCategories() as $n => $v) {
486
-                                    echo '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v['category']) . '</option>';
486
+                                    echo '<option value="'.$v['id'].'"'.($content['category'] == $v['id'] ? ' selected="selected"' : '').'>'.$modx->htmlspecialchars($v['category']).'</option>';
487 487
                                 }
488 488
                                 ?>
489 489
                             </select>
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
                     <div class="form-group">
501 501
                         <?php if ($_SESSION['mgrRole'] == 1): ?>
502 502
                             <div class="form-row">
503
-                                <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>
503
+                                <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>
504 504
                             </div>
505 505
                         <?php endif; ?>
506 506
                         <div class="form-row">
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
                 <span><?= $_lang['snippet_code'] ?></span>
518 518
             </div>
519 519
             <div class="section-editor clearfix">
520
-                <textarea dir="ltr" name="post" class="phptextarea" rows="20" wrap="soft" onchange="documentDirty=true;"><?= (isset($content['post']) ? trim($modx->htmlspecialchars($content['post'])) : "<?php" . "\n" . trim($modx->htmlspecialchars($content['snippet'])) . "\n") ?></textarea>
520
+                <textarea dir="ltr" name="post" class="phptextarea" rows="20" wrap="soft" onchange="documentDirty=true;"><?= (isset($content['post']) ? trim($modx->htmlspecialchars($content['post'])) : "<?php"."\n".trim($modx->htmlspecialchars($content['snippet']))."\n") ?></textarea>
521 521
             </div>
522 522
             <!-- PHP text editor end -->
523 523
         </div>
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
 								INNER JOIN {$tbl_site_module_depobj} AS smd ON smd.module=sm.id AND smd.type=40 
553 553
 								INNER JOIN {$tbl_site_snippets} AS ss ON ss.id=smd.resource", "smd.resource='{$id}' AND sm.enable_sharedparams=1", 'sm.name');
554 554
                                 while ($row = $modx->db->getRow($ds)) {
555
-                                    echo "<option value='" . $row['guid'] . "'" . ($content['moduleguid'] == $row['guid'] ? " selected='selected'" : "") . ">" . $modx->htmlspecialchars($row['name']) . "</option>";
555
+                                    echo "<option value='".$row['guid']."'".($content['moduleguid'] == $row['guid'] ? " selected='selected'" : "").">".$modx->htmlspecialchars($row['name'])."</option>";
556 556
                                 }
557 557
                                 ?>
558 558
                             </select>
Please login to merge, or discard this patch.
manager/actions/site_schedule.static.php 1 patch
Spacing   +3 added lines, -3 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')) {
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 		<div class="form-group" id="lyr1">
18 18
 			<b><?= $_lang["publish_events"] ?></b>
19 19
 			<?php
20
-            $rs = $modx->db->select('id, pagetitle, pub_date', $modx->getFullTableName('site_content'), "pub_date > " . time() . "", 'pub_date ASC');
20
+            $rs = $modx->db->select('id, pagetitle, pub_date', $modx->getFullTableName('site_content'), "pub_date > ".time()."", 'pub_date ASC');
21 21
             $limit = $modx->db->getRecordCount($rs);
22 22
             if ($limit < 1) {
23 23
                 ?>
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 		<div class="form-group" id="lyr2">
56 56
 			<b><?= $_lang["unpublish_events"] ?></b>
57 57
 			<?php
58
-            $rs = $modx->db->select('id, pagetitle, unpub_date', $modx->getFullTableName('site_content'), "unpub_date > " . time() . "", 'unpub_date ASC');
58
+            $rs = $modx->db->select('id, pagetitle, unpub_date', $modx->getFullTableName('site_content'), "unpub_date > ".time()."", 'unpub_date ASC');
59 59
             $limit = $modx->db->getRecordCount($rs);
60 60
             if ($limit < 1) {
61 61
                 ?>
Please login to merge, or discard this patch.
manager/actions/welcome.static.php 1 patch
Spacing   +18 added lines, -18 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
 
@@ -17,15 +17,15 @@  discard block
 block discarded – undo
17 17
 
18 18
 // setup message info
19 19
 if ($modx->hasPermission('messages')) {
20
-    include_once(MODX_MANAGER_PATH . 'includes/messageCount.inc.php');
20
+    include_once(MODX_MANAGER_PATH.'includes/messageCount.inc.php');
21 21
     $_SESSION['nrtotalmessages'] = $nrtotalmessages;
22 22
     $_SESSION['nrnewmessages'] = $nrnewmessages;
23 23
 
24 24
     $msg = array();
25 25
     $msg[] = sprintf('<a href="index.php?a=10" target="main"><img src="%s" /></a>', $_style['icons_mail_large']);
26
-    $nrnewmessages = $_SESSION['nrnewmessages'] > 0 ? ' (<span style="color:red">' . $_SESSION['nrnewmessages'] . '</span>)' : '';
26
+    $nrnewmessages = $_SESSION['nrnewmessages'] > 0 ? ' (<span style="color:red">'.$_SESSION['nrnewmessages'].'</span>)' : '';
27 27
     $msg[] = sprintf('<span style="color:#909090;font-size:15px;font-weight:bold">&nbsp;<a class="wm_messages_inbox_link" href="index.php?a=10" target="main">[%%inbox%%]</a>%s</span><br />', $nrnewmessages);
28
-    $nrnewmessages = $_SESSION['nrnewmessages'] > 0 ? '<span style="color:red;">' . $_SESSION['nrnewmessages'] . '</span>' : '0';
28
+    $nrnewmessages = $_SESSION['nrnewmessages'] > 0 ? '<span style="color:red;">'.$_SESSION['nrnewmessages'].'</span>' : '0';
29 29
     $welcome_messages = sprintf($_lang['welcome_messages'], $_SESSION['nrtotalmessages'], $nrnewmessages);
30 30
     $msg[] = sprintf('<span class="comment">%s</span>', $welcome_messages);
31 31
     $ph['MessageInfo'] = implode("\n", $msg);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
 // do some config checks
82 82
 if (($modx->config['warning_visibility'] == 0 && $_SESSION['mgrRole'] == 1) || $modx->config['warning_visibility'] == 1) {
83
-    include_once(MODX_MANAGER_PATH . 'includes/config_check.inc.php');
83
+    include_once(MODX_MANAGER_PATH.'includes/config_check.inc.php');
84 84
     if ($config_check_results != $_lang['configcheck_ok']) {
85 85
         $ph['config_check_results'] = $config_check_results;
86 86
         $ph['config_display'] = 'block';
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	</tr>
148 148
 </table>';
149 149
 
150
-$nrnewmessages = '<span class="text-danger">' . $_SESSION['nrnewmessages'] . '</span>';
150
+$nrnewmessages = '<span class="text-danger">'.$_SESSION['nrnewmessages'].'</span>';
151 151
 
152 152
 $ph['UserInfo'] = $modx->parseText($tpl, array(
153 153
     'username' => $modx->getLoginUserName(),
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 if ($modx->db->getRecordCount($rs) < 1) {
166 166
     $html = '<p>[%no_active_users_found%]</p>';
167 167
 } else {
168
-    include_once(MODX_MANAGER_PATH . 'includes/actionlist.inc.php');
168
+    include_once(MODX_MANAGER_PATH.'includes/actionlist.inc.php');
169 169
     $now = $_SERVER['REQUEST_TIME'] + $server_offset_time;
170 170
     $ph['now'] = strftime('%H:%M:%S', $now);
171 171
     $timetocheck = ($now - (60 * 20)); //+$server_offset_time;
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     }
211 211
     foreach ($userList as $params) {
212 212
         $params[1] = $userCount[$params[4]] > 1 ? ' class="userMultipleSessions"' : '';
213
-        $html .= "\n\t\t" . vsprintf('<tr%s><td><strong%s>%s</strong></td><td>%s%s</td><td>%s</td><td>%s</td><td>%s</td></tr>', $params);
213
+        $html .= "\n\t\t".vsprintf('<tr%s><td><strong%s>%s</strong></td><td>%s%s</td><td>%s</td><td>%s</td><td>%s</td></tr>', $params);
214 214
     }
215 215
 
216 216
     $html .= '
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 $ph['OnlineInfo'] = $html;
223 223
 
224 224
 // include rss feeds for important forum topics
225
-include_once(MODX_MANAGER_PATH . 'includes/rss.inc.php');
225
+include_once(MODX_MANAGER_PATH.'includes/rss.inc.php');
226 226
 $ph['modx_security_notices_content'] = $feedData['modx_security_notices_content'];
227 227
 $ph['modx_news_content'] = $feedData['modx_news_content'];
228 228
 
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
     $widgets = (count($newwidgets) > 0) ? $newwidgets : $widgets;
392 392
 }
393 393
 
394
-usort($widgets, function ($a, $b) {
394
+usort($widgets, function($a, $b){
395 395
     return $a['menuindex'] - $b['menuindex'];
396 396
 });
397 397
 
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
 
407 407
 // load template
408 408
 if (!isset($modx->config['manager_welcome_tpl']) || empty($modx->config['manager_welcome_tpl'])) {
409
-    $modx->config['manager_welcome_tpl'] = MODX_MANAGER_PATH . 'media/style/common/welcome.tpl';
409
+    $modx->config['manager_welcome_tpl'] = MODX_MANAGER_PATH.'media/style/common/welcome.tpl';
410 410
 }
411 411
 
412 412
 $target = $modx->config['manager_welcome_tpl'];
@@ -425,15 +425,15 @@  discard block
 block discarded – undo
425 425
     $chunk = $modx->getChunk($target);
426 426
     if ($chunk !== false && !empty($chunk)) {
427 427
         $content = $chunk;
428
-    } elseif (is_file(MODX_BASE_PATH . $target)) {
429
-        $content = file_get_contents(MODX_BASE_PATH . $target);
430
-    } elseif (is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/welcome.tpl')) {
431
-        $content = file_get_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/welcome.tpl');
432
-    } elseif (is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/welcome.html')) { // ClipperCMS compatible
428
+    } elseif (is_file(MODX_BASE_PATH.$target)) {
429
+        $content = file_get_contents(MODX_BASE_PATH.$target);
430
+    } elseif (is_file(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/welcome.tpl')) {
431
+        $content = file_get_contents(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/welcome.tpl');
432
+    } elseif (is_file(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/html/welcome.html')) { // ClipperCMS compatible
433 433
 
434
-        $content = file_get_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/welcome.html');
434
+        $content = file_get_contents(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/html/welcome.html');
435 435
     } else {
436
-        $content = file_get_contents(MODX_MANAGER_PATH . 'media/style/common/welcome.tpl');
436
+        $content = file_get_contents(MODX_MANAGER_PATH.'media/style/common/welcome.tpl');
437 437
     }
438 438
 }
439 439
 
Please login to merge, or discard this patch.
manager/actions/search.static.php 1 patch
Spacing   +73 added lines, -73 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
     exit();
4 4
 }
5 5
 unset($_SESSION['itemname']); // clear this, because it's only set for logging purposes
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
                         <?php
42 42
                         $rs = $modx->db->select('*', $modx->getFullTableName('site_templates'));
43 43
                         $option[] = '<option value="">No selected</option>';
44
-                        $templateid = (isset($_REQUEST['templateid']) && $_REQUEST['templateid'] !== '') ? (int)$_REQUEST['templateid'] : '';
44
+                        $templateid = (isset($_REQUEST['templateid']) && $_REQUEST['templateid'] !== '') ? (int) $_REQUEST['templateid'] : '';
45 45
                         $selected = $templateid === 0 ? ' selected="selected"' : '';
46
-                        $option[] = '<option value="0"' . $selected . '>(blank)</option>';
46
+                        $option[] = '<option value="0"'.$selected.'>(blank)</option>';
47 47
                         while ($row = $modx->db->getRow($rs)) {
48 48
                             $templatename = htmlspecialchars($row['templatename'], ENT_QUOTES, $modx->config['modx_charset']);
49 49
                             $selected = $row['id'] == $templateid ? ' selected="selected"' : '';
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     $searchfields = htmlentities(trim($_POST['searchfields']), ENT_QUOTES, $modx_manager_charset);
87 87
     $searchlongtitle = $modx->db->escape(trim($_REQUEST['searchfields']));
88 88
     $search_alias = $modx->db->escape(trim($_REQUEST['searchfields']));
89
-    $templateid = isset($_REQUEST['templateid']) && $_REQUEST['templateid'] !== '' ? (int)$_REQUEST['templateid'] : '';
89
+    $templateid = isset($_REQUEST['templateid']) && $_REQUEST['templateid'] !== '' ? (int) $_REQUEST['templateid'] : '';
90 90
     $searchcontent = $modx->db->escape($_REQUEST['content']);
91 91
 
92 92
     $fields = 'DISTINCT sc.id, contenttype, pagetitle, longtitle, description, introtext, menutitle, deleted, published, isfolder, type';
@@ -100,12 +100,12 @@  discard block
 block discarded – undo
100 100
         $friendly_url_suffix = $modx->config['friendly_url_suffix'];
101 101
         $base_url = $modx->config['base_url'];
102 102
         $site_url = $modx->config['site_url'];
103
-        $url = preg_replace('@' . $friendly_url_suffix . '$@', '', $url);
103
+        $url = preg_replace('@'.$friendly_url_suffix.'$@', '', $url);
104 104
         if ($url[0] === '/') {
105
-            $url = preg_replace('@^' . $base_url . '@', '', $url);
105
+            $url = preg_replace('@^'.$base_url.'@', '', $url);
106 106
         }
107 107
         if (substr($url, 0, 4) === 'http') {
108
-            $url = preg_replace('@^' . $site_url . '@', '', $url);
108
+            $url = preg_replace('@^'.$site_url.'@', '', $url);
109 109
         }
110 110
         $idFromAlias = $modx->getIdFromAlias($url);
111 111
     }
@@ -118,13 +118,13 @@  discard block
 block discarded – undo
118 118
         $articul_query = "SELECT `contentid` FROM {$tbl_site_tmplvar_contentvalues} WHERE `value` LIKE '%{$searchfields}%'";
119 119
         $articul_result = $modx->db->query($articul_query);
120 120
         $articul_id_array = $modx->db->makeArray($articul_result);
121
-        if (count($articul_id_array)>0) {
121
+        if (count($articul_id_array) > 0) {
122 122
             $articul_id = '';
123 123
             $i = 1;
124 124
             foreach ($articul_id_array as $articul) {
125
-                $articul_id.=$articul['contentid'];
125
+                $articul_id .= $articul['contentid'];
126 126
                 if ($i !== count($articul_id_array)) {
127
-                    $articul_id.=',';
127
+                    $articul_id .= ',';
128 128
                 }
129 129
                 $i++;
130 130
             }
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         if (ctype_digit($searchfields)) {
138 138
             $sqladd .= "sc.id='{$searchfields}'";
139 139
             if (strlen($searchfields) > 3) {
140
-                $sqladd .= $articul_id_query;//search by TV
140
+                $sqladd .= $articul_id_query; //search by TV
141 141
                 $sqladd .= " OR sc.pagetitle LIKE '%{$searchfields}%'";
142 142
             }
143 143
         }
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             $sqladd .= " OR sc.introtext LIKE '%{$searchlongtitle}%'";
157 157
             $sqladd .= " OR sc.menutitle LIKE '%{$searchlongtitle}%'";
158 158
             $sqladd .= " OR sc.alias LIKE '%{$search_alias}%'";
159
-            $sqladd .= $articul_id_query;//search by TV
159
+            $sqladd .= $articul_id_query; //search by TV
160 160
             $sqladd .= ")";
161 161
         }
162 162
     } elseif ($idFromAlias) {
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
         $docgrp = (isset($_SESSION['mgrDocgroups']) && is_array($_SESSION['mgrDocgroups'])) ? implode(',', $_SESSION['mgrDocgroups']) : '';
181 181
         $mgrRole = (isset($_SESSION['mgrRole']) && $_SESSION['mgrRole'] == 1) ? 1 : 0;
182 182
         $docgrp_cond = $docgrp ? " OR dg.document_group IN ({$docgrp})" : '';
183
-        $fields .= ', MAX(IF(1=' . $mgrRole . ' OR sc.privatemgr=0' . $docgrp_cond . ',1,0)) AS hasAccess';
184
-        $sqladd = '(' . $sqladd . ") AND (1={$mgrRole} OR sc.privatemgr=0" . (!$docgrp ? ')' : " OR dg.document_group IN ({$docgrp}))");
183
+        $fields .= ', MAX(IF(1='.$mgrRole.' OR sc.privatemgr=0'.$docgrp_cond.',1,0)) AS hasAccess';
184
+        $sqladd = '('.$sqladd.") AND (1={$mgrRole} OR sc.privatemgr=0".(!$docgrp ? ')' : " OR dg.document_group IN ({$docgrp}))");
185 185
     }
186 186
 
187 187
     if ($sqladd) {
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
     $where = $sqladd;
192 192
 
193 193
     if ($where) {
194
-        $rs = $modx->db->select($fields, $tbl_site_content . ' AS sc LEFT JOIN ' . $tbldg . ' AS dg ON dg.document=sc.id', $where, 'sc.id');
194
+        $rs = $modx->db->select($fields, $tbl_site_content.' AS sc LEFT JOIN '.$tbldg.' AS dg ON dg.document=sc.id', $where, 'sc.id');
195 195
         $limit = $modx->db->getRecordCount($rs);
196 196
     } else {
197 197
         $limit = 0;
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
                 if ($limit < 1) {
208 208
                     echo $_lang['search_empty'];
209 209
                 } else {
210
-                    printf('<p>' . $_lang['search_results_returned_msg'] . '</p>', $limit); ?>
210
+                    printf('<p>'.$_lang['search_results_returned_msg'].'</p>', $limit); ?>
211 211
                     <script type="text/javascript" src="media/script/tablesort.js"></script>
212 212
                     <table class="grid sortabletable sortable-onload-2 rowstyle-even" id="table-1">
213 213
                         <thead>
@@ -265,14 +265,14 @@  discard block
 block discarded – undo
265 265
                                 if (function_exists('mb_strlen') && function_exists('mb_substr')) {
266 266
                                     ?>
267 267
                                     <td<?= $tdClass ?>>
268
-                                        <a href="index.php?a=27&id=<?= $row['id'] ?>"><?= mb_strlen($row['pagetitle'], $modx_manager_charset) > 70 ? mb_substr($row['pagetitle'], 0, 70, $modx_manager_charset) . "..." : $row['pagetitle'] ?></a>
268
+                                        <a href="index.php?a=27&id=<?= $row['id'] ?>"><?= mb_strlen($row['pagetitle'], $modx_manager_charset) > 70 ? mb_substr($row['pagetitle'], 0, 70, $modx_manager_charset)."..." : $row['pagetitle'] ?></a>
269 269
                                     </td>
270
-                                    <td<?= $tdClass ?>><?= mb_strlen($row['description'], $modx_manager_charset) > 70 ? mb_substr($row['description'], 0, 70, $modx_manager_charset) . "..." : $row['description'] ?></td>
270
+                                    <td<?= $tdClass ?>><?= mb_strlen($row['description'], $modx_manager_charset) > 70 ? mb_substr($row['description'], 0, 70, $modx_manager_charset)."..." : $row['description'] ?></td>
271 271
                                     <?php
272 272
                                 } else {
273 273
                                     ?>
274
-                                    <td<?= $tdClass ?>><?= strlen($row['pagetitle']) > 20 ? substr($row['pagetitle'], 0, 20) . '...' : $row['pagetitle'] ?></td>
275
-                                    <td<?= $tdClass ?>><?= strlen($row['description']) > 35 ? substr($row['description'], 0, 35) . '...' : $row['description'] ?></td>
274
+                                    <td<?= $tdClass ?>><?= strlen($row['pagetitle']) > 20 ? substr($row['pagetitle'], 0, 20).'...' : $row['pagetitle'] ?></td>
275
+                                    <td<?= $tdClass ?>><?= strlen($row['description']) > 35 ? substr($row['description'], 0, 35).'...' : $row['description'] ?></td>
276 276
                                     <?php
277 277
                                 } ?>
278 278
                             </tr>
@@ -289,115 +289,115 @@  discard block
 block discarded – undo
289 289
                 if ($modx->hasPermission('new_document') && $modx->hasPermission('edit_document') && $modx->hasPermission('save_document')) {
290 290
                     $docscounts = $modx->db->getRecordCount($rs);
291 291
                     if ($docscounts > 0) {
292
-                        $output .= '<li><b><i class="fa fa-sitemap"></i> ' . $_lang["manage_documents"] . ' (' . $docscounts . ')</b></li>';
292
+                        $output .= '<li><b><i class="fa fa-sitemap"></i> '.$_lang["manage_documents"].' ('.$docscounts.')</b></li>';
293 293
                         while ($row = $modx->db->getRow($rs)) {
294
-                            $output .= '<li' . addClassForItemList('', !$row['published'], $row['deleted']) . '><a href="index.php?a=27&id=' . $row['id'] . '" id="content_' . $row['id'] . '" target="main">' . highlightingCoincidence($row['pagetitle'] . ' <small>(' . $row['id'] . ')</small>', $_REQUEST['searchfields']) . $_style['icons_external_link'] . '</a></li>';
294
+                            $output .= '<li'.addClassForItemList('', !$row['published'], $row['deleted']).'><a href="index.php?a=27&id='.$row['id'].'" id="content_'.$row['id'].'" target="main">'.highlightingCoincidence($row['pagetitle'].' <small>('.$row['id'].')</small>', $_REQUEST['searchfields']).$_style['icons_external_link'].'</a></li>';
295 295
                         }
296 296
                     }
297 297
                 }
298 298
 
299 299
                 //templates
300 300
                 if ($modx->hasPermission('edit_template')) {
301
-                    $rs = $modx->db->select("id,templatename,locked", $modx->getFullTableName('site_templates'), "`id` like '%" . $searchfields . "%' 
302
-					OR `templatename` like '%" . $searchfields . "%' 
303
-					OR `description` like '%" . $searchfields . "%' 
304
-					OR `content` like '%" . $searchfields . "%'");
301
+                    $rs = $modx->db->select("id,templatename,locked", $modx->getFullTableName('site_templates'), "`id` like '%".$searchfields."%' 
302
+					OR `templatename` like '%" . $searchfields."%' 
303
+					OR `description` like '%" . $searchfields."%' 
304
+					OR `content` like '%" . $searchfields."%'");
305 305
                     $templatecounts = $modx->db->getRecordCount($rs);
306 306
                     if ($templatecounts > 0) {
307
-                        $output .= '<li><b><i class="fa fa-newspaper-o"></i> ' . $_lang["manage_templates"] . ' (' . $templatecounts . ')</b></li>';
307
+                        $output .= '<li><b><i class="fa fa-newspaper-o"></i> '.$_lang["manage_templates"].' ('.$templatecounts.')</b></li>';
308 308
                         while ($row = $modx->db->getRow($rs)) {
309
-                            $output .= '<li' . addClassForItemList($row['locked']) . '><a href="index.php?a=16&id=' . $row['id'] . '" id="templates_' . $row['id'] . '" target="main">' . highlightingCoincidence($row['templatename'], $_REQUEST['searchfields']) . $_style['icons_external_link'] . '</a></li>';
309
+                            $output .= '<li'.addClassForItemList($row['locked']).'><a href="index.php?a=16&id='.$row['id'].'" id="templates_'.$row['id'].'" target="main">'.highlightingCoincidence($row['templatename'], $_REQUEST['searchfields']).$_style['icons_external_link'].'</a></li>';
310 310
                         }
311 311
                     }
312 312
                 }
313 313
 
314 314
                 //tvs
315 315
                 if ($modx->hasPermission('edit_template') && $modx->hasPermission('edit_snippet') && $modx->hasPermission('edit_chunk') && $modx->hasPermission('edit_plugin')) {
316
-                    $rs = $modx->db->select("id,name,locked", $modx->getFullTableName('site_tmplvars'), "`id` like '%" . $searchfields . "%' 
317
-					OR `name` like '%" . $searchfields . "%' 
318
-					OR `description` like '%" . $searchfields . "%' 
319
-					OR `type` like '%" . $searchfields . "%' 
320
-					OR `elements` like '%" . $searchfields . "%' 
321
-					OR `display` like '%" . $searchfields . "%' 
322
-					OR `display_params` like '%" . $searchfields . "%' 
323
-					OR `default_text` like '%" . $searchfields . "%'");
316
+                    $rs = $modx->db->select("id,name,locked", $modx->getFullTableName('site_tmplvars'), "`id` like '%".$searchfields."%' 
317
+					OR `name` like '%" . $searchfields."%' 
318
+					OR `description` like '%" . $searchfields."%' 
319
+					OR `type` like '%" . $searchfields."%' 
320
+					OR `elements` like '%" . $searchfields."%' 
321
+					OR `display` like '%" . $searchfields."%' 
322
+					OR `display_params` like '%" . $searchfields."%' 
323
+					OR `default_text` like '%" . $searchfields."%'");
324 324
                     $tvscounts = $modx->db->getRecordCount($rs);
325 325
                     if ($tvscounts > 0) {
326
-                        $output .= '<li><b><i class="fa fa-list-alt"></i> ' . $_lang["settings_templvars"] . ' (' . $tvscounts . ')</b></li>';
326
+                        $output .= '<li><b><i class="fa fa-list-alt"></i> '.$_lang["settings_templvars"].' ('.$tvscounts.')</b></li>';
327 327
                         while ($row = $modx->db->getRow($rs)) {
328
-                            $output .= '<li' . addClassForItemList($row['locked']) . '><a href="index.php?a=301&id=' . $row['id'] . '" id="tmplvars_' . $row['id'] . '" target="main">' . highlightingCoincidence($row['name'], $_REQUEST['searchfields']) . $_style['icons_external_link'] . '</a></li>';
328
+                            $output .= '<li'.addClassForItemList($row['locked']).'><a href="index.php?a=301&id='.$row['id'].'" id="tmplvars_'.$row['id'].'" target="main">'.highlightingCoincidence($row['name'], $_REQUEST['searchfields']).$_style['icons_external_link'].'</a></li>';
329 329
                         }
330 330
                     }
331 331
                 }
332 332
 
333 333
                 //Chunks
334 334
                 if ($modx->hasPermission('edit_chunk')) {
335
-                    $rs = $modx->db->select("id,name,locked,disabled", $modx->getFullTableName('site_htmlsnippets'), "`id` like '%" . $searchfields . "%' 
336
-					OR `name` like '%" . $searchfields . "%' 
337
-					OR `description` like '%" . $searchfields . "%'     
338
-					OR `snippet` like '%" . $searchfields . "%'");
335
+                    $rs = $modx->db->select("id,name,locked,disabled", $modx->getFullTableName('site_htmlsnippets'), "`id` like '%".$searchfields."%' 
336
+					OR `name` like '%" . $searchfields."%' 
337
+					OR `description` like '%" . $searchfields."%'     
338
+					OR `snippet` like '%" . $searchfields."%'");
339 339
                     $chunkscounts = $modx->db->getRecordCount($rs);
340 340
                     if ($chunkscounts > 0) {
341
-                        $output .= '<li><b><i class="fa fa-th-large"></i> ' . $_lang["manage_htmlsnippets"] . ' (' . $chunkscounts . ')</b></li>';
341
+                        $output .= '<li><b><i class="fa fa-th-large"></i> '.$_lang["manage_htmlsnippets"].' ('.$chunkscounts.')</b></li>';
342 342
                         while ($row = $modx->db->getRow($rs)) {
343
-                            $output .= '<li' . addClassForItemList($row['locked'], $row['disabled']) . '><a href="index.php?a=78&id=' . $row['id'] . '" id="htmlsnippets_' . $row['id'] . '" target="main">' . highlightingCoincidence($row['name'], $_REQUEST['searchfields']) . $_style['icons_external_link'] . '</a></li>';
343
+                            $output .= '<li'.addClassForItemList($row['locked'], $row['disabled']).'><a href="index.php?a=78&id='.$row['id'].'" id="htmlsnippets_'.$row['id'].'" target="main">'.highlightingCoincidence($row['name'], $_REQUEST['searchfields']).$_style['icons_external_link'].'</a></li>';
344 344
                         }
345 345
                     }
346 346
                 }
347 347
 
348 348
                 //Snippets
349 349
                 if ($modx->hasPermission('edit_snippet')) {
350
-                    $rs = $modx->db->select("id,name,locked,disabled", $modx->getFullTableName('site_snippets'), "`id` like '%" . $searchfields . "%' 
351
-					OR `name` like '%" . $searchfields . "%' 
352
-					OR `description` like '%" . $searchfields . "%' 
353
-					OR `snippet` like '%" . $searchfields . "%'  
354
-					OR `properties` like '%" . $searchfields . "%'      
355
-					OR `moduleguid` like '%" . $searchfields . "%'");
350
+                    $rs = $modx->db->select("id,name,locked,disabled", $modx->getFullTableName('site_snippets'), "`id` like '%".$searchfields."%' 
351
+					OR `name` like '%" . $searchfields."%' 
352
+					OR `description` like '%" . $searchfields."%' 
353
+					OR `snippet` like '%" . $searchfields."%'  
354
+					OR `properties` like '%" . $searchfields."%'      
355
+					OR `moduleguid` like '%" . $searchfields."%'");
356 356
                     $snippetscounts = $modx->db->getRecordCount($rs);
357 357
                     if ($snippetscounts > 0) {
358
-                        $output .= '<li><b><i class="fa fa-code"></i> ' . $_lang["manage_snippets"] . ' (' . $snippetscounts . ')</b></li>';
358
+                        $output .= '<li><b><i class="fa fa-code"></i> '.$_lang["manage_snippets"].' ('.$snippetscounts.')</b></li>';
359 359
                         while ($row = $modx->db->getRow($rs)) {
360
-                            $output .= '<li' . addClassForItemList($row['locked'], $row['disabled']) . '><a href="index.php?a=22&id=' . $row['id'] . '" id="snippets_' . $row['id'] . '" target="main">' . highlightingCoincidence($row['name'], $_REQUEST['searchfields']) . $_style['icons_external_link'] . '</a></li>';
360
+                            $output .= '<li'.addClassForItemList($row['locked'], $row['disabled']).'><a href="index.php?a=22&id='.$row['id'].'" id="snippets_'.$row['id'].'" target="main">'.highlightingCoincidence($row['name'], $_REQUEST['searchfields']).$_style['icons_external_link'].'</a></li>';
361 361
                         }
362 362
                     }
363 363
                 }
364 364
 
365 365
                 //plugins
366 366
                 if ($modx->hasPermission('edit_plugin')) {
367
-                    $rs = $modx->db->select("id,name,locked,disabled", $modx->getFullTableName('site_plugins'), "`id` like '%" . $searchfields . "%' 
368
-					OR `name` like '%" . $searchfields . "%' 
369
-					OR `description` like '%" . $searchfields . "%' 
370
-					OR `plugincode` like '%" . $searchfields . "%'  
371
-					OR `properties` like '%" . $searchfields . "%'      
372
-					OR `moduleguid` like '%" . $searchfields . "%'");
367
+                    $rs = $modx->db->select("id,name,locked,disabled", $modx->getFullTableName('site_plugins'), "`id` like '%".$searchfields."%' 
368
+					OR `name` like '%" . $searchfields."%' 
369
+					OR `description` like '%" . $searchfields."%' 
370
+					OR `plugincode` like '%" . $searchfields."%'  
371
+					OR `properties` like '%" . $searchfields."%'      
372
+					OR `moduleguid` like '%" . $searchfields."%'");
373 373
                     $pluginscounts = $modx->db->getRecordCount($rs);
374 374
                     if ($pluginscounts > 0) {
375
-                        $output .= '<li><b><i class="fa fa-plug"></i> ' . $_lang["manage_plugins"] . ' (' . $pluginscounts . ')</b></li>';
375
+                        $output .= '<li><b><i class="fa fa-plug"></i> '.$_lang["manage_plugins"].' ('.$pluginscounts.')</b></li>';
376 376
                         while ($row = $modx->db->getRow($rs)) {
377
-                            $output .= '<li' . addClassForItemList($row['locked'], $row['disabled']) . '><a href="index.php?a=102&id=' . $row['id'] . '" id="plugins_' . $row['id'] . '" target="main">' . highlightingCoincidence($row['name'], $_REQUEST['searchfields']) . $_style['icons_external_link'] . '</a></li>';
377
+                            $output .= '<li'.addClassForItemList($row['locked'], $row['disabled']).'><a href="index.php?a=102&id='.$row['id'].'" id="plugins_'.$row['id'].'" target="main">'.highlightingCoincidence($row['name'], $_REQUEST['searchfields']).$_style['icons_external_link'].'</a></li>';
378 378
                         }
379 379
                     }
380 380
                 }
381 381
 
382 382
                 //modules
383 383
                 if ($modx->hasPermission('edit_module')) {
384
-                    $rs = $modx->db->select("id,name,locked,disabled", $modx->getFullTableName('site_modules'), "`id` like '%" . $searchfields . "%' 
385
-                    OR `name` like '%" . $searchfields . "%' 
386
-                    OR `description` like '%" . $searchfields . "%' 
387
-                    OR `modulecode` like '%" . $searchfields . "%'  
388
-                    OR `properties` like '%" . $searchfields . "%'  
389
-                    OR `guid` like '%" . $searchfields . "%'      
390
-                    OR `resourcefile` like '%" . $searchfields . "%'");
384
+                    $rs = $modx->db->select("id,name,locked,disabled", $modx->getFullTableName('site_modules'), "`id` like '%".$searchfields."%' 
385
+                    OR `name` like '%" . $searchfields."%' 
386
+                    OR `description` like '%" . $searchfields."%' 
387
+                    OR `modulecode` like '%" . $searchfields."%'  
388
+                    OR `properties` like '%" . $searchfields."%'  
389
+                    OR `guid` like '%" . $searchfields."%'      
390
+                    OR `resourcefile` like '%" . $searchfields."%'");
391 391
                     $modulescounts = $modx->db->getRecordCount($rs);
392 392
                     if ($modulescounts > 0) {
393
-                        $output .= '<li><b><i class="fa fa-cogs"></i> ' . $_lang["modules"] . ' (' . $modulescounts . ')</b></li>';
393
+                        $output .= '<li><b><i class="fa fa-cogs"></i> '.$_lang["modules"].' ('.$modulescounts.')</b></li>';
394 394
                         while ($row = $modx->db->getRow($rs)) {
395
-                            $output .= '<li' . addClassForItemList($row['locked'], $row['disabled']) . '><a href="index.php?a=108&id=' . $row['id'] . '" id="modules_' . $row['id'] . '" target="main">' . highlightingCoincidence($row['name'], $_REQUEST['searchfields']) . $_style['icons_external_link'] . '</a></li>';
395
+                            $output .= '<li'.addClassForItemList($row['locked'], $row['disabled']).'><a href="index.php?a=108&id='.$row['id'].'" id="modules_'.$row['id'].'" target="main">'.highlightingCoincidence($row['name'], $_REQUEST['searchfields']).$_style['icons_external_link'].'</a></li>';
396 396
                         }
397 397
                     }
398 398
                 }
399 399
 
400
-                echo $output ? '<div class="ajaxSearchResults"><ul>' . $output . '</ul></div>' : '1';
400
+                echo $output ? '<div class="ajaxSearchResults"><ul>'.$output.'</ul></div>' : '1';
401 401
             } ?>
402 402
         </div>
403 403
     </div>
@@ -411,13 +411,13 @@  discard block
 block discarded – undo
411 411
  */
412 412
 function highlightingCoincidence($text, $search)
413 413
 {
414
-    $regexp = '!(' . str_replace(array(
414
+    $regexp = '!('.str_replace(array(
415 415
             '(',
416 416
             ')'
417 417
         ), array(
418 418
             '\(',
419 419
             '\)'
420
-        ), trim($search)) . ')!isu';
420
+        ), trim($search)).')!isu';
421 421
     return preg_replace($regexp, '<span class="text-danger">$1</span>', $text);
422 422
 }
423 423
 
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
         $class .= ' deleted';
441 441
     }
442 442
     if ($class) {
443
-        $class = ' class="' . trim($class) . '"';
443
+        $class = ' class="'.trim($class).'"';
444 444
     }
445 445
     return $class;
446 446
 }
Please login to merge, or discard this patch.
manager/actions/resource_selector.static.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('edit_module')) {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
 }
65 65
 
66
-include_once MODX_MANAGER_PATH . "includes/header.inc.php";
66
+include_once MODX_MANAGER_PATH."includes/header.inc.php";
67 67
 ?>
68 68
 <script language="JavaScript" type="text/javascript">
69 69
     function saveSelection()
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 </script>
139 139
 
140 140
 <h1>
141
-    <?= $title . " - " . $_lang['element_selector_title'] ?><i class="fa fa-question-circle help"></i>
141
+    <?= $title." - ".$_lang['element_selector_title'] ?><i class="fa fa-question-circle help"></i>
142 142
 </h1>
143 143
 
144 144
 <div id="actions">
@@ -177,15 +177,15 @@  discard block
 block discarded – undo
177 177
             <div class="row">
178 178
                 <div class="table-responsive">
179 179
                     <?php
180
-                    include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
180
+                    include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php";
181 181
                     $grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items
182 182
                     $grd->noRecordMsg = $_lang["no_records_found"];
183 183
                     $grd->cssClass = "table data nowrap";
184 184
                     $grd->columnHeaderClass = "tableHeader";
185 185
                     $grd->itemClass = "tableItem";
186 186
                     $grd->altItemClass = "tableAltItem";
187
-                    $grd->columns = $_lang["name"] . " ," . $_lang["description"];
188
-                    $grd->colTypes = "template:<input type='" . ($sm == 'm' ? 'checkbox' : 'radio') . "' name='id[]' value='[+id+]' onclick='setCheckbox(this);'> [+value+]";
187
+                    $grd->columns = $_lang["name"]." ,".$_lang["description"];
188
+                    $grd->colTypes = "template:<input type='".($sm == 'm' ? 'checkbox' : 'radio')."' name='id[]' value='[+id+]' onclick='setCheckbox(this);'> [+value+]";
189 189
                     $grd->colWidths = "45%";
190 190
                     $grd->fields = "name,description";
191 191
                     if ($_REQUEST['listmode'] == '1') {
Please login to merge, or discard this patch.