Changeset 1386
- Timestamp:
- 03/30/2008 10:36:13 AM (18 years ago)
- Location:
- branches/0.8
- Files:
-
- 12 edited
-
bb-admin/admin-functions.php (modified) (2 diffs)
-
bb-admin/class-install.php (modified) (3 diffs)
-
bb-admin/content-forums.php (modified) (1 diff)
-
bb-admin/export.php (modified) (3 diffs)
-
bb-admin/upgrade-functions.php (modified) (1 diff)
-
bb-includes/functions.php (modified) (1 diff)
-
bb-includes/l10n.php (modified) (1 diff)
-
bb-includes/locale.php (modified) (1 diff)
-
bb-includes/registration-functions.php (modified) (2 diffs)
-
bb-includes/template-functions.php (modified) (6 diffs)
-
bb-plugins/akismet.php (modified) (2 diffs)
-
bb-plugins/bozo.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.8/bb-admin/admin-functions.php
r1342 r1386 84 84 function bb_admin_add_submenu($display_name, $capability, $file_name, $parent = 'plugins.php') 85 85 { 86 global $bb_ menu, $bb_submenu;86 global $bb_submenu; 87 87 if ($display_name && $capability && $file_name) { 88 88 $bb_submenu[$parent][] = array($display_name, $capability, $file_name); … … 557 557 function bb_forum_form( $forum_id = 0 ) { 558 558 $forum_id = (int) $forum_id; 559 if ( $forum_id && ! $forum =get_forum( $forum_id ) )559 if ( $forum_id && !get_forum( $forum_id ) ) 560 560 return; 561 561 $action = $forum_id ? 'update' : 'add'; -
branches/0.8/bb-admin/class-install.php
r1372 r1386 990 990 991 991 // Loop through the sample config and write lines to the new config file 992 foreach ($sample_config as $line _num => $line) {992 foreach ($sample_config as $line) { 993 993 switch (substr($line,0,18)) { 994 994 case "define('BBDB_NAME'": … … 1322 1322 $this->strings[3]['form_errors']['keymaster_user_login'][] = 'userlogin'; 1323 1323 } 1324 $data['keymaster_user_login']['value'] = =sanitize_user($data['keymaster_user_login']['value']);1324 $data['keymaster_user_login']['value'] = sanitize_user($data['keymaster_user_login']['value']); 1325 1325 1326 1326 // bb_verify_email() needs this … … 1520 1520 1521 1521 // Loop through the sample config and write lines to the new config file 1522 foreach ($config as $line _num => $line) {1522 foreach ($config as $line) { 1523 1523 if (substr($line,0,18) == "define('BB_SECRET_") { 1524 1524 $config_lines[] = str_replace("'" . BB_SECRET_KEY . "'", "'" . $data2['wp_secret_key']['value'] . "'", $line); -
branches/0.8/bb-admin/content-forums.php
r1286 r1386 37 37 <div class="ays narrow"> 38 38 <p><big><?php printf(__('Are you sure you want to delete the "<strong>%s</strong>" forum?'), $deleted_forum->forum_name); ?></big></p> 39 <p> This forum contains</p>39 <p><?php _e('This forum contains'); ?></p> 40 40 <ul> 41 41 <li><?php printf(__ngettext('%d topic', '%d topics', $deleted_forum->topics), $deleted_forum->topics); ?></li> -
branches/0.8/bb-admin/export.php
r1173 r1386 222 222 function bb_export_topic_tags( $r, $topic_id ) { 223 223 global $topic_tag_cache; 224 if ( ! $topic =get_topic( $topic_id ) )224 if ( !get_topic( $topic_id ) ) 225 225 return; 226 226 … … 239 239 function bb_export_topic_posts( $r, $topic_id ) { 240 240 global $bb_post_cache; 241 if ( ! $topic =get_topic( $topic_id ) )241 if ( !get_topic( $topic_id ) ) 242 242 return; 243 243 … … 272 272 $bb_user_cache = array(); // For the sake of memory 273 273 } 274 unset($users, $user _ids, $user_id, $page);274 unset($users, $user, $page); 275 275 } 276 276 -
branches/0.8/bb-admin/upgrade-functions.php
r1236 r1386 429 429 430 430 $bbdb->hide_errors(); 431 if ( !$ ids = $bbdb->get_var("SELECT forum_slug FROM $bbdb->forums ORDER BY forum_order ASC LIMIT 1" ) )431 if ( !$bbdb->get_var("SELECT forum_slug FROM $bbdb->forums ORDER BY forum_order ASC LIMIT 1" ) ) 432 432 return; // Wait till after dbDelta 433 433 $bbdb->show_errors(); -
branches/0.8/bb-includes/functions.php
r1384 r1386 53 53 $branch[$leaf->forum_id] = true; 54 54 $_leaves = false; 55 return $tree = empty($branch) ? false : $branch;55 return ( empty($branch) ? false : $branch ); 56 56 } 57 57 -
branches/0.8/bb-includes/l10n.php
r1221 r1386 67 67 68 68 function load_default_textdomain() { 69 global $l10n;70 71 69 $locale = get_locale(); 72 70 $mofile = BB_LANG_DIR . "$locale.mo"; -
branches/0.8/bb-includes/locale.php
r1221 r1386 113 113 function _load_locale_data() { 114 114 $locale = get_locale(); 115 $locale_file = BB_ PATH . "bb-includes/languages/$locale.php";116 if ( ! file_exists($locale_file) )115 $locale_file = BB_LANG_DIR . $locale . '.php'; 116 if ( !is_file($locale_file) ) 117 117 return; 118 118 -
branches/0.8/bb-includes/registration-functions.php
r1359 r1386 5 5 '[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'. 6 6 '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email)) { 7 if ( $check_domain &&function_exists('checkdnsrr') ) {7 if ( function_exists('checkdnsrr') ) { 8 8 list (, $domain) = explode('@', $email); 9 9 if ( checkdnsrr($domain . '.', 'MX') || checkdnsrr($domain . '.', 'A') ) { … … 86 86 87 87 function bb_send_pass( $user, $pass ) { 88 global $bbdb;89 88 if ( !$user = bb_get_user( $user ) ) 90 89 return false; -
branches/0.8/bb-includes/template-functions.php
r1377 r1386 129 129 130 130 function post_form( $h2 = '' ) { 131 global $ bb, $page, $topic, $forum;131 global $page, $topic, $forum; 132 132 $add = topic_pages_add(); 133 133 if ( empty($h2) && false !== $h2 ) { … … 170 170 171 171 function edit_form() { 172 global $bb_post , $topic_title;172 global $bb_post; 173 173 echo "<form class='postform edit-form' method='post' action='" . bb_get_option('uri') . "bb-edit.php'>\n"; 174 174 echo "<fieldset>\n"; … … 685 685 return false; 686 686 687 if ( $ r = $bb_forums_loop->step() ) {687 if ( $bb_forums_loop->step() ) { 688 688 $GLOBALS['forum'] =& $bb_forums_loop->elements[key($bb_forums_loop->elements)]; // Globalize the current forum object 689 689 } else { … … 796 796 797 797 function topic_posts( $id = 0 ) { 798 echo apply_filters( 'topic_posts', get_topic_posts( $id = 0), get_topic_id( $id ) );798 echo apply_filters( 'topic_posts', get_topic_posts( $id ), get_topic_id( $id ) ); 799 799 } 800 800 … … 893 893 894 894 function get_page_number_links($page, $total) { 895 $r = '';896 895 $args = array(); 897 896 $uri = $_SERVER['REQUEST_URI']; … … 1959 1958 extract($args, EXTR_SKIP); 1960 1959 1961 if ( ! $forums =bb_forums( $args ) )1960 if ( !bb_forums( $args ) ) 1962 1961 return; 1963 1962 -
branches/0.8/bb-plugins/akismet.php
r1346 r1386 80 80 81 81 function bb_akismet_verify_key( $key ) { 82 global $bb_ksd_ pre_post_status, $bb_ksd_api_host, $bb_ksd_api_port;82 global $bb_ksd_api_port; 83 83 $blog = urlencode( bb_get_option('uri') ); 84 84 $response = bb_ksd_http_post("key=$key&blog=$blog", 'rest.akismet.com', '/1.1/verify-key', $bb_ksd_api_port); … … 269 269 270 270 function bb_ksd_admin_page() { 271 global $bb_ current_submenu, $bb_posts, $page;271 global $bb_posts, $page; 272 272 if ( !bb_akismet_verify_key( bb_get_option( 'akismet_key' ) ) ) : ?> 273 273 <div class="error"><p><?php printf(__('The API key you have specified is invalid. Please double check the <strong>Akismet Key</strong> set in <a href="%s">Akismet configuration</a>. If you don\'t have an API key yet, you can get one at <a href="%s">WordPress.com</a>.'), 'admin-base.php?plugin=bb_ksd_configuration_page', 'http://wordpress.com/api-keys/'); ?></p></div> -
branches/0.8/bb-plugins/bozo.php
r1175 r1386 37 37 if ( 1 < $page ) 38 38 $limit = ($limit * ($page - 1)) . ", $limit"; 39 $bozo_mkey = $bbdb->prefix . 'bozo_topics';40 39 $bb_last_countable_query = "SELECT user_id FROM $bbdb->usermeta WHERE meta_key='is_bozo' AND meta_value='1' ORDER BY umeta_id DESC LIMIT $limit"; 41 40 if ( $ids = (array) $bbdb->get_col( $bb_last_countable_query ) ) … … 104 103 endif; 105 104 endforeach; 106 unset($topics, $ t, $i, $counts, $posters, $bozos);105 unset($topics, $i, $counts, $posters, $bozos); 107 106 endif; 108 107 if ( $old ) : … … 234 233 else 235 234 $user->bozo_topics = array($topic_id => 1); 236 bb_update_usermeta( $u id, $bbdb->prefix . 'bozo_topics', $user->bozo_topics );235 bb_update_usermeta( $user_id, $bbdb->prefix . 'bozo_topics', $user->bozo_topics ); 237 236 } 238 237 } … … 255 254 if ( --$user->bozo_topics[$topic_id] < 1 ) 256 255 unset($user->bozo_topics[$topic_id]); 257 bb_update_usermeta( $u id, $bbdb->prefix . 'bozo_topics', $user->bozo_topics );256 bb_update_usermeta( $user_id, $bbdb->prefix . 'bozo_topics', $user->bozo_topics ); 258 257 } 259 258 } 260 259 261 260 function bb_bozo_profile_admin_keys( $a ) { 262 global $user;263 261 $a['is_bozo'] = array( 264 262 0, // Required
Note: See TracChangeset
for help on using the changeset viewer.