From 8f27e41937754c20e56b25c3977b849412c5358c Mon Sep 17 00:00:00 2001 From: Pierre Date: Thu, 29 Dec 2022 17:21:12 +0100 Subject: [PATCH] v2.0 --- _define.php | 2 +- _public.php | 4 ++-- changelog | 4 ++-- index.php | 18 ++++++++---------- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/_define.php b/_define.php index 05a8b03..93256b8 100644 --- a/_define.php +++ b/_define.php @@ -16,7 +16,7 @@ $this->registerModule( 'moreCSS', 'Another CSS stylesheet for the active theme', 'Osku and contributors', - '1.4', + '2.0', [ 'requires' => [['core', '2.24']], 'permissions' => dcCore::app()->auth->makePermissions([ diff --git a/_public.php b/_public.php index 182de09..534a5c1 100644 --- a/_public.php +++ b/_public.php @@ -16,7 +16,7 @@ dcCore::app()->addBehavior('publicHeadContent',array('moreCSSpublicBehaviors','s class moreCSSpublicBehaviors { - public static function stylesheet($core) + public static function stylesheet() { $css = base64_decode(dcCore::app()->blog->settings->themes->morecss_min); @@ -26,4 +26,4 @@ class moreCSSpublicBehaviors ''."\n"; } } -} \ No newline at end of file +} diff --git a/changelog b/changelog index 8dbd56f..80f74e2 100644 --- a/changelog +++ b/changelog @@ -1,5 +1,5 @@ -v1.4 - 19/12/2022 - Pierre Van Glabeke -* màj dc2.24 à compléter +v2.0 - 19/12/2022 - Pierre Van Glabeke +* màj dc2.24 v1.3 - 23/01/2018 - Pierre Van Glabeke * ajout js pour fermeture diff --git a/index.php b/index.php index e4cfd98..082c643 100644 --- a/index.php +++ b/index.php @@ -14,8 +14,6 @@ if (!defined('DC_CONTEXT_ADMIN')) { return; } $page_title = __('Style sheet'); -$p_url = 'plugin.php?p=' . basename(dirname(__FILE__)); - $config = array(); $s =& dcCore::app()->blog->settings->themes; @@ -36,7 +34,7 @@ if (isset($_POST['file_content'])) { $css_min = str_replace(array(' , ',' ,',', '),',', $css_min); $s->put('morecss_min',base64_encode($css_min)); - http::redirect($p_url.'&config=1'); + http::redirect(dcCore::app()->admin->getPageURL().'&config=1'); } catch (Exception $e) { dcCore::app()->error->add($e->getMessage()); } @@ -48,13 +46,13 @@ $css_content = base64_decode($s->morecss); <?php echo $page_title; ?> - - + morecss); '. +'
'. '
'. '

'. @@ -81,4 +79,4 @@ echo ?> - \ No newline at end of file +