Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/22/2008 07:31:37 PM (19 years ago)
Author:
sambauers
Message:

Deprecate "admin_email" function. Introduce new "from_email" function that actually does something.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bb-admin/upgrade-functions.php

    r1053 r1058  
    2424        $bb_upgrade[] = bb_upgrade_1010(); // Make sure all forums have a valid parent
    2525        $bb_upgrade[] = bb_upgrade_1020(); // Add a user_nicename to existing users
     26        $bb_upgrade[] = bb_upgrade_1030(); // Move admin_email option to from_email
    2627        bb_update_db_version();
    2728        return $bb_upgrade;
    … …  
    503504}
    504505
     506// Move admin_email option to from_email
     507function bb_upgrade_1030() {
     508        if ( ( $dbv = bb_get_option_from_db( 'bb_db_version' ) ) && $dbv >= 1058 )
     509                return;
     510       
     511        $admin_email = bb_get_option('admin_email');
     512        if ($admin_email) {
     513                bb_update_option('from_email', $admin_email);
     514        }
     515        bb_delete_option('admin_email');
     516       
     517        bb_update_option( 'bb_db_version', 1058 );
     518       
     519        return 'Done moving admin_email to from_email: ' . __FUNCTION__;
     520}
     521
    505522function bb_deslash($content) {
    506523    // Note: \\\ inside a regex denotes a single backslash.
Note: See TracChangeset for help on using the changeset viewer.