summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/theme.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/gallery/helpers/theme.php b/modules/gallery/helpers/theme.php
index 5a3a328a..16ed104e 100644
--- a/modules/gallery/helpers/theme.php
+++ b/modules/gallery/helpers/theme.php
@@ -29,8 +29,8 @@ class theme_Core {
* active for any given request.
*/
static function load_themes() {
- $path = Input::instance()->server("PATH_INFO");
$input = Input::instance();
+ $path = $input->server("PATH_INFO");
if (empty($path)) {
$path = "/" . $input->get("kohana_uri");
}
@@ -67,5 +67,15 @@ class theme_Core {
$group->submit("")->value(t("Save"));
return $form;
}
+
+ static function get_info($theme_name) {
+ $theme_name = preg_replace("/[^\w]/", "", $theme_name);
+ $file = THEMEPATH . "$theme_name/theme.info";
+ $theme_info = new ArrayObject(parse_ini_file($file), ArrayObject::ARRAY_AS_PROPS);
+ $theme_info->description = t($theme_info->description);
+ $theme_info->name = t($theme_info->name);
+
+ return $theme_info;
+ }
}