Changeset 1174 for trunk/bb-admin/upgrade-functions.php
- Timestamp:
- 03/02/2008 06:34:21 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/bb-admin/upgrade-functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bb-admin/upgrade-functions.php
r1058 r1174 25 25 $bb_upgrade[] = bb_upgrade_1020(); // Add a user_nicename to existing users 26 26 $bb_upgrade[] = bb_upgrade_1030(); // Move admin_email option to from_email 27 $bb_upgrade[] = bb_upgrade_1040(); // Activate Akismet and bozo plugins on upgrade only 27 28 bb_update_db_version(); 28 29 return $bb_upgrade; … … 520 521 } 521 522 523 // Activate Akismet and bozo plugins on upgrade only 524 function bb_upgrade_1040() { 525 if ( ( $dbv = bb_get_option_from_db( 'bb_db_version' ) ) && $dbv >= 1174 ) 526 return; 527 528 // Only do this when upgrading 529 if ( defined( 'BB_UPGRADING' ) && BB_UPGRADING ) { 530 $plugins = bb_get_option('active_plugins') 531 if ( bb_get_option('akismet_key') && !in_array('akismet.php', $plugins) ) { 532 $plugins[] = 'akismet.php'; 533 } 534 if ( !in_array('bozo.php', $plugins) ) { 535 $plugins[] = 'bozo.php'; 536 } 537 ksort($plugins); 538 bb_update_option( 'active_plugins', $plugins ); 539 } 540 541 bb_update_option( 'bb_db_version', 1174 ); 542 } 543 522 544 function bb_deslash($content) { 523 545 // Note: \\\ inside a regex denotes a single backslash.
Note: See TracChangeset
for help on using the changeset viewer.