com web/bugs: Remove dependency on PEAR_HTTP: README.md www/patch-display.php
| From: | Maciej Sobaczewski | Date: | Fri, 20 Jan 2017 05:34:29 +0000 |
| Subject: | com web/bugs: Remove dependency on PEAR_HTTP: README.md www/patch-display.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-25524@lists.php.net to get a copy of this message | ||
Commit: 30f26dbf6e22e25ea7c22feeed2b9797abd77a47
Author: Sobak <msobaczewski@gmail.com> Fri, 20 Jan 2017 06:34:29 +0100
Parents: eeb25b61eb0ba42e669f0c63a318c3e76585c373
Branches: master
Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=30f26dbf6e22e25ea7c22feeed2b9797abd77a47
Log:
Remove dependency on PEAR_HTTP
Changed paths:
M README.md
M www/patch-display.php
Diff:
diff --git a/README.md b/README.md
index 7bf2d07..125c1a1 100644
--- a/README.md
+++ b/README.md
@@ -13,14 +13,13 @@ Requirements
- DB_DataObject
- Text_CAPTCHA_Numeral
- Text_Diff
- - HTTP
- HTTP_Upload
Installation
============
1. Copy
local_config.php.sample to local_config.php and modify
accordingly
2. Install all required packages:
-pear install MDB2 MDB2#mysql MDB2#mysqli DB_DataObject Text_CAPTCHA_Numeral Text_Diff HTTP
HTTP_Upload
+pear install MDB2 MDB2#mysql MDB2#mysqli DB_DataObject Text_CAPTCHA_Numeral Text_Diff
HTTP_Upload
3. Import SQL schema from sql/bugs.sql
TODO
diff --git a/www/patch-display.php b/www/patch-display.php
index cfe0ea6..4ef9683 100644
--- a/www/patch-display.php
+++ b/www/patch-display.php
@@ -65,10 +65,8 @@ if (isset($patch_name) && isset($revision)) {
exit;
}
- require_once 'HTTP.php';
-
if (isset($_GET['download'])) {
- header('Last-modified: ' . HTTP::date(filemtime($path)));
+ header('Last-modified: ' . gmdate('l, d-M-y H:i:s \G\M\T',
filemtime($path)));
header('Content-type: application/octet-stream');
header('Content-disposition: attachment; filename="' . $patch_name .
'.patch.txt"');
header('Content-length: '.filesize($path));