Skip to content

Commit

Permalink
Workin on Coding Standards for #11 #12
Browse files Browse the repository at this point in the history
  • Loading branch information
bordoni committed Feb 11, 2014
1 parent 89f3778 commit 11e774e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions stream-reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 11e774e

Please sign in to comment.