From c44908ddd02eb5fd63c292bb7e0fa99a52f73222 Mon Sep 17 00:00:00 2001 From: Fatih Orhan Date: Thu, 4 Apr 2013 11:05:58 +0300 Subject: Correct the php opening tag --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 9e6e2256..e32996fa 100755 --- a/index.php +++ b/index.php @@ -80,7 +80,7 @@ function url(){
  • home
  • favorites
  • archive
  • -
  • poche it !
  • +
  • poche it !
  • prepare("SELECT * FROM entries WHERE read=?"); -- cgit v1.2.3 From aa8e0a27e21c88dcaaf99af602219f1e79188a88 Mon Sep 17 00:00:00 2001 From: Fatih Orhan Date: Thu, 4 Apr 2013 11:10:31 +0300 Subject: Prevent "undefined index 'HTTPS'" Notice In servers where notice error_level is enabled, php prints this notice which mixed in to url. --- index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index e32996fa..167c4401 100755 --- a/index.php +++ b/index.php @@ -53,7 +53,11 @@ switch ($action) { } function url(){ - $protocol = ($_SERVER['HTTPS'] && $_SERVER['HTTPS'] != "off") ? "https" : "http"; + $protocol = "http"; + if(isset($_SERVER['HTTPS'])) + if($_SERVER['HTTPS'] != "off") + $protocol = "https"; + return $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; } ?> -- cgit v1.2.3 From bf1be2bf4971688dfe925699c3797dac319cd4b8 Mon Sep 17 00:00:00 2001 From: Fatih Orhan Date: Thu, 4 Apr 2013 11:14:33 +0300 Subject: Don't add 'index.php' to url, REQUEST_URI has it See http://php.net/manual/en/reserved.variables.server.php --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 167c4401..d89fa41c 100755 --- a/index.php +++ b/index.php @@ -84,7 +84,7 @@ function url(){
  • home
  • favorites
  • archive
  • -
  • poche it !
  • +
  • poche it !
  • prepare("SELECT * FROM entries WHERE read=?"); -- cgit v1.2.3