aboutsummaryrefslogtreecommitdiff
path: root/app/models/RSSThemes.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-01-29 21:26:19 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-01-29 21:26:19 +0100
commit165eb57459a152b3cc6aa3fd15ca990c3d908829 (patch)
tree640ddacbc6eabc985646dd65b0578f369ea92321 /app/models/RSSThemes.php
parent75096e6a39fe5d34d3951991f296f616e62a9fd8 (diff)
parentc053825ff8f9792e692c101585481129b006937b (diff)
Sortie de la version 0.70.7.0
Diffstat (limited to 'app/models/RSSThemes.php')
-rw-r--r--app/models/RSSThemes.php47
1 files changed, 0 insertions, 47 deletions
diff --git a/app/models/RSSThemes.php b/app/models/RSSThemes.php
deleted file mode 100644
index 83db85acf..000000000
--- a/app/models/RSSThemes.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-
-class RSSThemes extends Model {
- private static $themes_dir = '/themes';
-
- private static $list = array();
-
- public static function init() {
- $basedir = PUBLIC_PATH . self::$themes_dir;
-
- $themes_list = array_diff(
- scandir($basedir),
- array('..', '.')
- );
-
- foreach ($themes_list as $theme_dir) {
- $json_filename = $basedir . '/' . $theme_dir . '/metadata.json';
- if(file_exists($json_filename)) {
- $content = file_get_contents($json_filename);
- $res = json_decode($content, true);
-
- if($res &&
- isset($res['name']) &&
- isset($res['author']) &&
- isset($res['description']) &&
- isset($res['version']) &&
- isset($res['files']) && is_array($res['files'])) {
- $theme = $res;
- $theme['path'] = $theme_dir;
- self::$list[$theme_dir] = $theme;
- }
- }
- }
- }
-
- 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