Fix custom notifications CKEditor was broken, depending on how you loaded Admin

- also fixed if you login to admin app, then switch to another app and go to site configuration from the app's sidebox menu
This commit is contained in:
nathangray 2017-05-17 10:12:47 -06:00
parent 0ff91fd96c
commit b685b08f8d
2 changed files with 8 additions and 3 deletions

View File

@ -546,8 +546,13 @@ abstract class Ajax extends Api\Framework
// fix app admin menus to use admin.admin_ui.index loader // fix app admin menus to use admin.admin_ui.index loader
if (($type == 'admin' || $menu_title == lang('Admin')) && $appname != 'admin') if (($type == 'admin' || $menu_title == lang('Admin')) && $appname != 'admin')
{ {
$file = preg_replace("/^(javascript:egw_link_handler\(')(.*)menuaction=([^&]+)(.*)(','[^']+'\))$/", foreach($file as &$link)
'$1$2menuaction=admin.admin_ui.index&load=$3$4&ajax=true\',\'admin\')', $file_was=$file); {
preg_match('/ajax=(true|false)/', $link, $ajax);
$link = preg_replace("/^(javascript:egw_link_handler\(')(.*)menuaction=([^&]+)(.*)(','[^']+'\))$/",
'$1$2menuaction=admin.admin_ui.index&load=$3$4&ajax=' . ($ajax[1] ? $ajax[1] : 'true') .'\',\'admin\')', $file_was=$link);
}
} }
$this->sideboxes[$appname][$menu_title] = $file; $this->sideboxes[$appname][$menu_title] = $file;

View File

@ -113,7 +113,7 @@ class infolog_hooks
'menuaction' => 'infolog.infolog_ui.admin', 'menuaction' => 'infolog.infolog_ui.admin',
// As long as CKEditor needs CSP exceptions, this needs to // As long as CKEditor needs CSP exceptions, this needs to
// load in an iframe // load in an iframe
//'ajax' => 'true', 'ajax' => 'false',
)), )),
'Global Categories' => Egw::link('/index.php',array( 'Global Categories' => Egw::link('/index.php',array(
'menuaction' => 'admin.admin_categories.index', 'menuaction' => 'admin.admin_categories.index',