Plugin Directory

Changeset 548002


Ignore:
Timestamp:
05/23/2012 11:56:08 AM (13 years ago)
Author:
hel.io
Message:

fixed download button showing up when there was no local backup available

File:
1 edited

Legend:

Unmodified
Added
Removed
  • backup/trunk/backup.php

    r547983 r548002  
    158158                            if ( $options['last_backup'] ) {
    159159                                echo '<strong>' . date( __( "M j, Y \a\\t H:i:s", 'backup' ), $options['last_backup'] ) . '</strong><br/><br/>';
    160                                 ?><a class="button-secondary" title="<?php _e( 'Download most recent backup', 'backup'); ?>" href="<?php echo WP_CONTENT_URL . substr( end( $options['local_files'] ), strlen( WP_CONTENT_DIR ) ); ?>">Download backup</a><?php
     160                                if ( $options['local_number'] > 0 ) {
     161                                    ?><a class="button-secondary" title="<?php _e( 'Download most recent backup', 'backup'); ?>" href="<?php echo WP_CONTENT_URL . substr( end( $options['local_files'] ), strlen( WP_CONTENT_DIR ) ); ?>">Download backup</a><?php
     162                                }
    161163                            }
    162164                            else {
Note: See TracChangeset for help on using the changeset viewer.