mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
set the default for global_cats parameter to true\nreset start to 0, if we come back or view another apps categories\ntake care that the global_cats param survives the edit
This commit is contained in:
parent
f6a2c159a1
commit
4a1fec7207
@ -82,6 +82,10 @@ class admin_categories
|
||||
*/
|
||||
public function edit(array $content=null,$msg='')
|
||||
{
|
||||
// read the session, as the global_cats param is stored with it.
|
||||
$session = egw_cache::getSession(__CLASS__,'nm');
|
||||
$global_cats = $session['global_cats'];
|
||||
unset($session);
|
||||
if (!isset($content))
|
||||
{
|
||||
if (!(isset($_GET['cat_id']) && $_GET['cat_id'] > 0 &&
|
||||
@ -165,6 +169,7 @@ class admin_categories
|
||||
$link = egw::link('/index.php',array(
|
||||
'menuaction' => 'admin.admin_categories.index',
|
||||
'msg' => $msg,
|
||||
'global_cats' => (empty($global_cats)? false : true),
|
||||
));
|
||||
$js = "window.opener.location='$link';";
|
||||
if ($button == 'save' || $button == 'delete')
|
||||
@ -304,11 +309,16 @@ class admin_categories
|
||||
'no_search' => !self::$acl_search,
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$content['nm']['start']=0;
|
||||
}
|
||||
if (isset($_GET['appname']) && ($_GET['appname'] == categories::GLOBAL_APPNAME ||
|
||||
isset($GLOBALS['egw_info']['apps'][$_GET['appname']])))
|
||||
{
|
||||
$content['nm']['appname'] = $_GET['appname'];
|
||||
}
|
||||
$content['nm']['global_cats'] = true;
|
||||
if (isset($_GET['global_cats']) && empty($_GET['global_cats'] ))
|
||||
{
|
||||
$content['nm']['global_cats'] = false;
|
||||
|
Loading…
Reference in New Issue
Block a user