Version Description
Please, keep your Dropbox Backup and Restore plugin up-to-date.
Download this release
Release Info
Developer | backup-dropbox |
Plugin | Backup & Restore Dropbox |
Version | 1.5.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.5.1 to 1.5.1.1
- dropbox-backup.php +14 -2
- languages/index.html +10 -0
- languages/index.php +1 -0
- libs/wpadm.server.main.class.php +31 -4
- main/wpadm-class-wp.php +23 -15
- modules/archive.php +2 -1
- modules/class-wpadm-running.php +1 -0
- modules/phpseclib/index.html +10 -0
- modules/restore-class.php +14 -4
- readme.txt +2 -2
- template/advantage-plugin.php +3 -8
- template/css/admin-style-wpadm.css +30 -22
- template/css/tool-bar.css +10 -0
dropbox-backup.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Dropbox Backup & Restore
|
4 |
Description: Dropbox Backup & Restore Plugin to create Dropbox Full Backup (Files + Database) of your Web Page
|
5 |
-
Version: 1.5.1
|
6 |
Text Domain: dropbox-backup
|
7 |
Domain Path: /languages/
|
8 |
*/
|
@@ -11,6 +11,12 @@ if (!defined('DRBBACKUP_BASE_DIR')) {
|
|
11 |
define('DRBBACKUP_BASE_DIR', dirname(__FILE__));
|
12 |
}
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '/modules/constant.php';
|
15 |
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '/functions/wpadm.php';
|
16 |
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '/main/wpadm-class-wp.php';
|
@@ -18,9 +24,15 @@ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '/main/wpadm-class-wp.php
|
|
18 |
add_action('init', 'wpadm_full_backup_dropbox_run');
|
19 |
|
20 |
add_action('admin_print_scripts', array('wpadm_wp_full_backup_dropbox', 'include_admins_script' ));
|
21 |
-
|
|
|
|
|
|
|
|
|
22 |
add_action('admin_post_activate_wpadm_full_backup_dropbox', array('wpadm_wp_full_backup_dropbox', 'activatePlugin') );
|
23 |
|
|
|
|
|
24 |
if ( !function_exists('wpadm_full_backup_dropbox_run') ) {
|
25 |
function wpadm_full_backup_dropbox_run()
|
26 |
{
|
2 |
/*
|
3 |
Plugin Name: Dropbox Backup & Restore
|
4 |
Description: Dropbox Backup & Restore Plugin to create Dropbox Full Backup (Files + Database) of your Web Page
|
5 |
+
Version: 1.5.1.1
|
6 |
Text Domain: dropbox-backup
|
7 |
Domain Path: /languages/
|
8 |
*/
|
11 |
define('DRBBACKUP_BASE_DIR', dirname(__FILE__));
|
12 |
}
|
13 |
|
14 |
+
if (defined('MULTISITE') && (MULTISITE === true || MULTISITE == 'true')) {
|
15 |
+
define('DRBBACKUP_MULTI', true);
|
16 |
+
} else {
|
17 |
+
define('DRBBACKUP_MULTI', false);
|
18 |
+
}
|
19 |
+
|
20 |
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '/modules/constant.php';
|
21 |
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '/functions/wpadm.php';
|
22 |
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '/main/wpadm-class-wp.php';
|
24 |
add_action('init', 'wpadm_full_backup_dropbox_run');
|
25 |
|
26 |
add_action('admin_print_scripts', array('wpadm_wp_full_backup_dropbox', 'include_admins_script' ));
|
27 |
+
if (DRBBACKUP_MULTI) {
|
28 |
+
add_action('network_admin_menu', array('wpadm_wp_full_backup_dropbox', 'draw_menu'));
|
29 |
+
} else {
|
30 |
+
add_action('admin_menu', array('wpadm_wp_full_backup_dropbox', 'draw_menu'));
|
31 |
+
}
|
32 |
add_action('admin_post_activate_wpadm_full_backup_dropbox', array('wpadm_wp_full_backup_dropbox', 'activatePlugin') );
|
33 |
|
34 |
+
|
35 |
+
|
36 |
if ( !function_exists('wpadm_full_backup_dropbox_run') ) {
|
37 |
function wpadm_full_backup_dropbox_run()
|
38 |
{
|
languages/index.html
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html>
|
3 |
+
<head lang="en">
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<title></title>
|
6 |
+
</head>
|
7 |
+
<body>
|
8 |
+
|
9 |
+
</body>
|
10 |
+
</html>
|
languages/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php
|
libs/wpadm.server.main.class.php
CHANGED
@@ -416,7 +416,7 @@
|
|
416 |
}
|
417 |
|
418 |
|
419 |
-
|
420 |
|
421 |
if (strpos($d2, 'cache') !== false && isset($tmp[0])&& !in_array($tmp[0], array('plugins', 'themes')) ) {
|
422 |
return array();
|
@@ -831,18 +831,28 @@
|
|
831 |
$dir_b = opendir($dir_backup . "/$d");
|
832 |
$count_zip = 0;
|
833 |
$backups[$i]['files'] = "[";
|
|
|
834 |
while($d_b = readdir($dir_b)) {
|
835 |
if ($d_b != '.' && $d_b != '..' && file_exists($dir_backup . "/$d/$d_b") && ( substr($d_b, -3) == "zip" || substr($d_b, -3) == 'md5' ) || substr($d_b, -6) == "tar.gz" ) {
|
836 |
$backups[$i]['files'] .= "$d_b,";
|
837 |
$size += filesize($dir_backup . "/$d/$d_b");
|
838 |
$count_zip = $count_zip + 1;
|
|
|
|
|
|
|
839 |
}
|
840 |
}
|
841 |
-
if (
|
842 |
-
$
|
|
|
|
|
|
|
|
|
|
|
843 |
} else {
|
844 |
-
$backups[$i]['not_all_upload'] =
|
845 |
}
|
|
|
846 |
$backups[$i]['files'] .= ']';
|
847 |
$backups[$i]['size'] = $size;
|
848 |
$backups[$i]['type'] = 'local';
|
@@ -855,6 +865,23 @@
|
|
855 |
}
|
856 |
return $backups;
|
857 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
858 |
public static function check_plugin($name = "", $version = false)
|
859 |
{
|
860 |
if (!empty($name)) {
|
416 |
}
|
417 |
|
418 |
|
419 |
+
|
420 |
|
421 |
if (strpos($d2, 'cache') !== false && isset($tmp[0])&& !in_array($tmp[0], array('plugins', 'themes')) ) {
|
422 |
return array();
|
831 |
$dir_b = opendir($dir_backup . "/$d");
|
832 |
$count_zip = 0;
|
833 |
$backups[$i]['files'] = "[";
|
834 |
+
$file_md5 = '';
|
835 |
while($d_b = readdir($dir_b)) {
|
836 |
if ($d_b != '.' && $d_b != '..' && file_exists($dir_backup . "/$d/$d_b") && ( substr($d_b, -3) == "zip" || substr($d_b, -3) == 'md5' ) || substr($d_b, -6) == "tar.gz" ) {
|
837 |
$backups[$i]['files'] .= "$d_b,";
|
838 |
$size += filesize($dir_backup . "/$d/$d_b");
|
839 |
$count_zip = $count_zip + 1;
|
840 |
+
if (substr($d_b, -3) == 'md5') {
|
841 |
+
$file_md5 = $dir_backup . "/$d/$d_b";
|
842 |
+
}
|
843 |
}
|
844 |
}
|
845 |
+
if (!empty($file_md5)) {
|
846 |
+
$md5_cache = self::lastString($file_md5);
|
847 |
+
if ( strpos( $md5_cache['str'], 'mysqldump.sql' ) !== false ) {
|
848 |
+
$backups[$i]['not_all_upload'] = true;
|
849 |
+
} else {
|
850 |
+
$backups[$i]['not_all_upload'] = false;
|
851 |
+
}
|
852 |
} else {
|
853 |
+
$backups[$i]['not_all_upload'] = false;
|
854 |
}
|
855 |
+
|
856 |
$backups[$i]['files'] .= ']';
|
857 |
$backups[$i]['size'] = $size;
|
858 |
$backups[$i]['type'] = 'local';
|
865 |
}
|
866 |
return $backups;
|
867 |
}
|
868 |
+
|
869 |
+
public static function lastString($file)
|
870 |
+
{
|
871 |
+
$f = fopen($file, "r");
|
872 |
+
if($f){
|
873 |
+
if(fseek($f, -1, SEEK_END) == 0){
|
874 |
+
$len = ftell($f);
|
875 |
+
for($i = $len; $i > ($len-5000); $i--){
|
876 |
+
fseek($f, -2, SEEK_CUR);
|
877 |
+
if(fread($f,1) == "\n")
|
878 |
+
break;
|
879 |
+
}
|
880 |
+
return array('line' => $i, 'str' => fread($f, $len - $i)) ;
|
881 |
+
}
|
882 |
+
fclose($f);
|
883 |
+
}
|
884 |
+
}
|
885 |
public static function check_plugin($name = "", $version = false)
|
886 |
{
|
887 |
if (!empty($name)) {
|
main/wpadm-class-wp.php
CHANGED
@@ -30,8 +30,14 @@
|
|
30 |
add_action('admin_post_wpadm_download', array('wpadm_wp_full_backup_dropbox', 'download') );
|
31 |
add_action('init', array('wpadm_wp_full_backup_dropbox', 'init'), 10 );
|
32 |
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
add_action('admin_post_hide_notice', array('wpadm_wp_full_backup_dropbox', 'hide_notice') );
|
36 |
add_action( 'admin_bar_menu', array('wpadm_wp_full_backup_dropbox', 'add_link_to_admin_bar') ,999 );
|
37 |
|
@@ -132,12 +138,14 @@
|
|
132 |
}
|
133 |
}
|
134 |
if ($show) {
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
|
|
|
|
141 |
}
|
142 |
|
143 |
}
|
@@ -658,7 +666,7 @@
|
|
658 |
}
|
659 |
}
|
660 |
if (self::$local_delete === false || empty(self::$local_delete)) {
|
661 |
-
header("Location: " .
|
662 |
}
|
663 |
}
|
664 |
|
@@ -853,7 +861,7 @@
|
|
853 |
{
|
854 |
require_once DRBBACKUP_BASE_DIR. "/modules/dropbox.class.php";
|
855 |
parent::$type = 'full';
|
856 |
-
|
857 |
$dropbox_options = self::getSettings();
|
858 |
$stop_precess = WPAdm_Running::getCommandResultData('stop_process');
|
859 |
$name_backup = isset($stop_precess['name']) ? $stop_precess['name'] : '' ;
|
@@ -999,7 +1007,7 @@
|
|
999 |
}
|
1000 |
if ($show) {
|
1001 |
$menu_position = '1.9998887771';
|
1002 |
-
if(self::checkInstallWpadmPlugins()) {
|
1003 |
$page = add_menu_page(
|
1004 |
'WPAdm',
|
1005 |
'WPAdm',
|
@@ -1016,8 +1024,8 @@
|
|
1016 |
'read',
|
1017 |
'wpadm_wp_full_backup_dropbox',
|
1018 |
array('wpadm_wp_full_backup_dropbox', 'wpadm_show_backup')
|
1019 |
-
);
|
1020 |
-
} else {
|
1021 |
$page = add_menu_page(
|
1022 |
'Dropbox Full Backup',
|
1023 |
'Dropbox Full Backup',
|
@@ -1035,7 +1043,7 @@
|
|
1035 |
'read',
|
1036 |
'wpadm_plugins',
|
1037 |
'wpadm_plugins'
|
1038 |
-
);
|
1039 |
}
|
1040 |
|
1041 |
}
|
@@ -1084,7 +1092,7 @@
|
|
1084 |
WPAdm_Running::setCommandResultData('test_zip_archive', true);
|
1085 |
WPAdm_Core::log( __('Testing of ZIP under shell was finished successfully', 'dropbox-backup') );
|
1086 |
}
|
1087 |
-
|
1088 |
$targz_archive = $archive->targzArchive( array( WPAdm_Core::getTmpDir() . '/index.php' , WPAdm_Core::getTmpDir() . '/.htaccess' ) );
|
1089 |
if ( $targz_archive ) {
|
1090 |
WPAdm_Running::setCommandResultData('test_targz_archive', true);
|
30 |
add_action('admin_post_wpadm_download', array('wpadm_wp_full_backup_dropbox', 'download') );
|
31 |
add_action('init', array('wpadm_wp_full_backup_dropbox', 'init'), 10 );
|
32 |
|
33 |
+
if (DRBBACKUP_MULTI === false) {
|
34 |
+
add_action('admin_notices', array('wpadm_wp_full_backup_dropbox', 'notice') );
|
35 |
+
add_action('admin_notices', array('wpadm_wp_full_backup_dropbox', 'notice_stars'));
|
36 |
+
} else {
|
37 |
+
add_action('network_admin_notices', array('wpadm_wp_full_backup_dropbox', 'notice') );
|
38 |
+
add_action('network_admin_notices', array('wpadm_wp_full_backup_dropbox', 'notice_stars') );
|
39 |
+
}
|
40 |
+
|
41 |
add_action('admin_post_hide_notice', array('wpadm_wp_full_backup_dropbox', 'hide_notice') );
|
42 |
add_action( 'admin_bar_menu', array('wpadm_wp_full_backup_dropbox', 'add_link_to_admin_bar') ,999 );
|
43 |
|
138 |
}
|
139 |
}
|
140 |
if ($show) {
|
141 |
+
if (!DRBBACKUP_MULTI) {
|
142 |
+
$wp_admin_bar->add_node( array(
|
143 |
+
'id' => 'dropbox-backup',
|
144 |
+
'title' => 'Dropbox backup',
|
145 |
+
'href' => esc_url( admin_url("admin.php?page=wpadm_wp_full_backup_dropbox") ),
|
146 |
+
'meta' => array('class' => 'dropbox-image-toolbar')
|
147 |
+
));
|
148 |
+
}
|
149 |
}
|
150 |
|
151 |
}
|
666 |
}
|
667 |
}
|
668 |
if (self::$local_delete === false || empty(self::$local_delete)) {
|
669 |
+
header("Location: " . $_SERVER['HTTP_REFERER']);
|
670 |
}
|
671 |
}
|
672 |
|
861 |
{
|
862 |
require_once DRBBACKUP_BASE_DIR. "/modules/dropbox.class.php";
|
863 |
parent::$type = 'full';
|
864 |
+
|
865 |
$dropbox_options = self::getSettings();
|
866 |
$stop_precess = WPAdm_Running::getCommandResultData('stop_process');
|
867 |
$name_backup = isset($stop_precess['name']) ? $stop_precess['name'] : '' ;
|
1007 |
}
|
1008 |
if ($show) {
|
1009 |
$menu_position = '1.9998887771';
|
1010 |
+
if(self::checkInstallWpadmPlugins()) {
|
1011 |
$page = add_menu_page(
|
1012 |
'WPAdm',
|
1013 |
'WPAdm',
|
1024 |
'read',
|
1025 |
'wpadm_wp_full_backup_dropbox',
|
1026 |
array('wpadm_wp_full_backup_dropbox', 'wpadm_show_backup')
|
1027 |
+
);
|
1028 |
+
} else {
|
1029 |
$page = add_menu_page(
|
1030 |
'Dropbox Full Backup',
|
1031 |
'Dropbox Full Backup',
|
1043 |
'read',
|
1044 |
'wpadm_plugins',
|
1045 |
'wpadm_plugins'
|
1046 |
+
);
|
1047 |
}
|
1048 |
|
1049 |
}
|
1092 |
WPAdm_Running::setCommandResultData('test_zip_archive', true);
|
1093 |
WPAdm_Core::log( __('Testing of ZIP under shell was finished successfully', 'dropbox-backup') );
|
1094 |
}
|
1095 |
+
|
1096 |
$targz_archive = $archive->targzArchive( array( WPAdm_Core::getTmpDir() . '/index.php' , WPAdm_Core::getTmpDir() . '/.htaccess' ) );
|
1097 |
if ( $targz_archive ) {
|
1098 |
WPAdm_Running::setCommandResultData('test_targz_archive', true);
|
modules/archive.php
CHANGED
@@ -442,7 +442,6 @@
|
|
442 |
while ($block = fread($fp, 512))
|
443 |
{
|
444 |
$temp = unpack("A100name/A8mode/A8uid/A8gid/A12size/A12mtime/A8checksum/A1type/A100symlink/A6magic/A2temp/A32temp/A32temp/A8temp/A8temp/A155prefix/A12temp", $block);
|
445 |
-
|
446 |
$file = array (
|
447 |
'name' => trim( $temp['prefix'] ) . trim( $temp['name'] ),
|
448 |
'stat' => array (
|
@@ -456,6 +455,7 @@
|
|
456 |
'type' => (int)$temp['type'],
|
457 |
'magic' => $temp['magic'],
|
458 |
);
|
|
|
459 |
if ($file['checksum'] == 0x00000000)
|
460 |
break;
|
461 |
else if (substr($file['magic'], 0, 5) != "ustar")
|
@@ -495,6 +495,7 @@
|
|
495 |
}
|
496 |
$this->createDir($file['name'], $this->options['basedir']);
|
497 |
}
|
|
|
498 |
if ($this->options['inmemory'] == 1)
|
499 |
{
|
500 |
$file['data'] = fread($fp, $file['stat'][7]);
|
442 |
while ($block = fread($fp, 512))
|
443 |
{
|
444 |
$temp = unpack("A100name/A8mode/A8uid/A8gid/A12size/A12mtime/A8checksum/A1type/A100symlink/A6magic/A2temp/A32temp/A32temp/A8temp/A8temp/A155prefix/A12temp", $block);
|
|
|
445 |
$file = array (
|
446 |
'name' => trim( $temp['prefix'] ) . trim( $temp['name'] ),
|
447 |
'stat' => array (
|
455 |
'type' => (int)$temp['type'],
|
456 |
'magic' => $temp['magic'],
|
457 |
);
|
458 |
+
|
459 |
if ($file['checksum'] == 0x00000000)
|
460 |
break;
|
461 |
else if (substr($file['magic'], 0, 5) != "ustar")
|
495 |
}
|
496 |
$this->createDir($file['name'], $this->options['basedir']);
|
497 |
}
|
498 |
+
|
499 |
if ($this->options['inmemory'] == 1)
|
500 |
{
|
501 |
$file['data'] = fread($fp, $file['stat'][7]);
|
modules/class-wpadm-running.php
CHANGED
@@ -52,6 +52,7 @@ if (!class_exists('WPAdm_Running')) {
|
|
52 |
WPAdm_Core::rmdir($path . "/test_zip_archive");
|
53 |
WPAdm_Core::rmdir($path . "/test_targz_archive");
|
54 |
WPAdm_Core::rmdir($path . "/start-process");
|
|
|
55 |
|
56 |
if ($method) {
|
57 |
$files = glob($path ."/wpadm_method*.queue");
|
52 |
WPAdm_Core::rmdir($path . "/test_zip_archive");
|
53 |
WPAdm_Core::rmdir($path . "/test_targz_archive");
|
54 |
WPAdm_Core::rmdir($path . "/start-process");
|
55 |
+
WPAdm_Core::rmdir($path . "/circle");
|
56 |
|
57 |
if ($method) {
|
58 |
$files = glob($path ."/wpadm_method*.queue");
|
modules/phpseclib/index.html
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html>
|
3 |
+
<head lang="en">
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<title></title>
|
6 |
+
</head>
|
7 |
+
<body>
|
8 |
+
|
9 |
+
</body>
|
10 |
+
</html>
|
modules/restore-class.php
CHANGED
@@ -385,20 +385,21 @@ if ( !class_exists('dbr_helper') ) {
|
|
385 |
{
|
386 |
dbr_log::log('Testing of TarGz under shell');
|
387 |
$res_tar = self::TarGz( DBP_PATH_TMP . '/test.tar.gz', array(DBP_PATH_TMP .'/index.php', DBP_PATH_TMP .'/.htaccess'), ABSPATH );
|
388 |
-
|
|
|
389 |
dbr_log::log('Testing of TarGz under shell was finished successfully');
|
390 |
dbr_helper::setCommand('test_targz_c', true);
|
391 |
}
|
392 |
dbr_log::log('Testing of unTarGz under shell');
|
393 |
$res_tar = self::unTarGz( DBP_PATH_TMP . '/test.tar.gz', DBP_PATH_TMP . '/test/' );
|
394 |
-
if ($res_tar) {
|
395 |
dbr_log::log('Testing of unTarGz under shell was finished successfully');
|
396 |
dbr_helper::setCommand('test_targz_c', true);
|
397 |
}
|
398 |
|
399 |
dbr_log::log('Testing of Zip under shell');
|
400 |
$res_zip = self::Zip( DBP_PATH_TMP . '/test.zip', array(DBP_PATH_TMP .'/index.php', DBP_PATH_TMP .'/.htaccess'), ABSPATH );
|
401 |
-
if ($res_tar) {
|
402 |
dbr_log::log('Testing of ZIP under shell was finished successfully');
|
403 |
dbr_helper::setCommand('test_zip_c', true);
|
404 |
}
|
@@ -708,7 +709,7 @@ if ( !class_exists('dbr_helper') ) {
|
|
708 |
if (isset($site_url['option_value'])) {
|
709 |
$name_running_backup = str_replace("http://", '', $site_url['option_value']);
|
710 |
$name_running_backup = str_replace("https://", '', $name_running_backup);
|
711 |
-
$name_running_backup = preg_replace("|\W|", "_", $name_running_backup);
|
712 |
}
|
713 |
return $name_running_backup;
|
714 |
}
|
@@ -1173,6 +1174,8 @@ if ( !class_exists('dbr_methods') ) {
|
|
1173 |
if ($zip_config && strpos($file, $zip_config[2]) !== false) {
|
1174 |
$this->reconfig();
|
1175 |
}
|
|
|
|
|
1176 |
continue;
|
1177 |
} else {
|
1178 |
dbr_log::log('Data will be decompressed of ' . basename($file) . ' wasn\'t successful. Try other method "PclZip"');
|
@@ -1228,6 +1231,8 @@ if ( !class_exists('dbr_methods') ) {
|
|
1228 |
if ($zip_config && strpos($file, $zip_config[2]) !== false) {
|
1229 |
$this->reconfig();
|
1230 |
}
|
|
|
|
|
1231 |
continue;
|
1232 |
} else {
|
1233 |
dbr_log::log('Data will be decompressed of ' . basename($file) . ' wasn\'t successful. Try other method "PHP tar class"');
|
@@ -1265,6 +1270,8 @@ if ( !class_exists('dbr_methods') ) {
|
|
1265 |
|
1266 |
$this->reconfig();
|
1267 |
}
|
|
|
|
|
1268 |
}
|
1269 |
}
|
1270 |
}
|
@@ -1299,6 +1306,9 @@ if ( !class_exists('dbr_methods') ) {
|
|
1299 |
if ($file_list === false) {
|
1300 |
dbr_log::log('Getting list of files from Dropbox');
|
1301 |
$files = $dropbox->listing("$folder_project/$name_backup");
|
|
|
|
|
|
|
1302 |
dbr_helper::setCommand('download-with-dropbox-restore', $files, 'file-list');
|
1303 |
dbr_helper::is_work(time(), 'start');
|
1304 |
} else {
|
385 |
{
|
386 |
dbr_log::log('Testing of TarGz under shell');
|
387 |
$res_tar = self::TarGz( DBP_PATH_TMP . '/test.tar.gz', array(DBP_PATH_TMP .'/index.php', DBP_PATH_TMP .'/.htaccess'), ABSPATH );
|
388 |
+
|
389 |
+
if ($res_tar === true) {
|
390 |
dbr_log::log('Testing of TarGz under shell was finished successfully');
|
391 |
dbr_helper::setCommand('test_targz_c', true);
|
392 |
}
|
393 |
dbr_log::log('Testing of unTarGz under shell');
|
394 |
$res_tar = self::unTarGz( DBP_PATH_TMP . '/test.tar.gz', DBP_PATH_TMP . '/test/' );
|
395 |
+
if ($res_tar === true) {
|
396 |
dbr_log::log('Testing of unTarGz under shell was finished successfully');
|
397 |
dbr_helper::setCommand('test_targz_c', true);
|
398 |
}
|
399 |
|
400 |
dbr_log::log('Testing of Zip under shell');
|
401 |
$res_zip = self::Zip( DBP_PATH_TMP . '/test.zip', array(DBP_PATH_TMP .'/index.php', DBP_PATH_TMP .'/.htaccess'), ABSPATH );
|
402 |
+
if ($res_tar === true) {
|
403 |
dbr_log::log('Testing of ZIP under shell was finished successfully');
|
404 |
dbr_helper::setCommand('test_zip_c', true);
|
405 |
}
|
709 |
if (isset($site_url['option_value'])) {
|
710 |
$name_running_backup = str_replace("http://", '', $site_url['option_value']);
|
711 |
$name_running_backup = str_replace("https://", '', $name_running_backup);
|
712 |
+
$name_running_backup = preg_replace("|\W|", "_", trim($name_running_backup, '/') );
|
713 |
}
|
714 |
return $name_running_backup;
|
715 |
}
|
1174 |
if ($zip_config && strpos($file, $zip_config[2]) !== false) {
|
1175 |
$this->reconfig();
|
1176 |
}
|
1177 |
+
$extract_files[$f] = true;
|
1178 |
+
dbr_helper::setCommand('extract-files-restore', $extract_files);
|
1179 |
continue;
|
1180 |
} else {
|
1181 |
dbr_log::log('Data will be decompressed of ' . basename($file) . ' wasn\'t successful. Try other method "PclZip"');
|
1231 |
if ($zip_config && strpos($file, $zip_config[2]) !== false) {
|
1232 |
$this->reconfig();
|
1233 |
}
|
1234 |
+
$extract_files[$f] = true;
|
1235 |
+
dbr_helper::setCommand('extract-files-restore', $extract_files);
|
1236 |
continue;
|
1237 |
} else {
|
1238 |
dbr_log::log('Data will be decompressed of ' . basename($file) . ' wasn\'t successful. Try other method "PHP tar class"');
|
1270 |
|
1271 |
$this->reconfig();
|
1272 |
}
|
1273 |
+
$extract_files[$f] = true;
|
1274 |
+
dbr_helper::setCommand('extract-files-restore', $extract_files);
|
1275 |
}
|
1276 |
}
|
1277 |
}
|
1306 |
if ($file_list === false) {
|
1307 |
dbr_log::log('Getting list of files from Dropbox');
|
1308 |
$files = $dropbox->listing("$folder_project/$name_backup");
|
1309 |
+
if (isset($files['error']) ) {
|
1310 |
+
dbr_helper::setError('Dropbox answered: ' . $files['text']);
|
1311 |
+
}
|
1312 |
dbr_helper::setCommand('download-with-dropbox-restore', $files, 'file-list');
|
1313 |
dbr_helper::is_work(time(), 'start');
|
1314 |
} else {
|
readme.txt
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
=== Backup & Restore Dropbox ===
|
2 |
Plugin Name: Backup & Restore Dropbox
|
3 |
-
Version: 1.5.1
|
4 |
Donate link: http://www.wpadm.com/donate
|
5 |
URI: http://www.wpadm.com/dropbox-backup
|
6 |
Tags: dropbox, backup, dropbox backup, database, file, full backup, manage, sicherung, database backup, file backup, page backup, page, web, web backup, web page, synchronize, clone, duplicate, move, web page backup, site, site backup, back up, cloud, Cloud Files, cloud backup, db backup, dump, german, migrate, multisite, German, schedule, storage, time, upload, data bank, zip, archive, backups, restore, db, recover, recovery, restoration, wp backup, wordpress backup, wordpress backup to dropbox, plugin wordpress backup, wpadm, wpadm.com, website, website backup, website back up, wp backup, wordpress backup, scheduled backup, backup scheduler, tool, backup tool
|
7 |
Requires at least: 3.9
|
8 |
-
Tested up to: 4.7
|
9 |
Stable tag: trunk
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
1 |
=== Backup & Restore Dropbox ===
|
2 |
Plugin Name: Backup & Restore Dropbox
|
3 |
+
Version: 1.5.1.1
|
4 |
Donate link: http://www.wpadm.com/donate
|
5 |
URI: http://www.wpadm.com/dropbox-backup
|
6 |
Tags: dropbox, backup, dropbox backup, database, file, full backup, manage, sicherung, database backup, file backup, page backup, page, web, web backup, web page, synchronize, clone, duplicate, move, web page backup, site, site backup, back up, cloud, Cloud Files, cloud backup, db backup, dump, german, migrate, multisite, German, schedule, storage, time, upload, data bank, zip, archive, backups, restore, db, recover, recovery, restoration, wp backup, wordpress backup, wordpress backup to dropbox, plugin wordpress backup, wpadm, wpadm.com, website, website backup, website back up, wp backup, wordpress backup, scheduled backup, backup scheduler, tool, backup tool
|
7 |
Requires at least: 3.9
|
8 |
+
Tested up to: 4.7.3
|
9 |
Stable tag: trunk
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
template/advantage-plugin.php
CHANGED
@@ -79,12 +79,7 @@
|
|
79 |
</div>
|
80 |
<?php } ?>
|
81 |
<style>
|
82 |
-
|
83 |
-
margin-top: 26%;
|
84 |
-
float: left;
|
85 |
-
margin-left: 20px;
|
86 |
-
margin-right: 15px;
|
87 |
-
}
|
88 |
.block-pay.repeat_advantage {
|
89 |
margin-top: 50%;
|
90 |
}
|
@@ -99,8 +94,8 @@
|
|
99 |
<input type="hidden" value="<?php echo 'proBackupPay'?>" name="actApi">
|
100 |
<input type="hidden" value="<?php echo get_option('admin_email');?>" name="email">
|
101 |
<input type="hidden" value="<?php echo 'dropbox-backup';?>" name="plugin">
|
102 |
-
<input type="hidden" value="<?php echo admin_url("admin.php?page=wpadm_wp_full_backup_dropbox&pay=success"); ?>" name="success_url">
|
103 |
-
<input type="hidden" value="<?php echo admin_url("admin.php?page=wpadm_wp_full_backup_dropbox&pay=cancel"); ?>" name="cancel_url">
|
104 |
<input type="submit" class="backup_button" value="<?php _e('Get PRO','dropbox-backup');?>">
|
105 |
</form>
|
106 |
<?php } else {
|
79 |
</div>
|
80 |
<?php } ?>
|
81 |
<style>
|
82 |
+
|
|
|
|
|
|
|
|
|
|
|
83 |
.block-pay.repeat_advantage {
|
84 |
margin-top: 50%;
|
85 |
}
|
94 |
<input type="hidden" value="<?php echo 'proBackupPay'?>" name="actApi">
|
95 |
<input type="hidden" value="<?php echo get_option('admin_email');?>" name="email">
|
96 |
<input type="hidden" value="<?php echo 'dropbox-backup';?>" name="plugin">
|
97 |
+
<input type="hidden" value="<?php echo (DRBBACKUP_MULTI) ? network_admin_url("admin.php?page=wpadm_wp_full_backup_dropbox&pay=success") : admin_url("admin.php?page=wpadm_wp_full_backup_dropbox&pay=success"); ?>" name="success_url">
|
98 |
+
<input type="hidden" value="<?php echo (DRBBACKUP_MULTI) ? network_admin_url("admin.php?page=wpadm_wp_full_backup_dropbox&pay=cancel") : admin_url("admin.php?page=wpadm_wp_full_backup_dropbox&pay=cancel"); ?>" name="cancel_url">
|
99 |
<input type="submit" class="backup_button" value="<?php _e('Get PRO','dropbox-backup');?>">
|
100 |
</form>
|
101 |
<?php } else {
|
template/css/admin-style-wpadm.css
CHANGED
@@ -63,6 +63,14 @@
|
|
63 |
.inline {
|
64 |
float:left;
|
65 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
.inline-right, .inline {
|
67 |
margin-top:10px;
|
68 |
margin-left:10px;
|
@@ -942,31 +950,31 @@ text-align: center; margin-top: 10px;
|
|
942 |
}
|
943 |
|
944 |
.cfTabsContainer.wpadm-setting-box {
|
945 |
-
|
946 |
}
|
947 |
|
948 |
@media only screen and (max-width: 1345px) {
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
}
|
971 |
|
972 |
/*default style */
|
63 |
.inline {
|
64 |
float:left;
|
65 |
}
|
66 |
+
|
67 |
+
.block-pay {
|
68 |
+
margin-top: 26%;
|
69 |
+
float: left;
|
70 |
+
margin-left: 20px;
|
71 |
+
margin-right: 15px;
|
72 |
+
}
|
73 |
+
|
74 |
.inline-right, .inline {
|
75 |
margin-top:10px;
|
76 |
margin-left:10px;
|
950 |
}
|
951 |
|
952 |
.cfTabsContainer.wpadm-setting-box {
|
953 |
+
width: 28%; float: left; margin-left: 10px; padding-bottom: 0px; padding-top: 0px;
|
954 |
}
|
955 |
|
956 |
@media only screen and (max-width: 1345px) {
|
957 |
+
.cfTabsContainer.wpadm-setting-box {
|
958 |
+
width: 97%;
|
959 |
+
float:none;
|
960 |
+
margin-left: 0px;
|
961 |
+
}
|
962 |
+
|
963 |
+
|
964 |
+
.block-pay.repeat_advantage {
|
965 |
+
margin-top: 10px;
|
966 |
+
width: 90%;
|
967 |
+
text-align: center;
|
968 |
+
}
|
969 |
+
.inline.repeat_advantage {
|
970 |
+
float:none;
|
971 |
+
}
|
972 |
+
.block-advantage {
|
973 |
+
width:100%;
|
974 |
+
}
|
975 |
+
.inline-right {
|
976 |
+
float:left;
|
977 |
+
}
|
978 |
}
|
979 |
|
980 |
/*default style */
|
template/css/tool-bar.css
CHANGED
@@ -79,6 +79,16 @@ button.backup_button:disabled, button.backup_button:disabled:hover {
|
|
79 |
background: #9eb7d8;
|
80 |
}
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
|
83 |
@media only screen and (max-width: 1345px) {
|
84 |
|
79 |
background: #9eb7d8;
|
80 |
}
|
81 |
|
82 |
+
#pro-plugin-description .inline {
|
83 |
+
float:left;
|
84 |
+
}
|
85 |
+
|
86 |
+
#pro-plugin-description .block-pay {
|
87 |
+
margin-top: 6%;
|
88 |
+
float: left;
|
89 |
+
margin-left: 20px;
|
90 |
+
margin-right: 15px;
|
91 |
+
}
|
92 |
|
93 |
@media only screen and (max-width: 1345px) {
|
94 |
|