From 879e9fcd76f65107390bffa7d8c8999cb6c6a853 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Mon, 7 Oct 2013 11:31:12 +0200 Subject: Fix issue #165: @import CSS enlevés MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implique une modification des fichiers metadata.json pour les thèmes : ajout d'un champ "files" répertoriant les fichiers CSS à utiliser --- app/models/RSSThemes.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'app/models/RSSThemes.php') diff --git a/app/models/RSSThemes.php b/app/models/RSSThemes.php index 291b295e3..83db85acf 100644 --- a/app/models/RSSThemes.php +++ b/app/models/RSSThemes.php @@ -23,10 +23,11 @@ class RSSThemes extends Model { isset($res['name']) && isset($res['author']) && isset($res['description']) && - isset($res['version'])) { + isset($res['version']) && + isset($res['files']) && is_array($res['files'])) { $theme = $res; $theme['path'] = $theme_dir; - self::$list[] = $theme; + self::$list[$theme_dir] = $theme; } } } @@ -35,4 +36,12 @@ class RSSThemes extends Model { public static function get() { return self::$list; } + + public static function get_infos($theme_id) { + if (isset(self::$list[$theme_id])) { + return self::$list[$theme_id]; + } + + return false; + } } \ No newline at end of file -- cgit v1.2.3