]> git.mxchange.org Git - friendica.git/commitdiff
Merge remote-tracking branch 'upstream/develop' into 1602-mixed-content
authorMichael Vogel <icarus@dabo.de>
Wed, 17 Feb 2016 11:18:46 +0000 (12:18 +0100)
committerMichael Vogel <icarus@dabo.de>
Wed, 17 Feb 2016 11:18:46 +0000 (12:18 +0100)
1  2 
boot.php

diff --combined boot.php
index 69440e69d29aa25f8f3566d6ccedd59262b2ce53,94e1e0ab8c63d2b34a7b3b9467887b345a1b1082..df4a1fdea265f1450a9af240cbffdb5097022064
+++ b/boot.php
@@@ -590,15 -590,6 +590,6 @@@ class App 
                if(x($_SERVER,'SERVER_NAME')) {
                        $this->hostname = $_SERVER['SERVER_NAME'];
  
-                       // See bug 437 - this didn't work so disabling it
-                       //if(stristr($this->hostname,'xn--')) {
-                               // PHP or webserver may have converted idn to punycode, so
-                               // convert punycode back to utf-8
-                       //      require_once('library/simplepie/idn/idna_convert.class.php');
-                       //      $x = new idna_convert();
-                       //      $this->hostname = $x->decode($_SERVER['SERVER_NAME']);
-                       //}
                        if(x($_SERVER,'SERVER_PORT') && $_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443)
                                $this->hostname .= ':' . $_SERVER['SERVER_PORT'];
                        /*
  
                $shortcut_icon = get_config("system", "shortcut_icon");
                if ($shortcut_icon == "")
 -                      $shortcut_icon = $this->get_baseurl()."/images/friendica-32.png";
 +                      $shortcut_icon = "images/friendica-32.png";
  
                $touch_icon = get_config("system", "touch_icon");
                if ($touch_icon == "")
 -                      $touch_icon = $this->get_baseurl()."/images/friendica-128.png";
 +                      $touch_icon = "images/friendica-128.png";
  
                $tpl = get_markup_template('head.tpl');
                $this->page['htmlhead'] = replace_macros($tpl,array(
        }
  
  
 +      /**
 +       * @brief Removes the baseurl from an url. This avoids some mixed content problems.
 +       *
 +       * @param string $url
 +       *
 +       * @return string The cleaned url
 +       */
 +      function remove_baseurl($url){
 +
 +              // Is the function called statically?
 +              if (!is_object($this))
 +                      return(self::$a->remove_baseurl($ssl));
 +
 +              $url = normalise_link($url);
 +              $base = normalise_link($this->get_baseurl());
 +              $url = str_replace($base."/", "", $url);
 +              return $url;
 +      }
 +
        /**
         * @brief Register template engine class
         * 
@@@ -1447,7 -1419,7 +1438,7 @@@ function login($register = false, $hidd
  
        $noid = get_config('system','no_openid');
  
 -      $dest_url = $a->get_baseurl(true) . '/' . $a->query_string;
 +      $dest_url = $a->query_string;
  
        if(local_user()) {
                $tpl = get_markup_template("logout.tpl");
@@@ -1766,9 -1738,9 +1757,9 @@@ function current_theme_url() 
  
        $opts = (($a->profile_uid) ? '?f=&puid=' . $a->profile_uid : '');
        if (file_exists('view/theme/' . $t . '/style.php'))
 -              return($a->get_baseurl() . '/view/theme/' . $t . '/style.pcss' . $opts);
 +              return('view/theme/'.$t.'/style.pcss'.$opts);
  
 -      return($a->get_baseurl() . '/view/theme/' . $t . '/style.css');
 +      return('view/theme/'.$t.'/style.css');
  }
  
  function feed_birthday($uid,$tz) {