diff --git a/inc/Readability.php b/inc/Readability.php index 52a37d505..c50bf2efa 100755 --- a/inc/Readability.php +++ b/inc/Readability.php @@ -80,7 +80,7 @@ class Readability public $debug = false; protected $body = null; // protected $bodyCache = null; // Cache the body HTML in case we need to re-use it later - protected $flags = FLAG_CLEAN_CONDITIONALLY; // 1 | 2 | 4; // Start with all flags set. + protected $flags = self::FLAG_CLEAN_CONDITIONALLY; // 1 | 2 | 4; // Start with all flags set. protected $success = false; // indicates whether we were able to extract or not /** diff --git a/index.php b/index.php index 9e6e22564..d89fa41c3 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']; } ?> @@ -80,7 +84,7 @@ function url(){
  • home
  • favorites
  • archive
  • -
  • poche it !
  • +
  • poche it !
  • prepare("SELECT * FROM entries WHERE read=?"); diff --git a/readityourself.php b/readityourself.php index 4a4661c26..c59bb9d12 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']; } @@ -92,7 +96,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);