Skip to content

Commit

Permalink
Dev: added the possibility for user to download his backup of files a…
Browse files Browse the repository at this point in the history
…nd database directly from comfortUpdate
  • Loading branch information
louis committed Sep 1, 2015
1 parent af93af2 commit f20cf8b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
22 changes: 9 additions & 13 deletions application/extensions/bootstrap/assets/css/bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -3054,7 +3054,6 @@ button.close {
*line-height: 20px;
color: #333333;
text-align: center;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
vertical-align: middle;
cursor: pointer;
background-color: #f5f5f5;
Expand Down Expand Up @@ -3309,14 +3308,13 @@ input[type="button"].btn-block {

.btn-success {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #5bb75b;
*background-color: #51a351;
background-image: -moz-linear-gradient(top, #62c462, #51a351);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
background-image: -webkit-linear-gradient(top, #62c462, #51a351);
background-image: -o-linear-gradient(top, #62c462, #51a351);
background-image: linear-gradient(to bottom, #62c462, #51a351);
background-color: #daf5a7;
*background-color: #daf5a7;
background-image: -moz-linear-gradient(top, #daf5a7, #daf5a7);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#daf5a7), to(#daf5a7));
background-image: -webkit-linear-gradient(top, #daf5a7, #daf5a7);
background-image: -o-linear-gradient(top, #daf5a7, #daf5a7);
background-image: linear-gradient(to bottom, #daf5a7, #daf5a7);
background-repeat: repeat-x;
border-color: #51a351 #51a351 #387038;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
Expand All @@ -3329,9 +3327,8 @@ input[type="button"].btn-block {
.btn-success.active,
.btn-success.disabled,
.btn-success[disabled] {
color: #ffffff;
background-color: #51a351;
*background-color: #499249;
background-color: #daf5a7;
*background-color: #daf5a7;
}

.btn-success:active,
Expand All @@ -3341,7 +3338,6 @@ input[type="button"].btn-block {

.btn-info {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #49afcd;
*background-color: #2f96b4;
background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
Expand Down
3 changes: 2 additions & 1 deletion application/models/UpdateForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,8 @@ private function _createDbBackup()
else
{
$backupDb->result = TRUE;
$backupDb->message = htmlspecialchars($dfilename);
$backupDb->message = htmlspecialchars($dfilename);
$backupDb->fileurl = Yii::app()->getBaseUrl(true) . '/tmp/LimeSurvey_database_backup_' . $basefilename . '.zip';
}
}
else
Expand Down
7 changes: 5 additions & 2 deletions application/views/admin/update/updater/steps/_backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@
<p class="success " style="text-align: left;">
<strong><?php echo sprintf(gT("File backup created: %s"),''); ?></strong>
<br/>
<?php echo $tempdir.DIRECTORY_SEPARATOR.'LimeSurvey_files_backup_'.$basefilename.'.zip'; ?>
<?php echo $tempdir.DIRECTORY_SEPARATOR.'LimeSurvey_files_backup_'.$basefilename.'.zip'; ?><br/>
<a class="btn btn-success" href="<?php echo Yii::app()->getBaseUrl(true);?>/tmp/LimeSurvey_files_backup_<?php echo $basefilename;?>.zip" title="<?php eT('Download this file');?>"><?php eT('Download this file');?></a>
</p>


<?php if($dbBackupInfos->result):?>
<p class="success " style="text-align: left;">
<strong><?php eT('DB backup created:'); ?></strong>
<br/>
<?php eT($dbBackupInfos->message); ?>
<?php echo $dbBackupInfos->message; ?>
<br/>
<a class="btn btn-success" href="<?php echo $dbBackupInfos->fileurl;?>" title="<?php eT('Download this file');?>"><?php eT('Download this file');?></a>
</p>
<?php else:?>
<?php
Expand Down

0 comments on commit f20cf8b

Please sign in to comment.