@@ -63,7 +63,7 @@ discard block |
||
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 |
||
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 |
||
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') { |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
2 | +if (IN_MANAGER_MODE != "true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
3 | 3 | |
4 | -if(!$modx->hasPermission('category_manager')) { |
|
4 | +if (!$modx->hasPermission('category_manager')) { |
|
5 | 5 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
6 | 6 | } |
7 | 7 | |
@@ -13,32 +13,32 @@ discard block |
||
13 | 13 | 'native_language' => 'de', |
14 | 14 | 'name' => 'Categories Manager', |
15 | 15 | 'dirname' => $site_manager_url, |
16 | - 'url' => 'index.php?a=120&id=' . $_GET['id'], |
|
17 | - 'path' => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR, |
|
18 | - 'inc_dir' => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR, |
|
19 | - 'languages_dir' => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR, |
|
20 | - 'views_dir' => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'skin' . DIRECTORY_SEPARATOR, |
|
16 | + 'url' => 'index.php?a=120&id='.$_GET['id'], |
|
17 | + 'path' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR, |
|
18 | + 'inc_dir' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'inc'.DIRECTORY_SEPARATOR, |
|
19 | + 'languages_dir' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR, |
|
20 | + 'views_dir' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'skin'.DIRECTORY_SEPARATOR, |
|
21 | 21 | 'request_key' => 'module_categories_manager', |
22 | 22 | 'messages' => array() |
23 | 23 | ); |
24 | 24 | |
25 | -require_once $_module_params['inc_dir'] . 'Module_Categories_Manager.php'; |
|
25 | +require_once $_module_params['inc_dir'].'Module_Categories_Manager.php'; |
|
26 | 26 | $cm = new Module_Categories_Manager(); |
27 | 27 | |
28 | 28 | // assign module_params to internal params |
29 | -foreach( $_module_params as $param => $value ) |
|
29 | +foreach ($_module_params as $param => $value) |
|
30 | 30 | { |
31 | - $cm->set( $param, $value ); |
|
31 | + $cm->set($param, $value); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | // catch the request actions |
35 | -include_once $cm->get('inc_dir') . 'request_trigger.inc.php'; |
|
35 | +include_once $cm->get('inc_dir').'request_trigger.inc.php'; |
|
36 | 36 | |
37 | -if( !$categories = $cm->getCategories() ) |
|
37 | +if (!$categories = $cm->getCategories()) |
|
38 | 38 | { |
39 | - setcookie('webfxtab_manage-categories-pane', 0 ); |
|
40 | - $cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' ); |
|
39 | + setcookie('webfxtab_manage-categories-pane', 0); |
|
40 | + $cm->addMessage($cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global'); |
|
41 | 41 | } |
42 | 42 | |
43 | -$cm->renderView('main', $categories ); |
|
43 | +$cm->renderView('main', $categories); |
|
44 | 44 | return; |
45 | 45 | \ No newline at end of file |
@@ -1,17 +1,17 @@ discard block |
||
1 | 1 | <?php |
2 | -if(IN_MANAGER_MODE != "true") { |
|
2 | +if (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(); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | 'type7' => $_lang["lock_element_type_7"], |
29 | 29 | 'type8' => $_lang["lock_element_type_8"] |
30 | 30 | ); |
31 | -foreach($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
31 | +foreach ($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
32 | 32 | |
33 | 33 | // Prepare lang-strings for mgrResAction() |
34 | 34 | $mraTranslations = array( |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | 'confirm_delete_plugin' => $_lang["confirm_delete_plugin"], |
45 | 45 | 'confirm_delete_module' => $_lang["confirm_delete_module"], |
46 | 46 | ); |
47 | -foreach($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
47 | +foreach ($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
48 | 48 | ?> |
49 | 49 | <script>var trans = <?php echo json_encode($unlockTranslations); ?>;</script> |
50 | 50 | <script>var mraTrans = <?php echo json_encode($mraTranslations); ?>;</script> |
@@ -65,45 +65,45 @@ discard block |
||
65 | 65 | </script> |
66 | 66 | |
67 | 67 | <?php |
68 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php')) { |
|
69 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php'); |
|
68 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab1_templates.inc.php')) { |
|
69 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab1_templates.inc.php'); |
|
70 | 70 | } else { |
71 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab1_templates.inc.php'); |
|
71 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab1_templates.inc.php'); |
|
72 | 72 | } |
73 | 73 | |
74 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php')) { |
|
75 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php'); |
|
74 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab2_templatevars.inc.php')) { |
|
75 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab2_templatevars.inc.php'); |
|
76 | 76 | } else { |
77 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab2_templatevars.inc.php'); |
|
77 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab2_templatevars.inc.php'); |
|
78 | 78 | } |
79 | 79 | |
80 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php')) { |
|
81 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php'); |
|
80 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab3_chunks.inc.php')) { |
|
81 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab3_chunks.inc.php'); |
|
82 | 82 | } else { |
83 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab3_chunks.inc.php'); |
|
83 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab3_chunks.inc.php'); |
|
84 | 84 | } |
85 | 85 | |
86 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php')) { |
|
87 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php'); |
|
86 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab4_snippets.inc.php')) { |
|
87 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab4_snippets.inc.php'); |
|
88 | 88 | } else { |
89 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab4_snippets.inc.php'); |
|
89 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab4_snippets.inc.php'); |
|
90 | 90 | } |
91 | 91 | |
92 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php')) { |
|
93 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php'); |
|
92 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab5_plugins.inc.php')) { |
|
93 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab5_plugins.inc.php'); |
|
94 | 94 | } else { |
95 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab5_plugins.inc.php'); |
|
95 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab5_plugins.inc.php'); |
|
96 | 96 | } |
97 | 97 | |
98 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php')) { |
|
99 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php'); |
|
98 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab6_categoryview.inc.php')) { |
|
99 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab6_categoryview.inc.php'); |
|
100 | 100 | } else { |
101 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab6_categoryview.inc.php'); |
|
101 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab6_categoryview.inc.php'); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | |
105 | - if(is_numeric($_GET['tab'])) { |
|
106 | - echo '<script type="text/javascript"> tpResources.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; |
|
105 | + if (is_numeric($_GET['tab'])) { |
|
106 | + echo '<script type="text/javascript"> tpResources.setSelectedIndex( '.$_GET['tab'].' );</script>'; |
|
107 | 107 | } |
108 | 108 | ?> |
109 | 109 | </div> |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -if(IN_MANAGER_MODE != "true") { |
|
2 | +if (IN_MANAGER_MODE != "true") { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | -if(!$modx->hasPermission('view_eventlog')) { |
|
5 | +if (!$modx->hasPermission('view_eventlog')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | ?> |
@@ -17,9 +17,9 @@ discard block |
||
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 | - if($limit < 1) { |
|
22 | + if ($limit < 1) { |
|
23 | 23 | ?> |
24 | 24 | <p><?= $_lang["no_docs_pending_publishing"] ?></p> |
25 | 25 | <?php |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | </thead> |
37 | 37 | <tbody> |
38 | 38 | <?php |
39 | - while($row = $modx->db->getRow($rs)) { |
|
39 | + while ($row = $modx->db->getRow($rs)) { |
|
40 | 40 | ?> |
41 | 41 | <tr> |
42 | 42 | <td class="text-right"><?= $row['id'] ?></td> |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | <div class="form-group" id="lyr2"> |
57 | 57 | <b><?= $_lang["unpublish_events"] ?></b> |
58 | 58 | <?php |
59 | - $rs = $modx->db->select('id, pagetitle, unpub_date', $modx->getFullTableName('site_content'), "unpub_date > " . time() . "", 'unpub_date ASC'); |
|
59 | + $rs = $modx->db->select('id, pagetitle, unpub_date', $modx->getFullTableName('site_content'), "unpub_date > ".time()."", 'unpub_date ASC'); |
|
60 | 60 | $limit = $modx->db->getRecordCount($rs); |
61 | - if($limit < 1) { |
|
61 | + if ($limit < 1) { |
|
62 | 62 | ?> |
63 | 63 | <p><?= $_lang["no_docs_pending_unpublishing"] ?></p> |
64 | 64 | <?php |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | </thead> |
76 | 76 | <tbody> |
77 | 77 | <?php |
78 | - while($row = $modx->db->getRow($rs)) { |
|
78 | + while ($row = $modx->db->getRow($rs)) { |
|
79 | 79 | ?> |
80 | 80 | <tr> |
81 | 81 | <td class="text-right"><?= $row['id'] ?></td> |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | <?php |
98 | 98 | $rs = $modx->db->select('id, pagetitle, pub_date, unpub_date', $modx->getFullTableName('site_content'), "pub_date > 0 OR unpub_date > 0", "pub_date DESC"); |
99 | 99 | $limit = $modx->db->getRecordCount($rs); |
100 | - if($limit < 1) { |
|
100 | + if ($limit < 1) { |
|
101 | 101 | ?> |
102 | 102 | <p><?= $_lang["no_docs_pending_pubunpub"] ?></p> |
103 | 103 | <?php |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | </thead> |
116 | 116 | <tbody> |
117 | 117 | <?php |
118 | - while($row = $modx->db->getRow($rs)) { |
|
118 | + while ($row = $modx->db->getRow($rs)) { |
|
119 | 119 | ?> |
120 | 120 | <tr> |
121 | 121 | <td class="text-right"><?= $row['id'] ?></td> |
@@ -1,15 +1,15 @@ discard block |
||
1 | 1 | <?php |
2 | -if(IN_MANAGER_MODE != "true") { |
|
2 | +if (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 | -switch($modx->manager->action) { |
|
5 | +switch ($modx->manager->action) { |
|
6 | 6 | case 107: |
7 | - if(!$modx->hasPermission('new_module')) { |
|
7 | + if (!$modx->hasPermission('new_module')) { |
|
8 | 8 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
9 | 9 | } |
10 | 10 | break; |
11 | 11 | case 108: |
12 | - if(!$modx->hasPermission('edit_module')) { |
|
12 | + if (!$modx->hasPermission('edit_module')) { |
|
13 | 13 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
14 | 14 | } |
15 | 15 | break; |
@@ -29,16 +29,16 @@ discard block |
||
29 | 29 | $tbl_site_templates = $modx->getFullTableName('site_templates'); |
30 | 30 | $tbl_site_tmplvars = $modx->getFullTableName('site_tmplvars'); |
31 | 31 | // create globally unique identifiers (guid) |
32 | -function createGUID() { |
|
32 | +function createGUID(){ |
|
33 | 33 | srand((double) microtime() * 1000000); |
34 | 34 | $r = rand(); |
35 | - $u = uniqid(getmypid() . $r . (double) microtime() * 1000000, 1); |
|
35 | + $u = uniqid(getmypid().$r.(double) microtime() * 1000000, 1); |
|
36 | 36 | $m = md5($u); |
37 | 37 | return $m; |
38 | 38 | } |
39 | 39 | |
40 | 40 | // check to see the module editor isn't locked |
41 | -if($lockedEl = $modx->elementIsLocked(6, $id)) { |
|
41 | +if ($lockedEl = $modx->elementIsLocked(6, $id)) { |
|
42 | 42 | $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['module'])); |
43 | 43 | } |
44 | 44 | // end check for lock |
@@ -46,29 +46,29 @@ discard block |
||
46 | 46 | // Lock snippet for other users to edit |
47 | 47 | $modx->lockElement(6, $id); |
48 | 48 | |
49 | -if(isset($_GET['id'])) { |
|
49 | +if (isset($_GET['id'])) { |
|
50 | 50 | $rs = $modx->db->select('*', $tbl_site_modules, "id='{$id}'"); |
51 | 51 | $content = $modx->db->getRow($rs); |
52 | - if(!$content) { |
|
52 | + if (!$content) { |
|
53 | 53 | $modx->webAlertAndQuit("Module not found for id '{$id}'."); |
54 | 54 | } |
55 | 55 | $content['properties'] = str_replace("&", "&", $content['properties']); |
56 | 56 | $_SESSION['itemname'] = $content['name']; |
57 | - if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) { |
|
57 | + if ($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) { |
|
58 | 58 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
59 | 59 | } |
60 | 60 | } else { |
61 | 61 | $_SESSION['itemname'] = $_lang["new_module"]; |
62 | 62 | $content['wrap'] = '1'; |
63 | 63 | } |
64 | -if($modx->manager->hasFormValues()) { |
|
64 | +if ($modx->manager->hasFormValues()) { |
|
65 | 65 | $modx->manager->loadFormValues(); |
66 | 66 | } |
67 | 67 | |
68 | 68 | // Add lock-element JS-Script |
69 | 69 | $lockElementId = $id; |
70 | 70 | $lockElementType = 6; |
71 | -require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php'); |
|
71 | +require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php'); |
|
72 | 72 | ?> |
73 | 73 | <script type="text/javascript"> |
74 | 74 | function loadDependencies() { |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | function BrowseServer() { |
416 | 416 | var w = screen.width * 0.7; |
417 | 417 | var h = screen.height * 0.7; |
418 | - OpenServerBrowser("<?= MODX_MANAGER_URL;?>media/browser/<?= $which_browser;?>/browser.php?Type=images", w, h); |
|
418 | + OpenServerBrowser("<?= MODX_MANAGER_URL; ?>media/browser/<?= $which_browser; ?>/browser.php?Type=images", w, h); |
|
419 | 419 | } |
420 | 420 | |
421 | 421 | function SetUrl(url, width, height, alt) { |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | <?php |
436 | 436 | // invoke OnModFormPrerender event |
437 | 437 | $evtOut = $modx->invokeEvent('OnModFormPrerender', array('id' => $id)); |
438 | - if(is_array($evtOut)) { |
|
438 | + if (is_array($evtOut)) { |
|
439 | 439 | echo implode('', $evtOut); |
440 | 440 | } |
441 | 441 | |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | <input type="hidden" name="mode" value="<?= $modx->manager->action ?>"> |
450 | 450 | |
451 | 451 | <h1> |
452 | - <i class="<?= ($content['icon'] != '' ? $content['icon'] : $_style['icons_module']) ?>"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_module']) ?><i class="fa fa-question-circle help"></i> |
|
452 | + <i class="<?= ($content['icon'] != '' ? $content['icon'] : $_style['icons_module']) ?>"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_module']) ?><i class="fa fa-question-circle help"></i> |
|
453 | 453 | </h1> |
454 | 454 | |
455 | 455 | <?= $_style['actionbuttons']['dynamic']['element'] ?> |
@@ -474,8 +474,8 @@ discard block |
||
474 | 474 | <div class="col-md-9 col-lg-10"> |
475 | 475 | <div class="form-control-name clearfix"> |
476 | 476 | <input name="name" type="text" maxlength="100" value="<?= $modx->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" /> |
477 | - <?php if($modx->hasPermission('save_role')): ?> |
|
478 | - <label class="custom-control" title="<?= $_lang['lock_module'] . "\n" . $_lang['lock_module_msg'] ?>" tooltip> |
|
477 | + <?php if ($modx->hasPermission('save_role')): ?> |
|
478 | + <label class="custom-control" title="<?= $_lang['lock_module']."\n".$_lang['lock_module_msg'] ?>" tooltip> |
|
479 | 479 | <input name="locked" type="checkbox"<?= ($content['locked'] == 1 ? ' checked="checked"' : '') ?> /> |
480 | 480 | <i class="fa fa-lock"></i> |
481 | 481 | </label> |
@@ -497,9 +497,9 @@ discard block |
||
497 | 497 | <select name="categoryid" class="form-control" onchange="documentDirty=true;"> |
498 | 498 | <option> </option> |
499 | 499 | <?php |
500 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
501 | - foreach(getCategories() as $n => $v) { |
|
502 | - echo "\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v['category']) . "</option>\n"; |
|
500 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
501 | + foreach (getCategories() as $n => $v) { |
|
502 | + echo "\t\t\t".'<option value="'.$v['id'].'"'.($content['category'] == $v['id'] ? ' selected="selected"' : '').'>'.$modx->htmlspecialchars($v['category'])."</option>\n"; |
|
503 | 503 | } |
504 | 504 | ?> |
505 | 505 | </select> |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | <div class="form-group"> |
532 | 532 | <div class="form-row"> |
533 | 533 | <label for="disabled"><input name="disabled" id="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> |
534 | - <?= ($content['disabled'] == 1 ? '<span class="text-danger">' . $_lang['module_disabled'] . '</span>' : $_lang['module_disabled']) ?></label> |
|
534 | + <?= ($content['disabled'] == 1 ? '<span class="text-danger">'.$_lang['module_disabled'].'</span>' : $_lang['module_disabled']) ?></label> |
|
535 | 535 | </div> |
536 | 536 | <div class="form-row"> |
537 | 537 | <label for="parse_docblock"> |
@@ -596,7 +596,7 @@ discard block |
||
596 | 596 | </div> |
597 | 597 | <!-- HTML text editor end --> |
598 | 598 | </div> |
599 | - <?php if($modx->manager->action == '108'): ?> |
|
599 | + <?php if ($modx->manager->action == '108'): ?> |
|
600 | 600 | <!-- Dependencies --> |
601 | 601 | <div class="tab-page" id="tabDepend"> |
602 | 602 | <h2 class="tab"><?= $_lang['settings_dependencies'] ?></h2> |
@@ -624,14 +624,14 @@ discard block |
||
624 | 624 | LEFT JOIN {$tbl_site_templates} AS st ON st.id = smd.resource AND smd.type = 50 |
625 | 625 | LEFT JOIN {$tbl_site_tmplvars} AS sv ON sv.id = smd.resource AND smd.type = 60", "smd.module='{$id}'", 'smd.type,name'); |
626 | 626 | |
627 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
627 | + include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php"; |
|
628 | 628 | $grd = new DataGrid('', $ds, 0); // set page size to 0 t show all items |
629 | 629 | $grd->noRecordMsg = $_lang['no_records_found']; |
630 | 630 | $grd->cssClass = 'grid'; |
631 | 631 | $grd->columnHeaderClass = 'gridHeader'; |
632 | 632 | $grd->itemClass = 'gridItem'; |
633 | 633 | $grd->altItemClass = 'gridAltItem'; |
634 | - $grd->columns = $_lang['element_name'] . " ," . $_lang['type']; |
|
634 | + $grd->columns = $_lang['element_name']." ,".$_lang['type']; |
|
635 | 635 | $grd->fields = "name,type"; |
636 | 636 | echo $grd->render(); |
637 | 637 | ?> |
@@ -644,13 +644,13 @@ discard block |
||
644 | 644 | <h2 class="tab"><?= $_lang['access_permissions'] ?></h2> |
645 | 645 | <script type="text/javascript">tp.addTabPage(document.getElementById("tabPermissions"));</script> |
646 | 646 | <div class="container container-body"> |
647 | - <?php if($use_udperms == 1) : ?> |
|
647 | + <?php if ($use_udperms == 1) : ?> |
|
648 | 648 | <?php |
649 | 649 | // fetch user access permissions for the module |
650 | 650 | $rs = $modx->db->select('usergroup', $tbl_site_module_access, "module='{$id}'"); |
651 | 651 | $groupsarray = $modx->db->getColumn('usergroup', $rs); |
652 | 652 | |
653 | - if($modx->hasPermission('access_permissions')) { |
|
653 | + if ($modx->hasPermission('access_permissions')) { |
|
654 | 654 | ?> |
655 | 655 | <!-- User Group Access Permissions --> |
656 | 656 | <script type="text/javascript"> |
@@ -678,22 +678,22 @@ discard block |
||
678 | 678 | } |
679 | 679 | $chk = ''; |
680 | 680 | $rs = $modx->db->select('name, id', $tbl_membergroup_names, '', 'name'); |
681 | - while($row = $modx->db->getRow($rs)) { |
|
681 | + while ($row = $modx->db->getRow($rs)) { |
|
682 | 682 | $groupsarray = is_numeric($id) && $id > 0 ? $groupsarray : array(); |
683 | 683 | $checked = in_array($row['id'], $groupsarray); |
684 | - if($modx->hasPermission('access_permissions')) { |
|
685 | - if($checked) { |
|
684 | + if ($modx->hasPermission('access_permissions')) { |
|
685 | + if ($checked) { |
|
686 | 686 | $notPublic = true; |
687 | 687 | } |
688 | - $chks .= '<label><input type="checkbox" name="usrgroups[]" value="' . $row['id'] . '"' . ($checked ? ' checked="checked"' : '') . ' onclick="makePublic(false)" /> ' . $row['name'] . "</label><br />\n"; |
|
688 | + $chks .= '<label><input type="checkbox" name="usrgroups[]" value="'.$row['id'].'"'.($checked ? ' checked="checked"' : '').' onclick="makePublic(false)" /> '.$row['name']."</label><br />\n"; |
|
689 | 689 | } else { |
690 | - if($checked) { |
|
691 | - $chks = '<input type="hidden" name="usrgroups[]" value="' . $row['id'] . '" />' . "\n" . $chks; |
|
690 | + if ($checked) { |
|
691 | + $chks = '<input type="hidden" name="usrgroups[]" value="'.$row['id'].'" />'."\n".$chks; |
|
692 | 692 | } |
693 | 693 | } |
694 | 694 | } |
695 | - if($modx->hasPermission('access_permissions')) { |
|
696 | - $chks = '<label><input type="checkbox" name="chkallgroups"' . (!$notPublic ? ' checked="checked"' : '') . ' onclick="makePublic(true)" /><span class="warning"> ' . $_lang['all_usr_groups'] . '</span></label><br />' . "\n" . $chks; |
|
695 | + if ($modx->hasPermission('access_permissions')) { |
|
696 | + $chks = '<label><input type="checkbox" name="chkallgroups"'.(!$notPublic ? ' checked="checked"' : '').' onclick="makePublic(true)" /><span class="warning"> '.$_lang['all_usr_groups'].'</span></label><br />'."\n".$chks; |
|
697 | 697 | } |
698 | 698 | echo $chks; |
699 | 699 | ?> |
@@ -714,7 +714,7 @@ discard block |
||
714 | 714 | <?php |
715 | 715 | // invoke OnModFormRender event |
716 | 716 | $evtOut = $modx->invokeEvent('OnModFormRender', array('id' => $id)); |
717 | - if(is_array($evtOut)) { |
|
717 | + if (is_array($evtOut)) { |
|
718 | 718 | echo implode('', $evtOut); |
719 | 719 | } |
720 | 720 | ?> |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -if(IN_MANAGER_MODE != "true") { |
|
2 | +if (IN_MANAGER_MODE != "true") { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | -if(!$modx->hasPermission('edit_web_user')) { |
|
5 | +if (!$modx->hasPermission('edit_web_user')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | $modx->manager->initPageViewState(); |
11 | 11 | |
12 | 12 | // get and save search string |
13 | -if($_REQUEST['op'] == 'reset') { |
|
13 | +if ($_REQUEST['op'] == 'reset') { |
|
14 | 14 | $query = ''; |
15 | 15 | $_PAGE['vs']['search'] = ''; |
16 | 16 | } else { |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | |
27 | 27 | // context menu |
28 | -include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php"; |
|
28 | +include_once MODX_MANAGER_PATH."includes/controls/contextmenu.php"; |
|
29 | 29 | $cm = new ContextMenu("cntxm", 150); |
30 | 30 | $cm->addItem($_lang["edit"], "js:menuAction(1)", $_style["actions_edit"], (!$modx->hasPermission('edit_user') ? 1 : 0)); |
31 | 31 | $cm->addItem($_lang["delete"], "js:menuAction(2)", $_style["actions_delete"], (!$modx->hasPermission('delete_user') ? 1 : 0)); |
@@ -120,9 +120,9 @@ discard block |
||
120 | 120 | <div class="row"> |
121 | 121 | <div class="table-responsive"> |
122 | 122 | <?php |
123 | - $ds = $modx->db->select("wu.id, wu.username, wua.fullname, wua.email, ELT(wua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(wua.blocked,'{$_lang['yes']}','-') as 'blocked'", $modx->getFullTableName("web_users") . " wu |
|
124 | - INNER JOIN " . $modx->getFullTableName("web_user_attributes") . " wua ON wua.internalKey=wu.id", ($sqlQuery ? "(wu.username LIKE '{$sqlQuery}%') OR (wua.fullname LIKE '%{$sqlQuery}%') OR (wua.email LIKE '%{$sqlQuery}%')" : ""), 'username'); |
|
125 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
123 | + $ds = $modx->db->select("wu.id, wu.username, wua.fullname, wua.email, ELT(wua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(wua.blocked,'{$_lang['yes']}','-') as 'blocked'", $modx->getFullTableName("web_users")." wu |
|
124 | + INNER JOIN " . $modx->getFullTableName("web_user_attributes")." wua ON wua.internalKey=wu.id", ($sqlQuery ? "(wu.username LIKE '{$sqlQuery}%') OR (wua.fullname LIKE '%{$sqlQuery}%') OR (wua.email LIKE '%{$sqlQuery}%')" : ""), 'username'); |
|
125 | + include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php"; |
|
126 | 126 | $grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items |
127 | 127 | $grd->noRecordMsg = $_lang["no_records_found"]; |
128 | 128 | $grd->cssClass = "table data"; |
@@ -130,14 +130,14 @@ discard block |
||
130 | 130 | $grd->itemClass = "tableItem"; |
131 | 131 | $grd->altItemClass = "tableAltItem"; |
132 | 132 | $grd->fields = "id,username,fullname,email,gender,blocked"; |
133 | - $grd->columns = $_lang["icon"] . " ," . $_lang["name"] . " ," . $_lang["user_full_name"] . " ," . $_lang["email"] . " ," . $_lang["user_gender"] . " ," . $_lang["user_block"]; |
|
133 | + $grd->columns = $_lang["icon"]." ,".$_lang["name"]." ,".$_lang["user_full_name"]." ,".$_lang["email"]." ,".$_lang["user_gender"]." ,".$_lang["user_block"]; |
|
134 | 134 | $grd->colWidths = "1%,,,,1%,1%"; |
135 | 135 | $grd->colAligns = "center,,,,center,right' nowrap='nowrap"; |
136 | - $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang["click_to_context"] . "'><i class='" . $_style["icons_user"] . "'></i></a>||template:<a href='index.php?a=88&id=[+id+]' title='" . $_lang["click_to_edit_title"] . "'>[+value+]</a>"; |
|
137 | - if($listmode == '1') { |
|
136 | + $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='".$_lang["click_to_context"]."'><i class='".$_style["icons_user"]."'></i></a>||template:<a href='index.php?a=88&id=[+id+]' title='".$_lang["click_to_edit_title"]."'>[+value+]</a>"; |
|
137 | + if ($listmode == '1') { |
|
138 | 138 | $grd->pageSize = 0; |
139 | 139 | } |
140 | - if($_REQUEST['op'] == 'reset') { |
|
140 | + if ($_REQUEST['op'] == 'reset') { |
|
141 | 141 | $grd->pageNumber = 1; |
142 | 142 | } |
143 | 143 | // render grid |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | // Add lock-element JS-Script |
57 | 57 | $lockElementId = $id; |
58 | 58 | $lockElementType = 5; |
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 | function bold($cond = false) |
62 | 62 | { |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | <input type="hidden" name="mode" value="<?= $modx->manager->action ?>"> |
479 | 479 | |
480 | 480 | <h1> |
481 | - <i class="fa fa-plug"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_plugin']) ?><i class="fa fa-question-circle help"></i> |
|
481 | + <i class="fa fa-plug"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_plugin']) ?><i class="fa fa-question-circle help"></i> |
|
482 | 482 | </h1> |
483 | 483 | |
484 | 484 | <?= $_style['actionbuttons']['dynamic']['element'] ?> |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | <div class="form-control-name clearfix"> |
505 | 505 | <input name="name" type="text" maxlength="100" value="<?= $modx->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" /> |
506 | 506 | <?php if ($modx->hasPermission('save_role')): ?> |
507 | - <label class="custom-control" title="<?= $_lang['lock_plugin'] . "\n" . $_lang['lock_plugin_msg'] ?>" tooltip> |
|
507 | + <label class="custom-control" title="<?= $_lang['lock_plugin']."\n".$_lang['lock_plugin_msg'] ?>" tooltip> |
|
508 | 508 | <input name="locked" type="checkbox" value="on"<?= ($content['locked'] == 1 ? ' checked="checked"' : '') ?> /> |
509 | 509 | <i class="fa fa-lock"></i> |
510 | 510 | </label> |
@@ -528,9 +528,9 @@ discard block |
||
528 | 528 | <select name="categoryid" class="form-control" onchange="documentDirty=true;"> |
529 | 529 | <option> </option> |
530 | 530 | <?php |
531 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
531 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
532 | 532 | foreach (getCategories() as $n => $v) { |
533 | - echo '<option value="' . $v['id'] . '"' . ($content["category"] == $v["id"] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v["category"]) . "</option>"; |
|
533 | + echo '<option value="'.$v['id'].'"'.($content["category"] == $v["id"] ? ' selected="selected"' : '').'>'.$modx->htmlspecialchars($v["category"])."</option>"; |
|
534 | 534 | } |
535 | 535 | ?> |
536 | 536 | </select> |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | <?php if ($modx->hasPermission('save_role')): ?> |
547 | 547 | <div class="form-group"> |
548 | 548 | <div class="form-row"> |
549 | - <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>" . $_lang['plugin_disabled'] . "</span>" : $_lang['plugin_disabled']) ?></label> |
|
549 | + <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>".$_lang['plugin_disabled']."</span>" : $_lang['plugin_disabled']) ?></label> |
|
550 | 550 | </div> |
551 | 551 | <div class="form-row"> |
552 | 552 | <label> |
@@ -593,11 +593,11 @@ discard block |
||
593 | 593 | <select name="moduleguid" class="form-control" onchange="documentDirty=true;"> |
594 | 594 | <option> </option> |
595 | 595 | <?php |
596 | - $ds = $modx->db->select('sm.id,sm.name,sm.guid', $modx->getFullTableName("site_modules") . " sm |
|
597 | - INNER JOIN " . $modx->getFullTableName("site_module_depobj") . " smd ON smd.module=sm.id AND smd.type=30 |
|
598 | - INNER JOIN " . $modx->getFullTableName("site_plugins") . " sp ON sp.id=smd.resource", "smd.resource='{$id}' AND sm.enable_sharedparams='1'", 'sm.name'); |
|
596 | + $ds = $modx->db->select('sm.id,sm.name,sm.guid', $modx->getFullTableName("site_modules")." sm |
|
597 | + INNER JOIN " . $modx->getFullTableName("site_module_depobj")." smd ON smd.module=sm.id AND smd.type=30 |
|
598 | + INNER JOIN " . $modx->getFullTableName("site_plugins")." sp ON sp.id=smd.resource", "smd.resource='{$id}' AND sm.enable_sharedparams='1'", 'sm.name'); |
|
599 | 599 | while ($row = $modx->db->getRow($ds)) { |
600 | - echo "<option value='" . $row['guid'] . "'" . ($content["moduleguid"] == $row["guid"] ? " selected='selected'" : "") . ">" . $modx->htmlspecialchars($row["name"]) . "</option>"; |
|
600 | + echo "<option value='".$row['guid']."'".($content["moduleguid"] == $row["guid"] ? " selected='selected'" : "").">".$modx->htmlspecialchars($row["name"])."</option>"; |
|
601 | 601 | } |
602 | 602 | ?> |
603 | 603 | </select> |
@@ -658,7 +658,7 @@ discard block |
||
658 | 658 | echoEventRows($evtnames); |
659 | 659 | } |
660 | 660 | echo '<hr class="clear">'; |
661 | - echo '<div class="form-group"><b>' . $services[$srv - 1] . '</b></div>'; |
|
661 | + echo '<div class="form-group"><b>'.$services[$srv - 1].'</b></div>'; |
|
662 | 662 | } |
663 | 663 | // display group name |
664 | 664 | if ($grp != $row['groupname']) { |
@@ -667,9 +667,9 @@ discard block |
||
667 | 667 | echoEventRows($evtnames); |
668 | 668 | } |
669 | 669 | echo '<hr class="clear">'; |
670 | - echo '<div class="form-group"><b>' . $row['groupname'] . '</b></div>'; |
|
670 | + echo '<div class="form-group"><b>'.$row['groupname'].'</b></div>'; |
|
671 | 671 | } |
672 | - $evtnames[] = '<input name="sysevents[]" id="' . $row['name'] . '" type="checkbox" ' . (in_array($row['id'], $evts) ? ' checked="checked" ' : '') . 'class="inputBox" value="' . $row['id'] . '" /> <label for="' . $row['name'] . '" ' . bold(in_array($row['id'], $evts)) . '> ' . $row['name'] . '</label>' . "\n"; |
|
672 | + $evtnames[] = '<input name="sysevents[]" id="'.$row['name'].'" type="checkbox" '.(in_array($row['id'], $evts) ? ' checked="checked" ' : '').'class="inputBox" value="'.$row['id'].'" /> <label for="'.$row['name'].'" '.bold(in_array($row['id'], $evts)).'> '.$row['name'].'</label>'."\n"; |
|
673 | 673 | if (count($evtnames) == 2) { |
674 | 674 | echoEventRows($evtnames); |
675 | 675 | } |
@@ -681,7 +681,7 @@ discard block |
||
681 | 681 | |
682 | 682 | function echoEventRows(&$evtnames) |
683 | 683 | { |
684 | - echo '<div class="row form-row"><div class="col-sm-6 col-md-4 col-lg-3">' . implode('</div><div class="col-sm-6 col-md-4 col-lg-3">', $evtnames) . '</div></div>'; |
|
684 | + echo '<div class="row form-row"><div class="col-sm-6 col-md-4 col-lg-3">'.implode('</div><div class="col-sm-6 col-md-4 col-lg-3">', $evtnames).'</div></div>'; |
|
685 | 685 | $evtnames = array(); |
686 | 686 | } |
687 | 687 |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $option[] = '<option value="">No selected</option>'; |
44 | 44 | $templateid = (isset($_REQUEST['templateid']) && $_REQUEST['templateid'] !== '') ? intval($_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"' : ''; |
@@ -100,12 +100,12 @@ discard block |
||
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,18 +118,18 @@ discard block |
||
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 | - foreach( $articul_id_array as $articul ) { |
|
125 | - $articul_id.=$articul['contentid']; |
|
126 | - if($i !== count($articul_id_array)){ |
|
127 | - $articul_id.=','; |
|
124 | + foreach ($articul_id_array as $articul) { |
|
125 | + $articul_id .= $articul['contentid']; |
|
126 | + if ($i !== count($articul_id_array)) { |
|
127 | + $articul_id .= ','; |
|
128 | 128 | } |
129 | 129 | $i++; |
130 | 130 | } |
131 | 131 | $articul_id_query = " OR sc.id IN ({$articul_id})"; |
132 | - }else{ |
|
132 | + } else { |
|
133 | 133 | $articul_id_query = ''; |
134 | 134 | } |
135 | 135 | /*end search by TV*/ |
@@ -137,7 +137,7 @@ discard block |
||
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 | } |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $sqladd .= " OR sc.introtext LIKE '%{$searchlongtitle}%'"; |
158 | 158 | $sqladd .= " OR sc.menutitle LIKE '%{$searchlongtitle}%'"; |
159 | 159 | $sqladd .= " OR sc.alias LIKE '%{$search_alias}%'"; |
160 | - $sqladd .= $articul_id_query;//search by TV |
|
160 | + $sqladd .= $articul_id_query; //search by TV |
|
161 | 161 | } |
162 | 162 | } else if ($idFromAlias) { |
163 | 163 | $sqladd .= " sc.id='{$idFromAlias}'"; |
@@ -180,8 +180,8 @@ discard block |
||
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 |
||
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; |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | if ($limit < 1) { |
211 | 211 | echo $_lang['search_empty']; |
212 | 212 | } else { |
213 | - printf('<p>' . $_lang['search_results_returned_msg'] . '</p>', $limit); |
|
213 | + printf('<p>'.$_lang['search_results_returned_msg'].'</p>', $limit); |
|
214 | 214 | ?> |
215 | 215 | <script type="text/javascript" src="media/script/tablesort.js"></script> |
216 | 216 | <table class="grid sortabletable sortable-onload-2 rowstyle-even" id="table-1"> |
@@ -270,14 +270,14 @@ discard block |
||
270 | 270 | if (function_exists('mb_strlen') && function_exists('mb_substr')) { |
271 | 271 | ?> |
272 | 272 | <td<?= $tdClass ?>> |
273 | - <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> |
|
273 | + <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> |
|
274 | 274 | </td> |
275 | - <td<?= $tdClass ?>><?= mb_strlen($row['description'], $modx_manager_charset) > 70 ? mb_substr($row['description'], 0, 70, $modx_manager_charset) . "..." : $row['description'] ?></td> |
|
275 | + <td<?= $tdClass ?>><?= mb_strlen($row['description'], $modx_manager_charset) > 70 ? mb_substr($row['description'], 0, 70, $modx_manager_charset)."..." : $row['description'] ?></td> |
|
276 | 276 | <?php |
277 | 277 | } else { |
278 | 278 | ?> |
279 | - <td<?= $tdClass ?>><?= strlen($row['pagetitle']) > 20 ? substr($row['pagetitle'], 0, 20) . '...' : $row['pagetitle'] ?></td> |
|
280 | - <td<?= $tdClass ?>><?= strlen($row['description']) > 35 ? substr($row['description'], 0, 35) . '...' : $row['description'] ?></td> |
|
279 | + <td<?= $tdClass ?>><?= strlen($row['pagetitle']) > 20 ? substr($row['pagetitle'], 0, 20).'...' : $row['pagetitle'] ?></td> |
|
280 | + <td<?= $tdClass ?>><?= strlen($row['description']) > 35 ? substr($row['description'], 0, 35).'...' : $row['description'] ?></td> |
|
281 | 281 | <?php |
282 | 282 | } |
283 | 283 | ?> |
@@ -297,115 +297,115 @@ discard block |
||
297 | 297 | if ($modx->hasPermission('new_document') && $modx->hasPermission('edit_document') && $modx->hasPermission('save_document')) { |
298 | 298 | $docscounts = $modx->db->getRecordCount($rs); |
299 | 299 | if ($docscounts > 0) { |
300 | - $output .= '<li><b><i class="fa fa-sitemap"></i> ' . $_lang["manage_documents"] . ' (' . $docscounts . ')</b></li>'; |
|
300 | + $output .= '<li><b><i class="fa fa-sitemap"></i> '.$_lang["manage_documents"].' ('.$docscounts.')</b></li>'; |
|
301 | 301 | while ($row = $modx->db->getRow($rs)) { |
302 | - $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>'; |
|
302 | + $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>'; |
|
303 | 303 | } |
304 | 304 | } |
305 | 305 | } |
306 | 306 | |
307 | 307 | //templates |
308 | 308 | if ($modx->hasPermission('edit_template')) { |
309 | - $rs = $modx->db->select("id,templatename,locked", $modx->getFullTableName('site_templates'), "`id` like '%" . $searchfields . "%' |
|
310 | - OR `templatename` like '%" . $searchfields . "%' |
|
311 | - OR `description` like '%" . $searchfields . "%' |
|
312 | - OR `content` like '%" . $searchfields . "%'"); |
|
309 | + $rs = $modx->db->select("id,templatename,locked", $modx->getFullTableName('site_templates'), "`id` like '%".$searchfields."%' |
|
310 | + OR `templatename` like '%" . $searchfields."%' |
|
311 | + OR `description` like '%" . $searchfields."%' |
|
312 | + OR `content` like '%" . $searchfields."%'"); |
|
313 | 313 | $templatecounts = $modx->db->getRecordCount($rs); |
314 | 314 | if ($templatecounts > 0) { |
315 | - $output .= '<li><b><i class="fa fa-newspaper-o"></i> ' . $_lang["manage_templates"] . ' (' . $templatecounts . ')</b></li>'; |
|
315 | + $output .= '<li><b><i class="fa fa-newspaper-o"></i> '.$_lang["manage_templates"].' ('.$templatecounts.')</b></li>'; |
|
316 | 316 | while ($row = $modx->db->getRow($rs)) { |
317 | - $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>'; |
|
317 | + $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>'; |
|
318 | 318 | } |
319 | 319 | } |
320 | 320 | } |
321 | 321 | |
322 | 322 | //tvs |
323 | 323 | if ($modx->hasPermission('edit_template') && $modx->hasPermission('edit_snippet') && $modx->hasPermission('edit_chunk') && $modx->hasPermission('edit_plugin')) { |
324 | - $rs = $modx->db->select("id,name,locked", $modx->getFullTableName('site_tmplvars'), "`id` like '%" . $searchfields . "%' |
|
325 | - OR `name` like '%" . $searchfields . "%' |
|
326 | - OR `description` like '%" . $searchfields . "%' |
|
327 | - OR `type` like '%" . $searchfields . "%' |
|
328 | - OR `elements` like '%" . $searchfields . "%' |
|
329 | - OR `display` like '%" . $searchfields . "%' |
|
330 | - OR `display_params` like '%" . $searchfields . "%' |
|
331 | - OR `default_text` like '%" . $searchfields . "%'"); |
|
324 | + $rs = $modx->db->select("id,name,locked", $modx->getFullTableName('site_tmplvars'), "`id` like '%".$searchfields."%' |
|
325 | + OR `name` like '%" . $searchfields."%' |
|
326 | + OR `description` like '%" . $searchfields."%' |
|
327 | + OR `type` like '%" . $searchfields."%' |
|
328 | + OR `elements` like '%" . $searchfields."%' |
|
329 | + OR `display` like '%" . $searchfields."%' |
|
330 | + OR `display_params` like '%" . $searchfields."%' |
|
331 | + OR `default_text` like '%" . $searchfields."%'"); |
|
332 | 332 | $tvscounts = $modx->db->getRecordCount($rs); |
333 | 333 | if ($tvscounts > 0) { |
334 | - $output .= '<li><b><i class="fa fa-list-alt"></i> ' . $_lang["settings_templvars"] . ' (' . $tvscounts . ')</b></li>'; |
|
334 | + $output .= '<li><b><i class="fa fa-list-alt"></i> '.$_lang["settings_templvars"].' ('.$tvscounts.')</b></li>'; |
|
335 | 335 | while ($row = $modx->db->getRow($rs)) { |
336 | - $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>'; |
|
336 | + $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>'; |
|
337 | 337 | } |
338 | 338 | } |
339 | 339 | } |
340 | 340 | |
341 | 341 | //Chunks |
342 | 342 | if ($modx->hasPermission('edit_chunk')) { |
343 | - $rs = $modx->db->select("id,name,locked,disabled", $modx->getFullTableName('site_htmlsnippets'), "`id` like '%" . $searchfields . "%' |
|
344 | - OR `name` like '%" . $searchfields . "%' |
|
345 | - OR `description` like '%" . $searchfields . "%' |
|
346 | - OR `snippet` like '%" . $searchfields . "%'"); |
|
343 | + $rs = $modx->db->select("id,name,locked,disabled", $modx->getFullTableName('site_htmlsnippets'), "`id` like '%".$searchfields."%' |
|
344 | + OR `name` like '%" . $searchfields."%' |
|
345 | + OR `description` like '%" . $searchfields."%' |
|
346 | + OR `snippet` like '%" . $searchfields."%'"); |
|
347 | 347 | $chunkscounts = $modx->db->getRecordCount($rs); |
348 | 348 | if ($chunkscounts > 0) { |
349 | - $output .= '<li><b><i class="fa fa-th-large"></i> ' . $_lang["manage_htmlsnippets"] . ' (' . $chunkscounts . ')</b></li>'; |
|
349 | + $output .= '<li><b><i class="fa fa-th-large"></i> '.$_lang["manage_htmlsnippets"].' ('.$chunkscounts.')</b></li>'; |
|
350 | 350 | while ($row = $modx->db->getRow($rs)) { |
351 | - $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>'; |
|
351 | + $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>'; |
|
352 | 352 | } |
353 | 353 | } |
354 | 354 | } |
355 | 355 | |
356 | 356 | //Snippets |
357 | 357 | if ($modx->hasPermission('edit_snippet')) { |
358 | - $rs = $modx->db->select("id,name,locked,disabled", $modx->getFullTableName('site_snippets'), "`id` like '%" . $searchfields . "%' |
|
359 | - OR `name` like '%" . $searchfields . "%' |
|
360 | - OR `description` like '%" . $searchfields . "%' |
|
361 | - OR `snippet` like '%" . $searchfields . "%' |
|
362 | - OR `properties` like '%" . $searchfields . "%' |
|
363 | - OR `moduleguid` like '%" . $searchfields . "%'"); |
|
358 | + $rs = $modx->db->select("id,name,locked,disabled", $modx->getFullTableName('site_snippets'), "`id` like '%".$searchfields."%' |
|
359 | + OR `name` like '%" . $searchfields."%' |
|
360 | + OR `description` like '%" . $searchfields."%' |
|
361 | + OR `snippet` like '%" . $searchfields."%' |
|
362 | + OR `properties` like '%" . $searchfields."%' |
|
363 | + OR `moduleguid` like '%" . $searchfields."%'"); |
|
364 | 364 | $snippetscounts = $modx->db->getRecordCount($rs); |
365 | 365 | if ($snippetscounts > 0) { |
366 | - $output .= '<li><b><i class="fa fa-code"></i> ' . $_lang["manage_snippets"] . ' (' . $snippetscounts . ')</b></li>'; |
|
366 | + $output .= '<li><b><i class="fa fa-code"></i> '.$_lang["manage_snippets"].' ('.$snippetscounts.')</b></li>'; |
|
367 | 367 | while ($row = $modx->db->getRow($rs)) { |
368 | - $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>'; |
|
368 | + $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>'; |
|
369 | 369 | } |
370 | 370 | } |
371 | 371 | } |
372 | 372 | |
373 | 373 | //plugins |
374 | 374 | if ($modx->hasPermission('edit_plugin')) { |
375 | - $rs = $modx->db->select("id,name,locked,disabled", $modx->getFullTableName('site_plugins'), "`id` like '%" . $searchfields . "%' |
|
376 | - OR `name` like '%" . $searchfields . "%' |
|
377 | - OR `description` like '%" . $searchfields . "%' |
|
378 | - OR `plugincode` like '%" . $searchfields . "%' |
|
379 | - OR `properties` like '%" . $searchfields . "%' |
|
380 | - OR `moduleguid` like '%" . $searchfields . "%'"); |
|
375 | + $rs = $modx->db->select("id,name,locked,disabled", $modx->getFullTableName('site_plugins'), "`id` like '%".$searchfields."%' |
|
376 | + OR `name` like '%" . $searchfields."%' |
|
377 | + OR `description` like '%" . $searchfields."%' |
|
378 | + OR `plugincode` like '%" . $searchfields."%' |
|
379 | + OR `properties` like '%" . $searchfields."%' |
|
380 | + OR `moduleguid` like '%" . $searchfields."%'"); |
|
381 | 381 | $pluginscounts = $modx->db->getRecordCount($rs); |
382 | 382 | if ($pluginscounts > 0) { |
383 | - $output .= '<li><b><i class="fa fa-plug"></i> ' . $_lang["manage_plugins"] . ' (' . $pluginscounts . ')</b></li>'; |
|
383 | + $output .= '<li><b><i class="fa fa-plug"></i> '.$_lang["manage_plugins"].' ('.$pluginscounts.')</b></li>'; |
|
384 | 384 | while ($row = $modx->db->getRow($rs)) { |
385 | - $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>'; |
|
385 | + $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>'; |
|
386 | 386 | } |
387 | 387 | } |
388 | 388 | } |
389 | 389 | |
390 | 390 | //modules |
391 | 391 | if ($modx->hasPermission('edit_module')) { |
392 | - $rs = $modx->db->select("id,name,locked,disabled", $modx->getFullTableName('site_modules'), "`id` like '%" . $searchfields . "%' |
|
393 | - OR `name` like '%" . $searchfields . "%' |
|
394 | - OR `description` like '%" . $searchfields . "%' |
|
395 | - OR `modulecode` like '%" . $searchfields . "%' |
|
396 | - OR `properties` like '%" . $searchfields . "%' |
|
397 | - OR `guid` like '%" . $searchfields . "%' |
|
398 | - OR `resourcefile` like '%" . $searchfields . "%'"); |
|
392 | + $rs = $modx->db->select("id,name,locked,disabled", $modx->getFullTableName('site_modules'), "`id` like '%".$searchfields."%' |
|
393 | + OR `name` like '%" . $searchfields."%' |
|
394 | + OR `description` like '%" . $searchfields."%' |
|
395 | + OR `modulecode` like '%" . $searchfields."%' |
|
396 | + OR `properties` like '%" . $searchfields."%' |
|
397 | + OR `guid` like '%" . $searchfields."%' |
|
398 | + OR `resourcefile` like '%" . $searchfields."%'"); |
|
399 | 399 | $modulescounts = $modx->db->getRecordCount($rs); |
400 | 400 | if ($modulescounts > 0) { |
401 | - $output .= '<li><b><i class="fa fa-cogs"></i> ' . $_lang["modules"] . ' (' . $modulescounts . ')</b></li>'; |
|
401 | + $output .= '<li><b><i class="fa fa-cogs"></i> '.$_lang["modules"].' ('.$modulescounts.')</b></li>'; |
|
402 | 402 | while ($row = $modx->db->getRow($rs)) { |
403 | - $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>'; |
|
403 | + $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>'; |
|
404 | 404 | } |
405 | 405 | } |
406 | 406 | } |
407 | 407 | |
408 | - echo $output ? '<div class="ajaxSearchResults"><ul>' . $output . '</ul></div>' : '1'; |
|
408 | + echo $output ? '<div class="ajaxSearchResults"><ul>'.$output.'</ul></div>' : '1'; |
|
409 | 409 | } |
410 | 410 | |
411 | 411 | ?> |
@@ -416,13 +416,13 @@ discard block |
||
416 | 416 | |
417 | 417 | function highlightingCoincidence($text, $search) |
418 | 418 | { |
419 | - $regexp = '!(' . str_replace(array( |
|
419 | + $regexp = '!('.str_replace(array( |
|
420 | 420 | '(', |
421 | 421 | ')' |
422 | 422 | ), array( |
423 | 423 | '\(', |
424 | 424 | '\)' |
425 | - ), trim($search)) . ')!isu'; |
|
425 | + ), trim($search)).')!isu'; |
|
426 | 426 | return preg_replace($regexp, '<span class="text-danger">$1</span>', $text); |
427 | 427 | } |
428 | 428 | |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | $class .= ' deleted'; |
440 | 440 | } |
441 | 441 | if ($class) { |
442 | - $class = ' class="' . trim($class) . '"'; |
|
442 | + $class = ' class="'.trim($class).'"'; |
|
443 | 443 | } |
444 | 444 | return $class; |
445 | 445 | } |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | $updateMsg = ''; |
12 | 12 | |
13 | 13 | if (isset($_POST['listSubmitted'])) { |
14 | - $updateMsg .= '<span class="text-success" id="updated">' . $_lang['sort_updated'] . '</span>'; |
|
14 | + $updateMsg .= '<span class="text-success" id="updated">'.$_lang['sort_updated'].'</span>'; |
|
15 | 15 | $tbl = $modx->getFullTableName('site_plugin_events'); |
16 | 16 | |
17 | 17 | foreach ($_POST as $listName => $listValue) { |
@@ -34,9 +34,9 @@ discard block |
||
34 | 34 | $modx->clearCache('full'); |
35 | 35 | } |
36 | 36 | |
37 | -$rs = $modx->db->select("sysevt.name as evtname, sysevt.id as evtid, pe.pluginid, plugs.name, pe.priority, plugs.disabled", $modx->getFullTableName('system_eventnames') . " sysevt |
|
38 | - INNER JOIN " . $modx->getFullTableName('site_plugin_events') . " pe ON pe.evtid = sysevt.id |
|
39 | - INNER JOIN " . $modx->getFullTableName('site_plugins') . " plugs ON plugs.id = pe.pluginid", '', 'sysevt.name,pe.priority'); |
|
37 | +$rs = $modx->db->select("sysevt.name as evtname, sysevt.id as evtid, pe.pluginid, plugs.name, pe.priority, plugs.disabled", $modx->getFullTableName('system_eventnames')." sysevt |
|
38 | + INNER JOIN " . $modx->getFullTableName('site_plugin_events')." pe ON pe.evtid = sysevt.id |
|
39 | + INNER JOIN " . $modx->getFullTableName('site_plugins')." plugs ON plugs.id = pe.pluginid", '', 'sysevt.name,pe.priority'); |
|
40 | 40 | |
41 | 41 | $insideUl = 0; |
42 | 42 | $preEvt = ''; |
@@ -47,17 +47,17 @@ discard block |
||
47 | 47 | if ($preEvt !== $plugins['evtid']) { |
48 | 48 | $sortables[] = $plugins['evtid']; |
49 | 49 | $sortableList .= $insideUl ? '</ul></div>' : ''; |
50 | - $sortableList .= '<div class="form-group clearfix"><strong>' . $plugins['evtname'] . '</strong><ul id="' . $plugins['evtid'] . '" class="sortableList">'; |
|
50 | + $sortableList .= '<div class="form-group clearfix"><strong>'.$plugins['evtname'].'</strong><ul id="'.$plugins['evtid'].'" class="sortableList">'; |
|
51 | 51 | $insideUl = 1; |
52 | 52 | } |
53 | - $sortableList .= '<li id="item_' . $plugins['pluginid'] . '"' . ($plugins['disabled'] ? ' class="disabledPlugin"' : '') . '><i class="fa fa-plug"></i> ' . $plugins['name'] . ($plugins['disabled'] ? ' (hide)' : '') . '</li>'; |
|
53 | + $sortableList .= '<li id="item_'.$plugins['pluginid'].'"'.($plugins['disabled'] ? ' class="disabledPlugin"' : '').'><i class="fa fa-plug"></i> '.$plugins['name'].($plugins['disabled'] ? ' (hide)' : '').'</li>'; |
|
54 | 54 | $preEvt = $plugins['evtid']; |
55 | 55 | } |
56 | 56 | if ($insideUl) { |
57 | 57 | $sortableList .= '</ul></div>'; |
58 | 58 | } |
59 | 59 | |
60 | -require_once(MODX_MANAGER_PATH . 'includes/header.inc.php'); |
|
60 | +require_once(MODX_MANAGER_PATH.'includes/header.inc.php'); |
|
61 | 61 | ?> |
62 | 62 | |
63 | 63 | <script type="text/javascript"> |