문서 작성시각 변경 방지

POST 값으로 regdate가 넘어올 경우 작성시각을 변경할 수 있는 문제를 해결.
This commit is contained in:
lansi951 2014-01-16 00:13:51 +09:00
parent eb2d12ee4c
commit 9e0b5ac7af

View file

@ -215,6 +215,9 @@ 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>
// block modify regdate
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 +396,10 @@ 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';
// block modify regdate
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