Version Description
- long file list not longer displayed in logs.
- Added option to see detailed file list
- removed FTP Alloc command
- set FTP normal mode if pasive mode disabled
- remove FTP heler function and use FTP PHP functions
- spend file list 2MB free memory
Download this release
Release Info
Developer | danielhuesken |
Plugin | BackWPup – WordPress Backup Plugin |
Version | 1.3.6 |
Comparing to | |
See all releases |
Code changes from version 1.3.5 to 1.3.6
- app/backwpup_dojob.php +46 -54
- app/css/options.css +1 -1
- app/functions.php +13 -13
- app/functions5.php +8 -10
- app/options-save.php +1 -0
- app/options-settings.php +2 -1
- backwpup.php +3 -3
- readme.txt +9 -1
app/backwpup_dojob.php
CHANGED
@@ -671,7 +671,10 @@ class backwpup_dojob {
|
|
671 |
|
672 |
//Make filelist
|
673 |
trigger_error(__('Make a list of files to Backup ....','backwpup'),E_USER_NOTICE);
|
674 |
-
|
|
|
|
|
|
|
675 |
$this->tempfilelist=array();
|
676 |
|
677 |
$backwpup_exclude=explode(',',trim($this->job['fileexclude']));
|
@@ -718,7 +721,8 @@ class backwpup_dojob {
|
|
718 |
if (!is_array($this->filelist[0])) {
|
719 |
trigger_error(__('No files to Backup','backwpup'),E_USER_ERROR);
|
720 |
} else {
|
721 |
-
trigger_error(__('
|
|
|
722 |
}
|
723 |
|
724 |
}
|
@@ -733,7 +737,10 @@ class backwpup_dojob {
|
|
733 |
if (!is_file($files[79001])) //check file exists
|
734 |
continue;
|
735 |
if ($zip->addFile($files[79001], $files[79003])) {
|
736 |
-
|
|
|
|
|
|
|
737 |
} else {
|
738 |
trigger_error(__('Can not add File to ZIP file:','backwpup').' '.$files[79001],E_USER_ERROR);
|
739 |
}
|
@@ -747,14 +754,16 @@ class backwpup_dojob {
|
|
747 |
} else { //use PclZip
|
748 |
define( 'PCLZIP_TEMPORARY_DIR', $this->tempdir );
|
749 |
if (!class_exists('PclZip'))
|
750 |
-
|
751 |
|
752 |
//Create Zip File
|
753 |
if (is_array($this->filelist[0])) {
|
754 |
$this->need_free_memory(10485760); //10MB free memory for zip
|
755 |
trigger_error(__('Create Backup Zip (PclZip) file...','backwpup'),E_USER_NOTICE);
|
756 |
-
|
757 |
-
|
|
|
|
|
758 |
}
|
759 |
$zipbackupfile = new PclZip($this->backupdir.$this->backupfile);
|
760 |
if (0==$zipbackupfile -> create($this->filelist,PCLZIP_OPT_ADD_TEMP_FILE_ON)) {
|
@@ -786,8 +795,11 @@ class backwpup_dojob {
|
|
786 |
$this->need_free_memory(1048576); //1MB free memory for zip
|
787 |
|
788 |
foreach($this->filelist as $key => $files) {
|
789 |
-
|
790 |
-
|
|
|
|
|
|
|
791 |
//check file exists
|
792 |
if (!is_readable($files[79001]))
|
793 |
continue;
|
@@ -864,35 +876,6 @@ class backwpup_dojob {
|
|
864 |
}
|
865 |
|
866 |
|
867 |
-
private function _ftp_raw_helper($ftp_conn_id,$command) { //FTP Comands helper function
|
868 |
-
$return=ftp_raw($ftp_conn_id,$command);
|
869 |
-
if (strtoupper(substr(trim($command),0,4))=="PASS") {
|
870 |
-
trigger_error(__('FTP Client command:','backwpup').' PASS *******',E_USER_NOTICE);
|
871 |
-
} else {
|
872 |
-
trigger_error(__('FTP Client command:','backwpup').' '.$command,E_USER_NOTICE);
|
873 |
-
}
|
874 |
-
foreach ($return as $returnline) {
|
875 |
-
$code=substr(trim($returnline),0,3);
|
876 |
-
if ($code>=100 and $code<200) {
|
877 |
-
trigger_error(__('FTP Server Preliminary reply:','backwpup').' '.$returnline,E_USER_NOTICE);
|
878 |
-
return true;
|
879 |
-
} elseif ($code>=200 and $code<300) {
|
880 |
-
trigger_error(__('FTP Server Completion reply:','backwpup').' '.$returnline,E_USER_NOTICE);
|
881 |
-
return true;
|
882 |
-
} elseif ($code>=300 and $code<400) {
|
883 |
-
trigger_error(__('FTP Server Intermediate reply:','backwpup').' '.$returnline,E_USER_NOTICE);
|
884 |
-
return true;
|
885 |
-
} elseif ($code>=400) {
|
886 |
-
trigger_error(__('FTP Server reply:','backwpup').' '.$returnline,E_USER_ERROR);
|
887 |
-
return false;
|
888 |
-
} else {
|
889 |
-
trigger_error(__('FTP Server reply:','backwpup').' '.$returnline,E_USER_NOTICE);
|
890 |
-
return $return;
|
891 |
-
}
|
892 |
-
}
|
893 |
-
}
|
894 |
-
|
895 |
-
|
896 |
private function destination_ftp() {
|
897 |
|
898 |
if (empty($this->job['ftphost']) or empty($this->job['ftpuser']) or empty($this->job['ftppass']))
|
@@ -921,35 +904,44 @@ class backwpup_dojob {
|
|
921 |
|
922 |
//FTP Login
|
923 |
$loginok=false;
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
} else { //if PHP ftp login don't work use raw login
|
928 |
-
|
929 |
-
|
|
|
|
|
|
|
|
|
|
|
930 |
$loginok=true;
|
931 |
-
}
|
932 |
}
|
933 |
}
|
934 |
|
935 |
-
//if (ftp_login($ftp_conn_id, $jobs[$jobid]['ftpuser'], $jobs[$jobid]['ftppass'])) {
|
936 |
if (!$loginok)
|
937 |
return false;
|
938 |
|
939 |
-
//SYSTYPE
|
940 |
-
$this->_ftp_raw_helper($ftp_conn_id,'SYST');
|
941 |
//PASV
|
942 |
trigger_error(__('FTP Client command:','backwpup').' PASV',E_USER_NOTICE);
|
943 |
if ($this->job['ftppasv']) {
|
944 |
if (ftp_pasv($ftp_conn_id, true))
|
945 |
-
trigger_error(__('Server
|
946 |
else
|
947 |
trigger_error(__('FTP Server reply:','backwpup').' '.__('Can not Entering Passive Mode','backwpup'),E_USER_WARNING);
|
|
|
|
|
|
|
|
|
|
|
948 |
}
|
949 |
-
//
|
950 |
-
trigger_error(__('FTP Client command:','backwpup').'
|
951 |
-
|
952 |
-
|
|
|
|
|
|
|
953 |
|
954 |
//test ftp dir and create it f not exists
|
955 |
$ftpdirs=explode("/", untrailingslashit($this->job['ftpdir']));
|
@@ -1073,7 +1065,7 @@ class backwpup_dojob {
|
|
1073 |
}
|
1074 |
|
1075 |
if (!class_exists('S3'))
|
1076 |
-
|
1077 |
|
1078 |
$s3 = new S3($this->job['awsAccessKey'], $this->job['awsSecretKey'], $this->job['awsSSL']);
|
1079 |
|
@@ -1125,7 +1117,7 @@ class backwpup_dojob {
|
|
1125 |
}
|
1126 |
|
1127 |
if (!class_exists('CF_Authentication'))
|
1128 |
-
|
1129 |
|
1130 |
|
1131 |
$auth = new CF_Authentication($this->job['rscUsername'], $this->job['rscAPIKey']);
|
@@ -1323,7 +1315,7 @@ class backwpup_dojob {
|
|
1323 |
$mailbody.=__("Errors:","backwpup")." ".$logdata['errors']."\n";
|
1324 |
if (!empty($logdata['warnings']))
|
1325 |
$mailbody.=__("Warnings:","backwpup")." ".$logdata['warnings']."\n";
|
1326 |
-
wp_mail($this->job['mailaddresslog'],__('BackWPup Log
|
1327 |
}
|
1328 |
}
|
1329 |
}
|
671 |
|
672 |
//Make filelist
|
673 |
trigger_error(__('Make a list of files to Backup ....','backwpup'),E_USER_NOTICE);
|
674 |
+
|
675 |
+
//Check free memory for file list
|
676 |
+
$this->need_free_memory(2097152); //2MB free memory for filelist
|
677 |
+
//empty filelist
|
678 |
$this->tempfilelist=array();
|
679 |
|
680 |
$backwpup_exclude=explode(',',trim($this->job['fileexclude']));
|
721 |
if (!is_array($this->filelist[0])) {
|
722 |
trigger_error(__('No files to Backup','backwpup'),E_USER_ERROR);
|
723 |
} else {
|
724 |
+
trigger_error(__('Files to Backup:','backwpup').' '.count($this->filelist),E_USER_NOTICE);
|
725 |
+
trigger_error(__('Size of all Files:','backwpup').' '.backwpup_formatBytes($this->allfilesize),E_USER_NOTICE);
|
726 |
}
|
727 |
|
728 |
}
|
737 |
if (!is_file($files[79001])) //check file exists
|
738 |
continue;
|
739 |
if ($zip->addFile($files[79001], $files[79003])) {
|
740 |
+
if ($this->cfg['logfilelist'])
|
741 |
+
trigger_error(__('Add File to ZIP file:','backwpup').' '.$files[79001].' '.backwpup_formatBytes(filesize($files[79001])),E_USER_NOTICE);
|
742 |
+
else
|
743 |
+
@set_time_limit(300); //Set time limit higer every file
|
744 |
} else {
|
745 |
trigger_error(__('Can not add File to ZIP file:','backwpup').' '.$files[79001],E_USER_ERROR);
|
746 |
}
|
754 |
} else { //use PclZip
|
755 |
define( 'PCLZIP_TEMPORARY_DIR', $this->tempdir );
|
756 |
if (!class_exists('PclZip'))
|
757 |
+
require_once(dirname(__FILE__).'/libs/pclzip.lib.php');
|
758 |
|
759 |
//Create Zip File
|
760 |
if (is_array($this->filelist[0])) {
|
761 |
$this->need_free_memory(10485760); //10MB free memory for zip
|
762 |
trigger_error(__('Create Backup Zip (PclZip) file...','backwpup'),E_USER_NOTICE);
|
763 |
+
if ($this->cfg['logfilelist']) {
|
764 |
+
foreach($this->filelist as $key => $files) {
|
765 |
+
trigger_error(__('Add File to ZIP file:','backwpup').' '.$files[79001].' '.backwpup_formatBytes(filesize($files[79001])),E_USER_NOTICE);
|
766 |
+
}
|
767 |
}
|
768 |
$zipbackupfile = new PclZip($this->backupdir.$this->backupfile);
|
769 |
if (0==$zipbackupfile -> create($this->filelist,PCLZIP_OPT_ADD_TEMP_FILE_ON)) {
|
795 |
$this->need_free_memory(1048576); //1MB free memory for zip
|
796 |
|
797 |
foreach($this->filelist as $key => $files) {
|
798 |
+
if ($this->cfg['logfilelist'])
|
799 |
+
trigger_error(__('Add File to Backup Archive:','backwpup').' '.$files[79001].' '.backwpup_formatBytes(filesize($files[79001])),E_USER_NOTICE);
|
800 |
+
else
|
801 |
+
@set_time_limit(300); //Set time limit higer every file
|
802 |
+
|
803 |
//check file exists
|
804 |
if (!is_readable($files[79001]))
|
805 |
continue;
|
876 |
}
|
877 |
|
878 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
879 |
private function destination_ftp() {
|
880 |
|
881 |
if (empty($this->job['ftphost']) or empty($this->job['ftpuser']) or empty($this->job['ftppass']))
|
904 |
|
905 |
//FTP Login
|
906 |
$loginok=false;
|
907 |
+
trigger_error(__('FTP Client command:','backwpup').' USER '.$this->job['ftpuser'],E_USER_NOTICE);
|
908 |
+
if ($loginok=ftp_login($ftp_conn_id, $this->job['ftpuser'], base64_decode($this->job['ftppass']))) {
|
909 |
+
trigger_error(__('FTP Server reply:','backwpup').' User '.$this->job['ftpuser'].' logged in.',E_USER_NOTICE);
|
910 |
} else { //if PHP ftp login don't work use raw login
|
911 |
+
$return=ftp_raw($ftp_conn_id,'USER '.$this->job['ftpuser']);
|
912 |
+
trigger_error(__('FTP Server reply:','backwpup').' '.$return[0],E_USER_NOTICE);
|
913 |
+
if (substr(trim($return[0]),0,3)<=400) {
|
914 |
+
trigger_error(__('FTP Client command:','backwpup').' PASS *******',E_USER_NOTICE);
|
915 |
+
$return=ftp_raw($ftp_conn_id,'PASS '.base64_decode($this->job['ftppass']));
|
916 |
+
trigger_error(__('FTP Server reply:','backwpup').' '.$return[0],E_USER_NOTICE);
|
917 |
+
if (substr(trim($return[0]),0,3)<=400)
|
918 |
$loginok=true;
|
|
|
919 |
}
|
920 |
}
|
921 |
|
|
|
922 |
if (!$loginok)
|
923 |
return false;
|
924 |
|
|
|
|
|
925 |
//PASV
|
926 |
trigger_error(__('FTP Client command:','backwpup').' PASV',E_USER_NOTICE);
|
927 |
if ($this->job['ftppasv']) {
|
928 |
if (ftp_pasv($ftp_conn_id, true))
|
929 |
+
trigger_error(__('FTP Server reply:','backwpup').' '.__('Entering Passive Mode','backwpup'),E_USER_NOTICE);
|
930 |
else
|
931 |
trigger_error(__('FTP Server reply:','backwpup').' '.__('Can not Entering Passive Mode','backwpup'),E_USER_WARNING);
|
932 |
+
} else {
|
933 |
+
if (ftp_pasv($ftp_conn_id, false))
|
934 |
+
trigger_error(__('FTP Server reply:','backwpup').' '.__('Entering Normal Mode','backwpup'),E_USER_NOTICE);
|
935 |
+
else
|
936 |
+
trigger_error(__('FTP Server reply:','backwpup').' '.__('Can not Entering Normal Mode','backwpup'),E_USER_WARNING);
|
937 |
}
|
938 |
+
//SYSTYPE
|
939 |
+
trigger_error(__('FTP Client command:','backwpup').' SYST',E_USER_NOTICE);
|
940 |
+
$systype=ftp_systype($ftp_conn_id);
|
941 |
+
if ($systype)
|
942 |
+
trigger_error(__('FTP Server reply:','backwpup').' '.$systype,E_USER_NOTICE);
|
943 |
+
else
|
944 |
+
trigger_error(__('FTP Server reply:','backwpup').' '.__('Error getting SYSTYPE','backwpup'),E_USER_ERROR);
|
945 |
|
946 |
//test ftp dir and create it f not exists
|
947 |
$ftpdirs=explode("/", untrailingslashit($this->job['ftpdir']));
|
1065 |
}
|
1066 |
|
1067 |
if (!class_exists('S3'))
|
1068 |
+
require_once(dirname(__FILE__).'/libs/S3.php');
|
1069 |
|
1070 |
$s3 = new S3($this->job['awsAccessKey'], $this->job['awsSecretKey'], $this->job['awsSSL']);
|
1071 |
|
1117 |
}
|
1118 |
|
1119 |
if (!class_exists('CF_Authentication'))
|
1120 |
+
require_once(dirname(__FILE__).'/libs/rackspace/cloudfiles.php');
|
1121 |
|
1122 |
|
1123 |
$auth = new CF_Authentication($this->job['rscUsername'], $this->job['rscAPIKey']);
|
1315 |
$mailbody.=__("Errors:","backwpup")." ".$logdata['errors']."\n";
|
1316 |
if (!empty($logdata['warnings']))
|
1317 |
$mailbody.=__("Warnings:","backwpup")." ".$logdata['warnings']."\n";
|
1318 |
+
wp_mail($this->job['mailaddresslog'],__('BackWPup Log from','backwpup').' '.date_i18n('Y-m-d H:i').': '.$this->job['name'] ,$mailbody,'',array($this->logdir.$this->logfile));
|
1319 |
}
|
1320 |
}
|
1321 |
}
|
app/css/options.css
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
width:40px;text-align:center;
|
3 |
}
|
4 |
.column-runtime, .column-last, .column-next , .column-status , .column-type {
|
5 |
-
width:
|
6 |
}
|
7 |
.column-info {
|
8 |
width:175px;
|
2 |
width:40px;text-align:center;
|
3 |
}
|
4 |
.column-runtime, .column-last, .column-next , .column-status , .column-type {
|
5 |
+
width:135px;
|
6 |
}
|
7 |
.column-info {
|
8 |
width:175px;
|
app/functions.php
CHANGED
@@ -18,7 +18,7 @@ if ( !defined('ABSPATH') )
|
|
18 |
echo '<div id="message" class="updated fade"><p><strong>'.$backwpup_message.'</strong></p></div>';
|
19 |
switch($_REQUEST['subpage']) {
|
20 |
case 'edit':
|
21 |
-
|
22 |
break;
|
23 |
case 'logs':
|
24 |
echo "<div class=\"wrap\">";
|
@@ -34,10 +34,10 @@ if ( !defined('ABSPATH') )
|
|
34 |
echo "</div>";
|
35 |
break;
|
36 |
case 'settings':
|
37 |
-
|
38 |
break;
|
39 |
case 'tools':
|
40 |
-
|
41 |
break;
|
42 |
case 'backups':
|
43 |
echo "<div class=\"wrap\">";
|
@@ -125,7 +125,7 @@ if ( !defined('ABSPATH') )
|
|
125 |
switch($_REQUEST['subpage']) {
|
126 |
case 'logs':
|
127 |
if (!empty($_REQUEST['action'])) {
|
128 |
-
|
129 |
backwpup_log_operations($_REQUEST['action']);
|
130 |
}
|
131 |
$table = new BackWPup_Logs_Table;
|
@@ -134,13 +134,13 @@ if ( !defined('ABSPATH') )
|
|
134 |
break;
|
135 |
case 'edit':
|
136 |
if (!empty($_POST['submit'])) {
|
137 |
-
|
138 |
$backwpup_message=backwpup_save_job();
|
139 |
}
|
140 |
break;
|
141 |
case 'settings':
|
142 |
if (!empty($_POST['submit'])) {
|
143 |
-
|
144 |
$backwpup_message=backwpup_save_settings();
|
145 |
}
|
146 |
break;
|
@@ -148,7 +148,7 @@ if ( !defined('ABSPATH') )
|
|
148 |
break;
|
149 |
case 'backups':
|
150 |
if (!empty($_REQUEST['action'])) {
|
151 |
-
|
152 |
backwpup_backups_operations($_REQUEST['action']);
|
153 |
}
|
154 |
$table = new BackWPup_Backups_Table;
|
@@ -161,7 +161,7 @@ if ( !defined('ABSPATH') )
|
|
161 |
break;
|
162 |
default:
|
163 |
if (!empty($_REQUEST['action'])) {
|
164 |
-
|
165 |
backwpup_job_operations($_REQUEST['action']);
|
166 |
}
|
167 |
$table = new BackWPup_Jobs_Table;
|
@@ -276,7 +276,7 @@ if ( !defined('ABSPATH') )
|
|
276 |
global $backwpup_logfile;
|
277 |
if (empty($jobid))
|
278 |
return false;
|
279 |
-
|
280 |
$backwpup_dojob= new backwpup_dojob($jobid);
|
281 |
unset($backwpup_dojob);
|
282 |
return $backwpup_logfile;
|
@@ -731,13 +731,15 @@ if ( !defined('ABSPATH') )
|
|
731 |
if (!backwpup_env_checks())
|
732 |
return;
|
733 |
//iclude php5 functions
|
734 |
-
|
|
|
|
|
735 |
//Disabele WP_Corn
|
736 |
$cfg=get_option('backwpup');
|
737 |
if ($cfg['disablewpcron'])
|
738 |
define('DISABLE_WP_CRON',true);
|
739 |
//add Menu
|
740 |
-
|
741 |
//Additional links on the plugin page
|
742 |
if (current_user_can(10))
|
743 |
add_filter('plugin_action_links_'.BACKWPUP_PLUGIN_BASEDIR.'/backwpup.php', 'backwpup_plugin_options_link');
|
@@ -756,8 +758,6 @@ if ( !defined('ABSPATH') )
|
|
756 |
// add ajax function
|
757 |
add_action('wp_ajax_backwpup_get_aws_buckets', 'backwpup_get_aws_buckets');
|
758 |
add_action('wp_ajax_backwpup_get_rsc_container', 'backwpup_get_rsc_container');
|
759 |
-
//load tables Classes
|
760 |
-
include_once('list-tables.php');
|
761 |
}
|
762 |
|
763 |
?>
|
18 |
echo '<div id="message" class="updated fade"><p><strong>'.$backwpup_message.'</strong></p></div>';
|
19 |
switch($_REQUEST['subpage']) {
|
20 |
case 'edit':
|
21 |
+
require_once(dirname(__FILE__).'/options-edit-job.php');
|
22 |
break;
|
23 |
case 'logs':
|
24 |
echo "<div class=\"wrap\">";
|
34 |
echo "</div>";
|
35 |
break;
|
36 |
case 'settings':
|
37 |
+
require_once(dirname(__FILE__).'/options-settings.php');
|
38 |
break;
|
39 |
case 'tools':
|
40 |
+
require_once(dirname(__FILE__).'/options-tools.php');
|
41 |
break;
|
42 |
case 'backups':
|
43 |
echo "<div class=\"wrap\">";
|
125 |
switch($_REQUEST['subpage']) {
|
126 |
case 'logs':
|
127 |
if (!empty($_REQUEST['action'])) {
|
128 |
+
require_once(dirname(__FILE__).'/options-save.php');
|
129 |
backwpup_log_operations($_REQUEST['action']);
|
130 |
}
|
131 |
$table = new BackWPup_Logs_Table;
|
134 |
break;
|
135 |
case 'edit':
|
136 |
if (!empty($_POST['submit'])) {
|
137 |
+
require_once(dirname(__FILE__).'/options-save.php');
|
138 |
$backwpup_message=backwpup_save_job();
|
139 |
}
|
140 |
break;
|
141 |
case 'settings':
|
142 |
if (!empty($_POST['submit'])) {
|
143 |
+
require_once(dirname(__FILE__).'/options-save.php');
|
144 |
$backwpup_message=backwpup_save_settings();
|
145 |
}
|
146 |
break;
|
148 |
break;
|
149 |
case 'backups':
|
150 |
if (!empty($_REQUEST['action'])) {
|
151 |
+
require_once(dirname(__FILE__).'/options-save.php');
|
152 |
backwpup_backups_operations($_REQUEST['action']);
|
153 |
}
|
154 |
$table = new BackWPup_Backups_Table;
|
161 |
break;
|
162 |
default:
|
163 |
if (!empty($_REQUEST['action'])) {
|
164 |
+
require_once(dirname(__FILE__).'/options-save.php');
|
165 |
backwpup_job_operations($_REQUEST['action']);
|
166 |
}
|
167 |
$table = new BackWPup_Jobs_Table;
|
276 |
global $backwpup_logfile;
|
277 |
if (empty($jobid))
|
278 |
return false;
|
279 |
+
require_once(dirname(__FILE__).'/backwpup_dojob.php');
|
280 |
$backwpup_dojob= new backwpup_dojob($jobid);
|
281 |
unset($backwpup_dojob);
|
282 |
return $backwpup_logfile;
|
731 |
if (!backwpup_env_checks())
|
732 |
return;
|
733 |
//iclude php5 functions
|
734 |
+
require_once(dirname(__FILE__).'/functions5.php');
|
735 |
+
//load tables Classes
|
736 |
+
require_once(dirname(__FILE__).'/list-tables.php');
|
737 |
//Disabele WP_Corn
|
738 |
$cfg=get_option('backwpup');
|
739 |
if ($cfg['disablewpcron'])
|
740 |
define('DISABLE_WP_CRON',true);
|
741 |
//add Menu
|
742 |
+
add_action('admin_menu', 'backwpup_admin_menu');
|
743 |
//Additional links on the plugin page
|
744 |
if (current_user_can(10))
|
745 |
add_filter('plugin_action_links_'.BACKWPUP_PLUGIN_BASEDIR.'/backwpup.php', 'backwpup_plugin_options_link');
|
758 |
// add ajax function
|
759 |
add_action('wp_ajax_backwpup_get_aws_buckets', 'backwpup_get_aws_buckets');
|
760 |
add_action('wp_ajax_backwpup_get_rsc_container', 'backwpup_get_rsc_container');
|
|
|
|
|
761 |
}
|
762 |
|
763 |
?>
|
app/functions5.php
CHANGED
@@ -251,9 +251,9 @@ if ( !defined('ABSPATH') )
|
|
251 |
$donefolders=array();
|
252 |
if (extension_loaded('curl') or @dl(PHP_SHLIB_SUFFIX == 'so' ? 'curl.so' : 'php_curl.dll')) {
|
253 |
if (!class_exists('S3'))
|
254 |
-
|
255 |
if (!class_exists('CF_Authentication'))
|
256 |
-
|
257 |
}
|
258 |
|
259 |
foreach ($jobs as $jobid => $jobvalue) { //go job by job
|
@@ -352,15 +352,13 @@ if ( !defined('ABSPATH') )
|
|
352 |
if (@ftp_login($ftp_conn_id, $jobvalue['ftpuser'], base64_decode($jobvalue['ftppass']))) {
|
353 |
$loginok=true;
|
354 |
} else { //if PHP ftp login don't work use raw login
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
}
|
359 |
-
}
|
360 |
}
|
361 |
}
|
362 |
if ($loginok) {
|
363 |
-
ftp_pasv($ftp_conn_id,
|
364 |
if ($ftpfilelist=ftp_nlist($ftp_conn_id, $jobvalue['ftpdir'])) {
|
365 |
foreach($ftpfilelist as $ftpfiles) {
|
366 |
if (substr(basename($ftpfiles),0,1)=='.' or !(strtolower(substr($ftpfiles,-4))=='.zip' or strtolower(substr($ftpfiles,-4))=='.tar' or strtolower(substr($ftpfiles,-7))=='.tar.gz' or strtolower(substr($ftpfiles,-8))=='.tar.bz2'))
|
@@ -402,7 +400,7 @@ if ( !defined('ABSPATH') )
|
|
402 |
$ajax=true;
|
403 |
}
|
404 |
if (!class_exists('S3'))
|
405 |
-
|
406 |
if (empty($awsAccessKey)) {
|
407 |
echo '<span id="awsBucket" style="color:red;">'.__('Missing Access Key ID!','backwpup').'</span>';
|
408 |
if ($ajax)
|
@@ -449,7 +447,7 @@ if ( !defined('ABSPATH') )
|
|
449 |
$ajax=true;
|
450 |
}
|
451 |
if (!class_exists('CF_Authentication'))
|
452 |
-
|
453 |
|
454 |
if (empty($rscUsername)) {
|
455 |
echo '<span id="rscContainer" style="color:red;">'.__('Missing Username!','backwpup').'</span>';
|
251 |
$donefolders=array();
|
252 |
if (extension_loaded('curl') or @dl(PHP_SHLIB_SUFFIX == 'so' ? 'curl.so' : 'php_curl.dll')) {
|
253 |
if (!class_exists('S3'))
|
254 |
+
require_once(dirname(__FILE__).'/libs/S3.php');
|
255 |
if (!class_exists('CF_Authentication'))
|
256 |
+
require_once(dirname(__FILE__).'/libs/rackspace/cloudfiles.php');
|
257 |
}
|
258 |
|
259 |
foreach ($jobs as $jobid => $jobvalue) { //go job by job
|
352 |
if (@ftp_login($ftp_conn_id, $jobvalue['ftpuser'], base64_decode($jobvalue['ftppass']))) {
|
353 |
$loginok=true;
|
354 |
} else { //if PHP ftp login don't work use raw login
|
355 |
+
ftp_raw($ftp_conn_id,'USER '.$jobvalue['ftpuser']);
|
356 |
+
ftp_raw($ftp_conn_id,'PASS '.base64_decode($jobvalue['ftppass']));
|
357 |
+
$loginok=true;
|
|
|
|
|
358 |
}
|
359 |
}
|
360 |
if ($loginok) {
|
361 |
+
ftp_pasv($ftp_conn_id, $jobvalue['ftppasv']);
|
362 |
if ($ftpfilelist=ftp_nlist($ftp_conn_id, $jobvalue['ftpdir'])) {
|
363 |
foreach($ftpfilelist as $ftpfiles) {
|
364 |
if (substr(basename($ftpfiles),0,1)=='.' or !(strtolower(substr($ftpfiles,-4))=='.zip' or strtolower(substr($ftpfiles,-4))=='.tar' or strtolower(substr($ftpfiles,-7))=='.tar.gz' or strtolower(substr($ftpfiles,-8))=='.tar.bz2'))
|
400 |
$ajax=true;
|
401 |
}
|
402 |
if (!class_exists('S3'))
|
403 |
+
require_once(dirname(__FILE__).'/libs/S3.php');
|
404 |
if (empty($awsAccessKey)) {
|
405 |
echo '<span id="awsBucket" style="color:red;">'.__('Missing Access Key ID!','backwpup').'</span>';
|
406 |
if ($ajax)
|
447 |
$ajax=true;
|
448 |
}
|
449 |
if (!class_exists('CF_Authentication'))
|
450 |
+
require_once(dirname(__FILE__).'/libs/rackspace/cloudfiles.php');
|
451 |
|
452 |
if (empty($rscUsername)) {
|
453 |
echo '<span id="rscContainer" style="color:red;">'.__('Missing Username!','backwpup').'</span>';
|
app/options-save.php
CHANGED
@@ -280,6 +280,7 @@ function backwpup_save_settings() {
|
|
280 |
$cfg['mailpass']=base64_encode($_POST['mailpass']);
|
281 |
$cfg['memorylimit']=$_POST['memorylimit'];
|
282 |
$cfg['disablewpcron']=$_POST['disablewpcron']==1 ? true : false;
|
|
|
283 |
$cfg['maxlogs']=abs((int)$_POST['maxlogs']);
|
284 |
$cfg['dirlogs']=trailingslashit(str_replace('//','/',str_replace('\\','/',stripslashes(trim($_POST['dirlogs'])))));
|
285 |
$cfg['dirtemp']=trailingslashit(str_replace('//','/',str_replace('\\','/',stripslashes(trim($_POST['dirtemp'])))));
|
280 |
$cfg['mailpass']=base64_encode($_POST['mailpass']);
|
281 |
$cfg['memorylimit']=$_POST['memorylimit'];
|
282 |
$cfg['disablewpcron']=$_POST['disablewpcron']==1 ? true : false;
|
283 |
+
$cfg['logfilelist']=$_POST['logfilelist']==1 ? true : false;
|
284 |
$cfg['maxlogs']=abs((int)$_POST['maxlogs']);
|
285 |
$cfg['dirlogs']=trailingslashit(str_replace('//','/',str_replace('\\','/',stripslashes(trim($_POST['dirlogs'])))));
|
286 |
$cfg['dirtemp']=trailingslashit(str_replace('//','/',str_replace('\\','/',stripslashes(trim($_POST['dirtemp'])))));
|
app/options-settings.php
CHANGED
@@ -59,7 +59,8 @@ $cfg=get_option('backwpup');
|
|
59 |
<b><?PHP _e('Log file Folder:','backwpup'); ?></b><br />
|
60 |
<input name="dirlogs" type="text" value="<?PHP echo $cfg['dirlogs'];?>" class="large-text" /><br />
|
61 |
<b><?PHP _e('Max. Log Files in Folder:','backwpup'); ?></b><br />
|
62 |
-
<input name="maxlogs" id="maxlogs" size="3" type="text" value="<?PHP echo $cfg['maxlogs'];?>" class="small-text" /><span class="description"><?PHP _e('(Oldest files will deleted first.)','backwpup');?></span
|
|
|
63 |
</div>
|
64 |
</div>
|
65 |
|
59 |
<b><?PHP _e('Log file Folder:','backwpup'); ?></b><br />
|
60 |
<input name="dirlogs" type="text" value="<?PHP echo $cfg['dirlogs'];?>" class="large-text" /><br />
|
61 |
<b><?PHP _e('Max. Log Files in Folder:','backwpup'); ?></b><br />
|
62 |
+
<input name="maxlogs" id="maxlogs" size="3" type="text" value="<?PHP echo $cfg['maxlogs'];?>" class="small-text" /><span class="description"><?PHP _e('(Oldest files will deleted first.)','backwpup');?></span><br />
|
63 |
+
<input class="checkbox" value="1" type="checkbox" <?php checked($cfg['logfilelist'],true); ?> name="logfilelist" /><b> <?PHP _e('Log deteiled File list.','backwpup'); ?></b><br />
|
64 |
</div>
|
65 |
</div>
|
66 |
|
backwpup.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: BackWPup
|
|
4 |
Plugin URI: http://danielhuesken.de/portfolio/backwpup/
|
5 |
Description: Backup and more of your WordPress Blog Database and Files.
|
6 |
Author: Daniel Hüsken
|
7 |
-
Version: 1.3.
|
8 |
Author URI: http://danielhuesken.de
|
9 |
Text Domain: backwpup
|
10 |
Domain Path: /lang/
|
@@ -34,11 +34,11 @@ if ( !defined('ABSPATH') )
|
|
34 |
//Set plugin dirname
|
35 |
define('BACKWPUP_PLUGIN_BASEDIR', dirname(plugin_basename(__FILE__)));
|
36 |
//Set Plugin Version
|
37 |
-
define('BACKWPUP_VERSION', '1.3.
|
38 |
//load Text Domain
|
39 |
load_plugin_textdomain('backwpup', false, BACKWPUP_PLUGIN_BASEDIR.'/lang');
|
40 |
//Load functions file
|
41 |
-
|
42 |
//Plugin activate
|
43 |
register_activation_hook(__FILE__, 'backwpup_plugin_activate');
|
44 |
//Plugin deactivate
|
4 |
Plugin URI: http://danielhuesken.de/portfolio/backwpup/
|
5 |
Description: Backup and more of your WordPress Blog Database and Files.
|
6 |
Author: Daniel Hüsken
|
7 |
+
Version: 1.3.6
|
8 |
Author URI: http://danielhuesken.de
|
9 |
Text Domain: backwpup
|
10 |
Domain Path: /lang/
|
34 |
//Set plugin dirname
|
35 |
define('BACKWPUP_PLUGIN_BASEDIR', dirname(plugin_basename(__FILE__)));
|
36 |
//Set Plugin Version
|
37 |
+
define('BACKWPUP_VERSION', '1.3.6');
|
38 |
//load Text Domain
|
39 |
load_plugin_textdomain('backwpup', false, BACKWPUP_PLUGIN_BASEDIR.'/lang');
|
40 |
//Load functions file
|
41 |
+
require_once(dirname(__FILE__).'/app/functions.php');
|
42 |
//Plugin activate
|
43 |
register_activation_hook(__FILE__, 'backwpup_plugin_activate');
|
44 |
//Plugin deactivate
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=danie
|
|
4 |
Tags: backup, admin, file, Database, mysql, cron, ftp, S3, export, xml, Rackspase, cloud, webdav
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.1.0
|
7 |
-
Stable tag: 1.3.
|
8 |
|
9 |
Backup and more of your WordPress Blog Database and Files
|
10 |
|
@@ -85,6 +85,14 @@ Please deactivate Pasive Mode and try it again.
|
|
85 |
1. Job Page
|
86 |
|
87 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
= 1.3.5 =
|
89 |
* fixed problem with folder include
|
90 |
* added option to deactivate FTP passive mode
|
4 |
Tags: backup, admin, file, Database, mysql, cron, ftp, S3, export, xml, Rackspase, cloud, webdav
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.1.0
|
7 |
+
Stable tag: 1.3.6
|
8 |
|
9 |
Backup and more of your WordPress Blog Database and Files
|
10 |
|
85 |
1. Job Page
|
86 |
|
87 |
== Changelog ==
|
88 |
+
= 1.3.6 =
|
89 |
+
* long file list not longer displayed in logs.
|
90 |
+
* Added option to see detailed file list
|
91 |
+
* removed FTP Alloc command
|
92 |
+
* set FTP normal mode if pasive mode disabled
|
93 |
+
* remove FTP heler function and use FTP PHP functions
|
94 |
+
* spend file list 2MB free memory
|
95 |
+
|
96 |
= 1.3.5 =
|
97 |
* fixed problem with folder include
|
98 |
* added option to deactivate FTP passive mode
|