Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/13/2012 05:04:53 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Bump default DB version in bp-core-options.php. Use bp_bump_version() where needed. Update activation/deactivation hooks, and prevent activation error from function not existing. Fixes #3967.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/admin/bp-core-update.php

    r5749 r5754  
    11<?php
     2
    23// Exit if accessed directly
    34if ( !defined( 'ABSPATH' ) ) exit;
     
    1920
    2021    function __construct() {
    21 
    22         // Ensure that we have access to some utility functions. Must use require_once()
    23         // because BP Core is loaded during incremental upgrades
    24         require_once( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );
    2522
    2623        // Set/reset the wizard cookie
     
    5552        $steps = array();
    5653
     54        // This is a first time installation
    5755        if ( bp_get_maintenance_mode() == 'install' ) {
    5856            $steps = array(
     
    6462            );
    6563
    66         // Update wizard steps
     64        // This is an update to an existing install
    6765        } else {
    6866
    69             if ( bp_get_db_version_raw() < (int) bp_get_db_version() )
     67            if ( bp_get_db_version_raw() < (int) bp_get_db_version() ) {
    7068                $steps[] = __( 'Database Update', 'buddypress' );
     69            }
    7170
    7271            // New for BP 1.5
     
    7776
    7877            // New for BP 1.6
    79             if ( bp_get_db_version_raw() < 5222 && !defined( 'BP_USE_WP_ADMIN_BAR' ) )
     78            if ( bp_get_db_version_raw() < 5222 && !defined( 'BP_USE_WP_ADMIN_BAR' ) ) {
    8079                $steps[] = __( 'Admin Bar', 'buddypress' );
     80            }
    8181
    8282            $steps[] = __( 'Finish', 'buddypress' );
     
    962962
    963963            // Update the DB version in the database
    964             // Stored in sitemeta. Do not use bp_update_option()
    965             update_blog_option( bp_get_root_blog_id(), '_bp_db_version', bp_get_db_version() );
     964            bp_version_bump();
    966965
    967966            // Delete the setup cookie
Note: See TracChangeset for help on using the changeset viewer.