Plugin Directory

Changeset 601426


Ignore:
Timestamp:
09/20/2012 05:46:36 AM (14 years ago)
Author:
SangrelX
Message:
 
Location:
wordpress-ez-backup
Files:
54 added
6 edited

Legend:

Unmodified
Added
Removed
  • wordpress-ez-backup/tags/6.0.2/functions/routine/backup.sh

    r601394 r601426  
    11#!/bin/bash
    22#
    3 # fullsitebackup.sh V2.0
     3# fullsitebackup.sh V1.0
    44#
    55dbhost=
  • wordpress-ez-backup/tags/6.0.2/pages/browser.php

    r601394 r601426  
    66        $newfile = $root.'/BackupDownloads/'. $send_file;
    77        $newdir = $root.'/BackupDownloads';
    8         $ppath = get_option('ezbu_plugin');     
    9         delete_directory($newdir); 
     8        $ppath = get_option('ezbu_plugin');
    109       
    1110if (isset($_POST['trash'])) {
     
    3938<form method="post">
    4039<input type="hidden" name="buf" value="<?php echo $path ?>">
     40<input type="hidden" name="download_folder" value="<?php echo $newdir ?>">
    4141<?php
    4242        $dhandle = opendir($path);
     
    6262
    6363{
    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 />';
    6668
    6769}
  • wordpress-ez-backup/tags/6.0.2/pages/functions.php

    r601394 r601426  
    11<?php
     2function 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
    28function ezbu_runbackup(){
    39       $scriptpath = dirname(dirname(__FILE__));
     
    164170}
    165171
    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) {
     172FUNCTION send_file($name,$path,$dir) {
    199173  OB_END_CLEAN ();
    200174  IF (!IS_FILE ($path) or CONNECTION_STATUS ()!=0) RETURN(FALSE);
     
    211185   WHILE(!FEOF ($file) and (CONNECTION_STATUS ()==0)) {
    212186     PRINT (FREAD ($file, 1024*8));
    213      FLUSH ();
     187     FLUSH ();   
    214188   }
    215    FCLOSE ($file);
     189    FCLOSE ($file);
     190    unlink($path);
     191    rmdir($dir);
    216192  }
    217   unlink($path);
    218193  RETURN((CONNECTION_STATUS ()==0) and !CONNECTION_ABORTED ());
    219194}
  • wordpress-ez-backup/tags/6.0.2/pages/main.php

    r601403 r601426  
    1010    $path = get_option('ezbu_root');
    1111    $config = get_option('ezbu_config');
    12     $config_location = ezbu_config_location(); 
     12    $config_location = ezbu_config_location();
    1313?>
    1414
     
    119119    $new_save = $_POST['custom_location'];
    120120    }else{     
    121     $new_save = $path.'/Backups_'.DB_PASSWORD;
     121    $new_save = $path.'/Backups_'.DB_USER;
    122122}
    123123
  • wordpress-ez-backup/trunk/readme.txt

    r601394 r601426  
    66Requires at least: 2.8.2
    77Tested up to: 3.4.2
    8 Stable tag: 7.0.2
     8Stable tag: 7.0.3
    99
    1010Backup & Archive your site & Database all from this easy to use plugin. Many robust features included.
     
    115115
    116116== 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.
    117122
    118123= 7.0.2 =
  • wordpress-ez-backup/trunk/wp-ezbackup.php

    r601404 r601426  
    44Plugin URI: http://lastnightsdesigns.com/wordpress-ez-backup/
    55Description: 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.2
     6Version: 7.0.3
    77Author: Jonathan Garber
    88Author URI: http://lastnightsdesigns.com
     
    3636    $c1 = call_it('EZBUCRON');
    3737    $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}
    5444function ezbu_uninstall() {
    5545   global $wpdb;
     
    114104}
    115105
    116 
     106function 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;}
    117107function ezbu_config_location()
    118108{
     
    195185    }
    196186}
    197 
    198 
    199187function ezbu_updates(){
    200 //version 7.0.0 upgrade routine - ensuring new permissions are set
     188//version 7.0.3 upgrade routine - ensuring new permissions are set
    201189    $chmods = dirname(__FILE__);
    202190    $sh1 = $chmods.''."/logs/errorlog.txt";
    203191    $sh2 = $chmods.''."/logs/log.txt";
    204192    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);
    206194}
    207195
     
    262250        $send_file = $_POST['file'];
    263251        $backupfolder = $_POST['buf'];
     252        $downloadsfolder = $_POST['download_folder'];
    264253        $file = $backupfolder.'/'. $send_file;             
    265254        $root = get_option('ezbu_root');
     
    268257        $newdir = $root.'/BackupDownloads';
    269258        $ppath = get_option('ezbu_plugin');     
    270         delete_directory($newdir); 
    271        
    272259if (isset($_POST['download'])) {
    273260    if (is_dir($newdir)) {
     
    278265    if (file_exists($newfile)) {
    279266            if (!headers_sent($filename, $linenum)) {
    280                 send_file($send_file, $newfile);   
     267                send_file($send_file, $newfile, $downloadsfolder); 
    281268                exit;
    282269            // You would most likely trigger an error here.
     
    291278        if (copy($file, $newfile)) {
    292279            if (!headers_sent($filename, $linenum)) {
    293                 send_file($send_file, $newfile);   
     280                send_file($send_file, $newfile, $downloadsfolder); 
    294281                exit;
    295282            // You would most likely trigger an error here.
Note: See TracChangeset for help on using the changeset viewer.