diff options
author | Maryana Rozhankivska <mariroz@mr.lviv.ua> | 2014-04-02 20:55:19 +0300 |
---|---|---|
committer | Maryana Rozhankivska <mariroz@mr.lviv.ua> | 2014-04-02 20:55:19 +0300 |
commit | 182faf2696b38502d4784efc3f84f2f00290343f (patch) | |
tree | 619e725c1820773dcd8bb1fe9cbd07c0c325e865 /inc/poche/Tools.class.php | |
parent | 22db488d21bc23dc28fc2d60574803525fe53b53 (diff) | |
download | wallabag-182faf2696b38502d4784efc3f84f2f00290343f.tar.gz wallabag-182faf2696b38502d4784efc3f84f2f00290343f.tar.zst wallabag-182faf2696b38502d4784efc3f84f2f00290343f.zip |
import without cron
Diffstat (limited to 'inc/poche/Tools.class.php')
-rwxr-xr-x | inc/poche/Tools.class.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index ad451fc6..a130e94b 100755 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php | |||
@@ -7,7 +7,7 @@ | |||
7 | * @copyright 2013 | 7 | * @copyright 2013 |
8 | * @license http://www.wtfpl.net/ see COPYING file | 8 | * @license http://www.wtfpl.net/ see COPYING file |
9 | */ | 9 | */ |
10 | 10 | ||
11 | class Tools | 11 | class Tools |
12 | { | 12 | { |
13 | public static function initPhp() | 13 | public static function initPhp() |
@@ -42,7 +42,7 @@ class Tools | |||
42 | && (strtolower($_SERVER['HTTPS']) == 'on')) | 42 | && (strtolower($_SERVER['HTTPS']) == 'on')) |
43 | || (isset($_SERVER["SERVER_PORT"]) | 43 | || (isset($_SERVER["SERVER_PORT"]) |
44 | && $_SERVER["SERVER_PORT"] == '443') // HTTPS detection. | 44 | && $_SERVER["SERVER_PORT"] == '443') // HTTPS detection. |
45 | || (isset($_SERVER["SERVER_PORT"]) //Custom HTTPS port detection | 45 | || (isset($_SERVER["SERVER_PORT"]) //Custom HTTPS port detection |
46 | && $_SERVER["SERVER_PORT"] == SSL_PORT) | 46 | && $_SERVER["SERVER_PORT"] == SSL_PORT) |
47 | || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) | 47 | || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) |
48 | && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'); | 48 | && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'); |
@@ -148,7 +148,7 @@ class Tools | |||
148 | ); | 148 | ); |
149 | 149 | ||
150 | # only download page lesser than 4MB | 150 | # only download page lesser than 4MB |
151 | $data = @file_get_contents($url, false, $context, -1, 4000000); | 151 | $data = @file_get_contents($url, false, $context, -1, 4000000); |
152 | 152 | ||
153 | if (isset($http_response_header) and isset($http_response_header[0])) { | 153 | if (isset($http_response_header) and isset($http_response_header[0])) { |
154 | $httpcodeOK = isset($http_response_header) and isset($http_response_header[0]) and ((strpos($http_response_header[0], '200 OK') !== FALSE) or (strpos($http_response_header[0], '301 Moved Permanently') !== FALSE)); | 154 | $httpcodeOK = isset($http_response_header) and isset($http_response_header[0]) and ((strpos($http_response_header[0], '200 OK') !== FALSE) or (strpos($http_response_header[0], '301 Moved Permanently') !== FALSE)); |
@@ -200,7 +200,7 @@ class Tools | |||
200 | } | 200 | } |
201 | } | 201 | } |
202 | 202 | ||
203 | public static function encodeString($string) | 203 | public static function encodeString($string) |
204 | { | 204 | { |
205 | return sha1($string . SALT); | 205 | return sha1($string . SALT); |
206 | } | 206 | } |