Merge pull request #4 from haroldkyle/master

Minor fixes to keep down the log notices
This commit is contained in:
Peter Molnar 2013-04-22 01:55:52 -07:00
commit 345447c5bd
3 changed files with 5 additions and 5 deletions

View file

@ -65,7 +65,7 @@ if (!class_exists('WP_Plugins_Abstract')) {
protected $donation_link;
protected $button_save;
protected $button_delete;
protected $capability = 10;
protected $capability = 'manage_options';
protected $donation_business_name;
protected $donation_item_name;
protected $broadcast_message;

View file

@ -96,14 +96,14 @@ foreach ( $wp_ffpc_keys as $internal => $key ) {
}
/* serve cache 404 status */
if ( $wp_ffpc_values['meta']['status'] == 404 ) {
if ( isset( $wp_ffpc_values['meta']['status'] ) && $wp_ffpc_values['meta']['status'] == 404 ) {
header("HTTP/1.1 404 Not Found");
flush();
die();
}
/* server redirect cache */
if ( $wp_ffpc_values['meta']['redirect'] ) {
if ( isset( $wp_ffpc_values['meta']['redirect'] ) && $wp_ffpc_values['meta']['redirect'] ) {
header('Location: ' . $wp_ffpc_values['meta']['redirect'] );
flush();
die();

View file

@ -264,7 +264,7 @@ if ( ! class_exists( 'WP_FFPC' ) ) {
/**
* if options were saved, display saved message
*/
if (isset($_GET[ self::key_precache ]) && $_GET[ self::key_precache ]=='true' || $this->status == 4) : ?>
if ( ( isset($_GET[ self::key_precache ]) && $_GET[ self::key_precache ]=='true' ) || $this->status == 4) : ?>
<div class='updated settings-error'><p><strong><?php _e( 'Precache process was started, it is now running in the background, please be patient, it may take a very long time to finish.' , $this->plugin_constant ) ?></strong></p></div>
<?php endif;
@ -582,7 +582,7 @@ if ( ! class_exists( 'WP_FFPC' ) ) {
<legend><?php _e( 'Precache', $this->plugin_constant ); ?></legend>
<dl>
<dt>
<?php if ( $_GET[ self::key_precache_disabled ]=='true' || $this->status == 5 || $this->shell_function == false ) : ?>
<?php if ( isset( $_GET[ self::key_precache_disabled ] ) && $_GET[ self::key_precache_disabled ] =='true' || $this->status == 5 || $this->shell_function == false ) : ?>
<strong><?php _e( "Precache functionality is disabled due to unavailable system call function. <br />Since precaching may take a very long time, it's done through a background CLI process in order not to run out of max execution time of PHP. Please enable one of the following functions if you whish to use precaching: " , $this->plugin_constant ) ?><?php echo join( ',' , $this->shell_possibilities ); ?></strong>
<?php else: ?>
<input class="button-secondary" type="submit" name="<?php echo $this->button_precache ?>" id="<?php echo $this->button_precache ?>" value="<?php _e('Pre-cache', $this->plugin_constant ) ?>" />