Overview
Comment:Fix config constructor
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA1: 755dee3526efc1aabbe8a411da3c08088e7f659a
User & Date: bohwaz on 2020-12-13 00:31:17
Other Links: branch diff | manifest | tags
Context
2020-12-13
00:31
We need WWW_URL constant to get file URL check-in: 6673511597 user: bohwaz tags: dev
00:31
Fix config constructor check-in: 755dee3526 user: bohwaz tags: dev
00:30
Refactor homepage controller check-in: 4f7a33917e user: bohwaz tags: dev
Changes

Modified src/include/lib/Garradin/Config.php from [7305829509] to [977640546b].

72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
		'image_fond'            => '?Garradin\Entities\Files\File',

		'desactiver_site'       => 'bool',
	];

	static protected $_instance = null;

	/**
	 * Singleton simple
	 * @return Config
	 */
	static public function getInstance()
	{
		return self::$_instance ?: self::$_instance = new self;
	}

	static public function deleteInstance()
	{







<
<
<
<







72
73
74
75
76
77
78




79
80
81
82
83
84
85
		'image_fond'            => '?Garradin\Entities\Files\File',

		'desactiver_site'       => 'bool',
	];

	static protected $_instance = null;





	static public function getInstance()
	{
		return self::$_instance ?: self::$_instance = new self;
	}

	static public function deleteInstance()
	{
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
			if ($type == File::class || substr($type, 1) == File::class) {
				$config[$key] = Files::get((int) $value);
			}
		}

		$this->load($config);

		$this->champs_membres = new Membres\Champs((string)$value);
		$this->accueil_connexion = $this->accueil_connexion ? Files::get($this->accueil_connexion) : null;
	}

	public function save(): bool
	{
		if (!count($this->_modified)) {
			return true;
		}







|
<







114
115
116
117
118
119
120
121

122
123
124
125
126
127
128
			if ($type == File::class || substr($type, 1) == File::class) {
				$config[$key] = Files::get((int) $value);
			}
		}

		$this->load($config);

		$this->champs_membres = new Membres\Champs((string)$this->champs_membres);

	}

	public function save(): bool
	{
		if (!count($this->_modified)) {
			return true;
		}