From: Michael Date: Sat, 26 Aug 2017 06:04:21 +0000 (+0000) Subject: New class "System" X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3c24bed412235cf8c7a3f16b46fed18004abf87b;p=friendica.git New class "System" --- diff --git a/boot.php b/boot.php index 358e884947..216a93496e 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 f69454e39e..0dbe2ca133 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 e380681934..f2a73ea2a8 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 8d9083ada4..7bdd9e4ee0 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 f13e89cd16..c09b4397df 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 5168e4c262..a8e9e642a3 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 b1ec4bae53..c2bb1a0706 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 229e863e93..eaa2585ad9 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 b09153876d..a3f4e011dd 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 47210012ca..9b3a65e3d2 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 5647fd493a..624e869043 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 00f1147211..ab049b03b7 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 0747770d36..5a20e131b9 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 298f0df57f..ee1751e4a0 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";