Ticket #1934: wp-db-backup.diff

File wp-db-backup.diff, 1.7 KB (added by skippy, 7 years ago)
  • wp-db-backup.php

     
    1919 
    2020$rand = substr( md5( md5( DB_PASSWORD ) ), -5 ); 
    2121 
    22 define('WP_BACKUP_DIR', 'wp-content/backup-' . $rand); 
     22define('WP_BACKUP_DIR', 'wp-content/backup/' . $rand); 
    2323 
    2424define('ROWS_PER_SEGMENT', 100); 
    2525 
     
    739739                        if ( @ mkdir( ABSPATH . $this->backup_dir) ) { 
    740740                                @ chmod( ABSPATH . $this->backup_dir, $dir_perms); 
    741741                        } else { 
    742                                 echo '<div class="updated error"><p align="center">' . __('WARNING: Your wp-content directory is <strong>NOT</strong> writable! We can not create the backup directory.', 'wp-db-backup') . '<br />' . ABSPATH . "</p></div>"; 
     742                                echo '<div class="updated error"><p align="center">' . __('WARNING: Your <code>/wp-content/backup/</code> directory is <strong>NOT</strong> writable! We cannot create the backup directory:', 'wp-db-backup') . '<br />' . ABSPATH . WP_BACKUP_DIR . "</p></div>"; 
     743                                die(); 
    743744                        $WHOOPS = TRUE; 
    744745                        } 
    745746                } 
    746747                 
    747748                if ( !is_writable( ABSPATH . $this->backup_dir) ) { 
    748                         echo '<div class="updated error"><p align="center">' . __('WARNING: Your backup directory is <strong>NOT</strong> writable! We can not create the backup directory.', 'wp-db-backup') . '<br />' . ABSPATH . "</p></div>"; 
     749                        echo '<div class="updated error"><p align="center">' . __('WARNING: Your backup directory is <strong>NOT</strong> writable! We cannot create the backup directory:', 'wp-db-backup') . '<br />' . ABSPATH . WP_BACKUP_DIR . "</p></div>"; 
    749750                } 
    750751 
    751752                if ( !file_exists( ABSPATH . $this->backup_dir . 'index.php') ) { 
     
    880881 
    881882$mywpdbbackup = new wpdbBackup(); 
    882883 
    883 ?> 
    884  No newline at end of file 
     884?>