Moved addon directory constant

2022.09-rc
Philipp Holzer 2019-02-04 09:33:55 +01:00
rodzic f779110154
commit 4b82e47034
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 517BE60E2CE5C8A5
2 zmienionych plików z 9 dodań i 6 usunięć

Wyświetl plik

@ -12,6 +12,12 @@ use Friendica\Database\DBA;
*/
class Addon extends BaseObject
{
/**
* The addon sub-directory
* @var string
*/
const DIRECTORY = '/addon/';
/**
* List of the names of enabled addons
*

Wyświetl plik

@ -2,6 +2,8 @@
namespace Friendica\Core\Config;
use Friendica\Core\Addon;
/**
* The ConfigCacheLoader loads config-files and stores them in a ConfigCache ( @see ConfigCache )
*
@ -17,11 +19,6 @@ class ConfigCacheLoader
* @var string
*/
const SUBDIRECTORY = '/config/';
/**
* The addon sub-directory
* @var string
*/
const ADDONDIRECTORY = '/addon/';
private $baseDir;
private $configDir;
@ -141,7 +138,7 @@ class ConfigCacheLoader
public function loadConfigFile($filename, $addon = false)
{
if ($addon) {
$filepath = $this->baseDir . self::ADDONDIRECTORY . $filename . self::SUBDIRECTORY . $filename . ".config.php";
$filepath = $this->baseDir . Addon::DIRECTORY . $filename . self::SUBDIRECTORY . $filename . ".config.php";
} else {
$filepath = $this->configDir . $filename . ".config.php";
}