Password reset mail could take several hours. After fix only a couple of seconds...
[fa-stable.git] / admin / db / maintenance_db.inc
index 1f3d8cdc2c36999528dc15127c80035fa7746f52..af6f577707aea8ebc5fce81357e9fe8bc75a1b70 100644 (file)
@@ -183,7 +183,7 @@ function update_extensions($extensions) {
        }
 
        // update per company files
-       $cnt = max(1, count($db_connections));
+       $cnt = max(1, count_array($db_connections));
        for($i = 0; $i < $cnt; $i++) 
        {
                $newexts = $extensions;
@@ -552,7 +552,6 @@ function db_backup($conn, $ext='no', $comm='', $path='')
 
        return db_export($conn, $path . clean_file_name($filename), $ext, $comm);
 }
-//
 // Generates a dump of $db database
 //
 function db_export($conn, $filename, $zip='no', $comment='')
@@ -565,8 +564,7 @@ function db_export($conn, $filename, $zip='no', $comment='')
     $max_size = 1048576 * 2; // 2 MB
     // changes max size if value can be retrieved
     if (ini_get("memory_limit"))
-       $max_size = 900000 * ini_get("memory_limit");
-
+       $max_size = 1048576 * (int)ini_get("memory_limit");
     // set backupfile name
     if ($zip == "gzip")
        $backupfile = $filename . ".gz";