1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 01:34:31 +02:00

Fix caching issue when multiple date fields in InputfieldDatetime

This commit is contained in:
Ryan Cramer
2020-03-07 08:53:37 -05:00
parent d793249f86
commit 63a588bf00

View File

@@ -124,7 +124,7 @@ class InputfieldDatetime extends Inputfield {
* @var InputfieldDatetimeType[]
*
*/
static protected $inputTypes = array();
protected $inputTypes = array();
/**
@@ -199,7 +199,9 @@ class InputfieldDatetime extends Inputfield {
*/
public function getInputTypes() {
if(count(self::$inputTypes)) return self::$inputTypes;
if(count($this->inputTypes)) {
return $this->inputTypes;
}
$path = dirname(__FILE__) . '/';
require_once($path . 'InputfieldDatetimeType.php');
@@ -212,10 +214,10 @@ class InputfieldDatetime extends Inputfield {
/** @var InputfieldDatetimeType $type */
$type = $this->wire(new $className($this));
$name = $type->getTypeName();
self::$inputTypes[$name] = $type;
$this->inputTypes[$name] = $type;
}
return self::$inputTypes;
return $this->inputTypes;
}
/**