@@ -116,7 +116,8 @@ discard block |
||
116 | 116 | * @return string |
117 | 117 | */ |
118 | 118 | public function getHashType($db_value = '') |
119 | - { // md5 | v1 | phpass |
|
119 | + { |
|
120 | +// md5 | v1 | phpass |
|
120 | 121 | $c = substr($db_value, 0, 1); |
121 | 122 | if ($c === '$') { |
122 | 123 | return 'phpass'; |
@@ -135,7 +136,8 @@ discard block |
||
135 | 136 | * @return string |
136 | 137 | */ |
137 | 138 | public function genV1Hash($password, $seed = '1') |
138 | - { // $seed is user_id basically |
|
139 | + { |
|
140 | +// $seed is user_id basically |
|
139 | 141 | $modx = evolutionCMS(); |
140 | 142 | |
141 | 143 | if (isset($modx->config['pwd_hash_algo']) && !empty($modx->config['pwd_hash_algo'])) { |
@@ -279,7 +279,8 @@ discard block |
||
279 | 279 | $row['count'] = $this->count; |
280 | 280 | $row['url'] = $modx->makeUrl($row['id']); |
281 | 281 | |
282 | - if (!$row['wasNull']) { // needs writing a document |
|
282 | + if (!$row['wasNull']) { |
|
283 | +// needs writing a document |
|
283 | 284 | $docname = $this->getFileName($row['id'], $row['alias'], $prefix, $suffix); |
284 | 285 | $filename = $dirpath . $docname; |
285 | 286 | if (!is_file($filename)) { |
@@ -307,7 +308,8 @@ discard block |
||
307 | 308 | $this->output[] = $this->parsePlaceholder($_lang['export_site_exporting_document'], $row); |
308 | 309 | } |
309 | 310 | if ($row['isfolder'] === '1' && ($modx->config['suffix_mode'] !== '1' || strpos($row['alias'], |
310 | - '.') === false)) { // needs making a folder |
|
311 | + '.') === false)) { |
|
312 | +// needs making a folder |
|
311 | 313 | $end_dir = ($row['alias'] !== '') ? $row['alias'] : $row['id']; |
312 | 314 | $dir_path = $dirpath . $end_dir; |
313 | 315 | if (strpos($dir_path, MODX_BASE_PATH) === false) { |
@@ -1,6 +1,7 @@ discard block |
||
1 | 1 | <?php namespace EvolutionCMS\Legacy; |
2 | 2 | |
3 | -class mgrResources { |
|
3 | +class mgrResources |
|
4 | +{ |
|
4 | 5 | /** |
5 | 6 | * @var array |
6 | 7 | */ |
@@ -21,7 +22,8 @@ discard block |
||
21 | 22 | /** |
22 | 23 | * mgrResources constructor. |
23 | 24 | */ |
24 | - public function __construct() { |
|
25 | + public function __construct() |
|
26 | + { |
|
25 | 27 | $this->setTypes(); |
26 | 28 | $this->queryItemsFromDB(); |
27 | 29 | $this->prepareCategoryArrays(); |
@@ -30,7 +32,8 @@ discard block |
||
30 | 32 | /** |
31 | 33 | * @return void |
32 | 34 | */ |
33 | - public function setTypes() { |
|
35 | + public function setTypes() |
|
36 | + { |
|
34 | 37 | global $_lang; |
35 | 38 | $this->types['site_templates'] = array( |
36 | 39 | 'title'=>$_lang["manage_templates"], |
@@ -68,7 +71,8 @@ discard block |
||
68 | 71 | /** |
69 | 72 | * @return void |
70 | 73 | */ |
71 | - public function queryItemsFromDB() { |
|
74 | + public function queryItemsFromDB() |
|
75 | + { |
|
72 | 76 | foreach($this->types as $resourceTable=>$type) { |
73 | 77 | if($this->hasAnyPermissions($type['permissions'])) { |
74 | 78 | $nameField = isset($type['name']) ? $type['name'] : 'name'; |
@@ -81,11 +85,13 @@ discard block |
||
81 | 85 | * @param array $permissions |
82 | 86 | * @return bool |
83 | 87 | */ |
84 | - public function hasAnyPermissions($permissions) { |
|
88 | + public function hasAnyPermissions($permissions) |
|
89 | + { |
|
85 | 90 | $modx = evolutionCMS(); |
86 | 91 | |
87 | - foreach($permissions as $p) |
|
88 | - if($modx->hasPermission($p)) return true; |
|
92 | + foreach($permissions as $p) { |
|
93 | + if($modx->hasPermission($p)) return true; |
|
94 | + } |
|
89 | 95 | |
90 | 96 | return false; |
91 | 97 | } |
@@ -95,7 +101,8 @@ discard block |
||
95 | 101 | * @param string $nameField |
96 | 102 | * @return array|bool |
97 | 103 | */ |
98 | - public function queryResources($resourceTable, $nameField = 'name') { |
|
104 | + public function queryResources($resourceTable, $nameField = 'name') |
|
105 | + { |
|
99 | 106 | $modx = evolutionCMS(); global $_lang; |
100 | 107 | |
101 | 108 | $allowed = array( |
@@ -112,8 +119,9 @@ discard block |
||
112 | 119 | $tvsql = 'site_tmplvars.caption, '; |
113 | 120 | $tvjoin = sprintf('LEFT JOIN %s AS stt ON site_tmplvars.id=stt.tmplvarid GROUP BY site_tmplvars.id,reltpl', $modx->getFullTableName('site_tmplvar_templates')); |
114 | 121 | $sttfield = 'IF(stt.templateid,1,0) AS reltpl,'; |
122 | + } else { |
|
123 | + $sttfield = ''; |
|
115 | 124 | } |
116 | - else $sttfield = ''; |
|
117 | 125 | |
118 | 126 | $selectableTemplates = $resourceTable === 'site_templates' ? "{$resourceTable}.selectable, " : ""; |
119 | 127 | |
@@ -126,7 +134,9 @@ discard block |
||
126 | 134 | ); |
127 | 135 | $limit = $modx->getDatabase()->getRecordCount($rs); |
128 | 136 | |
129 | - if($limit < 1) return false; |
|
137 | + if($limit < 1) { |
|
138 | + return false; |
|
139 | + } |
|
130 | 140 | |
131 | 141 | $result = array(); |
132 | 142 | while ($row = $modx->getDatabase()->getRow($rs)) { |
@@ -138,7 +148,8 @@ discard block |
||
138 | 148 | /** |
139 | 149 | * @return void |
140 | 150 | */ |
141 | - public function prepareCategoryArrays() { |
|
151 | + public function prepareCategoryArrays() |
|
152 | + { |
|
142 | 153 | foreach($this->items as $type=>$items) { |
143 | 154 | foreach((array)$items as $item) { |
144 | 155 | $catid = $item['catid'] ? $item['catid'] : 0; |
@@ -154,7 +165,7 @@ discard block |
||
154 | 165 | |
155 | 166 | // Now sort by name |
156 | 167 | foreach($this->itemsPerCategory as $catid=>$items) { |
157 | - usort($this->itemsPerCategory[$catid], function ($a, $b) { |
|
168 | + usort($this->itemsPerCategory[$catid], function ($a, $b){ |
|
158 | 169 | return strcasecmp($a['name'], $b['name']); |
159 | 170 | }); |
160 | 171 | } |
@@ -177,7 +177,8 @@ |
||
177 | 177 | * @return bool|string |
178 | 178 | */ |
179 | 179 | public function putChunk($chunkName) |
180 | - { // alias name >.< |
|
180 | + { |
|
181 | +// alias name >.< |
|
181 | 182 | $modx = evolutionCMS(); |
182 | 183 | |
183 | 184 | return $modx->getChunk($chunkName); |
@@ -2,4 +2,6 @@ |
||
2 | 2 | |
3 | 3 | use Exception; |
4 | 4 | |
5 | -class ServiceNotFoundException extends Exception{} |
|
5 | +class ServiceNotFoundException extends Exception |
|
6 | +{ |
|
7 | +} |
@@ -2,4 +2,6 @@ |
||
2 | 2 | |
3 | 3 | use Exception; |
4 | 4 | |
5 | -class ContainerException extends Exception{} |
|
5 | +class ContainerException extends Exception |
|
6 | +{ |
|
7 | +} |
@@ -373,7 +373,8 @@ discard block |
||
373 | 373 | * @return bool|mixed|mysqli_result |
374 | 374 | */ |
375 | 375 | public function save($fields, $table, $where = '') |
376 | - { // This is similar to "replace into table". |
|
376 | + { |
|
377 | +// This is similar to "replace into table". |
|
377 | 378 | |
378 | 379 | if ($where === '') { |
379 | 380 | $mode = 'insert'; |
@@ -490,7 +491,7 @@ discard block |
||
490 | 491 | { |
491 | 492 | $out = false; |
492 | 493 | if ($ds instanceof mysqli_result) { |
493 | - switch($mode){ |
|
494 | + switch($mode) { |
|
494 | 495 | case 'assoc': |
495 | 496 | $out = $ds->fetch_assoc(); |
496 | 497 | break; |
@@ -282,7 +282,8 @@ discard block |
||
282 | 282 | return $service; |
283 | 283 | } |
284 | 284 | |
285 | - private function checkServiceAlias($name){ |
|
285 | + private function checkServiceAlias($name) |
|
286 | + { |
|
286 | 287 | foreach ($this->providerAliases as $alias => $interface) { |
287 | 288 | if($name === $interface) { |
288 | 289 | return $alias; |
@@ -962,13 +963,15 @@ discard block |
||
962 | 963 | $this->virtualDir = ''; |
963 | 964 | } |
964 | 965 | |
965 | - if (preg_match('@^[1-9][0-9]*$@', $q) && !isset($this->documentListing[$q])) { /* we got an ID returned, check to make sure it's not an alias */ |
|
966 | + if (preg_match('@^[1-9][0-9]*$@', $q) && !isset($this->documentListing[$q])) { |
|
967 | +/* we got an ID returned, check to make sure it's not an alias */ |
|
966 | 968 | /* FS#476 and FS#308: check that id is valid in terms of virtualDir structure */ |
967 | 969 | if ($this->config['use_alias_path'] == 1) { |
968 | 970 | if (($this->virtualDir != '' && !isset($this->documentListing[$this->virtualDir . '/' . $q]) || ($this->virtualDir == '' && !isset($this->documentListing[$q]))) && (($this->virtualDir != '' && isset($this->documentListing[$this->virtualDir]) && in_array($q, $this->getChildIds($this->documentListing[$this->virtualDir], 1))) || ($this->virtualDir == '' && in_array($q, $this->getChildIds(0, 1))))) { |
969 | 971 | $this->documentMethod = 'id'; |
970 | 972 | return $q; |
971 | - } else { /* not a valid id in terms of virtualDir, treat as alias */ |
|
973 | + } else { |
|
974 | +/* not a valid id in terms of virtualDir, treat as alias */ |
|
972 | 975 | $this->documentMethod = 'alias'; |
973 | 976 | return $q; |
974 | 977 | } |
@@ -976,7 +979,8 @@ discard block |
||
976 | 979 | $this->documentMethod = 'id'; |
977 | 980 | return $q; |
978 | 981 | } |
979 | - } else { /* we didn't get an ID back, so instead we assume it's an alias */ |
|
982 | + } else { |
|
983 | +/* we didn't get an ID back, so instead we assume it's an alias */ |
|
980 | 984 | if ($this->config['friendly_alias_urls'] != 1) { |
981 | 985 | $q = $qOrig; |
982 | 986 | } |
@@ -1006,13 +1010,14 @@ discard block |
||
1006 | 1010 | * @param $id |
1007 | 1011 | * @return array|mixed|null|string |
1008 | 1012 | */ |
1009 | - public function makePageCacheKey($id){ |
|
1013 | + public function makePageCacheKey($id) |
|
1014 | + { |
|
1010 | 1015 | $hash = $id; |
1011 | 1016 | $tmp = null; |
1012 | 1017 | $params = array(); |
1013 | - if(!empty($this->systemCacheKey)){ |
|
1018 | + if(!empty($this->systemCacheKey)) { |
|
1014 | 1019 | $hash = $this->systemCacheKey; |
1015 | - }else { |
|
1020 | + } else { |
|
1016 | 1021 | if (!empty($_GET)) { |
1017 | 1022 | // Sort GET parameters so that the order of parameters on the HTTP request don't affect the generated cache ID. |
1018 | 1023 | $params = $_GET; |
@@ -1021,7 +1026,7 @@ discard block |
||
1021 | 1026 | } |
1022 | 1027 | } |
1023 | 1028 | $evtOut = $this->invokeEvent("OnMakePageCacheKey", array ("hash" => $hash, "id" => $id, 'params' => $params)); |
1024 | - if (is_array($evtOut) && count($evtOut) > 0){ |
|
1029 | + if (is_array($evtOut) && count($evtOut) > 0) { |
|
1025 | 1030 | $tmp = array_pop($evtOut); |
1026 | 1031 | } |
1027 | 1032 | return empty($tmp) ? $hash : $tmp; |
@@ -1348,7 +1353,8 @@ discard block |
||
1348 | 1353 | $where = "pub_date <= {$timeNow} AND pub_date!=0 AND published=0"; |
1349 | 1354 | $result_pub = $this->getDatabase()->select( 'id', '[+prefix+]site_content', $where); |
1350 | 1355 | $this->getDatabase()->update($field, '[+prefix+]site_content', $where); |
1351 | - if ($this->getDatabase()->getRecordCount($result_pub) >= 1) { //Event unPublished doc |
|
1356 | + if ($this->getDatabase()->getRecordCount($result_pub) >= 1) { |
|
1357 | +//Event unPublished doc |
|
1352 | 1358 | while ($row_pub = $this->getDatabase()->getRow($result_pub)) { |
1353 | 1359 | $this->invokeEvent("OnDocUnPublished", array( |
1354 | 1360 | "docid" => $row_pub['id'] |
@@ -1361,7 +1367,8 @@ discard block |
||
1361 | 1367 | $where = "unpub_date <= {$timeNow} AND unpub_date!=0 AND published=1"; |
1362 | 1368 | $result_unpub = $this->getDatabase()->select( 'id', '[+prefix+]site_content', $where); |
1363 | 1369 | $this->getDatabase()->update($field, '[+prefix+]site_content', $where); |
1364 | - if ($this->getDatabase()->getRecordCount($result_unpub) >= 1) { //Event unPublished doc |
|
1370 | + if ($this->getDatabase()->getRecordCount($result_unpub) >= 1) { |
|
1371 | +//Event unPublished doc |
|
1365 | 1372 | while ($row_unpub = $this->getDatabase()->getRow($result_unpub)) { |
1366 | 1373 | $this->invokeEvent("OnDocUnPublished", array( |
1367 | 1374 | "docid" => $row_unpub['id'] |
@@ -1448,10 +1455,18 @@ discard block |
||
1448 | 1455 | return array(); |
1449 | 1456 | } |
1450 | 1457 | $spacer = md5('<<<EVO>>>'); |
1451 | - if($left==='{{' && strpos($content,';}}')!==false) $content = str_replace(';}}', sprintf(';}%s}', $spacer),$content); |
|
1452 | - if($left==='{{' && strpos($content,'{{}}')!==false) $content = str_replace('{{}}',sprintf('{%$1s{}%$1s}',$spacer),$content); |
|
1453 | - if($left==='[[' && strpos($content,']]]]')!==false) $content = str_replace(']]]]',sprintf(']]%s]]', $spacer),$content); |
|
1454 | - if($left==='[[' && strpos($content,']]]')!==false) $content = str_replace(']]]', sprintf(']%s]]', $spacer),$content); |
|
1458 | + if($left==='{{' && strpos($content,';}}')!==false) { |
|
1459 | + $content = str_replace(';}}', sprintf(';}%s}', $spacer),$content); |
|
1460 | + } |
|
1461 | + if($left==='{{' && strpos($content,'{{}}')!==false) { |
|
1462 | + $content = str_replace('{{}}',sprintf('{%$1s{}%$1s}',$spacer),$content); |
|
1463 | + } |
|
1464 | + if($left==='[[' && strpos($content,']]]]')!==false) { |
|
1465 | + $content = str_replace(']]]]',sprintf(']]%s]]', $spacer),$content); |
|
1466 | + } |
|
1467 | + if($left==='[[' && strpos($content,']]]')!==false) { |
|
1468 | + $content = str_replace(']]]', sprintf(']%s]]', $spacer),$content); |
|
1469 | + } |
|
1455 | 1470 | |
1456 | 1471 | $pos['<![CDATA['] = strpos($content, '<![CDATA['); |
1457 | 1472 | $pos[']]>'] = strpos($content, ']]>'); |
@@ -1504,7 +1519,8 @@ discard block |
||
1504 | 1519 | } |
1505 | 1520 | } |
1506 | 1521 | |
1507 | - if (!in_array($fetch, $tags)) { // Avoid double Matches |
|
1522 | + if (!in_array($fetch, $tags)) { |
|
1523 | +// Avoid double Matches |
|
1508 | 1524 | $tags[] = $fetch; // Fetch |
1509 | 1525 | }; |
1510 | 1526 | $fetch = ''; // and reset |
@@ -1522,7 +1538,9 @@ discard block |
||
1522 | 1538 | } |
1523 | 1539 | } |
1524 | 1540 | foreach($tags as $i=>$tag) { |
1525 | - if(strpos($tag,$spacer)!==false) $tags[$i] = str_replace($spacer, '', $tag); |
|
1541 | + if(strpos($tag,$spacer)!==false) { |
|
1542 | + $tags[$i] = str_replace($spacer, '', $tag); |
|
1543 | + } |
|
1526 | 1544 | } |
1527 | 1545 | return $tags; |
1528 | 1546 | } |
@@ -1562,7 +1580,10 @@ discard block |
||
1562 | 1580 | } |
1563 | 1581 | |
1564 | 1582 | foreach ($matches[1] as $i => $key) { |
1565 | - if(strpos($key,'[+')!==false) continue; // Allow chunk {{chunk?¶m=`xxx`}} with [*tv_name_[+param+]*] as content |
|
1583 | + if(strpos($key,'[+')!==false) { |
|
1584 | + continue; |
|
1585 | + } |
|
1586 | + // Allow chunk {{chunk?¶m=`xxx`}} with [*tv_name_[+param+]*] as content |
|
1566 | 1587 | if (substr($key, 0, 1) == '#') { |
1567 | 1588 | $key = substr($key, 1); |
1568 | 1589 | } // remove # for QuickEdit format |
@@ -2288,7 +2309,8 @@ discard block |
||
2288 | 2309 | * @return mixed|string |
2289 | 2310 | */ |
2290 | 2311 | public function _getSGVar($value) |
2291 | - { // Get super globals |
|
2312 | + { |
|
2313 | +// Get super globals |
|
2292 | 2314 | $key = $value; |
2293 | 2315 | $_ = $this->config['enable_filter']; |
2294 | 2316 | $this->config['enable_filter'] = 1; |
@@ -2693,7 +2715,8 @@ discard block |
||
2693 | 2715 | if ($this->config['friendly_urls'] == 1) { |
2694 | 2716 | $aliases = array(); |
2695 | 2717 | if (is_array($this->documentListing)) { |
2696 | - foreach ($this->documentListing as $path => $docid) { // This is big Loop on large site! |
|
2718 | + foreach ($this->documentListing as $path => $docid) { |
|
2719 | +// This is big Loop on large site! |
|
2697 | 2720 | $aliases[$docid] = $path; |
2698 | 2721 | $isfolder[$docid] = $this->aliasListing[$docid]['isfolder']; |
2699 | 2722 | } |
@@ -2726,7 +2749,7 @@ discard block |
||
2726 | 2749 | $isfriendly = ($this->config['friendly_alias_urls'] == 1 ? 1 : 0); |
2727 | 2750 | $pref = $this->config['friendly_url_prefix']; |
2728 | 2751 | $suff = $this->config['friendly_url_suffix']; |
2729 | - $documentSource = preg_replace_callback($in, function ($m) use ($aliases, $isfolder, $isfriendly, $pref, $suff) { |
|
2752 | + $documentSource = preg_replace_callback($in, function ($m) use ($aliases, $isfolder, $isfriendly, $pref, $suff){ |
|
2730 | 2753 | global $modx; |
2731 | 2754 | $thealias = $aliases[$m[1]]; |
2732 | 2755 | $thefolder = $isfolder[$m[1]]; |
@@ -4509,7 +4532,8 @@ discard block |
||
4509 | 4532 | if (isset ($this->snippetCache[$snippetName])) { |
4510 | 4533 | $snippet = $this->snippetCache[$snippetName]; |
4511 | 4534 | $properties = !empty($this->snippetCache[$snippetName . "Props"]) ? $this->snippetCache[$snippetName . "Props"] : ''; |
4512 | - } else { // not in cache so let's check the db |
|
4535 | + } else { |
|
4536 | +// not in cache so let's check the db |
|
4513 | 4537 | $sql = "SELECT ss.`name`, ss.`snippet`, ss.`properties`, sm.properties as `sharedproperties` FROM " . $this->getFullTableName("site_snippets") . " as ss LEFT JOIN " . $this->getFullTableName('site_modules') . " as sm on sm.guid=ss.moduleguid WHERE ss.`name`='" . $this->getDatabase()->escape($snippetName) . "' AND ss.disabled=0;"; |
4514 | 4538 | $result = $this->getDatabase()->query($sql); |
4515 | 4539 | if ($this->getDatabase()->getRecordCount($result) == 1) { |
@@ -5010,7 +5034,7 @@ discard block |
||
5010 | 5034 | $result = $this->getDatabase()->makeArray($rs); |
5011 | 5035 | |
5012 | 5036 | // get default/built-in template variables |
5013 | - if(is_array($docRow)){ |
|
5037 | + if(is_array($docRow)) { |
|
5014 | 5038 | ksort($docRow); |
5015 | 5039 | |
5016 | 5040 | foreach ($docRow as $key => $value) { |
@@ -5485,12 +5509,16 @@ discard block |
||
5485 | 5509 | return ''; |
5486 | 5510 | } // nothing to register |
5487 | 5511 | if (!is_array($options)) { |
5488 | - if (is_bool($options)) // backward compatibility with old plaintext parameter |
|
5512 | + if (is_bool($options)) { |
|
5513 | + // backward compatibility with old plaintext parameter |
|
5489 | 5514 | { |
5490 | 5515 | $options = array('plaintext' => $options); |
5491 | - } elseif (is_string($options)) // Also allow script name as 2nd param |
|
5516 | + } |
|
5517 | + } elseif (is_string($options)) { |
|
5518 | + // Also allow script name as 2nd param |
|
5492 | 5519 | { |
5493 | 5520 | $options = array('name' => $options); |
5521 | + } |
|
5494 | 5522 | } else { |
5495 | 5523 | $options = array(); |
5496 | 5524 | } |
@@ -5502,7 +5530,8 @@ discard block |
||
5502 | 5530 | unset($overwritepos); // probably unnecessary--just making sure |
5503 | 5531 | |
5504 | 5532 | $useThisVer = true; |
5505 | - if (isset($this->loadedjscripts[$key])) { // a matching script was found |
|
5533 | + if (isset($this->loadedjscripts[$key])) { |
|
5534 | +// a matching script was found |
|
5506 | 5535 | // if existing script is a startup script, make sure the candidate is also a startup script |
5507 | 5536 | if ($this->loadedjscripts[$key]['startup']) { |
5508 | 5537 | $startup = true; |
@@ -5522,7 +5551,8 @@ discard block |
||
5522 | 5551 | // overwrite the old script (the position may be important for dependent scripts) |
5523 | 5552 | $overwritepos = $this->loadedjscripts[$key]['pos']; |
5524 | 5553 | } |
5525 | - } else { // Use the original version |
|
5554 | + } else { |
|
5555 | +// Use the original version |
|
5526 | 5556 | if ($startup == true && $this->loadedjscripts[$key]['startup'] == false) { |
5527 | 5557 | // need to move the exisiting script to the head |
5528 | 5558 | $version = $this->loadedjscripts[$key][$version]; |
@@ -5647,7 +5677,8 @@ discard block |
||
5647 | 5677 | } |
5648 | 5678 | |
5649 | 5679 | $results = null; |
5650 | - foreach ($this->pluginEvent[$evtName] as $pluginName) { // start for loop |
|
5680 | + foreach ($this->pluginEvent[$evtName] as $pluginName) { |
|
5681 | +// start for loop |
|
5651 | 5682 | if ($this->dumpPlugins) { |
5652 | 5683 | $eventtime = $this->getMicroTime(); |
5653 | 5684 | } |
@@ -5793,8 +5824,7 @@ discard block |
||
5793 | 5824 | } |
5794 | 5825 | } |
5795 | 5826 | } |
5796 | - } |
|
5797 | - elseif(\is_array($propertyString)) { |
|
5827 | + } elseif(\is_array($propertyString)) { |
|
5798 | 5828 | $property = $propertyString; |
5799 | 5829 | } |
5800 | 5830 | if (!empty($elementName) && !empty($elementType)) { |
@@ -6241,7 +6271,8 @@ discard block |
||
6241 | 6271 | * @return bool |
6242 | 6272 | */ |
6243 | 6273 | public function isSafeCode($phpcode = '', $safe_functions = '') |
6244 | - { // return true or false |
|
6274 | + { |
|
6275 | +// return true or false |
|
6245 | 6276 | if ($safe_functions == '') { |
6246 | 6277 | return false; |
6247 | 6278 | } |
@@ -6650,7 +6681,7 @@ discard block |
||
6650 | 6681 | $args = array_pad(array(), $_, '$var'); |
6651 | 6682 | $args = implode(", ", $args); |
6652 | 6683 | $modx = &$this; |
6653 | - $args = preg_replace_callback('/\$var/', function () use ($modx, &$tmp, $val) { |
|
6684 | + $args = preg_replace_callback('/\$var/', function () use ($modx, &$tmp, $val){ |
|
6654 | 6685 | $arg = $val['args'][$tmp - 1]; |
6655 | 6686 | switch (true) { |
6656 | 6687 | case is_null($arg): { |
@@ -1,3 +1,5 @@ |
||
1 | 1 | <?php namespace EvolutionCMS\Interfaces; |
2 | 2 | |
3 | -interface ManagerApiInterface{} |
|
3 | +interface ManagerApiInterface |
|
4 | +{ |
|
5 | +} |