Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/develop'
Browse files Browse the repository at this point in the history
Conflicts:
	catalog/admin/includes/applications/orders/classes/orders.php
  • Loading branch information
datazen committed Nov 14, 2013
2 parents a9da9ea + e4b4e82 commit 61c67fd
Show file tree
Hide file tree
Showing 68 changed files with 10,447 additions and 7,878 deletions.
101 changes: 55 additions & 46 deletions catalog/admin/includes/applications/backup/backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,62 +13,71 @@
@function The lC_Application_Banner_manager class manages the banners GUI
*/
global $lC_Vqmod;

require($lC_Vqmod->modCheck('includes/applications/backup/classes/backup.php'));

class lC_Application_Backup extends lC_Template_Admin {
/*
* Protected variables
*/
protected $_module = 'backup',
$_page_title,
$_page_contents = 'main.php';
/*
* Class constructor
*/
function __construct() {
global $lC_Language;

$this->_page_title = $lC_Language->get('heading_title');

if ( !isset($_GET['action']) ) {
$_GET['action'] = '';
}
global $lC_Vqmod;

require($lC_Vqmod->modCheck('includes/applications/backup/classes/backup.php'));

if ( !empty($_GET['action']) ) {
switch ( $_GET['action'] ) {
class lC_Application_Backup extends lC_Template_Admin {
/*
* Protected variables
*/
protected $_module = 'backup',
$_page_title,
$_page_contents = 'main.php';
/*
* Class constructor
*/
function __construct() {
global $lC_Language;

case 'backup':
if (lC_Backup_Admin::backup($_GET['compression'], (isset($_GET['download_only']) && ($_GET['download_only'] == 'yes') ? true : false))) {
return true;
} else {
return false;
}
break;
$this->_page_title = $lC_Language->get('heading_title');

case 'download':
$filename = basename($_GET['file']);
$extension = substr($filename, -3);
if ( !isset($_GET['action']) ) {
$_GET['action'] = '';
}

if ( ( $extension == 'zip' ) || ( $extension == '.gz' ) || ( $extension == 'sql' ) ) {
if ( file_exists(DIR_FS_BACKUP . $filename) ) {
if ( $fp = fopen(DIR_FS_BACKUP . $filename, 'rb') ) {
$buffer = fread($fp, filesize(DIR_FS_BACKUP . $filename));
fclose($fp);
if ( !empty($_GET['action']) ) {
switch ( $_GET['action'] ) {

case 'backup':
if (lC_Backup_Admin::backup($_GET['compression'], (isset($_GET['download_only']) && ($_GET['download_only'] == 'yes') ? true : false))) {
return true;
} else {
return false;
}
break;

header('Content-type: application/x-octet-stream');
header('Content-disposition: attachment; filename=' . $filename);
case 'download':
$filename = basename($_GET['file']);
$extension = substr($filename, -3);

echo $buffer;
if ( ( $extension == 'zip' ) || ( $extension == '.gz' ) || ( $extension == 'sql' ) ) {
if ( file_exists(DIR_FS_BACKUP . $filename) ) {
if ( $fp = fopen(DIR_FS_BACKUP . $filename, 'rb') ) {
$buffer = fread($fp, filesize(DIR_FS_BACKUP . $filename));
fclose($fp);

exit;
header('Content-type: application/x-octet-stream');
header('Content-disposition: attachment; filename=' . $filename);

echo $buffer;

exit;
}
}
}
}
break;
break;

case 'restoreLocal':
if (lC_Backup_Admin::restore()) {
$_SESSION['restoreLocal'] = true;
return true;
} else {
return false;
}
break;
}
}
}
}
}
?>
Loading

0 comments on commit 61c67fd

Please sign in to comment.