Merge branch 'master' of git://github.com/DmitrySandalov/poche into DmitrySandalov-master

This commit is contained in:
Nicolas Lœuillet 2013-11-13 14:52:28 +01:00
commit 705f04937f
2 changed files with 3 additions and 3 deletions

View file

@ -8,4 +8,4 @@ To fix the bug quickly, we need some infos:
* the link you want to poche and which causes problem * the link you want to poche and which causes problem
## You want to fix a bug or to add a feature ## You want to fix a bug or to add a feature
Please fork poche and work with the dev branch. Do not work on master branch. Please fork poche and work with **the dev branch** only. Do not work on master branch.

View file

@ -53,12 +53,12 @@ class Tools
$scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]); $scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]);
if (!isset($_SERVER["SERVER_NAME"])) { if (!isset($_SERVER["HTTP_HOST"])) {
return $scriptname; return $scriptname;
} }
return 'http' . ($https ? 's' : '') . '://' return 'http' . ($https ? 's' : '') . '://'
. $_SERVER["SERVER_NAME"] . $serverport . $scriptname; . $_SERVER["HTTP_HOST"] . $serverport . $scriptname;
} }
public static function redirect($url = '') public static function redirect($url = '')