diff --git a/boot.php b/boot.php index 358e88494..216a93496 100644 --- a/boot.php +++ b/boot.php @@ -21,6 +21,7 @@ require_once(__DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'); use Friendica\App; +use Friendica\Core\System; use Friendica\Core\Config; use Friendica\Util\Lock; diff --git a/include/Contact.php b/include/Contact.php index f69454e39..0dbe2ca13 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -1,6 +1,7 @@ friendica items permanent-url compatibility */ use Friendica\App; +use Friendica\Core\System; function notice_init(App $a) { diff --git a/mod/notify.php b/mod/notify.php index e38068193..f2a73ea2a 100644 --- a/mod/notify.php +++ b/mod/notify.php @@ -1,6 +1,7 @@ use Friendica\App; +use Friendica\Core\System; define('PROXY_DEFAULT_TIME', 86400); // 1 Day diff --git a/mod/randprof.php b/mod/randprof.php index 8d9083ada..7bdd9e4ee 100644 --- a/mod/randprof.php +++ b/mod/randprof.php @@ -1,6 +1,7 @@ '; killme(); -} \ No newline at end of file +} diff --git a/mod/settings.php b/mod/settings.php index f13e89cd1..c09b4397d 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1,6 +1,7 @@ get_baseurl($ssl); + } + + /** + * @brief Removes the baseurl from an url. This avoids some mixed content problems. + * + * @param string $orig_url + * + * @return string The cleaned url + */ + function removedBaseUrl($orig_url) { + self::init(); + return self::$a->remove_baseurl($orig_url); + } + + /// @todo Move the following functions from boot.php + /* + function get_guid($size = 16, $prefix = "") + function killme() + function goaway($s) + function local_user() + function public_contact() + function remote_user() + function notice($s) + function info($s) + function is_site_admin() + function random_digits($digits) + function get_server() + function get_temppath() + function get_cachefile($file, $writemode = true) + function get_itemcachepath() + function get_spoolpath() + function current_load() + */ +} diff --git a/src/Network/Probe.php b/src/Network/Probe.php index 5168e4c26..a8e9e642a 100644 --- a/src/Network/Probe.php +++ b/src/Network/Probe.php @@ -9,6 +9,7 @@ namespace Friendica\Network; */ use Friendica\App; +use Friendica\Core\System; use Friendica\Core\Config; use dbm; diff --git a/view/theme/duepuntozero/config.php b/view/theme/duepuntozero/config.php index b1ec4bae5..c2bb1a070 100644 --- a/view/theme/duepuntozero/config.php +++ b/view/theme/duepuntozero/config.php @@ -5,6 +5,7 @@ */ use Friendica\App; +use Friendica\Core\System; function theme_content(App $a) { if (!local_user()) { diff --git a/view/theme/frio/config.php b/view/theme/frio/config.php index 229e863e9..eaa2585ad 100644 --- a/view/theme/frio/config.php +++ b/view/theme/frio/config.php @@ -1,6 +1,7 @@ sourcename = 'Friendica mobile web'; diff --git a/view/theme/frost/theme.php b/view/theme/frost/theme.php index b09153876..a3f4e011d 100644 --- a/view/theme/frost/theme.php +++ b/view/theme/frost/theme.php @@ -10,6 +10,7 @@ */ use Friendica\App; +use Friendica\Core\System; function frost_init(App $a) { $a->videowidth = 400; diff --git a/view/theme/quattro/config.php b/view/theme/quattro/config.php index 47210012c..9b3a65e3d 100644 --- a/view/theme/quattro/config.php +++ b/view/theme/quattro/config.php @@ -5,6 +5,7 @@ */ use Friendica\App; +use Friendica\Core\System; function theme_content(App $a) { if (!local_user()) { diff --git a/view/theme/quattro/theme.php b/view/theme/quattro/theme.php index 5647fd493..624e86904 100644 --- a/view/theme/quattro/theme.php +++ b/view/theme/quattro/theme.php @@ -8,6 +8,7 @@ */ use Friendica\App; +use Friendica\Core\System; function quattro_init(App $a) { $a->page['htmlhead'] .= ''; diff --git a/view/theme/smoothly/theme.php b/view/theme/smoothly/theme.php index 00f114721..ab049b03b 100644 --- a/view/theme/smoothly/theme.php +++ b/view/theme/smoothly/theme.php @@ -11,6 +11,7 @@ */ use Friendica\App; +use Friendica\Core\System; function smoothly_init(App $a) { set_template_engine($a, 'smarty3'); diff --git a/view/theme/vier/config.php b/view/theme/vier/config.php index 0747770d3..5a20e131b 100644 --- a/view/theme/vier/config.php +++ b/view/theme/vier/config.php @@ -5,6 +5,7 @@ */ use Friendica\App; +use Friendica\Core\System; function theme_content(App $a) { if (!local_user()) { diff --git a/view/theme/vier/theme.php b/view/theme/vier/theme.php index 298f0df57..ee1751e4a 100644 --- a/view/theme/vier/theme.php +++ b/view/theme/vier/theme.php @@ -10,6 +10,7 @@ */ use Friendica\App; +use Friendica\Core\System; require_once "include/plugin.php"; require_once "include/socgraph.php";