mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-27 07:09:56 +09:00
issue 2363 api protocol modify.
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11728 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c725edc586
commit
005dff1ad4
2 changed files with 25 additions and 30 deletions
|
|
@ -928,7 +928,10 @@ class Context {
|
||||||
$v = stripslashes($v);
|
$v = stripslashes($v);
|
||||||
}
|
}
|
||||||
|
|
||||||
$val[$k] = trim($v);
|
if(!is_array($v))
|
||||||
|
{
|
||||||
|
$val[$k] = trim($v);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1143,8 +1143,8 @@
|
||||||
public function procMenuAdminUpdateAuth()
|
public function procMenuAdminUpdateAuth()
|
||||||
{
|
{
|
||||||
$menuItemSrl = Context::get('menu_item_srl');
|
$menuItemSrl = Context::get('menu_item_srl');
|
||||||
$exposureTarget = Context::get('exposure_target');
|
$exposure = Context::get('exposure');
|
||||||
$exposureGroupList = Context::get('exposure_group_list');
|
$htPerm = Context::get('htPerm');
|
||||||
|
|
||||||
$oMenuModel = &getAdminModel('menu');
|
$oMenuModel = &getAdminModel('menu');
|
||||||
$itemInfo = $oMenuModel->getMenuItemInfo($menuItemSrl);
|
$itemInfo = $oMenuModel->getMenuItemInfo($menuItemSrl);
|
||||||
|
|
@ -1152,24 +1152,20 @@
|
||||||
|
|
||||||
// Menu Exposure update
|
// Menu Exposure update
|
||||||
// if exposure target is only login user...
|
// if exposure target is only login user...
|
||||||
if($exposureTarget == -1)
|
if(!$exposure)
|
||||||
{
|
{
|
||||||
$args->group_srls = -1;
|
$args->group_srls = '';
|
||||||
}
|
|
||||||
else if($exposureGroupList)
|
|
||||||
{
|
|
||||||
if(is_array($exposureGroupList))
|
|
||||||
{
|
|
||||||
$args->group_srls = implode(',', $exposureGroupList);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$args->group_srls = $exposureGroupList;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$args->group_srls = '';
|
if(is_array($exposure))
|
||||||
|
{
|
||||||
|
$args->group_srls = implode(',', $exposure);
|
||||||
|
}
|
||||||
|
else if($exposure && !is_array($exposure))
|
||||||
|
{
|
||||||
|
$args->group_srls = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = executeQuery('menu.updateMenuItem', $args);
|
$output = executeQuery('menu.updateMenuItem', $args);
|
||||||
|
|
@ -1194,25 +1190,21 @@
|
||||||
|
|
||||||
foreach($grantList AS $grantName=>$grantInfo)
|
foreach($grantList AS $grantName=>$grantInfo)
|
||||||
{
|
{
|
||||||
// Get the default value
|
if(!$htPerm[$grantName])
|
||||||
$default = Context::get($grantName.'_default');
|
|
||||||
|
|
||||||
// -1 = Log-in user only, -2 = site members only, 0 = all users
|
|
||||||
if(strlen($default))
|
|
||||||
{
|
{
|
||||||
$grant->{$grantName}[] = $default;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// users in a particular group
|
// users in a particular group
|
||||||
|
if(is_array($htPerm[$grantName]))
|
||||||
|
{
|
||||||
|
$grant->{$grantName} = $htPerm[$grantName];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// -1 = Log-in user only, -2 = site members only, 0 = all users
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$group_srls = Context::get($grantName);
|
$grant->{$grantName}[] = $htPerm[$grantName];
|
||||||
if($group_srls) {
|
|
||||||
if(strpos($group_srls,'|@|')!==false) $group_srls = explode('|@|',$group_srls);
|
|
||||||
elseif(strpos($group_srls,',')!==false) $group_srls = explode(',',$group_srls);
|
|
||||||
else $group_srls = array($group_srls);
|
|
||||||
$grant->{$grantName} = $group_srls;
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$grant->{$group_srls} = array();
|
$grant->{$group_srls} = array();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue