]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Fix undefined index and constant problems 5/head
authorFatih Orhan <fatihorhan@gmail.com>
Thu, 4 Apr 2013 08:26:50 +0000 (11:26 +0300)
committerFatih Orhan <fatihorhan@gmail.com>
Thu, 4 Apr 2013 08:26:50 +0000 (11:26 +0300)
inc/Readability.php
readityourself.php

index 52a37d505e1aadcc8963dfa0213480956faaeaba..c50bf2efa1911acd3129e69cd1648e4584fd9d4b 100755 (executable)
@@ -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
        
        /**
index 2071b417529643b93f1ffd13d03bb459fb52c422..c59bb9d1226a03aa5f74670546400f8d9a3c1a92 100755 (executable)
@@ -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'];
 }