@@ -16,7 +16,8 @@ discard block |
||
16 | 16 | <span class="notok"><?=$_lang['setup_database_create_connection_failed']?></span> |
17 | 17 | </p> |
18 | 18 | <p><?=$_lang['setup_database_create_connection_failed_note']?></p> |
19 | -<?php else : ?> |
|
19 | +<?php else { |
|
20 | + : ?> |
|
20 | 21 | <p><?=$_lang['setup_database_create_connection']?> <span class="ok"><?=$_lang['ok']?></span></p> |
21 | 22 | <?php if ($selectDatabase === false) : ?> |
22 | 23 | <p><?=rtrim($_lang['setup_database_selection'], '`')?> <strong><?=trim($dbase, '`')?></strong>: |
@@ -41,13 +42,18 @@ discard block |
||
41 | 42 | <?=rtrim($_lang['setup_database_creation'], '`')?> <strong><?=trim($dbase, '`')?></strong>: |
42 | 43 | <span class="ok"><?=$_lang['ok']?></span> |
43 | 44 | </p> |
44 | - <?php endif; ?> |
|
45 | - <?php else : ?> |
|
45 | + <?php endif; |
|
46 | +} |
|
47 | +?> |
|
48 | + <?php else { |
|
49 | + : ?> |
|
46 | 50 | <p> |
47 | 51 | <?=rtrim($_lang['setup_database_selection'], '`')?> <strong><?=trim($dbase, '`')?></strong>: |
48 | 52 | <span class="ok"><?=$_lang['ok']?></span> |
49 | 53 | </p> |
50 | - <?php endif; ?> |
|
54 | + <?php endif; |
|
55 | +} |
|
56 | +?> |
|
51 | 57 | <?php endif; ?> |
52 | 58 | |
53 | 59 | <?php if ($installLevel >= 1) : ?> |
@@ -57,12 +63,15 @@ discard block |
||
57 | 63 | <span class="notok"><?=$_lang['failed']?></span> <?=$_lang['table_prefix_already_inuse']?> |
58 | 64 | </p> |
59 | 65 | <p><?=$_lang['table_prefix_already_inuse_note']?></p> |
60 | - <?php else : ?> |
|
66 | + <?php else { |
|
67 | + : ?> |
|
61 | 68 | <p> |
62 | 69 | <?=rtrim($_lang['checking_table_prefix'], '`')?> <strong><?=trim($table_prefix, '`')?></strong>: |
63 | 70 | <span class="ok"><?=$_lang['ok']?></span> |
64 | 71 | </p> |
65 | - <?php endif; ?> |
|
72 | + <?php endif; |
|
73 | +} |
|
74 | +?> |
|
66 | 75 | <?php endif; ?> |
67 | 76 | |
68 | 77 | <?php if ($installLevel >= 2 && $moduleSQLBaseFile) : ?> |
@@ -81,9 +90,12 @@ discard block |
||
81 | 90 | <hr /> |
82 | 91 | <?php endfor; ?> |
83 | 92 | <p><?=$_lang['some_tables_not_updated']?></p> |
84 | - <?php else : ?> |
|
93 | + <?php else { |
|
94 | + : ?> |
|
85 | 95 | <p><?=$_lang['setup_database_creating_tables']?> <span class="ok"><?=$_lang['ok']?></span></p> |
86 | - <?php endif; ?> |
|
96 | + <?php endif; |
|
97 | +} |
|
98 | +?> |
|
87 | 99 | <?php endif; ?> |
88 | 100 | |
89 | 101 | <?php if ($installLevel >= 3) : ?> |
@@ -94,11 +106,14 @@ discard block |
||
94 | 106 | <p><?=$_lang['cant_write_config_file']?> <span class="mono"><?=MGR_DIR?>/includes/config.inc.php</span></p> |
95 | 107 | <textarea style="width:400px; height:160px;"><?=$configString?></textarea> |
96 | 108 | <p><?=$_lang['cant_write_config_file_note']?></p> |
97 | - <?php else : ?> |
|
109 | + <?php else { |
|
110 | + : ?> |
|
98 | 111 | <p> |
99 | 112 | <?=$_lang['writing_config_file']?> <span class="ok"><?=$_lang['ok']?></span> |
100 | 113 | </p> |
101 | - <?php endif; ?> |
|
114 | + <?php endif; |
|
115 | +} |
|
116 | +?> |
|
102 | 117 | <?php endif; ?> |
103 | 118 | |
104 | 119 | <?php if ($installLevel >= 4 && $installData && $moduleSQLDataFile && $moduleSQLResetFile) : ?> |
@@ -117,12 +132,15 @@ discard block |
||
117 | 132 | <?php endfor; ?> |
118 | 133 | </p> |
119 | 134 | <p><?=$_lang['some_tables_not_updated']?></p> |
120 | - <?php else : ?> |
|
135 | + <?php else { |
|
136 | + : ?> |
|
121 | 137 | <p> |
122 | 138 | <?=$_lang['resetting_database']?> |
123 | 139 | <span class="ok"><?=$_lang['ok']?></span> |
124 | 140 | </p> |
125 | - <?php endif; ?> |
|
141 | + <?php endif; |
|
142 | +} |
|
143 | +?> |
|
126 | 144 | <?php endif; ?> |
127 | 145 | |
128 | 146 | <?php if ($installLevel >= 5) : ?> |
@@ -135,7 +153,8 @@ discard block |
||
135 | 153 | <?php elseif($itemData['type'] === 'update') : ?> |
136 | 154 | <p> ✓ <?=$itemName?>: <span class="ok"><?=$_lang['upgraded']?></span></p> |
137 | 155 | <?php endif; ?> |
138 | - <?php else : ?> |
|
156 | + <?php else { |
|
157 | + : ?> |
|
139 | 158 | <?php if ($itemData['error']['type'] === 'sql') : ?> |
140 | 159 | <p>❌ <?=$itemData['error']['content']?></p> |
141 | 160 | <?php elseif ($itemData['error']['type'] === 'file_not_found') : ?> |
@@ -145,7 +164,9 @@ discard block |
||
145 | 164 | <?=$_lang['not_found']?>. |
146 | 165 | </span> |
147 | 166 | </p> |
148 | - <?php endif; ?> |
|
167 | + <?php endif; |
|
168 | +} |
|
169 | +?> |
|
149 | 170 | <?php endif; ?> |
150 | 171 | <?php endforeach; ?> |
151 | 172 | <?php endif; ?> |
@@ -161,10 +182,13 @@ discard block |
||
161 | 182 | <?php elseif($itemData['type'] === 'skip') : ?> |
162 | 183 | <!-- SKIP --> |
163 | 184 | <?php endif; ?> |
164 | - <?php else : ?> |
|
185 | + <?php else { |
|
186 | + : ?> |
|
165 | 187 | <?php if ($itemData['error']['type'] === 'sql') : ?> |
166 | 188 | <p>❌ <?=$itemData['error']['content']?></p> |
167 | - <?php endif; ?> |
|
189 | + <?php endif; |
|
190 | +} |
|
191 | +?> |
|
168 | 192 | <?php endif; ?> |
169 | 193 | <?php endforeach; ?> |
170 | 194 | <?php endif; ?> |
@@ -182,7 +206,8 @@ discard block |
||
182 | 206 | <?php elseif($itemData['type'] === 'skip') : ?> |
183 | 207 | <!-- SKIP --> |
184 | 208 | <?php endif; ?> |
185 | - <?php else : ?> |
|
209 | + <?php else { |
|
210 | + : ?> |
|
186 | 211 | <?php if ($itemData['error']['type'] === 'sql') : ?> |
187 | 212 | <p>❌ <?=$itemData['error']['content']?></p> |
188 | 213 | <?php elseif ($itemData['error']['type'] === 'file_not_found') : ?> |
@@ -192,7 +217,9 @@ discard block |
||
192 | 217 | <?=$_lang['not_found']?>. |
193 | 218 | </span> |
194 | 219 | </p> |
195 | - <?php endif; ?> |
|
220 | + <?php endif; |
|
221 | +} |
|
222 | +?> |
|
196 | 223 | <?php endif; ?> |
197 | 224 | <?php endforeach; ?> |
198 | 225 | <?php endif; ?> |
@@ -208,7 +235,8 @@ discard block |
||
208 | 235 | <?php elseif($itemData['type'] === 'skip') : ?> |
209 | 236 | <!-- SKIP --> |
210 | 237 | <?php endif; ?> |
211 | - <?php else : ?> |
|
238 | + <?php else { |
|
239 | + : ?> |
|
212 | 240 | <?php if ($itemData['error']['type'] === 'sql') : ?> |
213 | 241 | <p>❌ <?=$itemData['error']['content']?></p> |
214 | 242 | <?php elseif ($itemData['error']['type'] === 'file_not_found') : ?> |
@@ -218,7 +246,9 @@ discard block |
||
218 | 246 | <?=$_lang['not_found']?>. |
219 | 247 | </span> |
220 | 248 | </p> |
221 | - <?php endif; ?> |
|
249 | + <?php endif; |
|
250 | +} |
|
251 | +?> |
|
222 | 252 | <?php endif; ?> |
223 | 253 | <?php endforeach; ?> |
224 | 254 | <?php endif; ?> |
@@ -234,7 +264,8 @@ discard block |
||
234 | 264 | <?php elseif($itemData['type'] === 'skip') : ?> |
235 | 265 | <!-- SKIP --> |
236 | 266 | <?php endif; ?> |
237 | - <?php else : ?> |
|
267 | + <?php else { |
|
268 | + : ?> |
|
238 | 269 | <?php if ($itemData['error']['type'] === 'sql') : ?> |
239 | 270 | <p>❌ <?=$itemData['error']['content']?></p> |
240 | 271 | <?php elseif ($itemData['error']['type'] === 'file_not_found') : ?> |
@@ -244,7 +275,9 @@ discard block |
||
244 | 275 | <?=$_lang['not_found']?>. |
245 | 276 | </span> |
246 | 277 | </p> |
247 | - <?php endif; ?> |
|
278 | + <?php endif; |
|
279 | +} |
|
280 | +?> |
|
248 | 281 | <?php endif; ?> |
249 | 282 | <?php endforeach; ?> |
250 | 283 | <?php endif; ?> |
@@ -262,7 +295,8 @@ discard block |
||
262 | 295 | <?php elseif($itemData['type'] === 'skip') : ?> |
263 | 296 | <!-- SKIP --> |
264 | 297 | <?php endif; ?> |
265 | - <?php else : ?> |
|
298 | + <?php else { |
|
299 | + : ?> |
|
266 | 300 | <?php if ($itemData['error']['type'] === 'sql') : ?> |
267 | 301 | <p>❌ <?=$itemData['error']['content']?></p> |
268 | 302 | <?php elseif ($itemData['error']['type'] === 'file_not_found') : ?> |
@@ -272,7 +306,9 @@ discard block |
||
272 | 306 | <?=$_lang['not_found']?>. |
273 | 307 | </span> |
274 | 308 | </p> |
275 | - <?php endif; ?> |
|
309 | + <?php endif; |
|
310 | +} |
|
311 | +?> |
|
276 | 312 | <?php endif; ?> |
277 | 313 | <?php endforeach; ?> |
278 | 314 | <?php endif; ?> |
@@ -281,7 +317,8 @@ discard block |
||
281 | 317 | <h3><?=$_lang['installing_demo_site']?></h3> |
282 | 318 | <?php if (empty($installDataLevel['demo']['error'])) : ?> |
283 | 319 | <p> ✓  <span class="ok"><?=$_lang['ok']?></span></p> |
284 | - <?php else : ?> |
|
320 | + <?php else { |
|
321 | + : ?> |
|
285 | 322 | <p><span class="notok"><b><?=$_lang['database_alerts']?></span></p> |
286 | 323 | <p><?=$_lang['setup_couldnt_install']?></p> |
287 | 324 | <p><?=$_lang['installation_error_occured']?></p> |
@@ -291,7 +328,9 @@ discard block |
||
291 | 328 | <?=$_lang['during_execution_of_sql']?> |
292 | 329 | <span class="mono"><?=htmlspecialchars($error['sql'])?></span> |
293 | 330 | <hr /> |
294 | - <?php endforeach; ?> |
|
331 | + <?php endforeach; |
|
332 | +} |
|
333 | +?> |
|
295 | 334 | <p><?=$_lang['some_tables_not_updated']?></p> |
296 | 335 | <?php endif; ?> |
297 | 336 | <?php endif; ?> |
@@ -316,10 +355,13 @@ discard block |
||
316 | 355 | <span class="ok"><?=$_lang['guid_set']?></span> |
317 | 356 | </p> |
318 | 357 | <?php endif; ?> |
319 | - <?php else : ?> |
|
358 | + <?php else { |
|
359 | + : ?> |
|
320 | 360 | <?php if ($itemData['error']['type'] === 'sql') : ?> |
321 | 361 | <p>❌ <?=$itemData['error']['content']?></p> |
322 | - <?php endif; ?> |
|
362 | + <?php endif; |
|
363 | +} |
|
364 | +?> |
|
323 | 365 | <?php endif; ?> |
324 | 366 | <?php endforeach; ?> |
325 | 367 | <?php endif; ?> |
@@ -332,12 +374,15 @@ discard block |
||
332 | 374 | <img src="img/ico_info.png" width="40" height="42" align="left" style="margin-right:10px;" /> |
333 | 375 | <?=$_lang['installation_note']?> |
334 | 376 | </p> |
335 | - <?php else : ?> |
|
377 | + <?php else { |
|
378 | + : ?> |
|
336 | 379 | <p> |
337 | 380 | <img src="img/ico_info.png" width="40" height="42" align="left" style="margin-right:10px;" /> |
338 | 381 | <?=$_lang['upgrade_note']?> |
339 | 382 | </p> |
340 | - <?php endif; ?> |
|
383 | + <?php endif; |
|
384 | +} |
|
385 | +?> |
|
341 | 386 | |
342 | 387 | <form name="install" id="install_form" action="index.php?action=options" method="post"> |
343 | 388 | <?php if ($errors === 0) : ?> |
@@ -350,11 +395,14 @@ discard block |
||
350 | 395 | /> |
351 | 396 | <?=$_lang['remove_install_folder_auto'] ?> |
352 | 397 | </span> |
353 | - <?php else : ?> |
|
398 | + <?php else { |
|
399 | + : ?> |
|
354 | 400 | <span id="removeinstall" style="float:left;color:#505050;line-height:18px;"> |
355 | 401 | <?=$_lang['remove_install_folder_manual'] ?> |
356 | 402 | </span> |
357 | - <?php endif; ?> |
|
403 | + <?php endif; |
|
404 | +} |
|
405 | +?> |
|
358 | 406 | <?php endif; ?> |
359 | 407 | <p class="buttonlinks"> |
360 | 408 | <a href="javascript:closepage();" title="<?=$_lang['btnclose_value'] ?>"> |
@@ -1,15 +1,15 @@ discard block |
||
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 | -switch($modx->getManagerApi()->action) { |
|
5 | +switch($modx->getManagerApi()->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; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | |
33 | 33 | // check to see the module editor isn't locked |
34 | -if($lockedEl = $modx->elementIsLocked(6, $id)) { |
|
34 | +if($lockedEl = $modx->elementIsLocked(6, $id)) { |
|
35 | 35 | $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['module'])); |
36 | 36 | } |
37 | 37 | // end check for lock |
@@ -39,22 +39,22 @@ discard block |
||
39 | 39 | // Lock snippet for other users to edit |
40 | 40 | $modx->lockElement(6, $id); |
41 | 41 | |
42 | -if(isset($_GET['id'])) { |
|
42 | +if(isset($_GET['id'])) { |
|
43 | 43 | $rs = $modx->getDatabase()->select('*', $tbl_site_modules, "id='{$id}'"); |
44 | 44 | $content = $modx->getDatabase()->getRow($rs); |
45 | - if(!$content) { |
|
45 | + if(!$content) { |
|
46 | 46 | $modx->webAlertAndQuit("Module not found for id '{$id}'."); |
47 | 47 | } |
48 | 48 | $content['properties'] = str_replace("&", "&", $content['properties']); |
49 | 49 | $_SESSION['itemname'] = $content['name']; |
50 | - if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) { |
|
50 | + if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) { |
|
51 | 51 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
52 | 52 | } |
53 | -} else { |
|
53 | +} else { |
|
54 | 54 | $_SESSION['itemname'] = $_lang["new_module"]; |
55 | 55 | $content['wrap'] = '1'; |
56 | 56 | } |
57 | -if($modx->getManagerApi()->hasFormValues()) { |
|
57 | +if($modx->getManagerApi()->hasFormValues()) { |
|
58 | 58 | $modx->getManagerApi()->loadFormValues(); |
59 | 59 | } |
60 | 60 | |
@@ -428,7 +428,7 @@ discard block |
||
428 | 428 | <?php |
429 | 429 | // invoke OnModFormPrerender event |
430 | 430 | $evtOut = $modx->invokeEvent('OnModFormPrerender', array('id' => $id)); |
431 | - if(is_array($evtOut)) { |
|
431 | + if(is_array($evtOut)) { |
|
432 | 432 | echo implode('', $evtOut); |
433 | 433 | } |
434 | 434 | |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | <option> </option> |
492 | 492 | <?php |
493 | 493 | include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
494 | - foreach(getCategories() as $n => $v) { |
|
494 | + foreach(getCategories() as $n => $v) { |
|
495 | 495 | echo "\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] ? ' selected="selected"' : '') . '>' . $modx->getPhpCompat()->htmlspecialchars($v['category']) . "</option>\n"; |
496 | 496 | } |
497 | 497 | ?> |
@@ -643,7 +643,7 @@ discard block |
||
643 | 643 | $rs = $modx->getDatabase()->select('usergroup', $tbl_site_module_access, "module='{$id}'"); |
644 | 644 | $groupsarray = $modx->getDatabase()->getColumn('usergroup', $rs); |
645 | 645 | |
646 | - if($modx->hasPermission('access_permissions')) { |
|
646 | + if($modx->hasPermission('access_permissions')) { |
|
647 | 647 | ?> |
648 | 648 | <!-- User Group Access Permissions --> |
649 | 649 | <script type="text/javascript"> |
@@ -671,21 +671,21 @@ discard block |
||
671 | 671 | } |
672 | 672 | $chk = ''; |
673 | 673 | $rs = $modx->getDatabase()->select('name, id', $tbl_membergroup_names, '', 'name'); |
674 | - while($row = $modx->getDatabase()->getRow($rs)) { |
|
674 | + while($row = $modx->getDatabase()->getRow($rs)) { |
|
675 | 675 | $groupsarray = is_numeric($id) && $id > 0 ? $groupsarray : array(); |
676 | 676 | $checked = in_array($row['id'], $groupsarray); |
677 | - if($modx->hasPermission('access_permissions')) { |
|
678 | - if($checked) { |
|
677 | + if($modx->hasPermission('access_permissions')) { |
|
678 | + if($checked) { |
|
679 | 679 | $notPublic = true; |
680 | 680 | } |
681 | 681 | $chks .= '<label><input type="checkbox" name="usrgroups[]" value="' . $row['id'] . '"' . ($checked ? ' checked="checked"' : '') . ' onclick="makePublic(false)" /> ' . $row['name'] . "</label><br />\n"; |
682 | - } else { |
|
683 | - if($checked) { |
|
682 | + } else { |
|
683 | + if($checked) { |
|
684 | 684 | $chks = '<input type="hidden" name="usrgroups[]" value="' . $row['id'] . '" />' . "\n" . $chks; |
685 | 685 | } |
686 | 686 | } |
687 | 687 | } |
688 | - if($modx->hasPermission('access_permissions')) { |
|
688 | + if($modx->hasPermission('access_permissions')) { |
|
689 | 689 | $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; |
690 | 690 | } |
691 | 691 | echo $chks; |
@@ -707,7 +707,7 @@ discard block |
||
707 | 707 | <?php |
708 | 708 | // invoke OnModFormRender event |
709 | 709 | $evtOut = $modx->invokeEvent('OnModFormRender', array('id' => $id)); |
710 | - if(is_array($evtOut)) { |
|
710 | + if(is_array($evtOut)) { |
|
711 | 711 | echo implode('', $evtOut); |
712 | 712 | } |
713 | 713 | ?> |
@@ -118,18 +118,18 @@ |
||
118 | 118 | $articul_query = "SELECT `contentid` FROM {$tbl_site_tmplvar_contentvalues} WHERE `value` LIKE '%{$searchfields}%'"; |
119 | 119 | $articul_result = $modx->getDatabase()->query($articul_query); |
120 | 120 | $articul_id_array = $modx->getDatabase()->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 | 125 | $articul_id.=$articul['contentid']; |
126 | - if($i !== count($articul_id_array)){ |
|
126 | + if($i !== count($articul_id_array)) { |
|
127 | 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*/ |
@@ -10,9 +10,13 @@ |
||
10 | 10 | $userid = $_REQUEST['user']; |
11 | 11 | $groupid = $_REQUEST['group']; |
12 | 12 | $subject = $modx->getDatabase()->escape($_REQUEST['messagesubject']); |
13 | -if($subject=="") $subject="(no subject)"; |
|
13 | +if($subject=="") { |
|
14 | + $subject="(no subject)"; |
|
15 | +} |
|
14 | 16 | $message = $modx->getDatabase()->escape($_REQUEST['messagebody']); |
15 | -if($message=="") $message="(no message)"; |
|
17 | +if($message=="") { |
|
18 | + $message="(no message)"; |
|
19 | +} |
|
16 | 20 | $postdate = time(); |
17 | 21 | |
18 | 22 | if($sendto=='u') { |
@@ -13,8 +13,11 @@ |
||
13 | 13 | // count duplicates |
14 | 14 | $name = $modx->getDatabase()->getValue($modx->getDatabase()->select('name', $modx->getDatabase()->getFullTableName('site_modules'), "id='{$id}'")); |
15 | 15 | $count = $modx->getDatabase()->getRecordCount($modx->getDatabase()->select('name', $modx->getDatabase()->getFullTableName('site_modules'), "name LIKE '{$name} {$_lang['duplicated_el_suffix']}%'")); |
16 | -if($count>=1) $count = ' '.($count+1); |
|
17 | -else $count = ''; |
|
16 | +if($count>=1) { |
|
17 | + $count = ' '.($count+1); |
|
18 | +} else { |
|
19 | + $count = ''; |
|
20 | +} |
|
18 | 21 | |
19 | 22 | // duplicate module |
20 | 23 | $newid = $modx->getDatabase()->insert( |
@@ -14,8 +14,11 @@ |
||
14 | 14 | // count duplicates |
15 | 15 | $name = $modx->getDatabase()->getValue($modx->getDatabase()->select('templatename', $modx->getDatabase()->getFullTableName('site_templates'), "id='{$id}'")); |
16 | 16 | $count = $modx->getDatabase()->getRecordCount($modx->getDatabase()->select('templatename', $modx->getDatabase()->getFullTableName('site_templates'), "templatename LIKE '{$name} {$_lang['duplicated_el_suffix']}%'")); |
17 | -if($count>=1) $count = ' '.($count+1); |
|
18 | -else $count = ''; |
|
17 | +if($count>=1) { |
|
18 | + $count = ' '.($count+1); |
|
19 | +} else { |
|
20 | + $count = ''; |
|
21 | +} |
|
19 | 22 | |
20 | 23 | // duplicate template |
21 | 24 | $newid = $modx->getDatabase()->insert( |
@@ -4,7 +4,9 @@ |
||
4 | 4 | } |
5 | 5 | |
6 | 6 | if(!isset($_GET['id'])) { |
7 | - if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | + if(!$modx->hasPermission('remove_locks')) { |
|
8 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
9 | + } |
|
8 | 10 | |
9 | 11 | // Remove all locks |
10 | 12 | $modx->getDatabase()->truncate($modx->getDatabase()->getFullTableName('active_user_locks')); |
@@ -14,8 +14,11 @@ |
||
14 | 14 | // count duplicates |
15 | 15 | $name = $modx->getDatabase()->getValue($modx->getDatabase()->select('name', $modx->getDatabase()->getFullTableName('site_plugins'), "id='{$id}'")); |
16 | 16 | $count = $modx->getDatabase()->getRecordCount($modx->getDatabase()->select('name', $modx->getDatabase()->getFullTableName('site_plugins'), "name LIKE '{$name} {$_lang['duplicated_el_suffix']}%'")); |
17 | -if($count>=1) $count = ' '.($count+1); |
|
18 | -else $count = ''; |
|
17 | +if($count>=1) { |
|
18 | + $count = ' '.($count+1); |
|
19 | +} else { |
|
20 | + $count = ''; |
|
21 | +} |
|
19 | 22 | |
20 | 23 | // duplicate Plugin |
21 | 24 | $newid = $modx->getDatabase()->insert( |
@@ -12,7 +12,7 @@ |
||
12 | 12 | } |
13 | 13 | |
14 | 14 | // check if user has access permission, except admins |
15 | -if($_SESSION['mgrRole']!=1){ |
|
15 | +if($_SESSION['mgrRole']!=1) { |
|
16 | 16 | $rs = $modx->getDatabase()->select( |
17 | 17 | 'sma.usergroup,mg.member', |
18 | 18 | $modx->getDatabase()->getFullTableName("site_module_access")." sma |