Changeset 601426
- Timestamp:
- 09/20/2012 05:46:36 AM (14 years ago)
- Location:
- wordpress-ez-backup
- Files:
-
- 54 added
- 6 edited
-
tags/6.0.2/functions/routine/backup.sh (modified) (1 diff)
-
tags/6.0.2/pages/browser.php (modified) (3 diffs)
-
tags/6.0.2/pages/functions.php (modified) (3 diffs)
-
tags/6.0.2/pages/main.php (modified) (2 diffs)
-
tags/7.0.3/7.0.3 (added)
-
tags/7.0.3/7.0.3/functions (added)
-
tags/7.0.3/7.0.3/functions/css (added)
-
tags/7.0.3/7.0.3/functions/css/ezstyle.css (added)
-
tags/7.0.3/7.0.3/functions/css/index.html (added)
-
tags/7.0.3/7.0.3/functions/index.html (added)
-
tags/7.0.3/7.0.3/functions/js (added)
-
tags/7.0.3/7.0.3/functions/js/boxover.js (added)
-
tags/7.0.3/7.0.3/functions/js/index.html (added)
-
tags/7.0.3/7.0.3/functions/js/main.js (added)
-
tags/7.0.3/7.0.3/functions/js/schedule.js (added)
-
tags/7.0.3/7.0.3/functions/js/wpcron.js (added)
-
tags/7.0.3/7.0.3/functions/logs (added)
-
tags/7.0.3/7.0.3/functions/logs/backupstats.php (added)
-
tags/7.0.3/7.0.3/functions/logs/errorlog.php (added)
-
tags/7.0.3/7.0.3/functions/logs/index.html (added)
-
tags/7.0.3/7.0.3/functions/logs/viewlog.php (added)
-
tags/7.0.3/7.0.3/functions/routine (added)
-
tags/7.0.3/7.0.3/functions/routine/backup.sh (added)
-
tags/7.0.3/7.0.3/functions/routine/functions.sh (added)
-
tags/7.0.3/7.0.3/functions/routine/index.html (added)
-
tags/7.0.3/7.0.3/functions/schedule (added)
-
tags/7.0.3/7.0.3/functions/schedule/index.html (added)
-
tags/7.0.3/7.0.3/images (added)
-
tags/7.0.3/7.0.3/images/ezbackup-125x115.png (added)
-
tags/7.0.3/7.0.3/images/greendot.jpg (added)
-
tags/7.0.3/7.0.3/images/index.html (added)
-
tags/7.0.3/7.0.3/images/question.gif (added)
-
tags/7.0.3/7.0.3/images/reddot.jpg (added)
-
tags/7.0.3/7.0.3/index.html (added)
-
tags/7.0.3/7.0.3/logs (added)
-
tags/7.0.3/7.0.3/logs/errorlog.txt (added)
-
tags/7.0.3/7.0.3/logs/index.html (added)
-
tags/7.0.3/7.0.3/logs/log.txt (added)
-
tags/7.0.3/7.0.3/pages (added)
-
tags/7.0.3/7.0.3/pages/activate.php (added)
-
tags/7.0.3/7.0.3/pages/backup.php (added)
-
tags/7.0.3/7.0.3/pages/browser.php (added)
-
tags/7.0.3/7.0.3/pages/cron.php (added)
-
tags/7.0.3/7.0.3/pages/functions.php (added)
-
tags/7.0.3/7.0.3/pages/help.php (added)
-
tags/7.0.3/7.0.3/pages/index.html (added)
-
tags/7.0.3/7.0.3/pages/main.php (added)
-
tags/7.0.3/7.0.3/pages/restore.php (added)
-
tags/7.0.3/7.0.3/pages/wp.php (added)
-
tags/7.0.3/7.0.3/readme.txt (added)
-
tags/7.0.3/7.0.3/screenshot-1.png (added)
-
tags/7.0.3/7.0.3/screenshot-2.png (added)
-
tags/7.0.3/7.0.3/screenshot-3.png (added)
-
tags/7.0.3/7.0.3/screenshot-4.png (added)
-
tags/7.0.3/7.0.3/screenshot-5.png (added)
-
tags/7.0.3/7.0.3/screenshot-6.png (added)
-
tags/7.0.3/7.0.3/screenshot-7.png (added)
-
tags/7.0.3/7.0.3/wp-ezbackup.php (added)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/wp-ezbackup.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wordpress-ez-backup/tags/6.0.2/functions/routine/backup.sh
r601394 r601426 1 1 #!/bin/bash 2 2 # 3 # fullsitebackup.sh V 2.03 # fullsitebackup.sh V1.0 4 4 # 5 5 dbhost= -
wordpress-ez-backup/tags/6.0.2/pages/browser.php
r601394 r601426 6 6 $newfile = $root.'/BackupDownloads/'. $send_file; 7 7 $newdir = $root.'/BackupDownloads'; 8 $ppath = get_option('ezbu_plugin'); 9 delete_directory($newdir); 8 $ppath = get_option('ezbu_plugin'); 10 9 11 10 if (isset($_POST['trash'])) { … … 39 38 <form method="post"> 40 39 <input type="hidden" name="buf" value="<?php echo $path ?>"> 40 <input type="hidden" name="download_folder" value="<?php echo $newdir ?>"> 41 41 <?php 42 42 $dhandle = opendir($path); … … 62 62 63 63 { 64 65 echo "<option>{$fname}</option><br />"; 64 $filesize = filesize($path.'/'.$fname); 65 $filesize = format_bytes($filesize); 66 67 echo '<option value="'.$fname.'">'.$fname.' - '.$filesize.'</option><br />'; 66 68 67 69 } -
wordpress-ez-backup/tags/6.0.2/pages/functions.php
r601394 r601426 1 1 <?php 2 function format_bytes($size) { 3 $units = array(' B', ' KB', ' MB', ' GB', ' TB'); 4 for ($i = 0; $size >= 1024 && $i < 4; $i++) $size /= 1024; 5 return round($size, 2).$units[$i]; 6 } 7 2 8 function ezbu_runbackup(){ 3 9 $scriptpath = dirname(dirname(__FILE__)); … … 164 170 } 165 171 166 function delete_directory($newfile) { 167 168 if (is_dir($newfile)) 169 170 $dir_handle = opendir($newfile); 171 172 if (!$dir_handle) 173 174 return false; 175 176 while($file = readdir($dir_handle)) { 177 178 if ($file != "." && $file != "..") { 179 180 if (!is_dir($newfile."/".$file)) 181 182 unlink($newfile."/".$file); 183 184 else 185 186 delete_directory($newfile.'/'.$file); 187 188 } 189 190 } 191 192 closedir($dir_handle); 193 194 rmdir($newfile); 195 196 return true; 197 } 198 FUNCTION send_file($name,$path) { 172 FUNCTION send_file($name,$path,$dir) { 199 173 OB_END_CLEAN (); 200 174 IF (!IS_FILE ($path) or CONNECTION_STATUS ()!=0) RETURN(FALSE); … … 211 185 WHILE(!FEOF ($file) and (CONNECTION_STATUS ()==0)) { 212 186 PRINT (FREAD ($file, 1024*8)); 213 FLUSH (); 187 FLUSH (); 214 188 } 215 FCLOSE ($file); 189 FCLOSE ($file); 190 unlink($path); 191 rmdir($dir); 216 192 } 217 unlink($path);218 193 RETURN((CONNECTION_STATUS ()==0) and !CONNECTION_ABORTED ()); 219 194 } -
wordpress-ez-backup/tags/6.0.2/pages/main.php
r601403 r601426 10 10 $path = get_option('ezbu_root'); 11 11 $config = get_option('ezbu_config'); 12 $config_location = ezbu_config_location(); 12 $config_location = ezbu_config_location(); 13 13 ?> 14 14 … … 119 119 $new_save = $_POST['custom_location']; 120 120 }else{ 121 $new_save = $path.'/Backups_'.DB_ PASSWORD;121 $new_save = $path.'/Backups_'.DB_USER; 122 122 } 123 123 -
wordpress-ez-backup/trunk/readme.txt
r601394 r601426 6 6 Requires at least: 2.8.2 7 7 Tested up to: 3.4.2 8 Stable tag: 7.0. 28 Stable tag: 7.0.3 9 9 10 10 Backup & Archive your site & Database all from this easy to use plugin. Many robust features included. … … 115 115 116 116 == Changelog == 117 118 = 7.0.3 = 119 *Many changes to the plugin and some of its function. Added a file size display to the browser. changed how parts of the browser work etc. 120 121 *Fixed a lot of bugs I found due to the file path changes sorry guys. 117 122 118 123 = 7.0.2 = -
wordpress-ez-backup/trunk/wp-ezbackup.php
r601404 r601426 4 4 Plugin URI: http://lastnightsdesigns.com/wordpress-ez-backup/ 5 5 Description: Fast Creation of Full Site Backups & Database Backups. Simply adjust your settings & Create your Backup. Features E-mail Alert & E-Mailing Backups, Viewing Live Log files of the backup procedure, Backup Browser & Automated Backups with Scheduling. 6 Version: 7.0. 26 Version: 7.0.3 7 7 Author: Jonathan Garber 8 8 Author URI: http://lastnightsdesigns.com … … 36 36 $c1 = call_it('EZBUCRON'); 37 37 $c2 = call_it('EZBUWP'); 38 $c3 = call_it('EZBUATTACH'); 39 40 $is_sub = ezbu_checksub(get_bloginfo('url')); 41 $config = ezbackup_path(); 42 $plugin = plugin_dir_url('').plugin_basename(dirname(__FILE__)).'/'; 43 update_option('ezbu_config', $config); 44 update_option('ezbu_plugin', $plugin); 45 $root = realpath((getenv('DOCUMENT_ROOT') && ereg('^'.preg_quote(realpath(getenv('DOCUMENT_ROOT'))), realpath(__FILE__))) ? getenv('DOCUMENT_ROOT') : str_replace(dirname(@$_SERVER['PHP_SELF']), '', str_replace(DIRECTORY_SEPARATOR, '/', dirname(__FILE__)))); 46 if ($is_sub){ 47 //$root = dirname($root); 48 update_option('ezbu_root', $root); 49 }else{ 50 update_option('ezbu_root', $root); 51 } 52 } 53 38 $c3 = call_it('EZBUATTACH'); $root = ezbu_load_path(); 39 $config = ezbackup_path(); 40 $plugin = plugin_dir_url('').plugin_basename(dirname(__FILE__)).'/'; 41 update_option('ezbu_config', $config); 42 update_option('ezbu_plugin', $plugin); update_option('ezbu_root', $root); 43 } 54 44 function ezbu_uninstall() { 55 45 global $wpdb; … … 114 104 } 115 105 116 106 function ezbu_load_path(){ $base = dirname(__FILE__); $path = false; if (@file_exists(dirname(dirname($base))."/wp-load.php")){ $path = dirname(dirname($base)); }else if (@file_exists(dirname(dirname(dirname($base)))."/wp-load.php")){ $path = dirname(dirname(dirname($base))); }else if (@file_exists(dirname(dirname(dirname(dirname($base))))."/wp-load.php")){ $path = 'outside'; }else{ $path = false; } if ($path != false) { $path = str_replace("\\", "/", $path); } return $path;} 117 107 function ezbu_config_location() 118 108 { … … 195 185 } 196 186 } 197 198 199 187 function ezbu_updates(){ 200 //version 7.0. 0upgrade routine - ensuring new permissions are set188 //version 7.0.3 upgrade routine - ensuring new permissions are set 201 189 $chmods = dirname(__FILE__); 202 190 $sh1 = $chmods.''."/logs/errorlog.txt"; 203 191 $sh2 = $chmods.''."/logs/log.txt"; 204 192 chmod("$sh1", 0700); 205 chmod("$sh2", 0700); 193 chmod("$sh2", 0700); $root = ezbu_load_path(); $config = ezbackup_path(); $plugin = plugin_dir_url('').plugin_basename(dirname(__FILE__)).'/'; update_option('ezbu_config', $config); update_option('ezbu_plugin', $plugin); update_option('ezbu_root', $root); 206 194 } 207 195 … … 262 250 $send_file = $_POST['file']; 263 251 $backupfolder = $_POST['buf']; 252 $downloadsfolder = $_POST['download_folder']; 264 253 $file = $backupfolder.'/'. $send_file; 265 254 $root = get_option('ezbu_root'); … … 268 257 $newdir = $root.'/BackupDownloads'; 269 258 $ppath = get_option('ezbu_plugin'); 270 delete_directory($newdir);271 272 259 if (isset($_POST['download'])) { 273 260 if (is_dir($newdir)) { … … 278 265 if (file_exists($newfile)) { 279 266 if (!headers_sent($filename, $linenum)) { 280 send_file($send_file, $newfile );267 send_file($send_file, $newfile, $downloadsfolder); 281 268 exit; 282 269 // You would most likely trigger an error here. … … 291 278 if (copy($file, $newfile)) { 292 279 if (!headers_sent($filename, $linenum)) { 293 send_file($send_file, $newfile );280 send_file($send_file, $newfile, $downloadsfolder); 294 281 exit; 295 282 // You would most likely trigger an error here.
Note: See TracChangeset
for help on using the changeset viewer.