mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 00:06:55 +02:00
Fix issue processwire/processwire-issues#229
This commit is contained in:
@@ -459,6 +459,8 @@ class Template extends WireData implements Saveable, Exportable {
|
|||||||
*/
|
*/
|
||||||
public function set($key, $value) {
|
public function set($key, $value) {
|
||||||
|
|
||||||
|
if($key == 'cacheTime') $key = 'cache_time'; // alias
|
||||||
|
|
||||||
if($key == 'flags') {
|
if($key == 'flags') {
|
||||||
$this->setFlags($value);
|
$this->setFlags($value);
|
||||||
|
|
||||||
@@ -473,7 +475,7 @@ class Template extends WireData implements Saveable, Exportable {
|
|||||||
if($fieldgroup) $this->setFieldgroup($fieldgroup);
|
if($fieldgroup) $this->setFieldgroup($fieldgroup);
|
||||||
else $this->error("Unable to load fieldgroup '$value' for template $this->name");
|
else $this->error("Unable to load fieldgroup '$value' for template $this->name");
|
||||||
return $this;
|
return $this;
|
||||||
} else if($key == 'cache_time' || $key == 'cacheTime') {
|
} else if($key == 'cache_time') {
|
||||||
$value = (int) $value;
|
$value = (int) $value;
|
||||||
} else {
|
} else {
|
||||||
$value = '';
|
$value = '';
|
||||||
|
Reference in New Issue
Block a user