code review phpstan and php-cs-fixer
parent
872bcb551f
commit
2d2c735fae
20
_config.php
20
_config.php
|
@ -15,18 +15,18 @@ if (!defined('DC_CONTEXT_MODULE')) {
|
|||
}
|
||||
|
||||
$redir = empty($_REQUEST['redir']) ?
|
||||
dcCore::app()->admin->list->getURL() . '#plugins' : $_REQUEST['redir'];
|
||||
dcCore::app()->admin->__get('list')->getURL() . '#plugins' : $_REQUEST['redir'];
|
||||
|
||||
# -- Get settings --
|
||||
$s = dcCore::app()->blog->settings->addNamespace(basename(__DIR__));
|
||||
|
||||
$lb_overwrite = (bool) $s->overwrite;
|
||||
$lb_write_full = (bool) $s->write_full;
|
||||
$lb_write_php = (bool) $s->write_php;
|
||||
$lb_write_js = (bool) $s->write_js;
|
||||
$lb_exclude_locales = (bool) $s->exclude_locales;
|
||||
$lb_license_name = licenseBootstrap::getName($s->license_name);
|
||||
$lb_license_head = licenseBootstrap::gethead($s->license_name, licenseBootstrap::decode($s->license_head));
|
||||
$lb_overwrite = (bool) $s->get('overwrite');
|
||||
$lb_write_full = (bool) $s->get('write_full');
|
||||
$lb_write_php = (bool) $s->get('write_php');
|
||||
$lb_write_js = (bool) $s->get('write_js');
|
||||
$lb_exclude_locales = (bool) $s->get('exclude_locales');
|
||||
$lb_license_name = licenseBootstrap::getName($s->get('license_name'));
|
||||
$lb_license_head = licenseBootstrap::gethead($s->get('license_name'), licenseBootstrap::decode($s->get('license_head')));
|
||||
|
||||
# -- Set settings --
|
||||
if (!empty($_POST['save'])) {
|
||||
|
@ -51,8 +51,8 @@ if (!empty($_POST['save'])) {
|
|||
__('Configuration has been successfully updated.')
|
||||
);
|
||||
http::redirect(
|
||||
dcCore::app()->admin->list->getURL('module=' . basename(__DIR__) . '&conf=1&redir=' .
|
||||
dcCore::app()->admin->list->getRedir())
|
||||
dcCore::app()->admin->__get('list')->getURL('module=' . basename(__DIR__) . '&conf=1&redir=' .
|
||||
dcCore::app()->admin->__get('list')->getRedir())
|
||||
);
|
||||
} catch (Exception $e) {
|
||||
dcCore::app()->error->add($e->getMessage());
|
||||
|
|
|
@ -36,22 +36,22 @@ class licenseBootstrap
|
|||
$module
|
||||
);
|
||||
|
||||
if ($s->write_full) {
|
||||
if ($s->get('write_full')) {
|
||||
licenseBootstrap::writeFullContent(
|
||||
$s->license_name,
|
||||
$s->get('license_name'),
|
||||
$module,
|
||||
$s->overwrite
|
||||
$s->get('overwrite')
|
||||
);
|
||||
}
|
||||
licenseBootstrap::writeHeadContent(
|
||||
$s->license_name,
|
||||
licenseBootstrap::decode($s->license_head),
|
||||
$s->get('license_name'),
|
||||
licenseBootstrap::decode($s->get('license_head')),
|
||||
$module,
|
||||
dcCore::app()->auth,
|
||||
$s->overwrite,
|
||||
$s->write_php,
|
||||
$s->write_js,
|
||||
$s->exclude_locales
|
||||
$s->get('overwrite'),
|
||||
$s->get('write_php'),
|
||||
$s->get('write_js'),
|
||||
$s->get('exclude_locales')
|
||||
);
|
||||
|
||||
# --BEHAVIOR-- licenseBootstrapAfterAddLicense
|
||||
|
@ -290,7 +290,7 @@ class licenseBootstrap
|
|||
*
|
||||
* @param string $content License content
|
||||
* @param array $module Module info
|
||||
* @param array $user User info
|
||||
* @param object $user User info
|
||||
* @return string License content
|
||||
*/
|
||||
protected static function replaceInfo($content, $module, $user)
|
||||
|
|
|
@ -24,7 +24,7 @@ $type = isset($_POST['type']) && in_array($_POST['type'], ['plugins', 'themes'
|
|||
$s = dcCore::app()->blog->settings->addNamespace(basename(__DIR__));
|
||||
|
||||
# Modules
|
||||
if (!isset(dcCore::app()->themes)) {
|
||||
if (!(dcCore::app()->themes instanceof dcThemes)) {
|
||||
dcCore::app()->themes = new dcThemes();
|
||||
dcCore::app()->themes->loadModules(dcCore::app()->blog->themes_path, null);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue