Completed
Push — develop ( 62a102...75b835 )
by Maxim
05:41
created
manager/actions/mutate_role.dynamic.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
 	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 
6
-switch((int) $modx->manager->action) {
6
+switch ((int) $modx->manager->action) {
7 7
 	case 35:
8
-		if(!$modx->hasPermission('edit_role')) {
8
+		if (!$modx->hasPermission('edit_role')) {
9 9
 			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
10 10
 		}
11 11
 		break;
12 12
 	case 38:
13
-		if(!$modx->hasPermission('new_role')) {
13
+		if (!$modx->hasPermission('new_role')) {
14 14
 			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
15 15
 		}
16 16
 		break;
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 $tbl_user_roles = $modx->getFullTableName('user_roles');
24 24
 
25 25
 // check to see the snippet editor isn't locked
26
-if($lockedEl = $modx->elementIsLocked(8, $role)) {
26
+if ($lockedEl = $modx->elementIsLocked(8, $role)) {
27 27
 	$modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['role']));
28 28
 }
29 29
 // end check for lock
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
31 31
 // Lock snippet for other users to edit
32 32
 $modx->lockElement(8, $role);
33 33
 
34
-if($modx->manager->action == '35') {
34
+if ($modx->manager->action == '35') {
35 35
 	$rs = $modx->db->select('*', $tbl_user_roles, "id='{$role}'");
36 36
 	$roledata = $modx->db->getRow($rs);
37
-	if(!$roledata) {
37
+	if (!$roledata) {
38 38
 		$modx->webAlertAndQuit("No role returned!");
39 39
 	}
40 40
 	$_SESSION['itemname'] = $roledata['name'];
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 // Add lock-element JS-Script
47 47
 $lockElementId = $role;
48 48
 $lockElementType = 8;
49
-require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php');
49
+require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php');
50 50
 ?>
51 51
 	<script type="text/javascript">
52 52
 		function changestate(element) {
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 		<input type="hidden" name="id" value="<?= $_GET['id'] ?>">
83 83
 
84 84
 		<h1>
85
-            <i class="fa fa-legal"></i><?= ($roledata['name'] ? $roledata['name'] . '<small>(' . $roledata['id'] . ')</small>' : $_lang['role_title']) ?>
85
+            <i class="fa fa-legal"></i><?= ($roledata['name'] ? $roledata['name'].'<small>('.$roledata['id'].')</small>' : $_lang['role_title']) ?>
86 86
         </h1>
87 87
 
88 88
 		<?= $_style['actionbuttons']['dynamic']['savedelete'] ?>
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 	</form>
294 294
 
295 295
 <?php
296
-function render_form($name, $label, $status = '') {
296
+function render_form($name, $label, $status = ''){
297 297
 	global $modx, $roledata;
298 298
 
299 299
 	$tpl = '<label class="d-block" for="[+name+]check">
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 
305 305
 	$checked = ($roledata[$name] == 1) ? 'checked' : '';
306 306
 	$value = ($roledata[$name] == 1) ? 1 : 0;
307
-	if($status == 'disabled') {
307
+	if ($status == 'disabled') {
308 308
 		$checked = 'checked';
309 309
 		$value = 1;
310 310
 		$set = 'fix';
Please login to merge, or discard this patch.
manager/actions/help/03Version_Notices.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     usort($notices, 'version_compare');
16 16
     $notices = array_reverse($notices);
17 17
 
18
-    foreach($notices as $v) {
18
+    foreach ($notices as $v) {
19 19
         if ($v >= '1.3.0') {
20 20
             $cms = 'EVO';
21 21
         }
Please login to merge, or discard this patch.
manager/actions/help/01About_EVO.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,37 +1,37 @@
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-$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
-function createList($sectionHeader, $linkArr) {
21
+function createList($sectionHeader, $linkArr){
22 22
 	$output = '<div class="sectionHeader">'.$sectionHeader.'</div><div class="sectionBody">'."\n";
23 23
 	$output .= '<table width="500"  border="0" cellspacing="0" cellpadding="0">'."\n";
24 24
 	$links = '';
25
-	foreach($linkArr as $row) {
25
+	foreach ($linkArr as $row) {
26 26
 		if (!is_array($row['link'])) $row['link'] = array($row['link']);
27 27
 		foreach ($row['link'] as $link) {
28 28
 			$links .= $links != '' ? '<br/>' : '';
29
-			$links .= '<a href="' . $link . '" target="_blank">' . $link . '</a>';
29
+			$links .= '<a href="'.$link.'" target="_blank">'.$link.'</a>';
30 30
 		}
31 31
 		$output .= '
32 32
 		<tr>
33
-			<td align="left"><strong>' . $row["title"] . '</strong></td>
34
-			<td align="left">' . $links . '</td>
33
+			<td align="left"><strong>' . $row["title"].'</strong></td>
34
+			<td align="left">' . $links.'</td>
35 35
 		</tr>';
36 36
 		$links = '';
37 37
 	}
Please login to merge, or discard this patch.
manager/actions/help/04Changelog.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 ?>
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
 <div class="sectionHeader">Changelog</div>
8 8
 <div class="sectionBody">
9 9
 <?php
10
-	$changeLog = MODX_BASE_PATH . 'assets/docs/changelog.txt';
11
-	if(is_readable($changeLog))
12
-		echo str_replace("\n",'<br>',file_get_contents($changeLog));
10
+	$changeLog = MODX_BASE_PATH.'assets/docs/changelog.txt';
11
+	if (is_readable($changeLog))
12
+		echo str_replace("\n", '<br>', file_get_contents($changeLog));
13 13
 ?>
14 14
 </div>
Please login to merge, or discard this patch.
manager/actions/resources/tab2_templatevars.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <!-- Template variables -->
2 2
 <?php
3
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
4 4
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
5 5
 }
6 6
 
Please login to merge, or discard this patch.
manager/actions/resources/tab3_chunks.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <!-- chunks -->
2 2
 <?php
3
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
4 4
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
5 5
 }
6 6
 
Please login to merge, or discard this patch.
manager/actions/resources/tab6_categoryview.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 } ?>
5 5
 
Please login to merge, or discard this patch.
manager/actions/resources/tab4_snippets.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <!-- snippets -->
2 2
 <?php
3
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
4 4
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
5 5
 }
6 6
 
Please login to merge, or discard this patch.
manager/actions/resources/functions.inc.php 1 patch
Spacing   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -1,23 +1,23 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
 	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 
6 6
 $tpl = array(
7
-	'viewForm' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_viewForm.tpl'),
8
-	'panelGroup' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelGroup.tpl'),
9
-	'panelHeading' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelHeading.tpl'),
10
-	'panelCollapse' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelCollapse.tpl'),
11
-	'elementsRow' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_elementsRow.tpl')
7
+	'viewForm' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_viewForm.tpl'),
8
+	'panelGroup' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelGroup.tpl'),
9
+	'panelHeading' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelHeading.tpl'),
10
+	'panelCollapse' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelCollapse.tpl'),
11
+	'elementsRow' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_elementsRow.tpl')
12 12
 );
13 13
 
14
-function parsePh($tpl, $ph) {
14
+function parsePh($tpl, $ph){
15 15
 	global $modx, $_lang;
16 16
 	$tpl = $modx->parseText($tpl, $_lang, '[%', '%]');
17 17
 	return $modx->parseText($tpl, $ph);
18 18
 }
19 19
 
20
-function renderViewSwitchButtons($cssId) {
20
+function renderViewSwitchButtons($cssId){
21 21
 	global $modx, $_lang, $tpl;
22 22
 
23 23
 	return parsePh($tpl['viewForm'], array(
@@ -25,19 +25,19 @@  discard block
 block discarded – undo
25 25
 	));
26 26
 }
27 27
 
28
-function createResourceList($resourceTable, $resources) {
28
+function createResourceList($resourceTable, $resources){
29 29
 	global $modx, $_lang, $_style, $modx_textdir, $tpl;
30 30
 
31 31
 	$items = isset($resources->items[$resourceTable]) ? $resources->items[$resourceTable] : false;
32 32
 
33
-	if( ! is_array($items) || empty($items)) {
33
+	if (!is_array($items) || empty($items)) {
34 34
 		return $_lang['no_results'];
35 35
 	}
36 36
 
37 37
 	// Prepare elements- and categories-list
38 38
 	$elements = array();
39 39
 	$categories = array();
40
-	foreach($items as $row) {
40
+	foreach ($items as $row) {
41 41
 		$catid = $row['catid'] ? $row['catid'] : 0;
42 42
 		$categories[$catid] = array('name' => stripslashes($row['category']));
43 43
 		$elements[$catid][] = prepareElementRowPh($row, $resourceTable, $resources);
@@ -45,18 +45,18 @@  discard block
 block discarded – undo
45 45
 
46 46
 	// Now render categories / panel-collapse
47 47
 	$panelGroup = '';
48
-	foreach($elements as $catid => $elList) {
48
+	foreach ($elements as $catid => $elList) {
49 49
 		// Add panel-heading / category-collapse to output
50 50
 		$panelGroup .= parsePh($tpl['panelHeading'], array(
51 51
 			'tab' => $resourceTable,
52 52
 			'category' => $categories[$catid]['name'],
53
-			'categoryid' => $catid != '' ? ' <small>(' . $catid . ')</small>' : '',
53
+			'categoryid' => $catid != '' ? ' <small>('.$catid.')</small>' : '',
54 54
 			'catid' => $catid,
55 55
 		));
56 56
 
57 57
 		// Prepare content for panel-collapse
58 58
 		$panelCollapse = '';
59
-		foreach($elList as $el) {
59
+		foreach ($elList as $el) {
60 60
 			$panelCollapse .= parsePh($tpl['elementsRow'], $el);
61 61
 		}
62 62
 
@@ -74,30 +74,30 @@  discard block
 block discarded – undo
74 74
 	));
75 75
 }
76 76
 
77
-function createCombinedView($resources) {
77
+function createCombinedView($resources){
78 78
 	global $modx, $_lang, $_style, $modx_textdir;
79 79
 
80 80
 	$itemsPerCategory = isset($resources->itemsPerCategory) ? $resources->itemsPerCategory : false;
81 81
 	$types = isset($resources->types) ? $resources->types : false;
82 82
 	$categories = isset($resources->categories) ? $resources->categories : false;
83 83
 
84
-	if(!$itemsPerCategory) {
84
+	if (!$itemsPerCategory) {
85 85
 		return $_lang['no_results'];
86 86
 	}
87 87
 
88 88
 	$tpl = array(
89
-		'panelGroup' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelGroup.tpl'),
90
-		'panelHeading' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelHeading.tpl'),
91
-		'panelCollapse' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelCollapse.tpl'),
92
-		'elementsRow' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_elementsRow.tpl'),
89
+		'panelGroup' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelGroup.tpl'),
90
+		'panelHeading' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelHeading.tpl'),
91
+		'panelCollapse' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelCollapse.tpl'),
92
+		'elementsRow' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_elementsRow.tpl'),
93 93
 	);
94 94
 
95 95
 	// Easily loop through $itemsPerCategory-Array
96 96
 	$panelGroup = '';
97
-	foreach($categories as $catid => $category) {
97
+	foreach ($categories as $catid => $category) {
98 98
 		// Prepare collapse content / elements-list
99 99
 		$panelCollapse = '';
100
-		foreach($itemsPerCategory[$catid] as $el) {
100
+		foreach ($itemsPerCategory[$catid] as $el) {
101 101
 			$resourceTable = $el['type'];
102 102
 			$ph = prepareElementRowPh($el, $resourceTable, $resources);
103 103
 			$panelCollapse .= parsePh($tpl['elementsRow'], $ph);
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 		$panelGroup .= parsePh($tpl['panelHeading'], array(
108 108
 			'tab' => 'categories_list',
109 109
 			'category' => $categories[$catid],
110
-			'categoryid' => $catid != '' ? ' <small>(' . $catid . ')</small>' : '',
110
+			'categoryid' => $catid != '' ? ' <small>('.$catid.')</small>' : '',
111 111
 			'catid' => $catid,
112 112
 		));
113 113
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 	));
126 126
 }
127 127
 
128
-function prepareElementRowPh($row, $resourceTable, $resources) {
128
+function prepareElementRowPh($row, $resourceTable, $resources){
129 129
 	global $modx, $modx_textdir, $_style, $_lang;
130 130
 
131 131
 	$types = isset($resources->types[$resourceTable]) ? $resources->types[$resourceTable] : false;
@@ -133,32 +133,32 @@  discard block
 block discarded – undo
133 133
 	$class = '';
134 134
 	$_lang["confirm_delete"] = $_lang["delete"];
135 135
 
136
-	if($resourceTable == 'site_templates') {
136
+	if ($resourceTable == 'site_templates') {
137 137
 		$class = $row['selectable'] ? '' : 'disabledPlugin';
138 138
 		$lockElementType = 1;
139 139
 		$_lang["confirm_delete"] = $_lang["confirm_delete_template"];
140 140
 	}
141
-	if($resourceTable == 'site_tmplvars') {
141
+	if ($resourceTable == 'site_tmplvars') {
142 142
 		$class = $row['reltpl'] ? '' : 'disabledPlugin';
143 143
 		$lockElementType = 2;
144 144
 		$_lang["confirm_delete"] = $_lang["confirm_delete_tmplvars"];
145 145
 	}
146
-	if($resourceTable == 'site_htmlsnippets') {
146
+	if ($resourceTable == 'site_htmlsnippets') {
147 147
         $class = $row['disabled'] ? 'disabledPlugin' : '';
148 148
 		$lockElementType = 3;
149 149
 		$_lang["confirm_delete"] = $_lang["confirm_delete_htmlsnippet"];
150 150
 	}
151
-	if($resourceTable == 'site_snippets') {
151
+	if ($resourceTable == 'site_snippets') {
152 152
         $class = $row['disabled'] ? 'disabledPlugin' : '';
153 153
 		$lockElementType = 4;
154 154
 		$_lang["confirm_delete"] = $_lang["confirm_delete_snippet"];
155 155
 	}
156
-	if($resourceTable == 'site_plugins') {
156
+	if ($resourceTable == 'site_plugins') {
157 157
 		$class = $row['disabled'] ? 'disabledPlugin' : '';
158 158
 		$lockElementType = 5;
159 159
 		$_lang["confirm_delete"] = $_lang["confirm_delete_plugin"];
160 160
 	}
161
-	if($resourceTable == 'site_modules') {
161
+	if ($resourceTable == 'site_modules') {
162 162
         $class = $row['disabled'] ? '' : 'disabledPlugin';
163 163
 		$_lang["confirm_delete"] = $_lang["confirm_delete_module"];
164 164
 	}
@@ -166,65 +166,65 @@  discard block
 block discarded – undo
166 166
 	// Prepare displaying user-locks
167 167
 	$lockedByUser = '';
168 168
 	$rowLock = $modx->elementIsLocked($lockElementType, $row['id'], true);
169
-	if($rowLock && $modx->hasPermission('display_locks')) {
170
-		if($rowLock['sid'] == $modx->sid) {
169
+	if ($rowLock && $modx->hasPermission('display_locks')) {
170
+		if ($rowLock['sid'] == $modx->sid) {
171 171
 			$title = $modx->parseText($_lang["lock_element_editing"], array(
172
-				'element_type' => $_lang["lock_element_type_" . $lockElementType],
172
+				'element_type' => $_lang["lock_element_type_".$lockElementType],
173 173
 				'lasthit_df' => $rowLock['lasthit_df']
174 174
 			));
175
-			$lockedByUser = '<span title="' . $title . '" class="editResource" style="cursor:context-menu;">' . $_style['tree_preview_resource'] . '</span>&nbsp;';
175
+			$lockedByUser = '<span title="'.$title.'" class="editResource" style="cursor:context-menu;">'.$_style['tree_preview_resource'].'</span>&nbsp;';
176 176
 		} else {
177 177
 			$title = $modx->parseText($_lang["lock_element_locked_by"], array(
178
-				'element_type' => $_lang["lock_element_type_" . $lockElementType],
178
+				'element_type' => $_lang["lock_element_type_".$lockElementType],
179 179
 				'username' => $rowLock['username'],
180 180
 				'lasthit_df' => $rowLock['lasthit_df']
181 181
 			));
182
-			if($modx->hasPermission('remove_locks')) {
183
-				$lockedByUser = '<a href="javascript:;" onclick="unlockElement(' . $lockElementType . ', ' . $row['id'] . ', this);return false;" title="' . $title . '" class="lockedResource"><i class="' . $_style['icons_secured'] . '"></i></a>';
182
+			if ($modx->hasPermission('remove_locks')) {
183
+				$lockedByUser = '<a href="javascript:;" onclick="unlockElement('.$lockElementType.', '.$row['id'].', this);return false;" title="'.$title.'" class="lockedResource"><i class="'.$_style['icons_secured'].'"></i></a>';
184 184
 			} else {
185
-				$lockedByUser = '<span title="' . $title . '" class="lockedResource" style="cursor:context-menu;"><i class="' . $_style['icons_secured'] . '"></i></span>';
185
+				$lockedByUser = '<span title="'.$title.'" class="lockedResource" style="cursor:context-menu;"><i class="'.$_style['icons_secured'].'"></i></span>';
186 186
 			}
187 187
 		}
188 188
 	}
189
-	if($lockedByUser) {
190
-		$lockedByUser = '<div class="lockCell">' . $lockedByUser . '</div>';
189
+	if ($lockedByUser) {
190
+		$lockedByUser = '<div class="lockCell">'.$lockedByUser.'</div>';
191 191
 	}
192 192
 
193 193
 	// Caption
194
-	if($resourceTable == 'site_tmplvars') {
195
-		$caption = !empty($row['description']) ? ' ' . $row['caption'] . ' &nbsp; <small>(' . $row['description'] . ')</small>' : ' ' . $row['caption'];
194
+	if ($resourceTable == 'site_tmplvars') {
195
+		$caption = !empty($row['description']) ? ' '.$row['caption'].' &nbsp; <small>('.$row['description'].')</small>' : ' '.$row['caption'];
196 196
 	} else {
197
-		$caption = !empty($row['description']) ? ' ' . $row['description'] : '';
197
+		$caption = !empty($row['description']) ? ' '.$row['description'] : '';
198 198
 	}
199 199
 
200 200
 	// Special marks
201 201
 	$tplInfo = array();
202
-	if($row['locked']) {
202
+	if ($row['locked']) {
203 203
 		$tplInfo[] = $_lang['locked'];
204 204
 	}
205
-	if($row['id'] == $modx->config['default_template'] && $resourceTable == 'site_templates') {
205
+	if ($row['id'] == $modx->config['default_template'] && $resourceTable == 'site_templates') {
206 206
 		$tplInfo[] = $_lang['defaulttemplate_title'];
207 207
 	}
208
-	$marks = !empty($tplInfo) ? ' <em>(' . join(', ', $tplInfo) . ')</em>' : '';
208
+	$marks = !empty($tplInfo) ? ' <em>('.join(', ', $tplInfo).')</em>' : '';
209 209
 
210 210
 	/* row buttons */
211 211
 	$buttons = '';
212
-	if($modx->hasPermission($types['actions']['edit'][1])) {
213
-		$buttons .= '<li><a title="' . $_lang["edit_resource"] . '" href="index.php?a=' . $types['actions']['edit'][0] . '&amp;id=' . $row['id'] . '"><i class="fa fa-edit fa-fw"></i></a></li>';
212
+	if ($modx->hasPermission($types['actions']['edit'][1])) {
213
+		$buttons .= '<li><a title="'.$_lang["edit_resource"].'" href="index.php?a='.$types['actions']['edit'][0].'&amp;id='.$row['id'].'"><i class="fa fa-edit fa-fw"></i></a></li>';
214 214
 	}
215
-	if($modx->hasPermission($types['actions']['duplicate'][1])) {
216
-		$buttons .= '<li><a onclick="return confirm(\'' . $_lang["confirm_duplicate_record"] . '\')" title="' . $_lang["resource_duplicate"] . '" href="index.php?a=' . $types['actions']['duplicate'][0] . '&amp;id=' . $row['id'] . '"><i class="fa fa-clone fa-fw"></i></a></li>';
215
+	if ($modx->hasPermission($types['actions']['duplicate'][1])) {
216
+		$buttons .= '<li><a onclick="return confirm(\''.$_lang["confirm_duplicate_record"].'\')" title="'.$_lang["resource_duplicate"].'" href="index.php?a='.$types['actions']['duplicate'][0].'&amp;id='.$row['id'].'"><i class="fa fa-clone fa-fw"></i></a></li>';
217 217
 	}
218
-	if($modx->hasPermission($types['actions']['remove'][1])) {
219
-		$buttons .= '<li><a onclick="return confirm(\'' . $_lang["confirm_delete"] . '\')" title="' . $_lang["delete"] . '" href="index.php?a=' . $types['actions']['remove'][0] . '&amp;id=' . $row['id'] . '"><i class="fa fa-trash fa-fw"></i></a></li>';
218
+	if ($modx->hasPermission($types['actions']['remove'][1])) {
219
+		$buttons .= '<li><a onclick="return confirm(\''.$_lang["confirm_delete"].'\')" title="'.$_lang["delete"].'" href="index.php?a='.$types['actions']['remove'][0].'&amp;id='.$row['id'].'"><i class="fa fa-trash fa-fw"></i></a></li>';
220 220
 	}
221
-	$buttons = $buttons ? '<div class="btnCell"><ul class="elements_buttonbar">' . $buttons . '</ul></div>' : '';
221
+	$buttons = $buttons ? '<div class="btnCell"><ul class="elements_buttonbar">'.$buttons.'</ul></div>' : '';
222 222
 
223 223
 	$catid = $row['catid'] ? $row['catid'] : 0;
224 224
 
225 225
 	// Placeholders for elements-row
226 226
 	return array(
227
-		'class' => $class ? ' class="' . $class . '"' : '',
227
+		'class' => $class ? ' class="'.$class.'"' : '',
228 228
 		'lockedByUser' => $lockedByUser,
229 229
 		'name' => $row['name'],
230 230
 		'caption' => $caption,
Please login to merge, or discard this patch.