theme toggle issue when viewing mod/cloud of another channel

This commit is contained in:
friendica 2015-01-12 18:33:39 -08:00
parent 2f9fe0280e
commit 1b3e52af2d
3 changed files with 9 additions and 18 deletions

View File

@ -267,6 +267,15 @@ class RedBrowser extends DAV\Browser\Plugin {
get_app()->page['content'] = $html;
load_pdl(get_app());
$theme_info_file = "view/theme/" . current_theme() . "/php/theme.php";
if (file_exists($theme_info_file)){
require_once($theme_info_file);
if (function_exists(str_replace('-', '_', current_theme()) . '_init')) {
$func = str_replace('-', '_', current_theme()) . '_init';
$func($a);
}
}
construct_page(get_app());
}

View File

@ -41,15 +41,6 @@ if(! defined('TRINIDAD')) {
* @param App &$a
*/
function cloud_init(&$a) {
// call ($currenttheme)_init since we're operating outside of index.php
$theme_info_file = "view/theme/" . current_theme() . "/php/theme.php";
if (file_exists($theme_info_file)){
require_once($theme_info_file);
if (function_exists(str_replace('-', '_', current_theme()) . '_init')) {
$func = str_replace('-', '_', current_theme()) . '_init';
$func($a);
}
}
require_once('include/reddav.php');

View File

@ -37,15 +37,6 @@ if (x($_SERVER, 'HTTP_AUTHORIZATION')) {
* @param App &$a
*/
function dav_init(&$a) {
// call ($currenttheme)_init since we're operating outside of index.php
$theme_info_file = "view/theme/" . current_theme() . "/php/theme.php";
if (file_exists($theme_info_file)){
require_once($theme_info_file);
if (function_exists(str_replace('-', '_', current_theme()) . '_init')) {
$func = str_replace('-', '_', current_theme()) . '_init';
$func($a);
}
}
require_once('include/reddav.php');