Skip to:
Content

bbPress.org

Changeset 4565


Ignore:
Timestamp:
12/10/2012 07:05:40 AM (9 years ago)
Author:
johnjamesjacoby
Message:

Code Improvement:

  • Add brackets to some updater functions.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/core/update.php

    r4527 r4565  
    5151 */
    5252function bbp_is_activation( $basename = '' ) {
    53     $bbp = bbpress();
    54 
     53    $bbp    = bbpress();
    5554    $action = false;
    56     if ( ! empty( $_REQUEST['action'] ) && ( '-1' != $_REQUEST['action'] ) )
     55
     56    if ( ! empty( $_REQUEST['action'] ) && ( '-1' != $_REQUEST['action'] ) ) {
    5757        $action = $_REQUEST['action'];
    58     elseif ( ! empty( $_REQUEST['action2'] ) && ( '-1' != $_REQUEST['action2'] ) )
     58    } elseif ( ! empty( $_REQUEST['action2'] ) && ( '-1' != $_REQUEST['action2'] ) ) {
    5959        $action = $_REQUEST['action2'];
     60    }
    6061
    6162    // Bail if not activating
    62     if ( empty( $action ) || !in_array( $action, array( 'activate', 'activate-selected' ) ) )
    63         return false;
     63    if ( empty( $action ) || !in_array( $action, array( 'activate', 'activate-selected' ) ) ) {
     64        return false;
     65    }
    6466
    6567    // The plugin(s) being activated
     
    7173
    7274    // Set basename if empty
    73     if ( empty( $basename ) && !empty( $bbp->basename ) )
     75    if ( empty( $basename ) && !empty( $bbp->basename ) ) {
    7476        $basename = $bbp->basename;
     77    }
    7578
    7679    // Bail if no basename
    77     if ( empty( $basename ) )
    78         return false;
     80    if ( empty( $basename ) ) {
     81        return false;
     82    }
    7983
    8084    // Is bbPress being activated?
     
    8993 */
    9094function bbp_is_deactivation( $basename = '' ) {
    91     $bbp = bbpress();
    92 
     95    $bbp    = bbpress();
    9396    $action = false;
    94     if ( ! empty( $_REQUEST['action'] ) && ( '-1' != $_REQUEST['action'] ) )
     97   
     98    if ( ! empty( $_REQUEST['action'] ) && ( '-1' != $_REQUEST['action'] ) ) {
    9599        $action = $_REQUEST['action'];
    96     elseif ( ! empty( $_REQUEST['action2'] ) && ( '-1' != $_REQUEST['action2'] ) )
     100    } elseif ( ! empty( $_REQUEST['action2'] ) && ( '-1' != $_REQUEST['action2'] ) ) {
    97101        $action = $_REQUEST['action2'];
     102    }
    98103
    99104    // Bail if not deactivating
    100     if ( empty( $action ) || !in_array( $action, array( 'deactivate', 'deactivate-selected' ) ) )
    101         return false;
     105    if ( empty( $action ) || !in_array( $action, array( 'deactivate', 'deactivate-selected' ) ) ) {
     106        return false;
     107    }
    102108
    103109    // The plugin(s) being deactivated
     
    109115
    110116    // Set basename if empty
    111     if ( empty( $basename ) && !empty( $bbp->basename ) )
     117    if ( empty( $basename ) && !empty( $bbp->basename ) ) {
    112118        $basename = $bbp->basename;
     119    }
    113120
    114121    // Bail if no basename
    115     if ( empty( $basename ) )
    116         return false;
     122    if ( empty( $basename ) ) {
     123        return false;
     124    }
    117125
    118126    // Is bbPress being deactivated?
Note: See TracChangeset for help on using the changeset viewer.