]> git.mxchange.org Git - friendica.git/blobdiff - src/App.php
Merge pull request #6132 from annando/notice
[friendica.git] / src / App.php
index 3cfcc67186d44fb7bb4571cd9ac97e9c42eeab24..445101309384a2f651b46fd69f78b507835538a4 100644 (file)
@@ -787,9 +787,9 @@ class App
                 */
                if ($this->is_mobile || $this->is_tablet) {
                        if (isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) {
-                               $link = 'toggle_mobile?address=' . curPageURL();
+                               $link = 'toggle_mobile?address=' . urlencode(curPageURL());
                        } else {
-                               $link = 'toggle_mobile?off=1&address=' . curPageURL();
+                               $link = 'toggle_mobile?off=1&address=' . urlencode(curPageURL());
                        }
                        $this->page['footer'] .= Core\Renderer::replaceMacros(Core\Renderer::getMarkupTemplate("toggle_mobile_footer.tpl"), [
                                '$toggle_link' => $link,
@@ -816,12 +816,12 @@ class App
        public function removeBaseURL($origURL)
        {
                // Remove the hostname from the url if it is an internal link
-               $nurl = normalise_link($origURL);
-               $base = normalise_link($this->getBaseURL());
+               $nurl = Util\Strings::normaliseLink($origURL);
+               $base = Util\Strings::normaliseLink($this->getBaseURL());
                $url = str_replace($base . '/', '', $nurl);
 
                // if it is an external link return the orignal value
-               if ($url == normalise_link($origURL)) {
+               if ($url == Util\Strings::normaliseLink($origURL)) {
                        return $origURL;
                } else {
                        return $url;
@@ -1443,7 +1443,7 @@ class App
                // and www.example.com vs example.com.
                // We will only change the url to an ip address if there is no existing setting
 
-               if (empty($url) || (!link_compare($url, $this->getBaseURL())) && (!preg_match("/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/", $this->getHostName()))) {
+               if (empty($url) || (!Util\Strings::compareLink($url, $this->getBaseURL())) && (!preg_match("/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/", $this->getHostName()))) {
                        Core\Config::set('system', 'url', $this->getBaseURL());
                }
        }
@@ -1554,7 +1554,7 @@ class App
                        $this->module = 'maintenance';
                } else {
                        $this->checkURL();
-                       check_db(false);
+                       Core\Update::check(false);
                        Core\Addon::loadAddons();
                        Core\Hook::loadHooks();
                }