Plugin Directory

Changeset 1194527

Timestamp:
07/08/2015 02:58:20 AM (9 years ago)
Author:
filosofo
Message:

Update to version 2.3.0

Location:
wp-db-backup
Files:
38 added
3 edited

Legend:

Unmodified
Added
Removed
  • wp-db-backup/trunk/README.markdown

    r780080 r1194527  
    66Tags: mysql, database, backup, cron
    77Requires at least: 2.0.3
    8 Tested up to: 3.6.1
    9 Stable tag: 2.2.4
     8Tested up to:
     9Stable tag: 2.
    1010
    1111On-demand backup of your WordPress database.
     
    2121              NO WARRANTY.
    2222
    23     Copyright (c) 2013 Austin Matzko
     23    Copyright (c) 2015 Austin Matzko
     24
     25[Source Code on GitHub](https://github.com/matzko/wp-db-backup)
    2426
    2527Installation
     
    4244
    4345Briefly, use phpMyAdmin, which is included with most hosting control panels. More details and links to further explanations are [here](http://codex.wordpress.org/Restoring_Your_Database_From_Backup).
    44 
    45 Why can't I schedule automatic backups to be saved to my server?
    46 ----------------------------------------------------------------
    47 
    48 Although WP-DB-Backup provides the option of saving the backup file to the server, I strongly discourage anyone from leaving backed-up database files on the server. If the server is not perfectly configured, then someone could gain access to your data, and I do not want to make it easy for that to happen.
    4946
    5047My backup stops or hangs without completing.
     
    9390
    94911. Select how you'd like the backup to be delivered:
    95  * Save to server : this will create a file in /wp-content/backup-*/ for you to retreive later
    9692 * Download to your computer : this will send the backup file to your browser to be downloaded
    9793 * Email : this will email the backup file to the address you specify
     
    107103       See the PHP date() function for details.
    108104
    109 When having the database backup emailed or sent to your browser for immediate download, the backup file will be _deleted_ from the server when the transfer is finished.  Only if you select delivery method "Save to server" will the backup file remain on your server.
    110 
    111    *** SECURITY WARNING ***
    112    Your database backup contains sensitive information,
    113    and should not be left on the server for any extended
    114    period of time.  The "Save to server" delivery method is provided
    115    as a convenience only.  I will not accept any responsibility
    116    if other people obtain your backup file.
    117    *** SECURITY WARNING ***
     105When having the database backup emailed or sent to your browser for immediate download, the backup file will be _deleted_ from the server when the transfer is finished.
    118106
    119107Changelog
    120108---------
     109
     110
     111
     112
     113
     114
     115
     116
     117
    121118
    1221192.2.3 
  • wp-db-backup/trunk/readme.txt

    r780081 r1194527  
    44Tags: mysql, database, backup, cron
    55Requires at least: 2.0.3
    6 Tested up to: 3.6.1
    7 Stable tag: 2.2.4
     6Tested up to:
     7Stable tag: 2.
    88
    99On-demand backup of your WordPress database.
     
    1818              NO WARRANTY.
    1919
    20     Copyright (c) 2013 Austin Matzko
     20    Copyright (c) 2015 Austin Matzko
     21
     22[Source Code on GitHub](https://github.com/matzko/wp-db-backup)
    2123
    2224== Installation ==
     
    3537
    3638Briefly, use phpMyAdmin, which is included with most hosting control panels. More details and links to further explanations are [here](http://codex.wordpress.org/Restoring_Your_Database_From_Backup).
    37 
    38 = Why can't I schedule automatic backups to be saved to my server? =
    39 
    40 Although WP-DB-Backup provides the option of saving the backup file to the server, I strongly discourage anyone from leaving backed-up database files on the server. If the server is not perfectly configured, then someone could gain access to your data, and I do not want to make it easy for that to happen.
    4139
    4240= My backup stops or hangs without completing. =
     
    8078
    81791. Select how you'd like the backup to be delivered:
    82 * Save to server : this will create a file in /wp-content/backup-*/ for you to retreive later
    8380* Download to your computer : this will send the backup file to your browser to be downloaded
    8481* Email : this will email the backup file to the address you specify
     
    9491       See the PHP date() function for details.
    9592
    96 When having the database backup emailed or sent to your browser for immediate download, the backup file will be _deleted_ from the server when the transfer is finished.  Only if you select delivery method "Save to server" will the backup file remain on your server.
    97 
    98    *** SECURITY WARNING ***
    99    Your database backup contains sensitive information,
    100    and should not be left on the server for any extended
    101    period of time.  The "Save to server" delivery method is provided
    102    as a convenience only.  I will not accept any responsibility
    103    if other people obtain your backup file.
    104    *** SECURITY WARNING ***
     93When having the database backup emailed or sent to your browser for immediate download, the backup file will be _deleted_ from the server when the transfer is finished.
    10594
    10695== Changelog ==
     96
     97
     98
     99
     100
     101
     102
    107103
    108104= 2.2.3 =
     
    159155== Past Contributors ==
    160156skippy, Firas, LaughingLizard, MtDewVirus, Podz, Ringmaster
    161 
  • wp-db-backup/trunk/wp-db-backup.php

    r780080 r1194527  
    22/*
    33Plugin Name: WordPress Database Backup
    4 Plugin URI: http://austinmatzko.com/wordpress-plugins/wp-db-backup/
     4Plugin URI: http
    55Description: On-demand backup of your WordPress database. Navigate to <a href="edit.php?page=wp-db-backup">Tools &rarr; Backup</a> to get started.
    66Author: Austin Matzko
    77Author URI: http://austinmatzko.com/
    8 Version: 2.2.4
    9 
    10 Copyright 2013  Austin Matzko  (email : austin at pressedcode.com)
     8Version: 2.
     9
     10Copyright 201  Austin Matzko  (email : austin at pressedcode.com)
    1111
    1212    This program is free software; you can redistribute it and/or modify
     
    2525*/
    2626
    27 /**
    28  * Change WP_BACKUP_DIR if you want to
    29  * use a different backup location
    30  */
    31 
    3227if ( ! defined('ABSPATH') ) {
    3328    die('Please do not load this file directly.');
     
    3530
    3631$rand = substr( md5( md5( DB_PASSWORD ) ), -5 );
    37 global $wpdbb_content_dir, $wpdbb_content_url, $wpdbb_plugin_dir;
     32global $wpdbb_content_dir, $wpdbb_content_url;
    3833$wpdbb_content_dir = ( defined('WP_CONTENT_DIR') ) ? WP_CONTENT_DIR : ABSPATH . 'wp-content';
    3934$wpdbb_content_url = ( defined('WP_CONTENT_URL') ) ? WP_CONTENT_URL : get_option('siteurl') . '/wp-content';
    40 $wpdbb_plugin_dir = ( defined('WP_PLUGIN_DIR') ) ? WP_PLUGIN_DIR : $wpdbb_content_dir . '/plugins';
    41 
    42 if ( ! defined('WP_BACKUP_DIR') ) {
    43     define('WP_BACKUP_DIR', $wpdbb_content_dir . '/backup-' . $rand . '/');
    44 }
    45 
    46 if ( ! defined('WP_BACKUP_URL') ) {
    47     define('WP_BACKUP_URL', $wpdbb_content_url . '/backup-' . $rand . '/');
    48 }
    4935
    5036if ( ! defined('ROWS_PER_SEGMENT') ) {
     
    9076        add_action('init', array(&$this, 'init_textdomain'));
    9177        add_action('init', array(&$this, 'set_page_url'));
    92         add_action('load-update-core.php', array(&$this, 'update_notice_action'));
     78        add_action('', array(&$this, 'update_notice_action'));
    9379        add_action('wp_db_backup_cron', array(&$this, 'cron_backup'));
    9480        add_action('wp_cron_daily', array(&$this, 'wp_cron_daily'));
     
    124110        }
    125111   
    126         $this->backup_dir = trailingslashit(apply_filters('wp_db_b_backup_dir', WP_BACKUP_DIR));
     112        $this->backup_dir = trailingslashit(apply_filters('wp_db_b_backup_dir', ));
    127113        $this->basename = 'wp-db-backup';
    128114   
     
    217203
    218204    /*
    219      * Add a link to back up your database when doing a core upgrade 
     205     * Add a link to back up your database when doing a core upgrade
    220206     */
    221207    function update_notice_action() {
    222         if ( 'upgrade-core' == $_REQUEST['action'] ) :
     208        global $pagenow;
     209        if (
     210            (
     211                isset($_REQUEST['action'])
     212                && ('upgrade-core' == $_REQUEST['action'])
     213            )
     214            || (
     215                !empty($pagenow) && ('update-core.php' == $pagenow)
     216            )
     217        ) :
    223218            ob_start(array(&$this, 'update_notice'));
    224219            add_action('admin_footer', create_function('', 'ob_end_flush();'));
    225220        endif;
    226221    }
    227         function update_notice($text = '') {
    228             $pattern = '#(<a href\="' . __('http://codex.wordpress.org/WordPress_Backups') . '">.*?</p>)#';
    229             $replace = '$1' . "\n<p>" . sprintf(__('Click <a href="%s" target="_blank">here</a> to back up your database using the WordPress Database Backup plugin. <strong>Note:</strong> WordPress Database Backup does <em>not</em> back up your files, just your database.', 'wp-db-backup'), 'tools.php?page=wp-db-backup') . "</p>\n";
    230             $text = preg_replace($pattern, $replace, $text);
    231             return $text;
    232         }
     222   
     223    function update_notice($text = '') {
     224        $pattern = '#(<a href\="' . __('http://codex.wordpress.org/WordPress_Backups') . '">.*?</p>)#';
     225        $replace = '$1' . "\n<p>" . sprintf(__('Click <a href="%s" target="_blank">here</a> to back up your database using the WordPress Database Backup plugin. <strong>Note:</strong> WordPress Database Backup does <em>not</em> back up your files, just your database.', 'wp-db-backup'), 'tools.php?page=wp-db-backup') . "</p>\n";
     226        $text = preg_replace($pattern, $replace, $text);
     227        return $text;
     228    }
    233229
    234230    function build_backup_script() {
     
    272268            function backup(table, segment) {
    273269                var fram = document.getElementById("backuploader");
    274                 fram.src = "' . $this->page_url . '&fragment=" + table + ":" + segment + ":' . $this->backup_filename . ':";
     270                fram.src = "' . $this->page_url . '&fragment=" + table + ":" + segment + ":' . $this->backup_filename . ':";
    275271            }
    276272           
     
    11491145            switch($_POST['deliver']) {
    11501146            case 'http':
    1151                 $feedback .= '<br />' . sprintf(__('Your backup file: <a href="%1s">%2s</a> should begin downloading shortly.','wp-db-backup'), WP_BACKUP_URL . "{$this->backup_file}", $this->backup_file);
     1147                $feedback .= '<br />' . sprintf(__('Your backup file: "{$this->backup_file}", $this->backup_file);
    11521148                break;
    11531149            case 'smtp':
     
    11591155                $feedback = '<br />' . sprintf(__('Your backup has been emailed to %s','wp-db-backup'), $feedback);
    11601156                break;
    1161             case 'none':
    1162                 $feedback .= '<br />' . __('Your backup file has been saved on the server. If you would like to download it now, right click and select "Save As"','wp-db-backup');
    1163                 $feedback .= ':<br /> <a href="' . WP_BACKUP_URL . "$file\">$file</a> : " . sprintf(__('%s bytes','wp-db-backup'), filesize($this->backup_dir . $file));
    11641157            }
    11651158            $feedback .= '</p></div>';
     
    12961289            <p><?php  _e('What to do with the backup file:','wp-db-backup'); ?></p>
    12971290            <ul>
    1298             <li><label for="do_save">
    1299                 <input type="radio" id="do_save" name="deliver" value="none" style="border:none;" />
    1300                 <?php _e('Save to server','wp-db-backup');
    1301                 echo " (<code>" . $this->backup_dir . "</code>)"; ?>
    1302             </label></li>
    13031291            <li><label for="do_download">
    13041292                <input type="radio" checked="checked" id="do_download" name="deliver" value="http" style="border:none;" />
Note: See TracChangeset for help on using the changeset viewer.