@@ -7,7 +7,7 @@ |
||
7 | 7 | $modx->getSettings(); |
8 | 8 | |
9 | 9 | $modx->documentMethod = 'id'; |
10 | -$modx->documentIdentifier = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 1; |
|
10 | +$modx->documentIdentifier = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 1; |
|
11 | 11 | $modx->documentObject = $modx->getDocumentObject('id', $modx->documentIdentifier); |
12 | 12 | |
13 | 13 | $modx->invokeEvent('OnWebPageInit'); |
@@ -1,13 +1,13 @@ 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 | -if(!$modx->hasPermission('new_document') || !$modx->hasPermission('save_document')) { |
|
5 | +if (!$modx->hasPermission('new_document') || !$modx->hasPermission('save_document')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
9 | -$id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
|
10 | -if($id==0) { |
|
9 | +$id = isset($_GET['id']) ? (int) $_GET['id'] : 0; |
|
10 | +if ($id == 0) { |
|
11 | 11 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
12 | 12 | } |
13 | 13 | |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $udperms->role = $_SESSION['mgrRole']; |
21 | 21 | $udperms->duplicateDoc = true; |
22 | 22 | |
23 | -if(!$udperms->checkPermissions()) { |
|
23 | +if (!$udperms->checkPermissions()) { |
|
24 | 24 | $modx->webAlertAndQuit($_lang["access_permission_denied"]); |
25 | 25 | } |
26 | 26 | |
@@ -32,5 +32,5 @@ discard block |
||
32 | 32 | $_SESSION['itemname'] = $name; |
33 | 33 | |
34 | 34 | // finish cloning - redirect |
35 | -$header="Location: index.php?r=1&a=3&id=$id"; |
|
35 | +$header = "Location: index.php?r=1&a=3&id=$id"; |
|
36 | 36 | header($header); |
@@ -1,21 +1,21 @@ |
||
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 | -$logo= '<img src="media/style/default/images/misc/login-logo.png" height="54" width="358" border="0">'; |
|
5 | +$logo = '<img src="media/style/default/images/misc/login-logo.png" height="54" width="358" border="0">'; |
|
6 | 6 | $downloadLinks = array( |
7 | - 0=>array('title'=>$_lang["information"],'link'=>'https://evo.im/'), |
|
8 | - 1=>array('title'=>$_lang["download"],'link'=>'https://github.com/evolution-cms/evolution/releases'), |
|
9 | - 2=>array('title'=>$_lang["previous_releases"],'link'=>'https://modx.com/download/evolution/previous-releases.html'), |
|
10 | - 3=>array('title'=>$_lang["extras"],'link'=>array( |
|
7 | + 0=>array('title'=>$_lang["information"], 'link'=>'https://evo.im/'), |
|
8 | + 1=>array('title'=>$_lang["download"], 'link'=>'https://github.com/evolution-cms/evolution/releases'), |
|
9 | + 2=>array('title'=>$_lang["previous_releases"], 'link'=>'https://modx.com/download/evolution/previous-releases.html'), |
|
10 | + 3=>array('title'=>$_lang["extras"], 'link'=>array( |
|
11 | 11 | 'http://extras.evolution-cms.com/', |
12 | 12 | 'https://github.com/extras-evolution' |
13 | 13 | )), |
14 | 14 | ); |
15 | 15 | |
16 | 16 | $translationLinks = array( |
17 | - 0=>array('title'=>'Evolution CMS','link'=>'https://www.transifex.com/evolutioncms/evolution/'), |
|
18 | - 1=>array('title'=>$_lang["extras"],'link'=>'https://www.transifex.com/evolutioncms/extras/'), |
|
17 | + 0=>array('title'=>'Evolution CMS', 'link'=>'https://www.transifex.com/evolutioncms/evolution/'), |
|
18 | + 1=>array('title'=>$_lang["extras"], 'link'=>'https://www.transifex.com/evolutioncms/extras/'), |
|
19 | 19 | ); |
20 | 20 | |
21 | 21 |
@@ -44,7 +44,7 @@ |
||
44 | 44 | <div class="container container-body"> |
45 | 45 | <?php |
46 | 46 | if (!isset($_POST['import'])) { |
47 | - echo "<div class=\"element-edit-message\">" . $_lang['import_site_message'] . "</div>"; |
|
47 | + echo "<div class=\"element-edit-message\">".$_lang['import_site_message']."</div>"; |
|
48 | 48 | ?> |
49 | 49 | <form action="index.php" method="post" name="importFrm"> |
50 | 50 | <input type="hidden" name="import" value="import"/> |
@@ -1,5 +1,5 @@ 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 | 5 | |
@@ -9,11 +9,11 @@ discard block |
||
9 | 9 | */ |
10 | 10 | |
11 | 11 | $tpl = array( |
12 | - 'viewForm' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_viewForm.tpl'), |
|
13 | - 'panelGroup' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelGroup.tpl'), |
|
14 | - 'panelHeading' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelHeading.tpl'), |
|
15 | - 'panelCollapse' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelCollapse.tpl'), |
|
16 | - 'elementsRow' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_elementsRow.tpl') |
|
12 | + 'viewForm' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_viewForm.tpl'), |
|
13 | + 'panelGroup' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelGroup.tpl'), |
|
14 | + 'panelHeading' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelHeading.tpl'), |
|
15 | + 'panelCollapse' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelCollapse.tpl'), |
|
16 | + 'elementsRow' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_elementsRow.tpl') |
|
17 | 17 | ); |
18 | 18 | |
19 | 19 | /** |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * @param array $ph |
22 | 22 | * @return string |
23 | 23 | */ |
24 | -function parsePh($tpl, $ph) { |
|
24 | +function parsePh($tpl, $ph){ |
|
25 | 25 | $modx = evolutionCMS(); global $_lang; |
26 | 26 | $tpl = $modx->parseText($tpl, $_lang, '[%', '%]'); |
27 | 27 | return $modx->parseText($tpl, $ph); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * @param string|int $cssId |
32 | 32 | * @return string |
33 | 33 | */ |
34 | -function renderViewSwitchButtons($cssId) { |
|
34 | +function renderViewSwitchButtons($cssId){ |
|
35 | 35 | $modx = evolutionCMS(); global $_lang, $tpl; |
36 | 36 | |
37 | 37 | return parsePh($tpl['viewForm'], array( |
@@ -44,19 +44,19 @@ discard block |
||
44 | 44 | * @param mgrResources $resources |
45 | 45 | * @return string |
46 | 46 | */ |
47 | -function createResourceList($resourceTable, $resources) { |
|
47 | +function createResourceList($resourceTable, $resources){ |
|
48 | 48 | $modx = evolutionCMS(); global $_lang, $_style, $modx_textdir, $tpl; |
49 | 49 | |
50 | 50 | $items = isset($resources->items[$resourceTable]) ? $resources->items[$resourceTable] : false; |
51 | 51 | |
52 | - if( ! is_array($items) || empty($items)) { |
|
52 | + if (!is_array($items) || empty($items)) { |
|
53 | 53 | return $_lang['no_results']; |
54 | 54 | } |
55 | 55 | |
56 | 56 | // Prepare elements- and categories-list |
57 | 57 | $elements = array(); |
58 | 58 | $categories = array(); |
59 | - foreach($items as $row) { |
|
59 | + foreach ($items as $row) { |
|
60 | 60 | $catid = $row['catid'] ? $row['catid'] : 0; |
61 | 61 | $categories[$catid] = array('name' => stripslashes($row['category'])); |
62 | 62 | $elements[$catid][] = prepareElementRowPh($row, $resourceTable, $resources); |
@@ -64,18 +64,18 @@ discard block |
||
64 | 64 | |
65 | 65 | // Now render categories / panel-collapse |
66 | 66 | $panelGroup = ''; |
67 | - foreach($elements as $catid => $elList) { |
|
67 | + foreach ($elements as $catid => $elList) { |
|
68 | 68 | // Add panel-heading / category-collapse to output |
69 | 69 | $panelGroup .= parsePh($tpl['panelHeading'], array( |
70 | 70 | 'tab' => $resourceTable, |
71 | 71 | 'category' => $categories[$catid]['name'], |
72 | - 'categoryid' => $catid != '' ? ' <small>(' . $catid . ')</small>' : '', |
|
72 | + 'categoryid' => $catid != '' ? ' <small>('.$catid.')</small>' : '', |
|
73 | 73 | 'catid' => $catid, |
74 | 74 | )); |
75 | 75 | |
76 | 76 | // Prepare content for panel-collapse |
77 | 77 | $panelCollapse = ''; |
78 | - foreach($elList as $el) { |
|
78 | + foreach ($elList as $el) { |
|
79 | 79 | $panelCollapse .= parsePh($tpl['elementsRow'], $el); |
80 | 80 | } |
81 | 81 | |
@@ -97,30 +97,30 @@ discard block |
||
97 | 97 | * @param mgrResources $resources |
98 | 98 | * @return string |
99 | 99 | */ |
100 | -function createCombinedView($resources) { |
|
100 | +function createCombinedView($resources){ |
|
101 | 101 | $modx = evolutionCMS(); global $_lang, $_style, $modx_textdir; |
102 | 102 | |
103 | 103 | $itemsPerCategory = isset($resources->itemsPerCategory) ? $resources->itemsPerCategory : false; |
104 | 104 | $types = isset($resources->types) ? $resources->types : false; |
105 | 105 | $categories = isset($resources->categories) ? $resources->categories : false; |
106 | 106 | |
107 | - if(!$itemsPerCategory) { |
|
107 | + if (!$itemsPerCategory) { |
|
108 | 108 | return $_lang['no_results']; |
109 | 109 | } |
110 | 110 | |
111 | 111 | $tpl = array( |
112 | - 'panelGroup' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelGroup.tpl'), |
|
113 | - 'panelHeading' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelHeading.tpl'), |
|
114 | - 'panelCollapse' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelCollapse.tpl'), |
|
115 | - 'elementsRow' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_elementsRow.tpl'), |
|
112 | + 'panelGroup' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelGroup.tpl'), |
|
113 | + 'panelHeading' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelHeading.tpl'), |
|
114 | + 'panelCollapse' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelCollapse.tpl'), |
|
115 | + 'elementsRow' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_elementsRow.tpl'), |
|
116 | 116 | ); |
117 | 117 | |
118 | 118 | // Easily loop through $itemsPerCategory-Array |
119 | 119 | $panelGroup = ''; |
120 | - foreach($categories as $catid => $category) { |
|
120 | + foreach ($categories as $catid => $category) { |
|
121 | 121 | // Prepare collapse content / elements-list |
122 | 122 | $panelCollapse = ''; |
123 | - foreach($itemsPerCategory[$catid] as $el) { |
|
123 | + foreach ($itemsPerCategory[$catid] as $el) { |
|
124 | 124 | $resourceTable = $el['type']; |
125 | 125 | $ph = prepareElementRowPh($el, $resourceTable, $resources); |
126 | 126 | $panelCollapse .= parsePh($tpl['elementsRow'], $ph); |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $panelGroup .= parsePh($tpl['panelHeading'], array( |
131 | 131 | 'tab' => 'categories_list', |
132 | 132 | 'category' => $categories[$catid], |
133 | - 'categoryid' => $catid != '' ? ' <small>(' . $catid . ')</small>' : '', |
|
133 | + 'categoryid' => $catid != '' ? ' <small>('.$catid.')</small>' : '', |
|
134 | 134 | 'catid' => $catid, |
135 | 135 | )); |
136 | 136 | |
@@ -154,14 +154,14 @@ discard block |
||
154 | 154 | * @param mgrResources $resources |
155 | 155 | * @return array |
156 | 156 | */ |
157 | -function prepareElementRowPh($row, $resourceTable, $resources) { |
|
157 | +function prepareElementRowPh($row, $resourceTable, $resources){ |
|
158 | 158 | $modx = evolutionCMS(); global $modx_textdir, $_style, $_lang; |
159 | 159 | |
160 | 160 | $types = isset($resources->types[$resourceTable]) ? $resources->types[$resourceTable] : false; |
161 | 161 | |
162 | 162 | $_lang["confirm_delete"] = $_lang["delete"]; |
163 | 163 | |
164 | - switch($resourceTable){ |
|
164 | + switch ($resourceTable) { |
|
165 | 165 | case 'site_templates': |
166 | 166 | $class = $row['selectable'] ? '' : 'disabledPlugin'; |
167 | 167 | $lockElementType = 1; |
@@ -198,65 +198,65 @@ discard block |
||
198 | 198 | // Prepare displaying user-locks |
199 | 199 | $lockedByUser = ''; |
200 | 200 | $rowLock = $modx->elementIsLocked($lockElementType, $row['id'], true); |
201 | - if($rowLock && $modx->hasPermission('display_locks')) { |
|
202 | - if($rowLock['sid'] == $modx->sid) { |
|
201 | + if ($rowLock && $modx->hasPermission('display_locks')) { |
|
202 | + if ($rowLock['sid'] == $modx->sid) { |
|
203 | 203 | $title = $modx->parseText($_lang["lock_element_editing"], array( |
204 | - 'element_type' => $_lang["lock_element_type_" . $lockElementType], |
|
204 | + 'element_type' => $_lang["lock_element_type_".$lockElementType], |
|
205 | 205 | 'lasthit_df' => $rowLock['lasthit_df'] |
206 | 206 | )); |
207 | - $lockedByUser = '<span title="' . $title . '" class="editResource" style="cursor:context-menu;">' . $_style['tree_preview_resource'] . '</span> '; |
|
207 | + $lockedByUser = '<span title="'.$title.'" class="editResource" style="cursor:context-menu;">'.$_style['tree_preview_resource'].'</span> '; |
|
208 | 208 | } else { |
209 | 209 | $title = $modx->parseText($_lang["lock_element_locked_by"], array( |
210 | - 'element_type' => $_lang["lock_element_type_" . $lockElementType], |
|
210 | + 'element_type' => $_lang["lock_element_type_".$lockElementType], |
|
211 | 211 | 'username' => $rowLock['username'], |
212 | 212 | 'lasthit_df' => $rowLock['lasthit_df'] |
213 | 213 | )); |
214 | - if($modx->hasPermission('remove_locks')) { |
|
215 | - $lockedByUser = '<a href="javascript:;" onclick="unlockElement(' . $lockElementType . ', ' . $row['id'] . ', this);return false;" title="' . $title . '" class="lockedResource"><i class="' . $_style['icons_secured'] . '"></i></a>'; |
|
214 | + if ($modx->hasPermission('remove_locks')) { |
|
215 | + $lockedByUser = '<a href="javascript:;" onclick="unlockElement('.$lockElementType.', '.$row['id'].', this);return false;" title="'.$title.'" class="lockedResource"><i class="'.$_style['icons_secured'].'"></i></a>'; |
|
216 | 216 | } else { |
217 | - $lockedByUser = '<span title="' . $title . '" class="lockedResource" style="cursor:context-menu;"><i class="' . $_style['icons_secured'] . '"></i></span>'; |
|
217 | + $lockedByUser = '<span title="'.$title.'" class="lockedResource" style="cursor:context-menu;"><i class="'.$_style['icons_secured'].'"></i></span>'; |
|
218 | 218 | } |
219 | 219 | } |
220 | 220 | } |
221 | - if($lockedByUser) { |
|
222 | - $lockedByUser = '<div class="lockCell">' . $lockedByUser . '</div>'; |
|
221 | + if ($lockedByUser) { |
|
222 | + $lockedByUser = '<div class="lockCell">'.$lockedByUser.'</div>'; |
|
223 | 223 | } |
224 | 224 | |
225 | 225 | // Caption |
226 | - if($resourceTable == 'site_tmplvars') { |
|
227 | - $caption = !empty($row['description']) ? ' ' . $row['caption'] . ' <small>(' . $row['description'] . ')</small>' : ' ' . $row['caption']; |
|
226 | + if ($resourceTable == 'site_tmplvars') { |
|
227 | + $caption = !empty($row['description']) ? ' '.$row['caption'].' <small>('.$row['description'].')</small>' : ' '.$row['caption']; |
|
228 | 228 | } else { |
229 | - $caption = !empty($row['description']) ? ' ' . $row['description'] : ''; |
|
229 | + $caption = !empty($row['description']) ? ' '.$row['description'] : ''; |
|
230 | 230 | } |
231 | 231 | |
232 | 232 | // Special marks |
233 | 233 | $tplInfo = array(); |
234 | - if($row['locked']) { |
|
234 | + if ($row['locked']) { |
|
235 | 235 | $tplInfo[] = $_lang['locked']; |
236 | 236 | } |
237 | - if($row['id'] == $modx->config['default_template'] && $resourceTable == 'site_templates') { |
|
237 | + if ($row['id'] == $modx->config['default_template'] && $resourceTable == 'site_templates') { |
|
238 | 238 | $tplInfo[] = $_lang['defaulttemplate_title']; |
239 | 239 | } |
240 | - $marks = !empty($tplInfo) ? ' <em>(' . implode(', ', $tplInfo) . ')</em>' : ''; |
|
240 | + $marks = !empty($tplInfo) ? ' <em>('.implode(', ', $tplInfo).')</em>' : ''; |
|
241 | 241 | |
242 | 242 | /* row buttons */ |
243 | 243 | $buttons = ''; |
244 | - if($modx->hasPermission($types['actions']['edit'][1])) { |
|
245 | - $buttons .= '<li><a title="' . $_lang["edit_resource"] . '" href="index.php?a=' . $types['actions']['edit'][0] . '&id=' . $row['id'] . '"><i class="fa fa-edit fa-fw"></i></a></li>'; |
|
244 | + if ($modx->hasPermission($types['actions']['edit'][1])) { |
|
245 | + $buttons .= '<li><a title="'.$_lang["edit_resource"].'" href="index.php?a='.$types['actions']['edit'][0].'&id='.$row['id'].'"><i class="fa fa-edit fa-fw"></i></a></li>'; |
|
246 | 246 | } |
247 | - if($modx->hasPermission($types['actions']['duplicate'][1])) { |
|
248 | - $buttons .= '<li><a onclick="return confirm(\'' . $_lang["confirm_duplicate_record"] . '\')" title="' . $_lang["resource_duplicate"] . '" href="index.php?a=' . $types['actions']['duplicate'][0] . '&id=' . $row['id'] . '"><i class="fa fa-clone fa-fw"></i></a></li>'; |
|
247 | + if ($modx->hasPermission($types['actions']['duplicate'][1])) { |
|
248 | + $buttons .= '<li><a onclick="return confirm(\''.$_lang["confirm_duplicate_record"].'\')" title="'.$_lang["resource_duplicate"].'" href="index.php?a='.$types['actions']['duplicate'][0].'&id='.$row['id'].'"><i class="fa fa-clone fa-fw"></i></a></li>'; |
|
249 | 249 | } |
250 | - if($modx->hasPermission($types['actions']['remove'][1])) { |
|
251 | - $buttons .= '<li><a onclick="return confirm(\'' . $_lang["confirm_delete"] . '\')" title="' . $_lang["delete"] . '" href="index.php?a=' . $types['actions']['remove'][0] . '&id=' . $row['id'] . '"><i class="fa fa-trash fa-fw"></i></a></li>'; |
|
250 | + if ($modx->hasPermission($types['actions']['remove'][1])) { |
|
251 | + $buttons .= '<li><a onclick="return confirm(\''.$_lang["confirm_delete"].'\')" title="'.$_lang["delete"].'" href="index.php?a='.$types['actions']['remove'][0].'&id='.$row['id'].'"><i class="fa fa-trash fa-fw"></i></a></li>'; |
|
252 | 252 | } |
253 | - $buttons = $buttons ? '<div class="btnCell"><ul class="elements_buttonbar">' . $buttons . '</ul></div>' : ''; |
|
253 | + $buttons = $buttons ? '<div class="btnCell"><ul class="elements_buttonbar">'.$buttons.'</ul></div>' : ''; |
|
254 | 254 | |
255 | 255 | $catid = $row['catid'] ? $row['catid'] : 0; |
256 | 256 | |
257 | 257 | // Placeholders for elements-row |
258 | 258 | return array( |
259 | - 'class' => $class ? ' class="' . $class . '"' : '', |
|
259 | + 'class' => $class ? ' class="'.$class.'"' : '', |
|
260 | 260 | 'lockedByUser' => $lockedByUser, |
261 | 261 | 'name' => $row['name'], |
262 | 262 | 'caption' => $caption, |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!function_exists('createList')) { |
|
2 | +if (!function_exists('createList')) { |
|
3 | 3 | /** |
4 | 4 | * @param string $sectionHeader |
5 | 5 | * @param array $linkArr |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | */ |
8 | 8 | function createList($sectionHeader, $linkArr) |
9 | 9 | { |
10 | - $output = '<div class="sectionHeader">' . $sectionHeader . '</div><div class="sectionBody">' . "\n"; |
|
11 | - $output .= '<table width="500" border="0" cellspacing="0" cellpadding="0">' . "\n"; |
|
10 | + $output = '<div class="sectionHeader">'.$sectionHeader.'</div><div class="sectionBody">'."\n"; |
|
11 | + $output .= '<table width="500" border="0" cellspacing="0" cellpadding="0">'."\n"; |
|
12 | 12 | $links = ''; |
13 | 13 | foreach ($linkArr as $row) { |
14 | 14 | if (!is_array($row['link'])) { |
@@ -16,16 +16,16 @@ discard block |
||
16 | 16 | } |
17 | 17 | foreach ($row['link'] as $link) { |
18 | 18 | $links .= $links != '' ? '<br/>' : ''; |
19 | - $links .= '<a href="' . $link . '" target="_blank">' . $link . '</a>'; |
|
19 | + $links .= '<a href="'.$link.'" target="_blank">'.$link.'</a>'; |
|
20 | 20 | } |
21 | 21 | $output .= ' |
22 | 22 | <tr> |
23 | - <td align="left"><strong>' . $row["title"] . '</strong></td> |
|
24 | - <td align="left">' . $links . '</td> |
|
23 | + <td align="left"><strong>' . $row["title"].'</strong></td> |
|
24 | + <td align="left">' . $links.'</td> |
|
25 | 25 | </tr>'; |
26 | 26 | $links = ''; |
27 | 27 | } |
28 | - $output .= '</table></div>' . "\n"; |
|
28 | + $output .= '</table></div>'."\n"; |
|
29 | 29 | |
30 | 30 | return $output; |
31 | 31 | } |
@@ -16,8 +16,8 @@ |
||
16 | 16 | { |
17 | 17 | echo '<div class="row form-row"> |
18 | 18 | <div class="col-sm-6 col-md-4 col-lg-3">' . |
19 | - implode('</div><div class="col-sm-6 col-md-4 col-lg-3">', $evtnames) . |
|
20 | - '</div>' . |
|
19 | + implode('</div><div class="col-sm-6 col-md-4 col-lg-3">', $evtnames). |
|
20 | + '</div>'. |
|
21 | 21 | '</div>'; |
22 | 22 | |
23 | 23 | $evtnames = array(); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if(!function_exists('getDefaultTemplate')) { |
|
3 | +if (!function_exists('getDefaultTemplate')) { |
|
4 | 4 | /** |
5 | 5 | * @return string |
6 | 6 | */ |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!function_exists('get_lang_keys')) { |
|
2 | +if (!function_exists('get_lang_keys')) { |
|
3 | 3 | /** |
4 | 4 | * get_lang_keys |
5 | 5 | * |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | */ |
9 | 9 | function get_lang_keys($filename) |
10 | 10 | { |
11 | - $file = MODX_MANAGER_PATH . 'includes/lang' . DIRECTORY_SEPARATOR . $filename; |
|
11 | + $file = MODX_MANAGER_PATH.'includes/lang'.DIRECTORY_SEPARATOR.$filename; |
|
12 | 12 | if (is_file($file) && is_readable($file)) { |
13 | 13 | include($file); |
14 | 14 | $out = isset($_lang) ? array_keys($_lang) : array(); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | } |
21 | 21 | } |
22 | 22 | |
23 | -if(!function_exists('get_langs_by_key')) { |
|
23 | +if (!function_exists('get_langs_by_key')) { |
|
24 | 24 | /** |
25 | 25 | * get_langs_by_key |
26 | 26 | * |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | } |
42 | 42 | } |
43 | 43 | |
44 | -if(!function_exists('get_lang_options')) { |
|
44 | +if (!function_exists('get_lang_options')) { |
|
45 | 45 | /** |
46 | 46 | * get_lang_options |
47 | 47 | * |
@@ -58,11 +58,11 @@ discard block |
||
58 | 58 | if (!empty($key)) { |
59 | 59 | $languages = get_langs_by_key($key); |
60 | 60 | sort($languages); |
61 | - $lang_options .= '<option value="">' . $_lang['language_title'] . '</option>'; |
|
61 | + $lang_options .= '<option value="">'.$_lang['language_title'].'</option>'; |
|
62 | 62 | |
63 | 63 | foreach ($languages as $language_name) { |
64 | 64 | $uclanguage_name = ucwords(str_replace("_", " ", $language_name)); |
65 | - $lang_options .= '<option value="' . $language_name . '">' . $uclanguage_name . '</option>'; |
|
65 | + $lang_options .= '<option value="'.$language_name.'">'.$uclanguage_name.'</option>'; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | return $lang_options; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | foreach ($languages as $language_name) { |
73 | 73 | $uclanguage_name = ucwords(str_replace("_", " ", $language_name)); |
74 | 74 | $sel = $language_name === $selected_lang ? ' selected="selected"' : ''; |
75 | - $lang_options .= '<option value="' . $language_name . '" ' . $sel . '>' . $uclanguage_name . '</option>'; |
|
75 | + $lang_options .= '<option value="'.$language_name.'" '.$sel.'>'.$uclanguage_name.'</option>'; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | return $lang_options; |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | } |
81 | 81 | } |
82 | 82 | |
83 | -if(!function_exists('form_radio')) { |
|
83 | +if (!function_exists('form_radio')) { |
|
84 | 84 | /** |
85 | 85 | * @param string $name |
86 | 86 | * @param string $value |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $disabled = ''; |
100 | 100 | } |
101 | 101 | if ($add) { |
102 | - $add = ' ' . $add; |
|
102 | + $add = ' '.$add; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | return sprintf('<input onchange="documentDirty=true;" type="radio" name="%s" value="%s" %s %s %s />', $name, |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | } |
109 | 109 | } |
110 | 110 | |
111 | -if(!function_exists('wrap_label')) { |
|
111 | +if (!function_exists('wrap_label')) { |
|
112 | 112 | /** |
113 | 113 | * @param string $str |
114 | 114 | * @param string $object |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | |
122 | 122 | } |
123 | 123 | |
124 | -if(!function_exists('parseText')) { |
|
124 | +if (!function_exists('parseText')) { |
|
125 | 125 | /** |
126 | 126 | * @param string $tpl |
127 | 127 | * @param array $ph |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | } |
143 | 143 | } |
144 | 144 | |
145 | -if(!function_exists('showHide')) { |
|
145 | +if (!function_exists('showHide')) { |
|
146 | 146 | /** |
147 | 147 | * @param bool $cond |
148 | 148 | * @return string |