From 69fc326c9880c281f8a5c9c5b71100a414971912 Mon Sep 17 00:00:00 2001 From: Fatih Orhan Date: Thu, 4 Apr 2013 11:20:23 +0300 Subject: Add forgotten $ sign Php was defaulting httpcodeOK to 'httpcodeOK' which always evaluates to true (which is incorrect) --- readityourself.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'readityourself.php') diff --git a/readityourself.php b/readityourself.php index 4a4661c2..2071b417 100755 --- a/readityourself.php +++ b/readityourself.php @@ -92,7 +92,7 @@ function get_external_file($url, $timeout) { } // if response is not empty and response is OK - if (isset($data) and isset($httpcodeOK) and httpcodeOK ) { + if (isset($data) and isset($httpcodeOK) and $httpcodeOK ) { // take charset of page and get it preg_match('##Usi', $data, $meta); -- cgit v1.2.3 From 1f1a6157aa480553afba0e1ed2537fff94dc7a6b Mon Sep 17 00:00:00 2001 From: Fatih Orhan Date: Thu, 4 Apr 2013 11:26:50 +0300 Subject: Fix undefined index and constant problems --- readityourself.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'readityourself.php') diff --git a/readityourself.php b/readityourself.php index 2071b417..c59bb9d1 100755 --- a/readityourself.php +++ b/readityourself.php @@ -26,7 +26,11 @@ require_once dirname(__FILE__).'/inc/rain.tpl.class.php'; 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