aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/admin/admin_db_utilities.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-08-03 17:17:08 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-08-03 17:17:08 +0000
commit605356a6ca9174f6d448f93405453ef648237244 (patch)
tree0f09615918e8e2db1dad70ee7aea8ecba086b1fb /phpBB/admin/admin_db_utilities.php
parent1232718822a7ee32434f8ecae5d15d5185646c49 (diff)
downloadforums-605356a6ca9174f6d448f93405453ef648237244.tar
forums-605356a6ca9174f6d448f93405453ef648237244.tar.gz
forums-605356a6ca9174f6d448f93405453ef648237244.tar.bz2
forums-605356a6ca9174f6d448f93405453ef648237244.tar.xz
forums-605356a6ca9174f6d448f93405453ef648237244.zip
Why do PHP insist the read size for a gzip file be the uncompressed length ... silly
git-svn-id: file:///svn/phpbb/trunk@809 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/admin/admin_db_utilities.php')
-rw-r--r--phpBB/admin/admin_db_utilities.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/phpBB/admin/admin_db_utilities.php b/phpBB/admin/admin_db_utilities.php
index eb8160bac6..a9a067d1c3 100644
--- a/phpBB/admin/admin_db_utilities.php
+++ b/phpBB/admin/admin_db_utilities.php
@@ -997,7 +997,12 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
if($do_gzip_compress)
{
- $sql_query = gzread(gzopen($backup_file_tmpname, 'rb'), filesize($backup_file_tmpname));
+ $gz_ptr = gzopen($backup_file_tmpname, 'rb');
+ $sql_query = "";
+ while( !gzeof($gz_ptr) )
+ {
+ $sql_query .= gzgets($gz_ptr, 100000);
+ }
}
else
{
@@ -1045,7 +1050,7 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
echo "Executing: $sql\n<br>";
flush();
}
-
+
$result = $db->sql_query($sql);
if(!$result && ( !(SQL_LAYER == 'postgres' && eregi("drop table", $sql) ) ) )