|
9 | 9 | * MODX version: 1.0.3 |
10 | 10 | */ |
11 | 11 | $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'; |
13 | 13 |
|
14 | 14 | if (!empty($_GET['a']) && $_GET['a'] == 2) { |
15 | | - $modx->config['enable_filter'] = 1; |
| 15 | + evo()->config['enable_filter'] = 1; |
16 | 16 |
|
17 | | - $modx->addSnippet('hasPermission', 'return $modx->hasPermission($key);'); |
| 17 | + evo()->addSnippet('hasPermission', 'return evo()->hasPermission($key);'); |
18 | 18 |
|
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')) { |
20 | 20 | $hasAnyPermission = 1; |
21 | 21 | } else { |
22 | 22 | $hasAnyPermission = 0; |
23 | 23 | } |
24 | 24 |
|
25 | | - $modx->addSnippet('hasAnyPermission', 'global $hasAnyPermission; return $hasAnyPermission;'); |
| 25 | + evo()->addSnippet('hasAnyPermission', 'global $hasAnyPermission; return $hasAnyPermission;'); |
26 | 26 |
|
27 | | - $modx->addSnippet('getLoginUserName', 'return $modx->getLoginUserName();'); |
| 27 | + evo()->addSnippet('getLoginUserName', 'return evo()->getLoginUserName();'); |
28 | 28 | } |
29 | 29 |
|
30 | 30 | // Favicon |
|
140 | 140 |
|
141 | 141 | // actions buttons templates |
142 | 142 | $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'])) { |
144 | 144 | $_REQUEST['stay'] = 2; |
145 | 145 | } |
146 | 146 | if (isset($_REQUEST['stay'])) { |
|
156 | 156 | case '4': |
157 | 157 | case '27': |
158 | 158 | case '72': |
159 | | - if ($modx->hasPermission('new_document')) { |
| 159 | + if (evo()->hasPermission('new_document')) { |
160 | 160 | $addnew = 1; |
161 | 161 | } |
162 | 162 | break; |
163 | 163 | case '16': |
164 | 164 | case '19': |
165 | | - if ($modx->hasPermission('new_template')) { |
| 165 | + if (evo()->hasPermission('new_template')) { |
166 | 166 | $addnew = 1; |
167 | 167 | } |
168 | 168 | break; |
169 | 169 | case '300': |
170 | 170 | 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')) { |
172 | 172 | $addnew = 1; |
173 | 173 | } |
174 | 174 | break; |
175 | 175 | case '77': |
176 | 176 | case '78': |
177 | | - if ($modx->hasPermission('new_chunk')) { |
| 177 | + if (evo()->hasPermission('new_chunk')) { |
178 | 178 | $addnew = 1; |
179 | 179 | } |
180 | 180 | break; |
181 | 181 | case '22': |
182 | 182 | case '23': |
183 | | - if ($modx->hasPermission('new_snippet')) { |
| 183 | + if (evo()->hasPermission('new_snippet')) { |
184 | 184 | $addnew = 1; |
185 | 185 | } |
186 | 186 | break; |
187 | 187 | case '101': |
188 | 188 | case '102': |
189 | | - if ($modx->hasPermission('new_plugin')) { |
| 189 | + if (evo()->hasPermission('new_plugin')) { |
190 | 190 | $addnew = 1; |
191 | 191 | } |
192 | 192 | break; |
193 | 193 | case '106': |
194 | 194 | case '107': |
195 | 195 | case '108': |
196 | | - if ($modx->hasPermission('new_module')) { |
| 196 | + if (evo()->hasPermission('new_module')) { |
197 | 197 | $addnew = 1; |
198 | 198 | } |
199 | | - if ($modx->hasPermission('exec_module')) { |
| 199 | + if (evo()->hasPermission('exec_module')) { |
200 | 200 | $run = 1; |
201 | 201 | } |
202 | 202 | break; |
203 | 203 | case '88': |
204 | | - if ($modx->hasPermission('new_user')) { |
| 204 | + if (evo()->hasPermission('new_user')) { |
205 | 205 | $addnew = 1; |
206 | 206 | } |
207 | 207 | break; |
|
234 | 234 | <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
235 | 235 | </select> |
236 | 236 | </div>' . |
237 | | - ($addnew ? ' |
| 237 | + ($addnew ? ' |
238 | 238 | <a id="Button6" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.duplicate();"> |
239 | 239 | <i class="' . $_style["icon_clone"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
240 | 240 | </a> |
|
364 | 364 | 'static' => array( |
365 | 365 | 'document' => '<div id="actions"> |
366 | 366 | <div class="btn-group">' . |
367 | | - ($addnew ? ' |
| 367 | + ($addnew ? ' |
368 | 368 | <a class="btn btn-secondary" href="javascript:;" onclick="actions.new();"> |
369 | 369 | <i class="' . $_style["icon_document"] . '"></i><span>' . $_lang['create_resource_here'] . '</span> |
370 | 370 | </a> |
|
0 commit comments