mirror of
https://github.com/friendica/friendica
synced 2025-04-27 13:10:10 +00:00
Adapt BaseURL calls to new UriInterface
This commit is contained in:
parent
9e6d95284b
commit
f0c29edcde
101 changed files with 218 additions and 241 deletions
|
@ -73,7 +73,7 @@ class Cache
|
|||
|
||||
public function __construct(BaseURL $baseURL, IManageConfigValues $config, Database $dba, Profiler $profiler, LoggerInterface $logger)
|
||||
{
|
||||
$this->hostname = $baseURL->getHostname();
|
||||
$this->hostname = $baseURL->getHost();
|
||||
$this->config = $config;
|
||||
$this->dba = $dba;
|
||||
$this->profiler = $profiler;
|
||||
|
|
|
@ -76,7 +76,7 @@ class Renderer
|
|||
DI::profiler()->startRecording('rendering');
|
||||
|
||||
// pass $baseurl to all templates if it isn't set
|
||||
$vars = array_merge(['$baseurl' => DI::baseUrl()->get(), '$APP' => DI::app()], $vars);
|
||||
$vars = array_merge(['$baseurl' => DI::baseUrl(), '$APP' => DI::app()], $vars);
|
||||
|
||||
$t = self::getTemplateEngine();
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ class Native extends AbstractSession implements IHandleSessions
|
|||
ini_set('session.use_only_cookies', 1);
|
||||
ini_set('session.cookie_httponly', (int)Cookie::HTTPONLY);
|
||||
|
||||
if ($baseURL->getSSLPolicy() == App\BaseURL::SSL_POLICY_FULL) {
|
||||
if ($baseURL->getScheme() === 'https') {
|
||||
ini_set('session.cookie_secure', 1);
|
||||
}
|
||||
|
||||
|
|
|
@ -401,7 +401,7 @@ class System
|
|||
if (is_bool($prefix) && !$prefix) {
|
||||
$prefix = '';
|
||||
} elseif (empty($prefix)) {
|
||||
$prefix = hash('crc32', DI::baseUrl()->getHostname());
|
||||
$prefix = hash('crc32', DI::baseUrl()->getHost());
|
||||
}
|
||||
|
||||
while (strlen($prefix) < ($size - 13)) {
|
||||
|
@ -604,7 +604,7 @@ class System
|
|||
$temppath = BasePath::getRealPath($temppath);
|
||||
|
||||
// To avoid any interferences with other systems we create our own directory
|
||||
$new_temppath = $temppath . "/" . DI::baseUrl()->getHostname();
|
||||
$new_temppath = $temppath . "/" . DI::baseUrl()->getHost();
|
||||
if (!is_dir($new_temppath)) {
|
||||
/// @TODO There is a mkdir()+chmod() upwards, maybe generalize this (+ configurable) into a function/method?
|
||||
mkdir($new_temppath);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue