1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 16:26:59 +02:00
This commit is contained in:
Ryan Cramer
2017-04-07 05:44:08 -04:00
parent 75a969bafb
commit 60989f97b4

View File

@@ -459,6 +459,8 @@ class Template extends WireData implements Saveable, Exportable {
*/
public function set($key, $value) {
if($key == 'cacheTime') $key = 'cache_time'; // alias
if($key == 'flags') {
$this->setFlags($value);
@@ -473,7 +475,7 @@ class Template extends WireData implements Saveable, Exportable {
if($fieldgroup) $this->setFieldgroup($fieldgroup);
else $this->error("Unable to load fieldgroup '$value' for template $this->name");
return $this;
} else if($key == 'cache_time' || $key == 'cacheTime') {
} else if($key == 'cache_time') {
$value = (int) $value;
} else {
$value = '';