mirror of
https://github.com/friendica/friendica
synced 2024-11-13 13:42:53 +00:00
Moved addon directory constant
This commit is contained in:
parent
f779110154
commit
4b82e47034
2 changed files with 9 additions and 6 deletions
|
@ -12,6 +12,12 @@ use Friendica\Database\DBA;
|
||||||
*/
|
*/
|
||||||
class Addon extends BaseObject
|
class Addon extends BaseObject
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* The addon sub-directory
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
const DIRECTORY = '/addon/';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of the names of enabled addons
|
* List of the names of enabled addons
|
||||||
*
|
*
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
namespace Friendica\Core\Config;
|
namespace Friendica\Core\Config;
|
||||||
|
|
||||||
|
use Friendica\Core\Addon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ConfigCacheLoader loads config-files and stores them in a ConfigCache ( @see ConfigCache )
|
* The ConfigCacheLoader loads config-files and stores them in a ConfigCache ( @see ConfigCache )
|
||||||
*
|
*
|
||||||
|
@ -17,11 +19,6 @@ class ConfigCacheLoader
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const SUBDIRECTORY = '/config/';
|
const SUBDIRECTORY = '/config/';
|
||||||
/**
|
|
||||||
* The addon sub-directory
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
const ADDONDIRECTORY = '/addon/';
|
|
||||||
|
|
||||||
private $baseDir;
|
private $baseDir;
|
||||||
private $configDir;
|
private $configDir;
|
||||||
|
@ -141,7 +138,7 @@ class ConfigCacheLoader
|
||||||
public function loadConfigFile($filename, $addon = false)
|
public function loadConfigFile($filename, $addon = false)
|
||||||
{
|
{
|
||||||
if ($addon) {
|
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 {
|
} else {
|
||||||
$filepath = $this->configDir . $filename . ".config.php";
|
$filepath = $this->configDir . $filename . ".config.php";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue