From 11e774eca3097752a9066deef0fe70701c10fa2a Mon Sep 17 00:00:00 2001 From: Gustavo Bordoni Date: Tue, 11 Feb 2014 16:54:31 -0200 Subject: [PATCH] Workin on Coding Standards for #11 #12 --- stream-reports.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/stream-reports.php b/stream-reports.php index 7a54459f1..638bc6626 100644 --- a/stream-reports.php +++ b/stream-reports.php @@ -137,14 +137,16 @@ public function register_menu() { public function page() { $view = (object) array( 'slug' => 'all', - 'path' => null + 'path' => null, ); - if ( isset( $_GET['view'] ) && !empty( $_GET['view'] ) ) + if ( isset( $_GET['view'] ) && !empty( $_GET['view'] ) ){ $view->slug = $_GET['view']; + } // First we check if the file exists in our plugin folder, otherwhise give the user an error - if ( !file_exists( WP_STREAM_REPORTS_VIEW_DIR . sanitize_file_name( $view->slug ) . ".php" ) ) + if ( ! file_exists( WP_STREAM_REPORTS_VIEW_DIR . sanitize_file_name( $view->slug ) . ".php" ) ){ $view->slug = 'error'; + } // Define the path for the view we