make getConfigDir static

This commit is contained in:
Uwe Steinmann 2016-10-25 09:56:49 +02:00
parent 8cf4901a46
commit bfd02591c8

View File

@ -872,7 +872,7 @@ class Settings { /* {{{ */
function searchConfigFilePath() { /* {{{ */
$configFilePath = null;
if($configDir = $this->getConfigDir()) {
if($configDir = Settings::getConfigDir()) {
if (file_exists($configDir."/settings.xml"))
return $configDir."/settings.xml";
}
@ -888,7 +888,7 @@ class Settings { /* {{{ */
* 3. The directory /etc/seeddms
* @return NULL|string config directory
*/
function getConfigDir() { /* {{{ */
static function getConfigDir() { /* {{{ */
$_tmp = dirname($_SERVER['SCRIPT_FILENAME']);
$_arr = preg_split('/\//', rtrim(str_replace('\\', '/', $_tmp)));
$configDir = null;