Skip to content

Commit bbfc1b8

Browse files
committed
[FIX] Attempt to modify property "config" on null.
1 parent 2ec0607 commit bbfc1b8

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

manager/media/style/default/style.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@
99
* MODX version: 1.0.3
1010
*/
1111
$style_path = 'media/style/' . ManagerTheme::getTheme() . '/images/';
12-
$modx->config['mgr_date_picker_path'] = 'media/calendar/datepicker.inc.php';
12+
evo()->config['mgr_date_picker_path'] = 'media/calendar/datepicker.inc.php';
1313

1414
if (!empty($_GET['a']) && $_GET['a'] == 2) {
15-
$modx->config['enable_filter'] = 1;
15+
evo()->config['enable_filter'] = 1;
1616

17-
$modx->addSnippet('hasPermission', 'return $modx->hasPermission($key);');
17+
evo()->addSnippet('hasPermission', 'return evo()->hasPermission($key);');
1818

19-
if ($modx->hasPermission('new_template') || $modx->hasPermission('edit_template') || $modx->hasPermission('new_snippet') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('new_plugin') || $modx->hasPermission('edit_plugin') || $modx->hasPermission('manage_metatags')) {
19+
if (evo()->hasPermission('new_template') || evo()->hasPermission('edit_template') || evo()->hasPermission('new_snippet') || evo()->hasPermission('edit_snippet') || evo()->hasPermission('new_plugin') || evo()->hasPermission('edit_plugin') || evo()->hasPermission('manage_metatags')) {
2020
$hasAnyPermission = 1;
2121
} else {
2222
$hasAnyPermission = 0;
2323
}
2424

25-
$modx->addSnippet('hasAnyPermission', 'global $hasAnyPermission; return $hasAnyPermission;');
25+
evo()->addSnippet('hasAnyPermission', 'global $hasAnyPermission; return $hasAnyPermission;');
2626

27-
$modx->addSnippet('getLoginUserName', 'return $modx->getLoginUserName();');
27+
evo()->addSnippet('getLoginUserName', 'return evo()->getLoginUserName();');
2828
}
2929

3030
// Favicon
@@ -140,7 +140,7 @@
140140

141141
// actions buttons templates
142142
$action = isset($_REQUEST['a']) ? $_REQUEST['a'] : '';
143-
if (!empty($modx->config['global_tabs']) && !isset($_SESSION['stay'])) {
143+
if (!empty(evo()->config['global_tabs']) && !isset($_SESSION['stay'])) {
144144
$_REQUEST['stay'] = 2;
145145
}
146146
if (isset($_REQUEST['stay'])) {
@@ -156,52 +156,52 @@
156156
case '4':
157157
case '27':
158158
case '72':
159-
if ($modx->hasPermission('new_document')) {
159+
if (evo()->hasPermission('new_document')) {
160160
$addnew = 1;
161161
}
162162
break;
163163
case '16':
164164
case '19':
165-
if ($modx->hasPermission('new_template')) {
165+
if (evo()->hasPermission('new_template')) {
166166
$addnew = 1;
167167
}
168168
break;
169169
case '300':
170170
case '301':
171-
if ($modx->hasPermission('new_snippet') && $modx->hasPermission('new_chunk') && $modx->hasPermission('new_plugin')) {
171+
if (evo()->hasPermission('new_snippet') && evo()->hasPermission('new_chunk') && evo()->hasPermission('new_plugin')) {
172172
$addnew = 1;
173173
}
174174
break;
175175
case '77':
176176
case '78':
177-
if ($modx->hasPermission('new_chunk')) {
177+
if (evo()->hasPermission('new_chunk')) {
178178
$addnew = 1;
179179
}
180180
break;
181181
case '22':
182182
case '23':
183-
if ($modx->hasPermission('new_snippet')) {
183+
if (evo()->hasPermission('new_snippet')) {
184184
$addnew = 1;
185185
}
186186
break;
187187
case '101':
188188
case '102':
189-
if ($modx->hasPermission('new_plugin')) {
189+
if (evo()->hasPermission('new_plugin')) {
190190
$addnew = 1;
191191
}
192192
break;
193193
case '106':
194194
case '107':
195195
case '108':
196-
if ($modx->hasPermission('new_module')) {
196+
if (evo()->hasPermission('new_module')) {
197197
$addnew = 1;
198198
}
199-
if ($modx->hasPermission('exec_module')) {
199+
if (evo()->hasPermission('exec_module')) {
200200
$run = 1;
201201
}
202202
break;
203203
case '88':
204-
if ($modx->hasPermission('new_user')) {
204+
if (evo()->hasPermission('new_user')) {
205205
$addnew = 1;
206206
}
207207
break;
@@ -234,7 +234,7 @@
234234
<option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option>
235235
</select>
236236
</div>' .
237-
($addnew ? '
237+
($addnew ? '
238238
<a id="Button6" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.duplicate();">
239239
<i class="' . $_style["icon_clone"] . '"></i><span>' . $_lang['duplicate'] . '</span>
240240
</a>
@@ -364,7 +364,7 @@
364364
'static' => array(
365365
'document' => '<div id="actions">
366366
<div class="btn-group">' .
367-
($addnew ? '
367+
($addnew ? '
368368
<a class="btn btn-secondary" href="javascript:;" onclick="actions.new();">
369369
<i class="' . $_style["icon_document"] . '"></i><span>' . $_lang['create_resource_here'] . '</span>
370370
</a>

0 commit comments

Comments
 (0)