Skip to content

Commit

Permalink
dev Check for mssql DB during DB backup in updater
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@8149 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Dec 11, 2009
1 parent f4e4aff commit 72fbe3b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
15 changes: 11 additions & 4 deletions admin/update/updater.php
Expand Up @@ -316,11 +316,18 @@ function UpdateStep3()

require_once("dumpdb.php");

$output.=$clang->gT('Creating database backup... ').'<br />';
$byteswritten=file_put_contents($tempdir.DIRECTORY_SEPARATOR.'db-'.$basefilename.'.sql',completedump());
if ($byteswritten>5000)
if ($databasetype=='mysql' || $databasetype=='mysqli')
{
$output.="<span class='successtitle'>".$clang->gT('DB backup created:')." ".htmlspecialchars($tempdir.DIRECTORY_SEPARATOR.'db-'.$basefilename.'.sql').'</span><br /><br />';
$output.=$clang->gT('Creating database backup... ').'<br />';
$byteswritten=file_put_contents($tempdir.DIRECTORY_SEPARATOR.'db-'.$basefilename.'.sql',completedump());
if ($byteswritten>5000)
{
$output.="<span class='successtitle'>".$clang->gT('DB backup created:')." ".htmlspecialchars($tempdir.DIRECTORY_SEPARATOR.'db-'.$basefilename.'.sql').'</span><br /><br />';
}
}
else
{
$output.="<span class='warningtitle'>".$clang->gT('No DB backup created:').'<br />'.$clang->gT('Database backup functionality is currently not available for your database type. Before proceeding please backup your database using a backup tool!').'</span><br /><br />';
}

$output.=$clang->gT('Please check any problems above and then proceed to the final step.');
Expand Down
6 changes: 3 additions & 3 deletions version.php
@@ -1,7 +1,7 @@
<?php

$versionnumber = "1.87RC4";
$dbversionnumber = 141;
$buildnumber = '8004';
$versionnumber = "1.87RC5";
$dbversionnumber = 142;
$buildnumber = '';

?>

0 comments on commit 72fbe3b

Please sign in to comment.