mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
해당 캐시파일이 디비를 지운 시점의 이전일일경우 캐시파일 재생성
This commit is contained in:
parent
68cac0b686
commit
b7be957962
3 changed files with 24 additions and 6 deletions
|
|
@ -171,7 +171,7 @@ class ncenterliteAdminController extends ncenterlite
|
|||
FileHandler::makeDir(\RX_BASEDIR . 'files/cache/ncenterlite/new_notify/');
|
||||
}
|
||||
$reg_obj = new stdClass();
|
||||
$reg_obj->regdate = date('YmdHis');
|
||||
$reg_obj->regdate = time();
|
||||
$buff = "<?php return unserialize(" . var_export(serialize($reg_obj), true) . ");\n";
|
||||
FileHandler::writeFile($flag_path, $buff);
|
||||
|
||||
|
|
|
|||
|
|
@ -1118,7 +1118,7 @@ class ncenterliteController extends ncenterlite
|
|||
FileHandler::writeFile($flag_path, $buff);
|
||||
}
|
||||
|
||||
public static function removeFlagFile($member_srl = null)
|
||||
public function removeFlagFile($member_srl = null)
|
||||
{
|
||||
if($member_srl === null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -224,11 +224,29 @@ class ncenterliteModel extends ncenterlite
|
|||
|
||||
if(FileHandler::exists($flag_path) && $page <= 1)
|
||||
{
|
||||
$output = require_once $flag_path;
|
||||
if(is_object($output))
|
||||
$deleteFlagPath = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/delete_date.php';
|
||||
if(FileHandler::exists($deleteFlagPath))
|
||||
{
|
||||
$output->flag_exists = true;
|
||||
return $output;
|
||||
$deleteOutput = require_once $deleteFlagPath;
|
||||
if(is_object($deleteOutput))
|
||||
{
|
||||
$create_time = filemtime($flag_path);
|
||||
|
||||
if($create_time <= $deleteOutput->regdate)
|
||||
{
|
||||
$oNcenterliteController = getController('ncenterlite');
|
||||
$oNcenterliteController->removeFlagFile($member_srl);
|
||||
}
|
||||
else
|
||||
{
|
||||
$output = require_once $flag_path;
|
||||
if(is_object($output))
|
||||
{
|
||||
$output->flag_exists = true;
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$args = new stdClass();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue