mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-11 23:29:08 -04:00
Normally Router::find_uri() strips off the url suffix for us, but when
we make the theme::$is_admin determination we're working off of the PATH_INFO so we need to strip it off manually. Fixes #1631.
This commit is contained in:
@@ -41,6 +41,13 @@ class theme_Core {
|
||||
|
||||
$config = Kohana_Config::instance();
|
||||
$modules = $config->get("core.modules");
|
||||
|
||||
// Normally Router::find_uri() strips off the url suffix for us, but we're working off of the
|
||||
// PATH_INFO here so we need to strip it off manually
|
||||
if ($suffix = Kohana::config("core.url_suffix")) {
|
||||
$path = preg_replace("#" . preg_quote($suffix) . "$#u", "", $path);
|
||||
}
|
||||
|
||||
self::$is_admin = $path == "/admin" || !strncmp($path, "/admin/", 7);
|
||||
self::$site_theme_name = module::get_var("gallery", "active_site_theme");
|
||||
if (self::$is_admin) {
|
||||
|
||||
Reference in New Issue
Block a user