Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/22/2011 07:32:48 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Prebeta code clean-up - see #3367:

  • Remove PHP4 constructors on loader classes
  • Remove class functions that start with underscores
  • Use require() rather than require_once() where appropriate
  • Remove background color on messages activity time
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-forums/bp-forums-bbpress-sa.php

    r4602 r4775  
    1717    define( 'BB_INC', 'bb-includes/' );
    1818
    19     require_once( BB_PATH . BB_INC . 'class.bb-query.php' );
    20     require_once( BB_PATH . BB_INC . 'class.bb-walker.php' );
    21 
    22     require_once( BB_PATH . BB_INC . 'functions.bb-core.php' );
    23     require_once( BB_PATH . BB_INC . 'functions.bb-forums.php' );
    24     require_once( BB_PATH . BB_INC . 'functions.bb-topics.php' );
    25     require_once( BB_PATH . BB_INC . 'functions.bb-posts.php' );
    26     require_once( BB_PATH . BB_INC . 'functions.bb-topic-tags.php' );
    27     require_once( BB_PATH . BB_INC . 'functions.bb-capabilities.php' );
    28     require_once( BB_PATH . BB_INC . 'functions.bb-meta.php' );
    29     require_once( BB_PATH . BB_INC . 'functions.bb-pluggable.php' );
    30     require_once( BB_PATH . BB_INC . 'functions.bb-formatting.php' );
    31     require_once( BB_PATH . BB_INC . 'functions.bb-template.php' );
    32 
    33     require_once( BACKPRESS_PATH . 'class.wp-taxonomy.php' );
    34     require_once( BB_PATH . BB_INC . 'class.bb-taxonomy.php' );
    35 
    36     require_once( BB_PATH . 'bb-admin/includes/functions.bb-admin.php' );
     19    require( BB_PATH . BB_INC . 'class.bb-query.php' );
     20    require( BB_PATH . BB_INC . 'class.bb-walker.php' );
     21
     22    require( BB_PATH . BB_INC . 'functions.bb-core.php' );
     23    require( BB_PATH . BB_INC . 'functions.bb-forums.php' );
     24    require( BB_PATH . BB_INC . 'functions.bb-topics.php' );
     25    require( BB_PATH . BB_INC . 'functions.bb-posts.php' );
     26    require( BB_PATH . BB_INC . 'functions.bb-topic-tags.php' );
     27    require( BB_PATH . BB_INC . 'functions.bb-capabilities.php' );
     28    require( BB_PATH . BB_INC . 'functions.bb-meta.php' );
     29    require( BB_PATH . BB_INC . 'functions.bb-pluggable.php' );
     30    require( BB_PATH . BB_INC . 'functions.bb-formatting.php' );
     31    require( BB_PATH . BB_INC . 'functions.bb-template.php' );
     32
     33    require( BACKPRESS_PATH . 'class.wp-taxonomy.php' );
     34    require( BB_PATH . BB_INC . 'class.bb-taxonomy.php' );
     35
     36    require( BB_PATH . 'bb-admin/includes/functions.bb-admin.php' );
    3737
    3838    $bb = new stdClass();
    39     require_once( $bp->forums->bbconfig );
     39    require( $bp->forums->bbconfig );
    4040
    4141    // Setup the global database connection
     
    8888    // Check if the tables are installed, if not, install them
    8989    if ( !$tables_installed = (boolean) $bbdb->get_results( 'DESCRIBE `' . $bbdb->forums . '`;', ARRAY_A ) ) {
    90         require_once( BB_PATH . 'bb-admin/includes/defaults.bb-schema.php' );
     90        require( BB_PATH . 'bb-admin/includes/defaults.bb-schema.php' );
    9191
    9292        // Backticks and "IF NOT EXISTS" break the dbDelta function.
    9393        bp_bb_dbDelta( str_replace( ' IF NOT EXISTS', '', str_replace( '`', '', $bb_queries ) ) );
    9494
    95         require_once( BB_PATH . 'bb-admin/includes/functions.bb-upgrade.php' );
     95        require( BB_PATH . 'bb-admin/includes/functions.bb-upgrade.php' );
    9696        bb_update_db_version();
    9797
     
    145145
    146146        $args = func_get_args();
    147         $args = call_user_func_array( array( &$this, '_init' ), $args );
     147        $args = call_user_func_array( array( &$this, 'init' ), $args );
    148148
    149149        if ( $args['host'] )
     
    169169     * Based on, and taken from, the BackPress class in turn taken from the 1.0 branch of bbPress.
    170170     */
    171     function _init( $args )
    172     {
     171    function init( $args ) {
    173172        if ( 4 == func_num_args() ) {
    174173            $args = array(
Note: See TracChangeset for help on using the changeset viewer.