BackWPup – WordPress Backup Plugin - Version 0.5.5

Version Description

  • removed log files. Log now stred in Database
Download this release

Release Info

Developer danielhuesken
Plugin Icon 128x128 BackWPup – WordPress Backup Plugin
Version 0.5.5
Comparing to
See all releases

Code changes from version 0.5.0 to 0.5.5

app/css/options.css CHANGED
@@ -1,11 +1,11 @@
1
  .column-id {
2
  width:25px;
3
  }
4
- .column-logdate, .column-last, .column-next {
5
  width:100px;
6
  }
7
  .column-type {
8
- width:100px;
9
  }
10
  .column-size {
11
  width:75px;
1
  .column-id {
2
  width:25px;
3
  }
4
+ .column-runtime, .column-last, .column-next , .column-status{
5
  width:100px;
6
  }
7
  .column-type {
8
+ width:130px;
9
  }
10
  .column-size {
11
  width:75px;
app/dojob/after.php CHANGED
@@ -1,21 +1,60 @@
1
  <?PHP
2
- if (is_file($cfg['tempdir'].'/'.DB_NAME.'.sql') ) {
3
- unlink($cfg['tempdir'].'/'.DB_NAME.'.sql');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  }
5
 
6
- $jobs[$jobid]['lastrun']=$jobs[$jobid]['starttime'];
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  $jobs[$jobid]['stoptime']=time();
 
 
8
  $jobs[$jobid]['scheduletime']=wp_next_scheduled('backwpup_cron',array('jobid'=>$jobid));
9
  update_option('backwpup_jobs',$jobs); //Save Settings
10
 
11
  $logs=get_option('backwpup_log');
12
- $time=time();
13
- $logs[$time]['jobid']=$jobid;
14
- $logs[$time]['error']=$joberror;
15
- $logs[$time]['logfile']=$logfile;
16
- $logs[$time]['type']=$jobs[$jobid]['type'];
17
- $logs[$time]['worktime']=$jobs[$jobid]['stoptime']-$jobs[$jobid]['starttime'];
18
- if (is_file($backupfile))
19
- $logs[$time]['backupfile']=$backupfile;
20
  update_option('backwpup_log',$logs);
21
  ?>
1
  <?PHP
2
+ //Delete old Logs/Backupfiles
3
+ if (!empty($jobs[$jobid]['maxbackups'])) {
4
+ BackWPupFunctions::joblog($logtime,__('Delete old backup files...','backwpup'));
5
+ $logs=get_option('backwpup_log');
6
+ if (is_array($logs)) {
7
+ unset($logkeys);
8
+ foreach ($logs as $timestamp => $logdata) {
9
+ if ($logdata['jobid']==$jobid)
10
+ $logkeys[]=$timestamp;
11
+ }
12
+ if (is_array($logkeys)) {
13
+ rsort($logkeys,SORT_NUMERIC);
14
+ $counter=0;$countdelbackups=0;
15
+ for ($i=0;$i<sizeof($logkeys);$i++) {
16
+ if (!empty($logs[$logkeys[$i]]['backupfile']) or in_array($jobs[$jobid]['type'],$logonlytyps))
17
+ $counter++;
18
+ if ($counter>=$jobs[$jobid]['maxbackups']) {
19
+ if (is_file($logs[$logkeys[$i]]['backupfile'])) {
20
+ unlink($logs[$logkeys[$i]]['backupfile']);
21
+ $countdelbackups++;
22
+ }
23
+ unset($logs[$logkeys[$i]]);
24
+ }
25
+ }
26
+ }
27
+ }
28
+ update_option('backwpup_log',$logs);
29
+ BackWPupFunctions::joblog($logtime,$countdelbackups.' '.__('Old backup files deleted!!!','backwpup'));
30
+ //clean vars
31
+ unset($logkeys);
32
+ unset($logs);
33
  }
34
 
35
+
36
+ if (is_file($backupfile)) {
37
+ BackWPupFunctions::joblog($logtime,sprintf(__('Backup zip filesize is %1s','backwpup'),BackWPupFunctions::formatBytes(filesize($backupfile))));
38
+ }
39
+
40
+ if (is_file(BackWPupFunctions::get_temp_dir().'backwpup/'.DB_NAME.'.sql') ) { //delete sql temp file
41
+ unlink(BackWPupFunctions::get_temp_dir().'backwpup/'.DB_NAME.'.sql');
42
+ }
43
+ if (empty($jobs[$jobid]['backupdir']) and ($backupfile!=BackWPupFunctions::get_temp_dir().'backwpup'.$backupfilename) and is_file($backupfile) ) { //delete backup file in temp dir
44
+ unlink($backupfile);
45
+ unset($backupfile);
46
+ }
47
+
48
+ $jobs=get_option('backwpup_jobs');
49
  $jobs[$jobid]['stoptime']=time();
50
+ $jobs[$jobid]['lastrun']=$jobs[$jobid]['starttime'];
51
+ $jobs[$jobid]['lastruntime']=$jobs[$jobid]['stoptime']-$jobs[$jobid]['starttime'];
52
  $jobs[$jobid]['scheduletime']=wp_next_scheduled('backwpup_cron',array('jobid'=>$jobid));
53
  update_option('backwpup_jobs',$jobs); //Save Settings
54
 
55
  $logs=get_option('backwpup_log');
56
+ $logs[$logtime]['worktime']=$jobs[$jobid]['stoptime']-$jobs[$jobid]['starttime'];
57
+ if (is_file($backupfile))
58
+ $logs[$logtime]['backupfile']=$backupfile;
 
 
 
 
 
59
  update_option('backwpup_log',$logs);
60
  ?>
app/dojob/bevore.php CHANGED
@@ -1,36 +1,92 @@
1
  <?php
2
- set_time_limit(300);
3
-
4
  $cfg=get_option('backwpup');
5
  $jobs=get_option('backwpup_jobs');
6
- $logfilename='/backwpup_'.$jobid.'_'.date('Y-m-d_H-i-s').'.log';
7
- $logfile=$cfg['tempdir'].$logfilename;
8
- $backupfilename='/backwpup_'.$jobid.'_'.date('Y-m-d_H-i-s').'.zip';
9
- $backupfile=$cfg['tempdir'].$backupfilename;
10
- $joberror=false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
- //Look for and Crate Temp dir
13
- if (!is_dir($cfg['tempdir'].'/')) {
14
- if (!mkdir($cfg['tempdir'].'/')) {
 
 
15
  return false;
16
  }
17
  }
18
- if (!is_file($cfg['tempdir'].'/.htaccess')) {
19
- if($file = @fopen($cfg['tempdir'].'/.htaccess', 'w')) {
 
 
 
 
 
20
  fwrite($file, "Order allow,deny\ndeny from all");
21
  fclose($file);
22
  }
23
  }
24
- if (!is_file($cfg['tempdir'].'/index.html')) {
25
- if($file = @fopen($cfg['tempdir'].'/index.html', 'w')) {
26
  fwrite($file,"\n");
27
  fclose($file);
28
  }
29
  }
30
 
31
- //Set start vars
32
- $jobs[$jobid]['starttime']=time();
33
- $jobs[$jobid]['stoptime']='';
34
- $jobs[$jobid]['scheduletime']=wp_next_scheduled('backwpup_cron',array('jobid'=>$jobid));
35
- update_option('backwpup_jobs',$jobs); //Save Settings
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  ?>
1
  <?php
 
 
2
  $cfg=get_option('backwpup');
3
  $jobs=get_option('backwpup_jobs');
4
+ $jobs[$jobid]['starttime']=time();
5
+ $jobs[$jobid]['stoptime']='';
6
+ $jobs[$jobid]['scheduletime']=wp_next_scheduled('backwpup_cron',array('jobid'=>$jobid));
7
+ update_option('backwpup_jobs',$jobs); //Save Settings
8
+ $logtime=$jobs[$jobid]['starttime'];
9
+ $backupfilename='/backwpup_'.$jobid.'_'.date('Y-m-d_H-i-s',$jobs[$jobid]['starttime']).'.zip';
10
+ if (!empty($jobs[$jobid]['backupdir'])) {
11
+ $backupfile=$jobs[$jobid]['backupdir'].$backupfilename;
12
+ } else {
13
+ $backupfile=BackWPupFunctions::get_temp_dir().'backwpup'.$backupfilename;
14
+ }
15
+ $logonlytyps=array('OPTIMIZE');
16
+ if (in_array($jobs[$jobid]['type'],$logonlytyps)) {
17
+ $jobs[$jobid]['maxbackups']=20;
18
+ }
19
+
20
+ //Create Log
21
+ $logs=get_option('backwpup_log');
22
+ $logs[$logtime]['jobid']=$jobid;
23
+ $logs[$logtime]['error']=0;
24
+ $logs[$logtime]['warning']=0;
25
+ $logs[$logtime]['log']='';
26
+ $logs[$logtime]['type']=$jobs[$jobid]['type'];
27
+ update_option('backwpup_log',$logs);
28
+
29
+ if (!ini_get('safe_mode') or strtolower(ini_get('safe_mode'))=='off') {
30
+ set_time_limit(300); //300 is most webserver time limit.
31
+ } else {
32
+ BackWPupFunctions::joblog($logtime,__('WARNING:','backwpup').' '.sprintf(__('Safe Mode is on!!! Max exec time is %1$s sec.','backwpup'),ini_get('max_execution_time')));
33
+ }
34
 
35
+ //Look for and Crate Temp dir and secure
36
+ if (!is_dir(BackWPupFunctions::get_temp_dir().'backwpup')) {
37
+ if (!mkdir(BackWPupFunctions::get_temp_dir().'backwpup')) {
38
+ BackWPupFunctions::joblog($logtime,__('ERROR:','backwpup').' '.__('Can not create Temp dir','backwpup'));
39
+ require_once('after.php');
40
  return false;
41
  }
42
  }
43
+ if (!is_writeable(BackWPupFunctions::get_temp_dir().'backwpup')) {
44
+ BackWPupFunctions::joblog($logtime,__('ERROR:','backwpup').' '.__('Can not write to Temp dir','backwpup'));
45
+ require_once('after.php');
46
+ return false;
47
+ }
48
+ if (!is_file(BackWPupFunctions::get_temp_dir().'backwpup/.htaccess')) {
49
+ if($file = @fopen(BackWPupFunctions::get_temp_dir().'backwpup/.htaccess', 'w')) {
50
  fwrite($file, "Order allow,deny\ndeny from all");
51
  fclose($file);
52
  }
53
  }
54
+ if (!is_file(BackWPupFunctions::get_temp_dir().'backwpup/index.html')) {
55
+ if($file = @fopen(BackWPupFunctions::get_temp_dir().'backwpup/index.html', 'w')) {
56
  fwrite($file,"\n");
57
  fclose($file);
58
  }
59
  }
60
 
61
+
62
+ if (!empty($backupfile)) {
63
+ //Look for and Crate Backup dir and secure
64
+ if (!is_dir($jobs[$jobid]['backupdir'])) {
65
+ if (!mkdir($jobs[$jobid]['backupdir'])) {
66
+ BackWPupFunctions::joblog($logtime,__('ERROR:','backwpup').' '.__('Can not create Backup dir','backwpup'));
67
+ require_once('after.php');
68
+ return false;
69
+ }
70
+ }
71
+ if (!is_writeable($jobs[$jobid]['backupdir'])) {
72
+ BackWPupFunctions::joblog($logtime,__('ERROR:','backwpup').' '.__('Can not write to Backup dir','backwpup'));
73
+ require_once('after.php');
74
+ return false;
75
+ }
76
+ if (!is_file($jobs[$jobid]['backupdir'].'/.htaccess')) {
77
+ if($file = fopen($jobs[$jobid]['backupdir'].'/.htaccess', 'w')) {
78
+ fwrite($file, "Order allow,deny\ndeny from all");
79
+ fclose($file);
80
+ }
81
+ }
82
+ if (!is_file($jobs[$jobid]['backupdir'].'/index.html')) {
83
+ if($file = fopen($jobs[$jobid]['backupdir'].'/index.html', 'w')) {
84
+ fwrite($file,"\n");
85
+ fclose($file);
86
+ }
87
+ }
88
+ BackWPupFunctions::joblog($logtime,__('Backup zip file save to:','backwpup').' '.$backupfile);
89
+ }
90
+
91
+
92
  ?>
app/dojob/db.php CHANGED
@@ -1,5 +1,5 @@
1
  <?PHP
2
- BackWPupFunctions::joblog($logfile,__('Run Database Backup...','backwpup'));
3
 
4
  //Tables to backup
5
  $tables=$wpdb->get_col('SHOW TABLES FROM `'.DB_NAME.'`');
@@ -12,38 +12,36 @@ if (is_array($jobs[$jobid]['dbexclude'])) {
12
  }
13
 
14
  if (sizeof($tables)>0) {
15
- BackWPupFunctions::joblog($logfile,__('Tables to Backup: ','backwpup').print_r($tables,true));
16
 
17
  require_once('MySQLDBExport.class.php');
18
  $export = new MySQLDBExport(DB_HOST, DB_USER, DB_PASSWORD);
19
  $export->set_db(DB_NAME);
20
 
21
- $file = @fopen($cfg['tempdir'].'/'.DB_NAME.'.sql', 'w');
22
  fwrite($file, $export->make_dump($tables));
23
  fclose($file);
24
 
25
 
26
  if ($error=$export->get_error()) {
27
- BackWPupFunctions::joblog($logfile,__('ERROR:','backwpup').' '.$error);
28
- $joberror=true;
29
  }
30
  } else {
31
- BackWPupFunctions::joblog($logfile,__('ERROR: No Tables to Backup','backwpup'));
32
- $joberror=true;
33
  }
34
 
35
 
36
- BackWPupFunctions::joblog($logfile,__('Database backup done!','backwpup'));
37
 
38
- if ($jobs[$jobid]['type']=='DB' and is_file($cfg['tempdir'].'/'.DB_NAME.'.sql')) {
39
- BackWPupFunctions::joblog($logfile,__('Create Zip file from dump...','backwpup'));
40
  require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php');
41
  $zipbackupfile = new PclZip($backupfile);
42
- if (0==$zipbackupfile -> create($cfg['tempdir'].'/'.DB_NAME.'.sql',PCLZIP_OPT_REMOVE_PATH,$cfg['tempdir'].'/')) {
43
- BackWPupFunctions::joblog($logfile,__('ERROR: Database Zip file create:','backwpup').' '.$zipbackupfile->errorInfo(true));
44
  $joberror=true;
45
  }
46
- BackWPupFunctions::joblog($logfile,__('Zip file created...','backwpup'));
47
  }
48
  //clean vars
49
  unset($tables);
1
  <?PHP
2
+ BackWPupFunctions::joblog($logtime,__('Run Database Backup...','backwpup'));
3
 
4
  //Tables to backup
5
  $tables=$wpdb->get_col('SHOW TABLES FROM `'.DB_NAME.'`');
12
  }
13
 
14
  if (sizeof($tables)>0) {
15
+ BackWPupFunctions::joblog($logtime,__('Tables to Backup: ','backwpup').print_r($tables,true));
16
 
17
  require_once('MySQLDBExport.class.php');
18
  $export = new MySQLDBExport(DB_HOST, DB_USER, DB_PASSWORD);
19
  $export->set_db(DB_NAME);
20
 
21
+ $file = @fopen(BackWPupFunctions::get_temp_dir().'backwpup/'.DB_NAME.'.sql', 'w');
22
  fwrite($file, $export->make_dump($tables));
23
  fclose($file);
24
 
25
 
26
  if ($error=$export->get_error()) {
27
+ BackWPupFunctions::joblog($logtime,__('ERROR:','backwpup').' '.$error);
 
28
  }
29
  } else {
30
+ BackWPupFunctions::joblog($logtime,__('ERROR: No Tables to Backup','backwpup'));
 
31
  }
32
 
33
 
34
+ BackWPupFunctions::joblog($logtime,__('Database backup done!','backwpup'));
35
 
36
+ if ($jobs[$jobid]['type']=='DB' and is_file(BackWPupFunctions::get_temp_dir().'backwpup/'.DB_NAME.'.sql')) {
37
+ BackWPupFunctions::joblog($logtime,__('Create Zip file from dump...','backwpup'));
38
  require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php');
39
  $zipbackupfile = new PclZip($backupfile);
40
+ if (0==$zipbackupfile -> create(BackWPupFunctions::get_temp_dir().'backwpup/'.DB_NAME.'.sql',PCLZIP_OPT_REMOVE_PATH,BackWPupFunctions::get_temp_dir().'backwpup')) {
41
+ BackWPupFunctions::joblog($logtime,__('ERROR: Database Zip file create:','backwpup').' '.$zipbackupfile->errorInfo(true));
42
  $joberror=true;
43
  }
44
+ BackWPupFunctions::joblog($logtime,__('Zip file created...','backwpup'));
45
  }
46
  //clean vars
47
  unset($tables);
app/dojob/destination-dir.php DELETED
@@ -1,75 +0,0 @@
1
- <?php
2
- BackWPupFunctions::joblog($logfile,__('Move Backup Zip file to Backup dir...','backwpup'));
3
-
4
- if (!is_file($jobs[$jobid]['backupdir'].'/.htaccess')) {
5
- if($file = fopen($jobs[$jobid]['backupdir'].'/.htaccess', 'w')) {
6
- fwrite($file, "Order allow,deny\ndeny from all");
7
- fclose($file);
8
- }
9
- }
10
- if (!is_file($jobs[$jobid]['backupdir'].'/index.html')) {
11
- if($file = fopen($jobs[$jobid]['backupdir'].'/index.html', 'w')) {
12
- fwrite($file,"\n");
13
- fclose($file);
14
- }
15
- }
16
-
17
- if ($jobs[$jobid]['backupdir']!=$cfg['tempdir']) {
18
- if (!rename($backupfile,$jobs[$jobid]['backupdir'].$backupfilename)) {
19
- BackWPupFunctions::joblog($logfile,__('ERROR: Backup Zip file can not moved to Backup dir!!!','backwpup'));
20
- $joberror=true;
21
- } else {
22
- $backupfile=$jobs[$jobid]['backupdir'].$backupfilename;
23
- }
24
- if (!rename($logfile,$jobs[$jobid]['backupdir'].$logfilename)) {
25
- BackWPupFunctions::joblog($logfile,__('ERROR: Log file file can not moved to Backup dir!!!','backwpup'));
26
- $joberror=true;
27
- } else {
28
- $logfile=$jobs[$jobid]['backupdir'].$logfilename;
29
- }
30
- }
31
-
32
- if (is_file($backupfile)) {
33
- BackWPupFunctions::joblog($logfile,__('Backup zip file saved to:','backwpup').' '.$backupfile);
34
- BackWPupFunctions::joblog($logfile,__('Backup zip filesize is','backwpup').' '.BackWPupFunctions::formatBytes(filesize($backupfile)));
35
- }
36
- BackWPupFunctions::joblog($logfile,__('Log file saved to:','backwpup').' '.$logfile);
37
-
38
- if (!empty($jobs[$jobid]['maxbackups'])) {
39
- BackWPupFunctions::joblog($logfile,__('Delete old backup files...','backwpup'));
40
- $logs=get_option('backwpup_log');
41
- if (is_array($logs)) {
42
- unset($logkeys);
43
- foreach ($logs as $timestamp => $logdata) {
44
- if ($logdata['jobid']==$jobid)
45
- $logkeys[]=$timestamp;
46
- }
47
- if (is_array($logkeys)) {
48
- rsort($logkeys,SORT_NUMERIC);
49
- $counter=0;$countdelbackups=0;$countdellogs=0;
50
- for ($i=0;$i<sizeof($logkeys);$i++) {
51
- if (!empty($logs[$logkeys[$i]]['backupfile']))
52
- $counter++;
53
- if ($counter>=$jobs[$jobid]['maxbackups']) {
54
- if (is_file($logs[$logkeys[$i]]['backupfile'])) {
55
- unlink($logs[$logkeys[$i]]['backupfile']);
56
- $countdelbackups++;
57
- }
58
- if (is_file($logs[$logkeys[$i]]['logfile'])) {
59
- unlink($logs[$logkeys[$i]]['logfile']);
60
- $countdellogs++;
61
- }
62
- unset($logs[$logkeys[$i]]);
63
- }
64
- }
65
- }
66
- }
67
- update_option('backwpup_log',$logs);
68
- BackWPupFunctions::joblog($logfile,$countdelbackups.' '.__('Old backup files deleted!!!','backwpup'));
69
- BackWPupFunctions::joblog($logfile,$countdellogs.' '.__('Old Log files deleted!!!','backwpup'));
70
- //clean vars
71
- unset($logkeys);
72
- unset($logs);
73
- }
74
-
75
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/dojob/destination-mail.php CHANGED
@@ -1,23 +1,23 @@
1
  <?php
2
  if (!empty($jobs[$jobid]['mailaddress'])) {
3
- BackWPupFunctions::joblog($logfile,__('Sendig mail...','backwpup'));
4
  if (is_file($backupfile)) {
5
  if (filesize($backupfile)<5242880) {
6
  $mailfiles=$backupfile;
7
  } else {
8
- BackWPupFunctions::joblog($logfile,__('WARNING: Backup Archive too big for sendig by mail','backwpup'));
 
 
 
 
9
  $mailfiles='';
10
  }
11
  }
12
- $logmassage=file($logfile);
13
- foreach ($logmassage as $massageline) {
14
- $mailmessage.=$massageline;
15
- }
16
- if (wp_mail($jobs[$jobid]['mailaddress'],__('BackWPup Job:','backwpup').' '.$jobs[$jobid]['name'],$mailmessage,'',$mailfiles)) {
17
- BackWPupFunctions::joblog($logfile,__('Mail send!!!','backwpup'));
18
  } else {
19
- BackWPupFunctions::joblog($logfile,__('ERROR: can not send mail!!!','backwpup'));
20
- $joberror=true;
21
  }
22
  }
23
  //clean vars
1
  <?php
2
  if (!empty($jobs[$jobid]['mailaddress'])) {
3
+ BackWPupFunctions::joblog($logtime,__('Sendig mail...','backwpup'));
4
  if (is_file($backupfile)) {
5
  if (filesize($backupfile)<5242880) {
6
  $mailfiles=$backupfile;
7
  } else {
8
+ if (!empty($jobs[$jobid]['backupdir'])) {
9
+ BackWPupFunctions::joblog($logtime,__('WARNING:','backwpup').' '.__('Backup Archive too big for sendig by mail','backwpup'));
10
+ } else {
11
+ BackWPupFunctions::joblog($logtime,__('ERROR:','backwpup').' '.__('Backup Archive too big for sendig by mail','backwpup'));
12
+ }
13
  $mailfiles='';
14
  }
15
  }
16
+ $logs=get_option('backwpup_log');
17
+ if (wp_mail($jobs[$jobid]['mailaddress'],__('BackWPup Job:','backwpup').' '.$jobs[$jobid]['name'],$logs[$logtime]['log'],'',$mailfiles)) {
18
+ BackWPupFunctions::joblog($logtime,__('Mail send!!!','backwpup'));
 
 
 
19
  } else {
20
+ BackWPupFunctions::joblog($logtime,__('ERROR:','backwpup').' '.__('Can not send mail!!!','backwpup'));
 
21
  }
22
  }
23
  //clean vars
app/dojob/file.php CHANGED
@@ -1,37 +1,19 @@
1
  <?PHP
2
- BackWPupFunctions::joblog($logfile,__('Run File Backup...','backwpup'));
 
3
 
4
- BackWPupFunctions::joblog($logfile,__('Make File List...','backwpup'));
5
-
6
- function allfiles($path,$filelist='') { //helper function
7
- if ($pathhandle = @opendir($path)) {
8
- $path=str_replace('\\','/',$path);
9
- $path=str_replace('//','/',$path);
10
- $path=untrailingslashit($path);
11
- while (false !== ($file = readdir($pathhandle))) {
12
- if ($file != "." && $file != ".." && $file != ".svn") {
13
- if (is_dir($path.'/'.$file)) {
14
- $filelist=allfiles($path.'/'.$file,$filelist);
15
- } else {
16
- $filelist[]=$path.'/'.$file;
17
- }
18
- }
19
- }
20
- closedir($pathhandle);
21
- }
22
- return $filelist;
23
- }
24
-
25
  //Make filelist
26
  if ($jobs[$jobid]['backuproot']) {
27
- $filelist=allfiles(ABSPATH);
 
 
28
  }
29
  if ($jobs[$jobid]['backupcontent']) {
30
- $filelist=allfiles(WP_CONTENT_DIR,$filelist);
31
  } else {
32
  if (is_array($filelist)) {
33
  unset($excludefilelist); //clean vars
34
- $excludefilelist=allfiles(WP_CONTENT_DIR);
35
  foreach($excludefilelist as $fileexcludevalue) {
36
  foreach($filelist as $filelistkey =>$filelistvalue) {
37
  if ($filelistvalue==$fileexcludevalue)
@@ -41,11 +23,11 @@ BackWPupFunctions::joblog($logfile,__('Make File List...','backwpup'));
41
  }
42
  }
43
  if ($jobs[$jobid]['backupplugins']) {
44
- $filelist=allfiles(WP_PLUGIN_DIR,$filelist);
45
  } else {
46
  if (is_array($filelist)) {
47
  unset($excludefilelist); //clean vars
48
- $excludefilelist=allfiles(WP_PLUGIN_DIR);
49
  foreach($excludefilelist as $fileexcludevalue) {
50
  foreach($filelist as $filelistkey =>$filelistvalue) {
51
  if ($filelistvalue==$fileexcludevalue)
@@ -54,40 +36,45 @@ BackWPupFunctions::joblog($logfile,__('Make File List...','backwpup'));
54
  }
55
  }
56
  }
57
- $dirinclude=split(',',$jobs[$jobid]['dirinclude']); // Add extra include dirs
58
- if (is_array($dirinclude)) {
59
- foreach($dirinclude as $dirincludevalue) {
60
- if (is_dir($dirincludevalue)) {
61
- $filelist=allfiles($dirincludevalue,$filelist);
 
 
62
  }
63
  }
64
  }
65
 
66
  if (sizeof($filelist)>0) {
67
  $filelist=array_unique($filelist);
68
- BackWPupFunctions::joblog($logfile,__('Remove Excludes from file list...','backwpup'));
 
 
 
 
 
69
  //Remove Backup dirs
70
  foreach($jobs as $jobsvale) {
71
  foreach($filelist as $filelistkey =>$filelistvalue) {
72
- if (stristr($filelistvalue,$jobsvale['backupdir'].'/'))
73
  unset($filelist[$filelistkey]);
74
  }
75
  }
76
  //Exclute files and dirs
77
- $fileexclude=split(',',$jobs[$jobid]['fileexclude']);
78
- if (is_array($fileexclude) and !empty($fileexclude[0]) and sizeof($fileexclude)>1) {
79
- foreach($fileexclude as $fileexcludevalue) {
80
- foreach($filelist as $filelistkey =>$filelistvalue) {
81
- if (stristr($filelistvalue,$fileexcludevalue))
82
- unset($filelist[$filelistkey]);
 
 
83
  }
84
  }
 
85
  }
86
- unset($fileexclude); //clean vars
87
- } else {
88
- BackWPupFunctions::joblog($logfile,__('ERROR: No files to Backup','backwpup'));
89
- $joberror=true;
90
- unset($filelist); //clean vars
91
  }
92
 
93
  if (sizeof($filelist)>0) {
@@ -100,33 +87,29 @@ BackWPupFunctions::joblog($logfile,__('Make File List...','backwpup'));
100
  $filelist=$cleanfilelist;
101
  unset($cleanfilelist);
102
  } else {
103
- BackWPupFunctions::joblog($logfile,__('ERROR: No files to Backup','backwpup'));
104
- $joberror=true;
105
  unset($filelist); //clean vars
106
  }
107
 
108
  //Create Zip File
109
- BackWPupFunctions::joblog($logfile,__('Files to Backup: ','backwpup').print_r($filelist,true));
110
- BackWPupFunctions::joblog($logfile,__('Create Backup Zip file...','backwpup'));
111
-
112
  if (is_array($filelist) or $jobs[$jobid]['type']=='DB+FILE') {
 
 
113
  require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php');
114
  $zipbackupfile = new PclZip($backupfile);
115
  if (0==$zipbackupfile -> create($filelist,PCLZIP_OPT_REMOVE_PATH,str_replace('\\','/',ABSPATH))) {
116
- BackWPupFunctions::joblog($logfile,__('ERROR: Zip file create:','backwpup').' '.$zipbackupfile->errorInfo(true));
117
- $joberror=true;
118
  }
119
  if ($jobs[$jobid]['type']=='DB+FILE') {
120
- BackWPupFunctions::joblog($logfile,__('Add Database dump to Backup Zip file...','backwpup'));
121
- if (0==$zipbackupfile -> add($cfg['tempdir'].'/'.DB_NAME.'.sql',PCLZIP_OPT_REMOVE_PATH,$cfg['tempdir'].'/')) {
122
- BackWPupFunctions::joblog($logfile,__('ERROR: Zip file create Add Database dump:','backwpup').' '.$zipbackupfile->errorInfo(true));
123
- $joberror=true;
124
  }
125
  }
126
  //clean vars
127
  unset($zipbackupfile);
128
  unset($filelist);
129
- BackWPupFunctions::joblog($logfile,__('Backup Zip file create done!','backwpup'));
130
  }
131
 
132
  ?>
1
  <?PHP
2
+ BackWPupFunctions::joblog($logtime,__('Run File Backup...','backwpup'));
3
+ BackWPupFunctions::joblog($logtime,__('Make File List...','backwpup'));
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  //Make filelist
6
  if ($jobs[$jobid]['backuproot']) {
7
+ $filelist=BackWPupFunctions::list_files(str_replace('\\','/',untrailingslashit(ABSPATH)));
8
+ } else {
9
+ $filelist=(array)$filelist;
10
  }
11
  if ($jobs[$jobid]['backupcontent']) {
12
+ $filelist=array_merge(BackWPupFunctions::list_files(str_replace('\\','/',untrailingslashit(WP_CONTENT_DIR))),$filelist);
13
  } else {
14
  if (is_array($filelist)) {
15
  unset($excludefilelist); //clean vars
16
+ $excludefilelist=BackWPupFunctions::list_files(WP_CONTENT_DIR);
17
  foreach($excludefilelist as $fileexcludevalue) {
18
  foreach($filelist as $filelistkey =>$filelistvalue) {
19
  if ($filelistvalue==$fileexcludevalue)
23
  }
24
  }
25
  if ($jobs[$jobid]['backupplugins']) {
26
+ $filelist=array_merge(BackWPupFunctions::list_files(str_replace('\\','/',untrailingslashit(WP_PLUGIN_DIR))),$filelist);
27
  } else {
28
  if (is_array($filelist)) {
29
  unset($excludefilelist); //clean vars
30
+ $excludefilelist=BackWPupFunctions::list_files(WP_PLUGIN_DIR);
31
  foreach($excludefilelist as $fileexcludevalue) {
32
  foreach($filelist as $filelistkey =>$filelistvalue) {
33
  if ($filelistvalue==$fileexcludevalue)
36
  }
37
  }
38
  }
39
+ if (!empty($jobs[$jobid]['dirinclude'])) {// Add extra include dirs
40
+ $dirinclude=split(',',$jobs[$jobid]['dirinclude']);
41
+ if (is_array($dirinclude)) {
42
+ foreach($dirinclude as $dirincludevalue) {
43
+ if (is_dir($dirincludevalue)) {
44
+ $filelist=array_merge(BackWPupFunctions::list_files(str_replace('\\','/',untrailingslashit($dirincludevalue))),$filelist);
45
+ }
46
  }
47
  }
48
  }
49
 
50
  if (sizeof($filelist)>0) {
51
  $filelist=array_unique($filelist);
52
+ BackWPupFunctions::joblog($logtime,__('Remove Excludes from file list...','backwpup'));
53
+ //Remove Temp dir
54
+ foreach($filelist as $filelistkey =>$filelistvalue) {
55
+ if (stristr($filelistvalue,BackWPupFunctions::get_temp_dir().'backwpup/'))
56
+ unset($filelist[$filelistkey]);
57
+ }
58
  //Remove Backup dirs
59
  foreach($jobs as $jobsvale) {
60
  foreach($filelist as $filelistkey =>$filelistvalue) {
61
+ if (stristr($filelistvalue,$jobsvale['backupdir'].'/') and !empty($filelistvalue))
62
  unset($filelist[$filelistkey]);
63
  }
64
  }
65
  //Exclute files and dirs
66
+ if (!empty($jobs[$jobid]['fileexclude'])) {
67
+ $fileexclude=split(',',$jobs[$jobid]['fileexclude']);
68
+ if (is_array($fileexclude)) {
69
+ foreach($fileexclude as $fileexcludevalue) {
70
+ foreach($filelist as $filelistkey =>$filelistvalue) {
71
+ if (stristr($filelistvalue,$fileexcludevalue))
72
+ unset($filelist[$filelistkey]);
73
+ }
74
  }
75
  }
76
+ unset($fileexclude); //clean vars
77
  }
 
 
 
 
 
78
  }
79
 
80
  if (sizeof($filelist)>0) {
87
  $filelist=$cleanfilelist;
88
  unset($cleanfilelist);
89
  } else {
90
+ BackWPupFunctions::joblog($logtime,__('ERROR:','backwpup').' '.__('No files to Backup','backwpup'));
 
91
  unset($filelist); //clean vars
92
  }
93
 
94
  //Create Zip File
 
 
 
95
  if (is_array($filelist) or $jobs[$jobid]['type']=='DB+FILE') {
96
+ BackWPupFunctions::joblog($logtime,__('Files to Backup: ','backwpup').print_r($filelist,true));
97
+ BackWPupFunctions::joblog($logtime,__('Create Backup Zip file...','backwpup'));
98
  require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php');
99
  $zipbackupfile = new PclZip($backupfile);
100
  if (0==$zipbackupfile -> create($filelist,PCLZIP_OPT_REMOVE_PATH,str_replace('\\','/',ABSPATH))) {
101
+ BackWPupFunctions::joblog($logtime,__('ERROR:','backwpup').' '.__('Zip file create:','backwpup').' '.$zipbackupfile->errorInfo(true));
 
102
  }
103
  if ($jobs[$jobid]['type']=='DB+FILE') {
104
+ BackWPupFunctions::joblog($logtime,__('Add Database dump to Backup Zip file...','backwpup'));
105
+ if (0==$zipbackupfile -> add(BackWPupFunctions::get_temp_dir().'backwpup/'.DB_NAME.'.sql',PCLZIP_OPT_REMOVE_PATH,BackWPupFunctions::get_temp_dir().'backwpup/')) {
106
+ BackWPupFunctions::joblog($logtime,__('ERROR:','backwpup').' '.__('Zip file create Add Database dump:','backwpup').' '.$zipbackupfile->errorInfo(true));
 
107
  }
108
  }
109
  //clean vars
110
  unset($zipbackupfile);
111
  unset($filelist);
112
+ BackWPupFunctions::joblog($logtime,__('Backup Zip file create done!','backwpup'));
113
  }
114
 
115
  ?>
app/dojob/optimize.php CHANGED
@@ -1,6 +1,6 @@
1
  <?PHP
2
  //Optimize SQL Table
3
- BackWPupFunctions::joblog($logfile,__('Run Database optimize...','backwpup'));
4
  $tables=$wpdb->get_col('SHOW TABLES FROM `'.DB_NAME.'`');
5
 
6
  if (is_array($jobs[$jobid]['dbexclude'])) {
@@ -11,59 +11,19 @@ if (is_array($jobs[$jobid]['dbexclude'])) {
11
  }
12
 
13
  if (sizeof($tables)>0) {
14
- BackWPupFunctions::joblog($logfile,__('Tables to optimize: ','backwpup').print_r($tables,true));
15
 
16
  foreach ($tables as $table) {
17
  if (!in_array($table,(array)$jobs[$jobid]['dbexclude'])) {
18
  $wpdb->query('OPTIMIZE TABLE `'.$table.'`');
19
  if ($sqlerr=mysql_error($wpdb->dbh)) {
20
- BackWPupFunctions::joblog($logfile,sprintf(__('ERROR: BackWPup database error %1$s for query %2$s','backwpup'), $sqlerr, $sqlerr->last_query));
21
- $joberror=true;
22
  }
23
  }
24
  }
25
  $wpdb->flush();
26
- BackWPupFunctions::joblog($logfile,__('Database optimize done!','backwpup'));
27
  } else {
28
- BackWPupFunctions::joblog($logfile,__('ERROR: No Tables to optimize','backwpup'));
29
- $joberror=true;
30
  }
31
-
32
-
33
- BackWPupFunctions::joblog($logfile,__('Delete old Log files...','backwpup'));
34
- $logs=get_option('backwpup_log');
35
- if (is_array($logs)) {
36
- unset($logkeys);
37
- foreach ($logs as $timestamp => $logdata) {
38
- if ($logdata['jobid']==$jobid)
39
- $logkeys[]=$timestamp;
40
- }
41
- if (is_array($logkeys)) {
42
- rsort($logkeys,SORT_NUMERIC);
43
- $counter=0;$countdelbackups=0;$countdellogs=0;
44
- for ($i=0;$i<sizeof($logkeys);$i++) {
45
- if (!empty($logs[$logkeys[$i]]['backupfile']))
46
- $counter++;
47
- if ($counter>=15) {
48
- if (is_file($logs[$logkeys[$i]]['backupfile'])) {
49
- unlink($logs[$logkeys[$i]]['backupfile']);
50
- $countdelbackups++;
51
- }
52
- if (is_file($logs[$logkeys[$i]]['logfile'])) {
53
- unlink($logs[$logkeys[$i]]['logfile']);
54
- $countdellogs++;
55
- }
56
- unset($logs[$logkeys[$i]]);
57
- }
58
- }
59
- }
60
- }
61
- update_option('backwpup_log',$logs);
62
- BackWPupFunctions::joblog($logfile,$countdellogs.' '.__('Old Log files deleted!!!','backwpup'));
63
- //clean vars
64
- unset($logkeys);
65
- unset($logs);
66
-
67
-
68
-
69
  ?>
1
  <?PHP
2
  //Optimize SQL Table
3
+ BackWPupFunctions::joblog($logtime,__('Run Database optimize...','backwpup'));
4
  $tables=$wpdb->get_col('SHOW TABLES FROM `'.DB_NAME.'`');
5
 
6
  if (is_array($jobs[$jobid]['dbexclude'])) {
11
  }
12
 
13
  if (sizeof($tables)>0) {
14
+ BackWPupFunctions::joblog($logtime,__('Tables to optimize: ','backwpup').print_r($tables,true));
15
 
16
  foreach ($tables as $table) {
17
  if (!in_array($table,(array)$jobs[$jobid]['dbexclude'])) {
18
  $wpdb->query('OPTIMIZE TABLE `'.$table.'`');
19
  if ($sqlerr=mysql_error($wpdb->dbh)) {
20
+ BackWPupFunctions::joblog($logtime,__('ERROR:','backwpup').' '.sprintf(__('BackWPup database error %1$s for query %2$s','backwpup'), $sqlerr, $sqlerr->last_query));
 
21
  }
22
  }
23
  }
24
  $wpdb->flush();
25
+ BackWPupFunctions::joblog($logtime,__('Database optimize done!','backwpup'));
26
  } else {
27
+ BackWPupFunctions::joblog($logtime,__('ERROR:','backwpup').' '.__('No Tables to optimize','backwpup'));
 
28
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  ?>
app/functions.php CHANGED
@@ -1,7 +1,44 @@
1
  <?PHP
2
 
3
  class BackWPupFunctions {
4
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  //Thems Option menu entry
6
  function menu_entry() {
7
  $hook = add_management_page(__('BackWPup','backwpup'), __('BackWPup','backwpup'), 'install_plugins', 'BackWPup',array('BackWPupFunctions', 'options')) ;
@@ -50,10 +87,9 @@ class BackWPupFunctions {
50
  require_once(WP_PLUGIN_DIR.'/'.BACKWPUP_PLUGIN_DIR.'/app/options-runnow.php');
51
  break;
52
  case 'view_log':
53
- $log= (int) $_GET['log'];
54
  check_admin_referer('view-log');
55
  $logs=get_option('backwpup_log');
56
- $logfile=$logs[$log]['logfile'];
57
  require_once(WP_PLUGIN_DIR.'/'.BACKWPUP_PLUGIN_DIR.'/app/options-view_log.php');
58
  break;
59
  default:
@@ -142,11 +178,6 @@ class BackWPupFunctions {
142
  }
143
  }
144
  }
145
- //set Tmp dir
146
- $cfg=get_option('backwpup');
147
- if (empty($cfg['tempdir']))
148
- $cfg['tempdir']=str_replace('\\','/',WP_CONTENT_DIR).'/backwpup';
149
- update_option('backwpup',$cfg);
150
  }
151
 
152
  //on Plugin deaktivate
@@ -207,17 +238,14 @@ class BackWPupFunctions {
207
  case 'DB+FILE':
208
  require_once('dojob/db.php');
209
  require_once('dojob/file.php');
210
- require_once('dojob/destination-dir.php');
211
  //require_once('dojob/destination-ftp.php');
212
  break;
213
  case 'DB':
214
  require_once('dojob/db.php');
215
- require_once('dojob/destination-dir.php');
216
  //require_once('dojob/destination-ftp.php');
217
  break;
218
  case 'FILE':
219
  require_once('dojob/file.php');
220
- require_once('dojob/destination-dir.php');
221
  //require_once('dojob/destination-ftp.php');
222
  break;
223
  case 'OPTIMIZE':
@@ -228,17 +256,20 @@ class BackWPupFunctions {
228
  require_once('dojob/after.php');
229
 
230
  if ($returnlogfile)
231
- return $logfile;
232
  else
233
  return;
234
  }
235
 
236
  //Make Log File for Jobs.
237
- function joblog($logfile,$entry) {
238
- if($file = fopen($logfile, 'a')) {
239
- fwrite($file, date('Y-m-d H:i.s').": ".$entry."\n");
240
- fclose($file);
241
- }
 
 
 
242
  }
243
 
244
  //file size
@@ -248,8 +279,8 @@ class BackWPupFunctions {
248
  $pow = floor(($bytes ? log($bytes) : 0) / log(1024));
249
  $pow = min($pow, count($units) - 1);
250
  $bytes /= pow(1024, $pow);
251
- return round($bytes, $precision) . ' ' . $units[$pow];
252
- }
253
 
254
  // add all action and so on only if plugin loaded.
255
  function init() {
1
  <?PHP
2
 
3
  class BackWPupFunctions {
4
+
5
+
6
+ function list_files( $folder = '', $levels = 100 ) { //Same as WP function but needet for cron
7
+ if( empty($folder) )
8
+ return false;
9
+ if( ! $levels )
10
+ return false;
11
+ $files = array();
12
+ if ( $dir = @opendir( $folder ) ) {
13
+ while (($file = readdir( $dir ) ) !== false ) {
14
+ if ( in_array($file, array('.', '..','.svn') ) )
15
+ continue;
16
+ if ( is_dir( $folder . '/' . $file ) ) {
17
+ $files2 = list_files( $folder . '/' . $file, $levels - 1);
18
+ if( $files2 )
19
+ $files = array_merge($files, $files2 );
20
+ else
21
+ $files[] = $folder . '/' . $file . '/';
22
+ } else {
23
+ $files[] = $folder . '/' . $file;
24
+ }
25
+ }
26
+ }
27
+ @closedir( $dir );
28
+ return $files;
29
+ }
30
+
31
+ function get_temp_dir() { //Same as WP function but needet for cron
32
+ if ( defined('WP_TEMP_DIR') )
33
+ return trailingslashit(WP_TEMP_DIR);
34
+ $temp = WP_CONTENT_DIR . '/';
35
+ if ( is_dir($temp) && is_writable($temp) )
36
+ return $temp;
37
+ if ( function_exists('sys_get_temp_dir') )
38
+ return trailingslashit(sys_get_temp_dir());
39
+ return '/tmp/';
40
+ }
41
+
42
  //Thems Option menu entry
43
  function menu_entry() {
44
  $hook = add_management_page(__('BackWPup','backwpup'), __('BackWPup','backwpup'), 'install_plugins', 'BackWPup',array('BackWPupFunctions', 'options')) ;
87
  require_once(WP_PLUGIN_DIR.'/'.BACKWPUP_PLUGIN_DIR.'/app/options-runnow.php');
88
  break;
89
  case 'view_log':
90
+ $logtime= (int) $_GET['logtime'];
91
  check_admin_referer('view-log');
92
  $logs=get_option('backwpup_log');
 
93
  require_once(WP_PLUGIN_DIR.'/'.BACKWPUP_PLUGIN_DIR.'/app/options-view_log.php');
94
  break;
95
  default:
178
  }
179
  }
180
  }
 
 
 
 
 
181
  }
182
 
183
  //on Plugin deaktivate
238
  case 'DB+FILE':
239
  require_once('dojob/db.php');
240
  require_once('dojob/file.php');
 
241
  //require_once('dojob/destination-ftp.php');
242
  break;
243
  case 'DB':
244
  require_once('dojob/db.php');
 
245
  //require_once('dojob/destination-ftp.php');
246
  break;
247
  case 'FILE':
248
  require_once('dojob/file.php');
 
249
  //require_once('dojob/destination-ftp.php');
250
  break;
251
  case 'OPTIMIZE':
256
  require_once('dojob/after.php');
257
 
258
  if ($returnlogfile)
259
+ return $logtime;
260
  else
261
  return;
262
  }
263
 
264
  //Make Log File for Jobs.
265
+ function joblog($logtime,$entry) {
266
+ $logs=get_option('backwpup_log');
267
+ if (substr($entry,0,strlen(__('ERROR:','backwpup')))==__('ERROR:','backwpup'))
268
+ $logs[$logtime]['error']=$logs[$logtime]['error']+1;
269
+ if (substr($entry,0,strlen(__('WARNING:','backwpup')))==__('WARNING:','backwpup'))
270
+ $logs[$logtime]['warning']=$logs[$logtime]['warning']+1;
271
+ $logs[$logtime]['log'].=$entry."\n";
272
+ update_option('backwpup_log',$logs);
273
  }
274
 
275
  //file size
279
  $pow = floor(($bytes ? log($bytes) : 0) / log(1024));
280
  $pow = min($pow, count($units) - 1);
281
  $bytes /= pow(1024, $pow);
282
+ return round($bytes, $precision) . ' ' . $units[$pow];
283
+ }
284
 
285
  // add all action and so on only if plugin loaded.
286
  function init() {
app/options-logs.php CHANGED
@@ -31,9 +31,10 @@
31
  <th scope="col" id="cb" class="manage-column column-cb check-column" style=""><input type="checkbox" /></th>
32
  <th scope="col" id="id" class="manage-column column-id" style=""><?PHP _e('Job','backwpup'); ?></th>
33
  <th scope="col" id="type" class="manage-column column-type" style=""><?PHP _e('Type','backwpup'); ?></th>
34
- <th scope="col" id="log" class="manage-column column-log" style=""><?PHP _e('Backup/Log','backwpup'); ?></th>
 
35
  <th scope="col" id="size" class="manage-column column-size" style=""><?PHP _e('Size','backwpup'); ?></th>
36
- <th scope="col" id="logdate" class="manage-column column-logdate" style=""><?PHP _e('Log Date','backwpup'); ?></th>
37
  </tr>
38
  </thead>
39
 
@@ -42,9 +43,10 @@
42
  <th scope="col" class="manage-column column-cb check-column" style=""><input type="checkbox" /></th>
43
  <th scope="col" class="manage-column column-id" style=""><?PHP _e('Job','backwpup'); ?></th>
44
  <th scope="col" class="manage-column column-type" style=""><?PHP _e('Type','backwpup'); ?></th>
45
- <th scope="col" class="manage-column column-log" style=""><?PHP _e('Backup/Log','backwpup'); ?></th>
 
46
  <th scope="col" class="manage-column column-size" style=""><?PHP _e('Size','backwpup'); ?></th>
47
- <th scope="col" class="manage-column column-logdate" style=""><?PHP _e('Log Date','backwpup'); ?></th>
48
  </tr>
49
  </tfoot>
50
 
@@ -78,19 +80,33 @@
78
  </td>
79
  <td class="name column-log">
80
  <?php
81
- $name=basename($logvalue['logfile']);
82
- if (!empty($logvalue['backupfile']) and is_file($logvalue['backupfile']))
83
  $name=basename($logvalue['backupfile']);
84
  ?>
85
- <strong><a href="<?PHP echo wp_nonce_url('admin.php?page=BackWPup&action=view_log&log='.$timestamp, 'view-log'); ?>" title="<?PHP _e('View log','backwpup'); ?>"><?PHP echo $name;?></a> <?PHP if($logvalue['error']) { echo '<span style="color:red;">'.__('ERROR','backwpup').'</span>'; } else { _e('OK','backwpup'); } ?></strong>
86
  <p><div class="row-actions">
87
- <span class="view"><a href="<?PHP echo wp_nonce_url('admin.php?page=BackWPup&action=view_log&log='.$timestamp, 'view-log'); ?>"><?PHP _e('View','backwpup'); ?></a></span>
88
  <span class="delete"> | <a class="submitdelete" href="<?PHP echo wp_nonce_url('admin.php?page=BackWPup&action=delete-logs&log='.$timestamp, 'delete-log_'.$timestamp); ?>" onclick="if ( confirm('<?PHP echo esc_js(__("You are about to delete this Job. \n 'Cancel' to stop, 'OK' to delete.","backwpup")) ?>') ){return true;}return false;"><?PHP _e('Delete','backwpup'); ?></a></span>
89
  <?PHP if (!empty($logvalue['backupfile']) and is_file($logvalue['backupfile'])) { ?>
90
  <span class="download"> | <a href="<?PHP echo wp_nonce_url('admin.php?page=BackWPup&action=download&log='.$timestamp, 'download-backup_'.$timestamp); ?>"><?PHP _e('Download','backwpup'); ?></a></span>
91
  <?PHP } ?>
92
  </div></p>
93
  </td>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  <td class="column-size">
95
  <?PHP
96
  if (!empty($logvalue['backupfile']) and is_file($logvalue['backupfile'])) {
@@ -102,8 +118,7 @@
102
  </td>
103
  <td class="column-logdate">
104
  <?PHP
105
- echo date(get_option('date_format'),$timestamp); ?><br /><?PHP echo date(get_option('time_format'),$timestamp);
106
- echo '<br />'.__('Runtime:','backwpup').' '.$logvalue['worktime'].' '.__('sec.','backwpup');
107
  ?>
108
  </td>
109
  </tr>
31
  <th scope="col" id="cb" class="manage-column column-cb check-column" style=""><input type="checkbox" /></th>
32
  <th scope="col" id="id" class="manage-column column-id" style=""><?PHP _e('Job','backwpup'); ?></th>
33
  <th scope="col" id="type" class="manage-column column-type" style=""><?PHP _e('Type','backwpup'); ?></th>
34
+ <th scope="col" id="log" class="manage-column column-log" style=""><?PHP _e('Backup/Log Date/Time','backwpup'); ?></th>
35
+ <th scope="col" id="size" class="manage-column column-status" style=""><?PHP _e('Status','backwpup'); ?></th>
36
  <th scope="col" id="size" class="manage-column column-size" style=""><?PHP _e('Size','backwpup'); ?></th>
37
+ <th scope="col" id="logdate" class="manage-column column-runtime" style=""><?PHP _e('Runtime','backwpup'); ?></th>
38
  </tr>
39
  </thead>
40
 
43
  <th scope="col" class="manage-column column-cb check-column" style=""><input type="checkbox" /></th>
44
  <th scope="col" class="manage-column column-id" style=""><?PHP _e('Job','backwpup'); ?></th>
45
  <th scope="col" class="manage-column column-type" style=""><?PHP _e('Type','backwpup'); ?></th>
46
+ <th scope="col" class="manage-column column-log" style=""><?PHP _e('Backup/Log Date/Time','backwpup'); ?></th>
47
+ <th scope="col" class="manage-column column-status" style=""><?PHP _e('Status','backwpup'); ?></th>
48
  <th scope="col" class="manage-column column-size" style=""><?PHP _e('Size','backwpup'); ?></th>
49
+ <th scope="col" class="manage-column column-runtime" style=""><?PHP _e('Runtime','backwpup'); ?></th>
50
  </tr>
51
  </tfoot>
52
 
80
  </td>
81
  <td class="name column-log">
82
  <?php
83
+ $name='';
84
+ if (is_file($logvalue['backupfile']))
85
  $name=basename($logvalue['backupfile']);
86
  ?>
87
+ <strong><a href="<?PHP echo wp_nonce_url('admin.php?page=BackWPup&action=view_log&logtime='.$timestamp, 'view-log'); ?>" title="<?PHP _e('View log','backwpup'); ?>"><?PHP echo date(get_option('date_format'),$timestamp); ?> <?PHP echo date(get_option('time_format'),$timestamp); ?></a></strong>
88
  <p><div class="row-actions">
89
+ <span class="view"><a href="<?PHP echo wp_nonce_url('admin.php?page=BackWPup&action=view_log&logtime='.$timestamp, 'view-log'); ?>"><?PHP _e('View','backwpup'); ?></a></span>
90
  <span class="delete"> | <a class="submitdelete" href="<?PHP echo wp_nonce_url('admin.php?page=BackWPup&action=delete-logs&log='.$timestamp, 'delete-log_'.$timestamp); ?>" onclick="if ( confirm('<?PHP echo esc_js(__("You are about to delete this Job. \n 'Cancel' to stop, 'OK' to delete.","backwpup")) ?>') ){return true;}return false;"><?PHP _e('Delete','backwpup'); ?></a></span>
91
  <?PHP if (!empty($logvalue['backupfile']) and is_file($logvalue['backupfile'])) { ?>
92
  <span class="download"> | <a href="<?PHP echo wp_nonce_url('admin.php?page=BackWPup&action=download&log='.$timestamp, 'download-backup_'.$timestamp); ?>"><?PHP _e('Download','backwpup'); ?></a></span>
93
  <?PHP } ?>
94
  </div></p>
95
  </td>
96
+ <td class="column-status">
97
+ <strong>
98
+ <?PHP
99
+ if($logvalue['error']>0 or $logvalue['warning']>0) {
100
+ if ($logvalue['error']>0)
101
+ echo '<span style="color:red;">'.$logvalue['error'].' '.__('ERROR(S)','backwpup').'</span>';
102
+ if ($logvalue['warning']>0)
103
+ echo '<span style="color:yellow;">'.$logvalue['warning'].' '.__('WARNING(S)','backwpup').'</span>';
104
+ } else {
105
+ _e('OK','backwpup');
106
+ }
107
+ ?>
108
+ </strong>
109
+ </td>
110
  <td class="column-size">
111
  <?PHP
112
  if (!empty($logvalue['backupfile']) and is_file($logvalue['backupfile'])) {
118
  </td>
119
  <td class="column-logdate">
120
  <?PHP
121
+ echo $logvalue['worktime'].' '.__('sec.','backwpup');
 
122
  ?>
123
  </td>
124
  </tr>
app/options-runnow.php CHANGED
@@ -7,12 +7,10 @@
7
  <li><a href="admin.php?page=BackWPup&amp;action=settings">Settings</a></li>
8
  </ul>
9
  <br class="clear" />
10
- <?PHP $logfile=BackWPupFunctions::dojob(array('jobid'=>$jobid,'returnlogfile'=>true)); ?>
11
  <pre>
12
  <?PHP
13
- $log=file($logfile);
14
- for ($i=0;$i<sizeof($log);$i++) {
15
- echo $log[$i];
16
- }
17
  ?>
18
  </pre>
7
  <li><a href="admin.php?page=BackWPup&amp;action=settings">Settings</a></li>
8
  </ul>
9
  <br class="clear" />
10
+ <?PHP $logtime=BackWPupFunctions::dojob(array('jobid'=>$jobid,'returnlogfile'=>true)); ?>
11
  <pre>
12
  <?PHP
13
+ $logs=get_option('backwpup_log');
14
+ echo $logs[$logtime]['log'];
 
 
15
  ?>
16
  </pre>
app/options-save.php CHANGED
@@ -13,8 +13,6 @@ class BackWPupOptions {
13
 
14
  function delete_log($timestamp) {
15
  $logs=get_option('backwpup_log'); //Load Settings
16
- if (is_file($logs[$timestamp]['logfile']))
17
- unlink($logs[$timestamp]['logfile']);
18
  if (is_file($logs[$timestamp]['backupfile']))
19
  unlink($logs[$timestamp]['backupfile']);
20
  unset($logs[$timestamp]);
@@ -38,7 +36,7 @@ class BackWPupOptions {
38
 
39
  function config() {
40
  $cfg=get_option('backwpup'); //Load Settings
41
- $cfg['tempdir']= untrailingslashit(str_replace('\\','/',stripslashes($_POST['tempdir'])));
42
  update_option('backwpup',$cfg); //Save Settings
43
  }
44
 
13
 
14
  function delete_log($timestamp) {
15
  $logs=get_option('backwpup_log'); //Load Settings
 
 
16
  if (is_file($logs[$timestamp]['backupfile']))
17
  unlink($logs[$timestamp]['backupfile']);
18
  unset($logs[$timestamp]);
36
 
37
  function config() {
38
  $cfg=get_option('backwpup'); //Load Settings
39
+
40
  update_option('backwpup',$cfg); //Save Settings
41
  }
42
 
app/options-settings.php CHANGED
@@ -13,10 +13,7 @@
13
  <?php wp_nonce_field('backwpup-cfg'); ?>
14
 
15
  <table class="form-table">
16
- <tr valign="top">
17
- <th scope="row"><label for="tempdir"><?PHP _e('Temp Directory:','backwpup'); ?></label></th>
18
- <td><input name="tempdir" type="text" value="<?PHP echo $cfg['tempdir'];?>" class="regular-text" /><span class="description"><?PHP _e('Full Phath of Temp Directory','backwpup'); ?></span></td>
19
- </tr>
20
 
21
  </table>
22
 
13
  <?php wp_nonce_field('backwpup-cfg'); ?>
14
 
15
  <table class="form-table">
16
+
 
 
 
17
 
18
  </table>
19
 
app/options-view_log.php CHANGED
@@ -10,9 +10,6 @@
10
 
11
  <pre>
12
  <?PHP
13
- $log=file($logfile);
14
- for ($i=0;$i<sizeof($log);$i++) {
15
- echo $log[$i];
16
- }
17
  ?>
18
  </pre>
10
 
11
  <pre>
12
  <?PHP
13
+ echo $logs[$logtime]['log'];
 
 
 
14
  ?>
15
  </pre>
app/options.php CHANGED
@@ -25,7 +25,7 @@
25
  </div>
26
 
27
  <div class="clear"></div>
28
-
29
  <table class="widefat fixed" cellspacing="0">
30
  <thead>
31
  <tr>
@@ -100,8 +100,8 @@
100
  <?PHP
101
  if ($jobvalue['lastrun']) {
102
  echo date(get_option('date_format'),$jobvalue['lastrun']); ?><br /><?PHP echo date(get_option('time_format'),$jobvalue['lastrun']);
103
- $runtime=$jobvalue['stoptime']-$jobvalue['starttime'];
104
- echo '<br />'.__('Runtime:','backwpup').' '.$runtime.' '.__('sec.','backwpup');
105
  } else {
106
  _e('None','backwpup');
107
  }
25
  </div>
26
 
27
  <div class="clear"></div>
28
+
29
  <table class="widefat fixed" cellspacing="0">
30
  <thead>
31
  <tr>
100
  <?PHP
101
  if ($jobvalue['lastrun']) {
102
  echo date(get_option('date_format'),$jobvalue['lastrun']); ?><br /><?PHP echo date(get_option('time_format'),$jobvalue['lastrun']);
103
+ if (isset($jobvalue['lastruntime']))
104
+ echo '<br />'.__('Runtime:','backwpup').' '.$jobvalue['lastruntime'].' '.__('sec.','backwpup');
105
  } else {
106
  _e('None','backwpup');
107
  }
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&uuml;sken
7
- Version: 0.5.0
8
  Author URI: http://danielhuesken.de
9
  Text Domain: backwpup
10
  Domain Path: /lang/
@@ -38,7 +38,7 @@ Change log:
38
  //Set plugin dirname
39
  define('BACKWPUP_PLUGIN_DIR', dirname(plugin_basename(__FILE__)));
40
  //Set Plugin Version
41
- define('BACKWPUP_VERSION', '0.5.0');
42
 
43
  //Version check
44
  if (version_compare($wp_version, '2.8', '<')) { // Let only Activate on WordPress Version 2.8 or heiger
4
  Plugin URI: http://danielhuesken.de/portfolio/backwpup/
5
  Description: Backup and more of your WordPress Blog Database and Files.
6
  Author: Daniel H&uuml;sken
7
+ Version: 0.5.5
8
  Author URI: http://danielhuesken.de
9
  Text Domain: backwpup
10
  Domain Path: /lang/
38
  //Set plugin dirname
39
  define('BACKWPUP_PLUGIN_DIR', dirname(plugin_basename(__FILE__)));
40
  //Set Plugin Version
41
+ define('BACKWPUP_VERSION', '0.5.5');
42
 
43
  //Version check
44
  if (version_compare($wp_version, '2.8', '<')) { // Let only Activate on WordPress Version 2.8 or heiger
lang/backwpup.pot CHANGED
@@ -8,7 +8,7 @@ msgid ""
8
  msgstr ""
9
  "Project-Id-Version: PACKAGE VERSION\n"
10
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/backwpup\n"
11
- "POT-Creation-Date: 2009-07-05 15:39+0000\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,131 +16,142 @@ msgstr ""
16
  "Content-Type: text/plain; charset=CHARSET\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
 
19
- #: app/dojob/db.php:2
20
- msgid "Run Database Backup..."
21
  msgstr ""
22
 
23
- #: app/dojob/db.php:15
24
- msgid "Tables to Backup: "
25
  msgstr ""
26
 
27
- #: app/dojob/db.php:27
28
- msgid "ERROR:"
 
29
  msgstr ""
30
 
31
- #: app/dojob/db.php:31
32
- msgid "ERROR: No Tables to Backup"
 
33
  msgstr ""
34
 
35
- #: app/dojob/db.php:36
36
- msgid "Database backup done!"
 
37
  msgstr ""
38
 
39
- #: app/dojob/db.php:39
40
- msgid "Create Zip file from dump..."
 
 
 
 
41
  msgstr ""
42
 
43
- #: app/dojob/db.php:43
44
- msgid "ERROR: Database Zip file create:"
45
  msgstr ""
46
 
47
- #: app/dojob/db.php:46
48
- msgid "Zip file created..."
49
  msgstr ""
50
 
51
- #: app/dojob/destination-dir.php:2
52
- msgid "Move Backup Zip file to Backup dir..."
53
  msgstr ""
54
 
55
- #: app/dojob/destination-dir.php:19
56
- msgid "ERROR: Backup Zip file can not moved to Backup dir!!!"
57
  msgstr ""
58
 
59
- #: app/dojob/destination-dir.php:25
60
- msgid "ERROR: Log file file can not moved to Backup dir!!!"
61
  msgstr ""
62
 
63
- #: app/dojob/destination-dir.php:33
64
- msgid "Backup zip file saved to:"
65
  msgstr ""
66
 
67
- #: app/dojob/destination-dir.php:34
68
- msgid "Backup zip filesize is"
69
  msgstr ""
70
 
71
- #: app/dojob/destination-dir.php:36
72
- msgid "Log file saved to:"
73
  msgstr ""
74
 
75
- #: app/dojob/destination-dir.php:39
76
- msgid "Delete old backup files..."
77
  msgstr ""
78
 
79
- #: app/dojob/destination-dir.php:68
80
- msgid "Old backup files deleted!!!"
81
  msgstr ""
82
 
83
- #: app/dojob/destination-dir.php:69 app/dojob/optimize.php:62
84
- msgid "Old Log files deleted!!!"
 
 
 
 
85
  msgstr ""
86
 
87
  #: app/dojob/destination-mail.php:3
88
  msgid "Sendig mail..."
89
  msgstr ""
90
 
91
- #: app/dojob/destination-mail.php:8
92
- msgid "WARNING: Backup Archive too big for sendig by mail"
93
  msgstr ""
94
 
95
- #: app/dojob/destination-mail.php:16
96
  msgid "BackWPup Job:"
97
  msgstr ""
98
 
99
- #: app/dojob/destination-mail.php:17
100
  msgid "Mail send!!!"
101
  msgstr ""
102
 
103
- #: app/dojob/destination-mail.php:19
104
- msgid "ERROR: can not send mail!!!"
105
  msgstr ""
106
 
107
  #: app/dojob/file.php:2
108
  msgid "Run File Backup..."
109
  msgstr ""
110
 
111
- #: app/dojob/file.php:4
112
  msgid "Make File List..."
113
  msgstr ""
114
 
115
- #: app/dojob/file.php:68
116
  msgid "Remove Excludes from file list..."
117
  msgstr ""
118
 
119
- #: app/dojob/file.php:88 app/dojob/file.php:103
120
- msgid "ERROR: No files to Backup"
121
  msgstr ""
122
 
123
- #: app/dojob/file.php:109
124
  msgid "Files to Backup: "
125
  msgstr ""
126
 
127
- #: app/dojob/file.php:110
128
  msgid "Create Backup Zip file..."
129
  msgstr ""
130
 
131
- #: app/dojob/file.php:116
132
- msgid "ERROR: Zip file create:"
133
  msgstr ""
134
 
135
- #: app/dojob/file.php:120
136
  msgid "Add Database dump to Backup Zip file..."
137
  msgstr ""
138
 
139
- #: app/dojob/file.php:122
140
- msgid "ERROR: Zip file create Add Database dump:"
141
  msgstr ""
142
 
143
- #: app/dojob/file.php:129
144
  msgid "Backup Zip file create done!"
145
  msgstr ""
146
 
@@ -154,64 +165,60 @@ msgstr ""
154
 
155
  #: app/dojob/optimize.php:20
156
  #, php-format
157
- msgid "ERROR: BackWPup database error %1$s for query %2$s"
158
  msgstr ""
159
 
160
- #: app/dojob/optimize.php:26
161
  msgid "Database optimize done!"
162
  msgstr ""
163
 
164
- #: app/dojob/optimize.php:28
165
- msgid "ERROR: No Tables to optimize"
166
- msgstr ""
167
-
168
- #: app/dojob/optimize.php:33
169
- msgid "Delete old Log files..."
170
  msgstr ""
171
 
172
  #. #-#-#-#-# plugin.pot (PACKAGE VERSION) #-#-#-#-#
173
  #. Plugin Name of an extension
174
- #: app/functions.php:7 app/options.php:3
175
  msgid "BackWPup"
176
  msgstr ""
177
 
178
- #: app/functions.php:15 app/functions.php:176
179
  msgid "Support"
180
  msgstr ""
181
 
182
- #: app/functions.php:16 app/functions.php:175
183
  msgid "FAQ"
184
  msgstr ""
185
 
186
- #: app/functions.php:17
187
  msgid "Plugin Homepage"
188
  msgstr ""
189
 
190
- #: app/functions.php:18
191
  msgid "Plugin Home on WordPress.org"
192
  msgstr ""
193
 
194
- #: app/functions.php:19 app/functions.php:177
195
  msgid "Donate"
196
  msgstr ""
197
 
198
- #: app/functions.php:22
199
  msgid "Version:"
200
  msgstr ""
201
 
202
- #: app/functions.php:23
203
  msgid "Author:"
204
  msgstr ""
205
 
206
- #: app/functions.php:167
207
  msgid "Go to Settings Page"
208
  msgstr ""
209
 
210
- #: app/functions.php:167 app/options.php:8
211
  msgid "Settings"
212
  msgstr ""
213
 
214
- #: app/functions.php:188
215
  msgid "BackWPup Job "
216
  msgstr ""
217
 
@@ -223,19 +230,19 @@ msgstr ""
223
  msgid "Job Type"
224
  msgstr ""
225
 
226
- #: app/options-edit.php:37 app/options-logs.php:65 app/options.php:73
227
  msgid "Database &amp; File Backup"
228
  msgstr ""
229
 
230
- #: app/options-edit.php:38 app/options-logs.php:68 app/options.php:76
231
  msgid "Database Backup"
232
  msgstr ""
233
 
234
- #: app/options-edit.php:39 app/options-logs.php:71 app/options.php:79
235
  msgid "File Backup"
236
  msgstr ""
237
 
238
- #: app/options-edit.php:40 app/options-logs.php:74 app/options.php:82
239
  msgid "Optimize Database Tabels"
240
  msgstr ""
241
 
@@ -387,7 +394,7 @@ msgstr ""
387
  msgid "Send Mail to"
388
  msgstr ""
389
 
390
- #: app/options-edit.php:177 app/options-settings.php:24
391
  msgid "Save Changes"
392
  msgstr ""
393
 
@@ -395,77 +402,81 @@ msgstr ""
395
  msgid "BackWPup Logs"
396
  msgstr ""
397
 
398
- #: app/options-logs.php:17 app/options-logs.php:117 app/options.php:18
399
  #: app/options.php:118
400
  msgid "Bulk Actions"
401
  msgstr ""
402
 
403
- #: app/options-logs.php:18 app/options-logs.php:88 app/options-logs.php:118
404
  #: app/options.php:19 app/options.php:64 app/options.php:119
405
  msgid "Delete"
406
  msgstr ""
407
 
408
- #: app/options-logs.php:20 app/options-logs.php:120 app/options.php:21
409
  #: app/options.php:121
410
  msgid "Apply"
411
  msgstr ""
412
 
413
- #: app/options-logs.php:32 app/options-logs.php:43
414
  msgid "Job"
415
  msgstr ""
416
 
417
- #: app/options-logs.php:33 app/options-logs.php:44 app/options.php:35
418
  #: app/options.php:46
419
  msgid "Type"
420
  msgstr ""
421
 
422
- #: app/options-logs.php:34 app/options-logs.php:45
423
- msgid "Backup/Log"
424
- msgstr ""
425
-
426
- #: app/options-logs.php:35 app/options-logs.php:46
427
- msgid "Size"
428
  msgstr ""
429
 
430
- #: app/options-logs.php:36 app/options-logs.php:47
431
- msgid "Log Date"
432
  msgstr ""
433
 
434
- #: app/options-logs.php:85
435
- msgid "View log"
436
  msgstr ""
437
 
438
- #: app/options-logs.php:85
439
- msgid "ERROR"
440
  msgstr ""
441
 
442
- #: app/options-logs.php:85
443
- msgid "OK"
444
  msgstr ""
445
 
446
- #: app/options-logs.php:87
447
  msgid "View"
448
  msgstr ""
449
 
450
- #: app/options-logs.php:88 app/options.php:64
451
  msgid ""
452
  "You are about to delete this Job. \n"
453
  " 'Cancel' to stop, 'OK' to delete."
454
  msgstr ""
455
 
456
- #: app/options-logs.php:90
457
  msgid "Download"
458
  msgstr ""
459
 
460
- #: app/options-logs.php:99
461
- msgid "only Log"
462
  msgstr ""
463
 
464
- #: app/options-logs.php:106 app/options.php:104
465
- msgid "Runtime:"
 
 
 
 
 
 
 
 
466
  msgstr ""
467
 
468
- #: app/options-logs.php:106 app/options.php:91 app/options.php:104
469
  msgid "sec."
470
  msgstr ""
471
 
@@ -473,11 +484,11 @@ msgstr ""
473
  msgid "BackWPup Job Running"
474
  msgstr ""
475
 
476
- #: app/options-save.php:34
477
  msgid "Copy of"
478
  msgstr ""
479
 
480
- #: app/options-save.php:60
481
  msgid "File does not exist."
482
  msgstr ""
483
 
@@ -485,14 +496,6 @@ msgstr ""
485
  msgid "BackWPup Settings"
486
  msgstr ""
487
 
488
- #: app/options-settings.php:17
489
- msgid "Temp Directory:"
490
- msgstr ""
491
-
492
- #: app/options-settings.php:18
493
- msgid "Full Phath of Temp Directory"
494
- msgstr ""
495
-
496
  #: app/options-view_log.php:3
497
  msgid "BackWPup View Log"
498
  msgstr ""
@@ -549,6 +552,10 @@ msgstr ""
549
  msgid "Inactive"
550
  msgstr ""
551
 
 
 
 
 
552
  #: app/options.php:106
553
  msgid "None"
554
  msgstr ""
8
  msgstr ""
9
  "Project-Id-Version: PACKAGE VERSION\n"
10
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/backwpup\n"
11
+ "POT-Creation-Date: 2009-07-08 19:12+0000\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
16
  "Content-Type: text/plain; charset=CHARSET\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
 
19
+ #: app/dojob/after.php:4
20
+ msgid "Delete old backup files..."
21
  msgstr ""
22
 
23
+ #: app/dojob/after.php:29
24
+ msgid "Old backup files deleted!!!"
25
  msgstr ""
26
 
27
+ #: app/dojob/after.php:37
28
+ #, php-format
29
+ msgid "Backup zip filesize is %1s"
30
  msgstr ""
31
 
32
+ #: app/dojob/bevore.php:32 app/dojob/destination-mail.php:9
33
+ #: app/functions.php:269
34
+ msgid "WARNING:"
35
  msgstr ""
36
 
37
+ #: app/dojob/bevore.php:32
38
+ #, php-format
39
+ msgid "Safe Mode is on!!! Max exec time is %1$s sec."
40
  msgstr ""
41
 
42
+ #: app/dojob/bevore.php:38 app/dojob/bevore.php:44 app/dojob/bevore.php:66
43
+ #: app/dojob/bevore.php:72 app/dojob/db.php:27
44
+ #: app/dojob/destination-mail.php:11 app/dojob/destination-mail.php:20
45
+ #: app/dojob/file.php:90 app/dojob/file.php:101 app/dojob/file.php:106
46
+ #: app/dojob/optimize.php:20 app/dojob/optimize.php:27 app/functions.php:267
47
+ msgid "ERROR:"
48
  msgstr ""
49
 
50
+ #: app/dojob/bevore.php:38
51
+ msgid "Can not create Temp dir"
52
  msgstr ""
53
 
54
+ #: app/dojob/bevore.php:44
55
+ msgid "Can not write to Temp dir"
56
  msgstr ""
57
 
58
+ #: app/dojob/bevore.php:66
59
+ msgid "Can not create Backup dir"
60
  msgstr ""
61
 
62
+ #: app/dojob/bevore.php:72
63
+ msgid "Can not write to Backup dir"
64
  msgstr ""
65
 
66
+ #: app/dojob/bevore.php:88
67
+ msgid "Backup zip file save to:"
68
  msgstr ""
69
 
70
+ #: app/dojob/db.php:2
71
+ msgid "Run Database Backup..."
72
  msgstr ""
73
 
74
+ #: app/dojob/db.php:15
75
+ msgid "Tables to Backup: "
76
  msgstr ""
77
 
78
+ #: app/dojob/db.php:30
79
+ msgid "ERROR: No Tables to Backup"
80
  msgstr ""
81
 
82
+ #: app/dojob/db.php:34
83
+ msgid "Database backup done!"
84
  msgstr ""
85
 
86
+ #: app/dojob/db.php:37
87
+ msgid "Create Zip file from dump..."
88
  msgstr ""
89
 
90
+ #: app/dojob/db.php:41
91
+ msgid "ERROR: Database Zip file create:"
92
+ msgstr ""
93
+
94
+ #: app/dojob/db.php:44
95
+ msgid "Zip file created..."
96
  msgstr ""
97
 
98
  #: app/dojob/destination-mail.php:3
99
  msgid "Sendig mail..."
100
  msgstr ""
101
 
102
+ #: app/dojob/destination-mail.php:9 app/dojob/destination-mail.php:11
103
+ msgid "Backup Archive too big for sendig by mail"
104
  msgstr ""
105
 
106
+ #: app/dojob/destination-mail.php:17
107
  msgid "BackWPup Job:"
108
  msgstr ""
109
 
110
+ #: app/dojob/destination-mail.php:18
111
  msgid "Mail send!!!"
112
  msgstr ""
113
 
114
+ #: app/dojob/destination-mail.php:20
115
+ msgid "Can not send mail!!!"
116
  msgstr ""
117
 
118
  #: app/dojob/file.php:2
119
  msgid "Run File Backup..."
120
  msgstr ""
121
 
122
+ #: app/dojob/file.php:3
123
  msgid "Make File List..."
124
  msgstr ""
125
 
126
+ #: app/dojob/file.php:52
127
  msgid "Remove Excludes from file list..."
128
  msgstr ""
129
 
130
+ #: app/dojob/file.php:90
131
+ msgid "No files to Backup"
132
  msgstr ""
133
 
134
+ #: app/dojob/file.php:96
135
  msgid "Files to Backup: "
136
  msgstr ""
137
 
138
+ #: app/dojob/file.php:97
139
  msgid "Create Backup Zip file..."
140
  msgstr ""
141
 
142
+ #: app/dojob/file.php:101
143
+ msgid "Zip file create:"
144
  msgstr ""
145
 
146
+ #: app/dojob/file.php:104
147
  msgid "Add Database dump to Backup Zip file..."
148
  msgstr ""
149
 
150
+ #: app/dojob/file.php:106
151
+ msgid "Zip file create Add Database dump:"
152
  msgstr ""
153
 
154
+ #: app/dojob/file.php:112
155
  msgid "Backup Zip file create done!"
156
  msgstr ""
157
 
165
 
166
  #: app/dojob/optimize.php:20
167
  #, php-format
168
+ msgid "BackWPup database error %1$s for query %2$s"
169
  msgstr ""
170
 
171
+ #: app/dojob/optimize.php:25
172
  msgid "Database optimize done!"
173
  msgstr ""
174
 
175
+ #: app/dojob/optimize.php:27
176
+ msgid "No Tables to optimize"
 
 
 
 
177
  msgstr ""
178
 
179
  #. #-#-#-#-# plugin.pot (PACKAGE VERSION) #-#-#-#-#
180
  #. Plugin Name of an extension
181
+ #: app/functions.php:44 app/options.php:3
182
  msgid "BackWPup"
183
  msgstr ""
184
 
185
+ #: app/functions.php:52 app/functions.php:207
186
  msgid "Support"
187
  msgstr ""
188
 
189
+ #: app/functions.php:53 app/functions.php:206
190
  msgid "FAQ"
191
  msgstr ""
192
 
193
+ #: app/functions.php:54
194
  msgid "Plugin Homepage"
195
  msgstr ""
196
 
197
+ #: app/functions.php:55
198
  msgid "Plugin Home on WordPress.org"
199
  msgstr ""
200
 
201
+ #: app/functions.php:56 app/functions.php:208
202
  msgid "Donate"
203
  msgstr ""
204
 
205
+ #: app/functions.php:59
206
  msgid "Version:"
207
  msgstr ""
208
 
209
+ #: app/functions.php:60
210
  msgid "Author:"
211
  msgstr ""
212
 
213
+ #: app/functions.php:198
214
  msgid "Go to Settings Page"
215
  msgstr ""
216
 
217
+ #: app/functions.php:198 app/options.php:8
218
  msgid "Settings"
219
  msgstr ""
220
 
221
+ #: app/functions.php:219
222
  msgid "BackWPup Job "
223
  msgstr ""
224
 
230
  msgid "Job Type"
231
  msgstr ""
232
 
233
+ #: app/options-edit.php:37 app/options-logs.php:67 app/options.php:73
234
  msgid "Database &amp; File Backup"
235
  msgstr ""
236
 
237
+ #: app/options-edit.php:38 app/options-logs.php:70 app/options.php:76
238
  msgid "Database Backup"
239
  msgstr ""
240
 
241
+ #: app/options-edit.php:39 app/options-logs.php:73 app/options.php:79
242
  msgid "File Backup"
243
  msgstr ""
244
 
245
+ #: app/options-edit.php:40 app/options-logs.php:76 app/options.php:82
246
  msgid "Optimize Database Tabels"
247
  msgstr ""
248
 
394
  msgid "Send Mail to"
395
  msgstr ""
396
 
397
+ #: app/options-edit.php:177 app/options-settings.php:21
398
  msgid "Save Changes"
399
  msgstr ""
400
 
402
  msgid "BackWPup Logs"
403
  msgstr ""
404
 
405
+ #: app/options-logs.php:17 app/options-logs.php:132 app/options.php:18
406
  #: app/options.php:118
407
  msgid "Bulk Actions"
408
  msgstr ""
409
 
410
+ #: app/options-logs.php:18 app/options-logs.php:90 app/options-logs.php:133
411
  #: app/options.php:19 app/options.php:64 app/options.php:119
412
  msgid "Delete"
413
  msgstr ""
414
 
415
+ #: app/options-logs.php:20 app/options-logs.php:135 app/options.php:21
416
  #: app/options.php:121
417
  msgid "Apply"
418
  msgstr ""
419
 
420
+ #: app/options-logs.php:32 app/options-logs.php:44
421
  msgid "Job"
422
  msgstr ""
423
 
424
+ #: app/options-logs.php:33 app/options-logs.php:45 app/options.php:35
425
  #: app/options.php:46
426
  msgid "Type"
427
  msgstr ""
428
 
429
+ #: app/options-logs.php:34 app/options-logs.php:46
430
+ msgid "Backup/Log Date/Time"
 
 
 
 
431
  msgstr ""
432
 
433
+ #: app/options-logs.php:35 app/options-logs.php:47
434
+ msgid "Status"
435
  msgstr ""
436
 
437
+ #: app/options-logs.php:36 app/options-logs.php:48
438
+ msgid "Size"
439
  msgstr ""
440
 
441
+ #: app/options-logs.php:37 app/options-logs.php:49
442
+ msgid "Runtime"
443
  msgstr ""
444
 
445
+ #: app/options-logs.php:87
446
+ msgid "View log"
447
  msgstr ""
448
 
449
+ #: app/options-logs.php:89
450
  msgid "View"
451
  msgstr ""
452
 
453
+ #: app/options-logs.php:90 app/options.php:64
454
  msgid ""
455
  "You are about to delete this Job. \n"
456
  " 'Cancel' to stop, 'OK' to delete."
457
  msgstr ""
458
 
459
+ #: app/options-logs.php:92
460
  msgid "Download"
461
  msgstr ""
462
 
463
+ #: app/options-logs.php:101
464
+ msgid "ERROR(S)"
465
  msgstr ""
466
 
467
+ #: app/options-logs.php:103
468
+ msgid "WARNING(S)"
469
+ msgstr ""
470
+
471
+ #: app/options-logs.php:105
472
+ msgid "OK"
473
+ msgstr ""
474
+
475
+ #: app/options-logs.php:115
476
+ msgid "only Log"
477
  msgstr ""
478
 
479
+ #: app/options-logs.php:121 app/options.php:91 app/options.php:104
480
  msgid "sec."
481
  msgstr ""
482
 
484
  msgid "BackWPup Job Running"
485
  msgstr ""
486
 
487
+ #: app/options-save.php:32
488
  msgid "Copy of"
489
  msgstr ""
490
 
491
+ #: app/options-save.php:58
492
  msgid "File does not exist."
493
  msgstr ""
494
 
496
  msgid "BackWPup Settings"
497
  msgstr ""
498
 
 
 
 
 
 
 
 
 
499
  #: app/options-view_log.php:3
500
  msgid "BackWPup View Log"
501
  msgstr ""
552
  msgid "Inactive"
553
  msgstr ""
554
 
555
+ #: app/options.php:104
556
+ msgid "Runtime:"
557
+ msgstr ""
558
+
559
  #: app/options.php:106
560
  msgid "None"
561
  msgstr ""
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
5
  Requires at least: 2.8
6
  Tested up to: 2.8.1
7
- Stable tag: 0.5.0
8
 
9
  Backup and more of your WordPress Blog Database and Files
10
 
@@ -42,3 +42,12 @@ You must import the Database Dump with Charaktercoding:latin1
42
  == Screenshots ==
43
 
44
  1. Job Page
 
 
 
 
 
 
 
 
 
4
  Tags: backup, admin, file, Database, mysql
5
  Requires at least: 2.8
6
  Tested up to: 2.8.1
7
+ Stable tag: 0.5.5
8
 
9
  Backup and more of your WordPress Blog Database and Files
10
 
42
  == Screenshots ==
43
 
44
  1. Job Page
45
+
46
+
47
+ == Changelog ==
48
+
49
+ = 0.5.5 =
50
+ * removed log files. Log now stred in Database
51
+
52
+ = 0.5.0 =
53
+ * Inital rekease