diff --git a/modules/gallery/controllers/admin_themes.php b/modules/gallery/controllers/admin_themes.php index 23685c9053..6991acd22e 100644 --- a/modules/gallery/controllers/admin_themes.php +++ b/modules/gallery/controllers/admin_themes.php @@ -30,11 +30,13 @@ public function index() { private function _get_themes() { $themes = array(); foreach (scandir(THEMEPATH) as $theme_name) { - if ($theme_name[0] == ".") { - continue; - } + if (file_exists(THEMEPATH . "$theme_name/theme.info")) { + if ($theme_name[0] == ".") { + continue; + } - $themes[$theme_name] = theme::get_info($theme_name); + $themes[$theme_name] = theme::get_info($theme_name); + } } return $themes; } diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php index 3139951f3e..02bfdf286e 100644 --- a/modules/gallery/helpers/gallery_event.php +++ b/modules/gallery/helpers/gallery_event.php @@ -228,8 +228,8 @@ static function admin_menu($menu, $theme) { ->label(t("Advanced")) ->url(url::site("admin/advanced_settings"))) ->append(Menu::factory("link") - ->id("identity_drivers") - ->label(t("Identity drivers")) + ->id("authentication") + ->label(t("Authentication")) ->url(url::site("admin/identity")))) ->append(Menu::factory("link") ->id("modules") diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php index b1167d0ee3..b64deab909 100644 --- a/modules/gallery/libraries/Theme_View.php +++ b/modules/gallery/libraries/Theme_View.php @@ -172,7 +172,7 @@ public function paginator() { $v->first_visible_position = ($this->page - 1) * $this->page_size + 1; $v->last_visible_position = min($this->page * $this->page_size, $v->total); - } else { + } else if ($this->page_type == "item") { $v->position = $this->position; $v->total = $this->sibling_count; if ($this->previous_item) { diff --git a/modules/search/controllers/search.php b/modules/search/controllers/search.php index 539e063fcc..2f1aeb763c 100644 --- a/modules/search/controllers/search.php +++ b/modules/search/controllers/search.php @@ -33,7 +33,7 @@ public function index() { $max_pages = max(ceil($count / $page_size), 1); - $template = new Theme_View("page.html", "other", "search"); + $template = new Theme_View("page.html", "collection", "search"); $template->set_global("page", $page); $template->set_global("max_pages", $max_pages); $template->set_global("page_size", $page_size);