Skip to content

Commit 8341aad

Browse files
committed
Merge remote-tracking branch 'origin/3.5.x' into 3.5.x
2 parents 35703ca + 9dc55a2 commit 8341aad

File tree

134 files changed

+1279
-1279
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+1279
-1279
lines changed

assets/modules/store/core.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
}
4545
} else {
4646
$extension = pathinfo($_FILES['install_file']['name'], PATHINFO_EXTENSION);
47-
if( !in_array($extension, array('zip'))) {
47+
if( !in_array($extension, ['zip'])) {
4848
die('Only ZIP-Files allowed');
4949
}
5050
if (!move_uploaded_file($_FILES['install_file']['tmp_name'], MODX_BASE_PATH."assets/cache/store/temp.zip")) {
@@ -154,7 +154,7 @@
154154

155155
default:
156156
//prepare list of snippets
157-
$types = array('snippets','plugins','modules');
157+
$types = ['snippets','plugins','modules'];
158158
$snippets = \EvolutionCMS\Models\SiteSnippet::query()->get();
159159
foreach ($snippets as $snippet){
160160
$PACK[$value][$snippet->name]= $Store->get_version($snippet->description) ;

assets/plugins/codemirror/codemirror.plugin.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@
130130
case 'OnTVFormRender':
131131
$tvMode = true;
132132
// $limitedHeight = true; // No limited height since MODX 1.2
133-
$elements = array(
133+
$elements = [
134134
$textarea_name,
135135
'properties'
136-
);
136+
];
137137
$mode = 'application/x-httpd-php-open';
138138
$rte = ($prte ? $prte : 'none');
139139
$lang = "php";
@@ -331,7 +331,7 @@ function makeMarker(symbol) {
331331
}
332332

333333
if(!$tvMode) {
334-
$elements = array($textarea_name);
334+
$elements = [$textarea_name];
335335
}
336336

337337
if(('none' == $rte) && $mode && $elements !== NULL) {

assets/plugins/extrascheck/CheckOutdated.class.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class CheckOutdated
2727
* @param string $pluginName
2828
* @param array $lang
2929
*/
30-
public function __construct($modx, $pluginName, $lang = array())
30+
public function __construct($modx, $pluginName, $lang = [])
3131
{
3232
$this->modx = $modx;
3333
$this->pluginName = $pluginName;
@@ -54,7 +54,7 @@ public function load($source)
5454
$data = json_decode($data, true);
5555
}
5656

57-
return \is_array($data) ? $data : array();
57+
return \is_array($data) ? $data : [];
5858
}
5959

6060
/**
@@ -92,15 +92,15 @@ public function snippet($name, $options)
9292
if (version_compare($currentVersion, $minVersion, 'lt')) {
9393
$out .= $this->parseTemplate(
9494
$tpl,
95-
array(
95+
[
9696
'name' => $snippet->name,
9797
'replaced' => $replaced,
9898
'isSecurity' => $isSecurity,
9999
'minVersion' => $minVersion,
100100
'currentVersion' => $currentVersion,
101101
'extrasID' => $this->getExtrasId(),
102102
'extrasURL' => $this->getExtrasUrl($snippet->name)
103-
)
103+
]
104104
);
105105
}
106106

@@ -144,15 +144,15 @@ public function plugin($name, $options)
144144
if (version_compare($currentVersion, $minVersion, 'lt')) {
145145
$out .= $this->parseTemplate(
146146
$tpl,
147-
array(
147+
[
148148
'name' => $plugin->name,
149149
'replaced' => $replaced,
150150
'isSecurity' => $isSecurity,
151151
'minVersion' => $minVersion,
152152
'currentVersion' => $currentVersion,
153153
'extrasID' => $this->getExtrasId(),
154154
'extrasURL' => $this->getExtrasUrl($plugin->name)
155-
)
155+
]
156156
);
157157
}
158158
}
@@ -194,15 +194,15 @@ public function module($name, $options)
194194
if (version_compare($currentVersion, $minVersion, 'lt')) {
195195
$out .= $this->parseTemplate(
196196
$tpl,
197-
array(
197+
[
198198
'name' => $module->name,
199199
'replaced' => $replaced,
200200
'isSecurity' => $isSecurity,
201201
'minVersion' => $minVersion,
202202
'currentVersion' => $currentVersion,
203203
'extrasID' => $this->getExtrasId(),
204204
'extrasURL' => $this->getExtrasUrl($module->name)
205-
)
205+
]
206206
);
207207
}
208208
}
@@ -216,7 +216,7 @@ public function module($name, $options)
216216
* @param array $options
217217
* @return string
218218
*/
219-
public function file($path, $options = array())
219+
public function file($path, $options = [])
220220
{
221221
$out = '';
222222
if (file_exists(MODX_BASE_PATH . $path)) {
@@ -241,7 +241,7 @@ public function file($path, $options = array())
241241
* @param array $options
242242
* @return string
243243
*/
244-
public function theme($theme, $options = array())
244+
public function theme($theme, $options = [])
245245
{
246246
$out = '';
247247
if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $theme)) {
@@ -257,11 +257,11 @@ public function theme($theme, $options = array())
257257

258258
$out = $this->parseTemplate(
259259
$tpl,
260-
array(
260+
[
261261
'theme' => $theme,
262262
'isSecurity' => $isSecurity,
263263
'path' => MODX_MANAGER_PATH . 'media/style/'
264-
)
264+
]
265265
);
266266
}
267267

@@ -288,10 +288,10 @@ public function rss($key, $options)
288288

289289
$out = $this->parseTemplate(
290290
$tpl,
291-
array(
291+
[
292292
'extrasID' => $this->getExtrasId(),
293293
'oldUrl' => $options['old']
294-
)
294+
]
295295
);
296296
}
297297

@@ -361,7 +361,7 @@ public function makeConfigButton($title)
361361
{
362362
$button = '';
363363
if ($this->modx->hasPermission('edit_plugin')) {
364-
$popup = array(
364+
$popup = [
365365
'url' => MODX_MANAGER_URL . '?a=102&id=' . $this->getPluginId() . '&tab=1',
366366
'title1' => $title,
367367
'icon' => 'fa-cog',
@@ -374,7 +374,7 @@ public function makeConfigButton($title)
374374
'hover' => 0,
375375
'overlay' => 1,
376376
'overlayclose' => 1
377-
);
377+
];
378378

379379
$button = '<a ' .
380380
'data-toggle="tooltip" ' .
@@ -395,7 +395,7 @@ public function makeConfigButton($title)
395395
/**
396396
* @param array $lexicon
397397
*/
398-
public function setLang($lexicon = array())
398+
public function setLang($lexicon = [])
399399
{
400400
$lang = $this->modx->getConfig('manager_language');
401401
if (file_exists( __DIR__ . '/lang/'.$lang.'/core.inc.php')){
@@ -424,7 +424,7 @@ public function setLang($lexicon = array())
424424
*/
425425
public function process($type, $item, $options)
426426
{
427-
$available = array('rss', 'file', 'theme', 'snippet', 'plugin', 'module');
427+
$available = ['rss', 'file', 'theme', 'snippet', 'plugin', 'module'];
428428

429429
if (\in_array($type, $available) && method_exists($this, $type)) {
430430
$out = $this->{$type}($item, $options);
@@ -437,12 +437,12 @@ public function process($type, $item, $options)
437437
* @param array $data
438438
* @return string
439439
*/
440-
public function parseTemplate($tpl, $data = array())
440+
public function parseTemplate($tpl, $data = [])
441441
{
442442
return $this->tpl->parseChunk(
443443
($tpl),
444444
array_merge(
445-
array('evo_cms_version' => $this->modx->getVersionData('version')),
445+
['evo_cms_version' => $this->modx->getVersionData('version')],
446446
$data,
447447
$this->lang
448448
),

assets/plugins/extrascheck/OutdatedExtrasCheck.plugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
$modx->setPlaceholder('button_pl_config', $button);
4848

4949
$wdgTitle = $checkOutdated->parseTemplate('@CODE:EVO [+evo_cms_version+] - [+title+]');
50-
$widgets['xtraCheck'] = array(
50+
$widgets['xtraCheck'] = [
5151
'menuindex' => '0',
5252
'id' => 'xtraCheck' . $checkOutdated->getPluginId() . '',
5353
'cols' => 'col-lg-12',
@@ -57,7 +57,7 @@
5757
'title' => '' . $wdgTitle . ' ' . $button . '',
5858
'body' => '<div class="card-body">' . $out . '</div>',
5959
'hide' => '0'
60-
);
60+
];
6161
$modx->event->setOutput(serialize($widgets));
6262
}
6363
break;

assets/plugins/extrascheck/lang/english/core.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//
1212
// GNU General Public License (GPL - http://www.gnu.org/copyleft/gpl.html)
1313
//
14-
$_lang = array();
14+
$_lang = [];
1515

1616
$_lang['title'] = 'Extras compatibility check';
1717
$_lang['outdated'] = 'is <b>outdated</b>';

assets/plugins/extrascheck/lang/italian/core.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//
1212
// GNU General Public License (GPL - http://www.gnu.org/copyleft/gpl.html)
1313
//
14-
$_lang = array();
14+
$_lang = [];
1515

1616
$_lang['title'] = 'Controllo Compatibilità Extras';
1717
$_lang['outdated'] = 'è <b>obsoleto</b>';

assets/plugins/extrascheck/lang/russian-UTF8/core.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//
1212
// GNU General Public License (GPL - http://www.gnu.org/copyleft/gpl.html)
1313
//
14-
$_lang = array();
14+
$_lang = [];
1515

1616
$_lang['title'] = 'Проверка совместимости дополнений';
1717
$_lang['outdated'] = '<b>устаревший</b>';

assets/plugins/extrascheck/lang/spanish/core.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//
1212
// GNU General Public License (GPL - http://www.gnu.org/copyleft/gpl.html)
1313
//
14-
$_lang = array();
14+
$_lang = [];
1515
$_lang['title'] = 'Comprobación de compatibilidad de extras';
1616
$_lang['outdated'] = 'está <b> obsoleto</b>';
1717
$_lang['isoutdated'] = 'está <b> obsoleto</b> y ya no es compatible con';

assets/plugins/transalias/transalias.class.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class TransAlias {
2424
* @var array
2525
* @access
2626
*/
27-
var $_tables = array ('named' => array (
27+
var $_tables = ['named' => [
2828
'quot' => '&#34;','amp' => '&#38;','lt' => '&#60;','gt' => '&#62;','OElig' => '&#338;','oelig' => '&#339;','Scaron' => '&#352;','scaron' => '&#353;',
2929
'Yuml' => '&#376;','circ' => '&#710;','tilde' => '&#732;','ensp' => '&#8194;','emsp' => '&#8195;','thinsp' => '&#8201;','zwnj' => '&#8204;','zwj' => '&#8205;',
3030
'lrm' => '&#8206;','rlm' => '&#8207;','ndash' => '&#8211;','mdash' => '&#8212;','lsquo' => '&#8216;','rsquo' => '&#8217;','sbquo' => '&#8218;','ldquo' => '&#8220;',
@@ -57,7 +57,7 @@ class TransAlias {
5757
'igrave' => '&#236;','iacute' => '&#237;','icirc' => '&#238;','iuml' => '&#239;','eth' => '&#240;','ntilde' => '&#241;','ograve' => '&#242;','oacute' => '&#243;',
5858
'ocirc' => '&#244;','otilde' => '&#245;','ouml' => '&#246;','divide' => '&#247;','oslash' => '&#248;','ugrave' => '&#249;','uacute' => '&#250;','ucirc' => '&#251;',
5959
'uuml' => '&#252;','yacute' => '&#253;','thorn' => '&#254;','yuml' => '&#255;'
60-
));
60+
]];
6161

6262
/**
6363
* Swap named HTML entities with numeric entities.
@@ -105,7 +105,7 @@ function convert_numeric_entity($matches) {
105105
*/
106106
function getTVValue($tv) {
107107
global $modx;
108-
$additionalEncodings = array('-' => '%2D', '.' => '%2E', '_' => '%5F');
108+
$additionalEncodings = ['-' => '%2D', '.' => '%2E', '_' => '%5F'];
109109
$tvname = str_replace(array_keys($additionalEncodings), array_values($additionalEncodings), rawurlencode($tv));
110110
if(array_key_exists('tv'.$tvname, $_POST)) {
111111
include_once MODX_MANAGER_PATH . 'includes/tmplvars.commands.inc.php';
@@ -168,11 +168,11 @@ function loadTable($name, $remove_periods = 'No') {
168168
*/
169169
function stripAlias($alias,$char_restrict,$word_separator) {
170170
// Convert all named HTML entities to numeric entities
171-
$alias = preg_replace_callback('/&([a-zA-Z][a-zA-Z0-9]{1,7});/', array($this,'convert_entity'), $alias);
171+
$alias = preg_replace_callback('/&([a-zA-Z][a-zA-Z0-9]{1,7});/', [$this,'convert_entity'], $alias);
172172

173173
// Convert all numeric entities to their actual character
174-
$alias = preg_replace_callback('/&#x([0-9a-f]{1,7});/i', array($this, 'convert_hex_entity'), $alias);
175-
$alias = preg_replace_callback('/&#([0-9]{1,7});/', array($this, 'convert_numeric_entity'), $alias);
174+
$alias = preg_replace_callback('/&#x([0-9a-f]{1,7});/i', [$this, 'convert_hex_entity'], $alias);
175+
$alias = preg_replace_callback('/&#([0-9]{1,7});/', [$this, 'convert_numeric_entity'], $alias);
176176

177177
if (class_exists('Normalizer')) {
178178
$alias = Normalizer::normalize($alias);

assets/plugins/transalias/transliterations/common.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Common transliteration table
44
*/
5-
return array(
5+
return [
66
'&' => 'and', '%' => '', '\'' => '',
77
'À' => 'A', 'Á' => 'A', 'Â' => 'A', 'Ã' => 'A', 'Ä' => 'A', 'Å' => 'A', 'Æ' => 'E', 'Ā' => 'A', 'Ą' => 'A', 'Ă' => 'A',
88
'Ç' => 'C', 'Ć' => 'C', 'Č' => 'C', 'Ĉ' => 'C', 'Ċ' => 'C',
@@ -51,4 +51,4 @@
5151
'ζ' => 'z', 'η' => 'i', 'ή' => 'i', 'θ' => 'th', 'ι' => 'i', 'ί' => 'i', 'ϊ' => 'i', 'ΐ' => 'i', 'κ' => 'k', 'λ' => 'l',
5252
'μ' => 'm', 'ν' => 'n', 'ξ' => 'ks', 'ο' => 'o', 'ό' => 'o', 'π' => 'p', 'ρ' => 'r', 'σ' => 's', 'τ' => 't', 'υ' => 'y',
5353
'ύ' => 'y', 'ϋ' => 'y', 'ΰ' => 'y', 'φ' => 'f', 'χ' => 'x', 'ψ' => 'ps', 'ω' => 'o', 'ώ' => 'o'
54-
);
54+
];

0 commit comments

Comments
 (0)