mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
move isDirectoryUsable to System
This commit is contained in:
parent
6a9d73f7d9
commit
b79bd63231
4 changed files with 47 additions and 49 deletions
15
boot.php
15
boot.php
|
@ -22,6 +22,7 @@ use Friendica\BaseObject;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Util\BasePath;
|
||||
|
@ -634,7 +635,7 @@ function get_temppath()
|
|||
|
||||
$temppath = Config::get("system", "temppath");
|
||||
|
||||
if (($temppath != "") && BasePath::isDirectoryUsable($temppath)) {
|
||||
if (($temppath != "") && System::isDirectoryUsable($temppath)) {
|
||||
// We have a temp path and it is usable
|
||||
return BasePath::getRealPath($temppath);
|
||||
}
|
||||
|
@ -643,7 +644,7 @@ function get_temppath()
|
|||
$temppath = sys_get_temp_dir();
|
||||
|
||||
// Check if it is usable
|
||||
if (($temppath != "") && BasePath::isDirectoryUsable($temppath)) {
|
||||
if (($temppath != "") && System::isDirectoryUsable($temppath)) {
|
||||
// Always store the real path, not the path through symlinks
|
||||
$temppath = BasePath::getRealPath($temppath);
|
||||
|
||||
|
@ -654,7 +655,7 @@ function get_temppath()
|
|||
mkdir($new_temppath);
|
||||
}
|
||||
|
||||
if (BasePath::isDirectoryUsable($new_temppath)) {
|
||||
if (System::isDirectoryUsable($new_temppath)) {
|
||||
// The new path is usable, we are happy
|
||||
Config::set("system", "temppath", $new_temppath);
|
||||
return $new_temppath;
|
||||
|
@ -736,7 +737,7 @@ function get_itemcachepath()
|
|||
}
|
||||
|
||||
$itemcache = Config::get('system', 'itemcache');
|
||||
if (($itemcache != "") && BasePath::isDirectoryUsable($itemcache)) {
|
||||
if (($itemcache != "") && System::isDirectoryUsable($itemcache)) {
|
||||
return BasePath::getRealPath($itemcache);
|
||||
}
|
||||
|
||||
|
@ -748,7 +749,7 @@ function get_itemcachepath()
|
|||
mkdir($itemcache);
|
||||
}
|
||||
|
||||
if (BasePath::isDirectoryUsable($itemcache)) {
|
||||
if (System::isDirectoryUsable($itemcache)) {
|
||||
Config::set("system", "itemcache", $itemcache);
|
||||
return $itemcache;
|
||||
}
|
||||
|
@ -764,7 +765,7 @@ function get_itemcachepath()
|
|||
function get_spoolpath()
|
||||
{
|
||||
$spoolpath = Config::get('system', 'spoolpath');
|
||||
if (($spoolpath != "") && BasePath::isDirectoryUsable($spoolpath)) {
|
||||
if (($spoolpath != "") && System::isDirectoryUsable($spoolpath)) {
|
||||
// We have a spool path and it is usable
|
||||
return $spoolpath;
|
||||
}
|
||||
|
@ -779,7 +780,7 @@ function get_spoolpath()
|
|||
mkdir($spoolpath);
|
||||
}
|
||||
|
||||
if (BasePath::isDirectoryUsable($spoolpath)) {
|
||||
if (System::isDirectoryUsable($spoolpath)) {
|
||||
// The new path is usable, we are happy
|
||||
Config::set("system", "spoolpath", $spoolpath);
|
||||
return $spoolpath;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue