summaryrefslogtreecommitdiffstats
path: root/application/libraries/Ddownload
diff options
context:
space:
mode:
Diffstat (limited to 'application/libraries/Ddownload')
-rw-r--r--application/libraries/Ddownload/Ddownload.php2
-rw-r--r--application/libraries/Ddownload/drivers/Ddownload_php.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/application/libraries/Ddownload/Ddownload.php b/application/libraries/Ddownload/Ddownload.php
index 808dfe776..3a98d4154 100644
--- a/application/libraries/Ddownload/Ddownload.php
+++ b/application/libraries/Ddownload/Ddownload.php
@@ -17,7 +17,7 @@ class Ddownload extends CI_Driver_Library {
protected $_adapter = null;
protected $valid_drivers = array(
- 'ddownload_php', 'ddownload_nginx', 'ddownload_lighttpd'
+ 'php', 'nginx', 'lighttpd'
);
function __construct()
diff --git a/application/libraries/Ddownload/drivers/Ddownload_php.php b/application/libraries/Ddownload/drivers/Ddownload_php.php
index 344db53f0..90c002b58 100644
--- a/application/libraries/Ddownload/drivers/Ddownload_php.php
+++ b/application/libraries/Ddownload/drivers/Ddownload_php.php
@@ -12,7 +12,7 @@ class Ddownload_php extends Ddownload_Driver {
// Original source: http://www.phpfreaks.com/forums/index.php?topic=198274.msg895468#msg895468
public function serveFile($file, $filename, $type)
{
- $fp = @fopen($file, 'r');
+ $fp = fopen($file, 'r');
$size = filesize($file); // File size
$length = $size; // Content length
@@ -54,7 +54,7 @@ class Ddownload_php extends Ddownload_Driver {
// If the range starts with an '-' we start from the beginning
// If not, we forward the file pointer
// And make sure to get the end byte if spesified
- if ($range{0} == '-')
+ if ($range[0] == '-')
{
// The n-number of the last bytes is requested
$c_start = $size - substr($range, 1);