Merge pull request #325 from lansi951/block_modify_regdate

문서 작성시각 변경 방지
This commit is contained in:
sungbum hong 2014-01-15 19:37:50 -08:00
commit 1cb2dce0af

View file

@ -215,6 +215,13 @@ class documentController extends document
if(!$obj->email_address) $obj->email_address = '';
if(!$isRestore) $obj->ipaddress = $_SERVER['REMOTE_ADDR']; //board?<3F>서 form key값으<EAB092>?ipaddress<73>??<3F>용?<3F>면 ?<3F>한 ip가 ?<3F>록?? ?<3F>터?<3F>???<3F><>??<3F>
// can modify regdate only manager
$grant = Context::get('grant');
if(!$grant->manager)
{
unset($obj->regdate);
}
// Serialize the $extra_vars, check the extra_vars type, because duplicate serialized avoid
if(!is_string($obj->extra_vars)) $obj->extra_vars = serialize($obj->extra_vars);
// Remove the columns for automatic saving
@ -393,6 +400,14 @@ class documentController extends document
if($obj->allow_trackback!='Y') $obj->allow_trackback = 'N';
if($obj->homepage && !preg_match('/^[a-z]+:\/\//i',$obj->homepage)) $obj->homepage = 'http://'.$obj->homepage;
if($obj->notify_message != 'Y') $obj->notify_message = 'N';
// can modify regdate only manager
$grant = Context::get('grant');
if(!$grant->manager)
{
unset($obj->regdate);
}
// Serialize the $extra_vars
if(!is_string($obj->extra_vars)) $obj->extra_vars = serialize($obj->extra_vars);
// Remove the columns for automatic saving