move class
This commit is contained in:
parent
7f87bc65b6
commit
9df925901f
1 changed files with 9 additions and 9 deletions
|
@ -33,7 +33,7 @@ use Exception;
|
||||||
*
|
*
|
||||||
* Add action and button to modules lists.
|
* Add action and button to modules lists.
|
||||||
*/
|
*/
|
||||||
class Admin
|
class Backend
|
||||||
{
|
{
|
||||||
private static $init = false;
|
private static $init = false;
|
||||||
|
|
||||||
|
@ -60,14 +60,14 @@ class Admin
|
||||||
'theme-activate',
|
'theme-activate',
|
||||||
]) ? sprintf(
|
]) ? sprintf(
|
||||||
'<input type="submit" name="%s[%s]" value="Pack" />',
|
'<input type="submit" name="%s[%s]" value="Pack" />',
|
||||||
basename(__DIR__),
|
self::id(),
|
||||||
html::escapeHTML($id)
|
html::escapeHTML($id)
|
||||||
) : null;
|
) : null;
|
||||||
},
|
},
|
||||||
'adminModulesListDoActions' => function ($list, $modules, $type) {
|
'adminModulesListDoActions' => function ($list, $modules, $type) {
|
||||||
# Pack action
|
# Pack action
|
||||||
if (empty($_POST[basename(__DIR__)])
|
if (empty($_POST[self::id()])
|
||||||
|| !is_array($_POST[basename(__DIR__)])) {
|
|| !is_array($_POST[self::id()])) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ class Admin
|
||||||
}
|
}
|
||||||
|
|
||||||
# Module to pack
|
# Module to pack
|
||||||
$modules = array_keys($_POST[basename(__DIR__)]);
|
$modules = array_keys($_POST[self::id()]);
|
||||||
$id = $modules[0];
|
$id = $modules[0];
|
||||||
|
|
||||||
if (!$list->modules->moduleExists($id)) {
|
if (!$list->modules->moduleExists($id)) {
|
||||||
|
@ -143,9 +143,9 @@ class Admin
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* process */
|
private function id()
|
||||||
if (Admin::init()) {
|
{
|
||||||
Admin::process();
|
return basename(dirname(__DIR__));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue