mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 04:24:14 +09:00
Partially revert #584
Bug reported in https://www.xetown.com/qna/375598
This commit is contained in:
parent
6dd776bd15
commit
54bbc36e73
2 changed files with 5 additions and 14 deletions
|
|
@ -162,16 +162,16 @@ class documentItem extends Object
|
||||||
|
|
||||||
function isGranted()
|
function isGranted()
|
||||||
{
|
{
|
||||||
if ($this->grant_cache !== null)
|
|
||||||
{
|
|
||||||
return $this->grant_cache;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($_SESSION['own_document'][$this->document_srl])
|
if ($_SESSION['own_document'][$this->document_srl])
|
||||||
{
|
{
|
||||||
return $this->grant_cache = true;
|
return $this->grant_cache = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->grant_cache !== null)
|
||||||
|
{
|
||||||
|
return $this->grant_cache;
|
||||||
|
}
|
||||||
|
|
||||||
$logged_info = Context::get('logged_info');
|
$logged_info = Context::get('logged_info');
|
||||||
if (!$logged_info->member_srl)
|
if (!$logged_info->member_srl)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1862,13 +1862,6 @@ class moduleModel extends module
|
||||||
*/
|
*/
|
||||||
function getGrant($module_info, $member_info, $xml_info = '')
|
function getGrant($module_info, $member_info, $xml_info = '')
|
||||||
{
|
{
|
||||||
$cache_key = sprintf('site_and_module:module_grant:%d:%d', $module_info->module_srl, $member_info->member_srl);
|
|
||||||
$grant = Rhymix\Framework\Cache::get($cache_key);
|
|
||||||
if ($grant !== null)
|
|
||||||
{
|
|
||||||
return $grant;
|
|
||||||
}
|
|
||||||
|
|
||||||
$grant = new stdClass();
|
$grant = new stdClass();
|
||||||
|
|
||||||
if(!$xml_info)
|
if(!$xml_info)
|
||||||
|
|
@ -2022,8 +2015,6 @@ class moduleModel extends module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set to cache and return
|
|
||||||
Rhymix\Framework\Cache::set($cache_key, $grant, 0, true);
|
|
||||||
return $grant;
|
return $grant;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue