* easily as email does today.
*/
-use Friendica\Core\Config;
use Friendica\Core\Protocol;
use Friendica\Core\System;
use Friendica\Database\DBA;
{
$a = DI::app();
- $admin_email = Config::get('config', 'admin_email');
+ $admin_email = DI::config()->get('config', 'admin_email');
$adminlist = explode(',', str_replace(' ', '', $admin_email));
function get_temppath()
{
- $temppath = Config::get("system", "temppath");
+ $temppath = DI::config()->get("system", "temppath");
if (($temppath != "") && System::isDirectoryUsable($temppath)) {
// We have a temp path and it is usable
if (System::isDirectoryUsable($new_temppath)) {
// The new path is usable, we are happy
- Config::set("system", "temppath", $new_temppath);
+ DI::config()->set("system", "temppath", $new_temppath);
return $new_temppath;
} else {
// We can't create a subdirectory, strange.
return;
}
- $cachetime = (int) Config::get('system', 'itemcache_duration');
+ $cachetime = (int) DI::config()->get('system', 'itemcache_duration');
if ($cachetime == 0) {
$cachetime = 86400;
}
function get_itemcachepath()
{
// Checking, if the cache is deactivated
- $cachetime = (int) Config::get('system', 'itemcache_duration');
+ $cachetime = (int) DI::config()->get('system', 'itemcache_duration');
if ($cachetime < 0) {
return "";
}
- $itemcache = Config::get('system', 'itemcache');
+ $itemcache = DI::config()->get('system', 'itemcache');
if (($itemcache != "") && System::isDirectoryUsable($itemcache)) {
return BasePath::getRealPath($itemcache);
}
}
if (System::isDirectoryUsable($itemcache)) {
- Config::set("system", "itemcache", $itemcache);
+ DI::config()->set("system", "itemcache", $itemcache);
return $itemcache;
}
}
*/
function get_spoolpath()
{
- $spoolpath = Config::get('system', 'spoolpath');
+ $spoolpath = DI::config()->get('system', 'spoolpath');
if (($spoolpath != "") && System::isDirectoryUsable($spoolpath)) {
// We have a spool path and it is usable
return $spoolpath;
if (System::isDirectoryUsable($spoolpath)) {
// The new path is usable, we are happy
- Config::set("system", "spoolpath", $spoolpath);
+ DI::config()->set("system", "spoolpath", $spoolpath);
return $spoolpath;
} else {
// We can't create a subdirectory, strange.