aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Tools.class.php
diff options
context:
space:
mode:
authortcit <tcit@tcit.fr>2014-09-27 17:54:13 +0200
committertcit <tcit@tcit.fr>2014-09-27 17:54:13 +0200
commit04a7674bdd20f2f24b32de69c086ecffdf20ceb4 (patch)
treebcc26634c68a8689ad511513c316058647e90789 /inc/poche/Tools.class.php
parent657245dcbdbca323621952d2b6f9e991dd94fa03 (diff)
parenta15108e65b12ceaf50821783bcaa1ee3fee10d13 (diff)
downloadwallabag-04a7674bdd20f2f24b32de69c086ecffdf20ceb4.tar.gz
wallabag-04a7674bdd20f2f24b32de69c086ecffdf20ceb4.tar.zst
wallabag-04a7674bdd20f2f24b32de69c086ecffdf20ceb4.zip
merge refactor and dev
Diffstat (limited to 'inc/poche/Tools.class.php')
-rwxr-xr-xinc/poche/Tools.class.php19
1 files changed, 4 insertions, 15 deletions
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php
index 63137d76..93ec3fc6 100755
--- a/inc/poche/Tools.class.php
+++ b/inc/poche/Tools.class.php
@@ -54,6 +54,10 @@ final class Tools
54 || ($https && $_SERVER["SERVER_PORT"] == '443') 54 || ($https && $_SERVER["SERVER_PORT"] == '443')
55 || ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection 55 || ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection
56 ? '' : ':' . $_SERVER["SERVER_PORT"]); 56 ? '' : ':' . $_SERVER["SERVER_PORT"]);
57
58 if (isset($_SERVER["HTTP_X_FORWARDED_PORT"])) {
59 $serverport = ':' . $_SERVER["HTTP_X_FORWARDED_PORT"];
60 }
57 61
58 $scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]); 62 $scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]);
59 63
@@ -295,21 +299,6 @@ final class Tools
295 } 299 }
296 300
297 /** 301 /**
298 * Download the sqlite database
299 */
300 public static function downloadDb()
301 {
302 header('Content-Disposition: attachment; filename="poche.sqlite.gz"');
303 self::_status(200);
304
305 header('Content-Transfer-Encoding: binary');
306 header('Content-Type: application/octet-stream');
307 echo gzencode(file_get_contents(STORAGE_SQLITE));
308
309 exit;
310 }
311
312 /**
313 * Get the content for a given URL (by a call to FullTextFeed) 302 * Get the content for a given URL (by a call to FullTextFeed)
314 * 303 *
315 * @param Url $url 304 * @param Url $url