Changeset 1385
- Timestamp:
- 03/30/2008 10:31:06 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 14 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/class-bb-taxonomy.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/pluggable.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
-
trunk/bb-admin/admin-functions.php
r1358 r1385 120 120 function bb_admin_add_submenu($display_name, $capability, $file_name, $parent = 'plugins.php') 121 121 { 122 global $bb_ menu, $bb_submenu;122 global $bb_submenu; 123 123 if ($display_name && $capability && $file_name) { 124 124 $bb_submenu[$parent][] = array($display_name, $capability, $file_name); … … 621 621 function bb_forum_form( $forum_id = 0 ) { 622 622 $forum_id = (int) $forum_id; 623 if ( $forum_id && ! $forum =get_forum( $forum_id ) )623 if ( $forum_id && !get_forum( $forum_id ) ) 624 624 return; 625 625 $action = $forum_id ? 'update' : 'add'; -
trunk/bb-admin/class-install.php
r1370 r1385 994 994 995 995 // Loop through the sample config and write lines to the new config file 996 foreach ($sample_config as $line _num => $line) {996 foreach ($sample_config as $line) { 997 997 switch (substr($line,0,18)) { 998 998 case "define('BBDB_NAME'": … … 1326 1326 $this->strings[3]['form_errors']['keymaster_user_login'][] = 'userlogin'; 1327 1327 } 1328 $data['keymaster_user_login']['value'] = =sanitize_user($data['keymaster_user_login']['value']);1328 $data['keymaster_user_login']['value'] = sanitize_user($data['keymaster_user_login']['value']); 1329 1329 1330 1330 // bb_verify_email() needs this … … 1524 1524 1525 1525 // Loop through the sample config and write lines to the new config file 1526 foreach ($config as $line _num => $line) {1526 foreach ($config as $line) { 1527 1527 if (substr($line,0,18) == "define('BB_SECRET_") { 1528 1528 $config_lines[] = str_replace("'" . BB_SECRET_KEY . "'", "'" . $data2['wp_secret_key']['value'] . "'", $line); -
trunk/bb-admin/content-forums.php
r1299 r1385 39 39 <div class="ays narrow"> 40 40 <p><big><?php printf(__('Are you sure you want to delete the "<strong>%s</strong>" forum?'), $deleted_forum->forum_name); ?></big></p> 41 <p> This forum contains</p>41 <p><?php _e('This forum contains'); ?></p> 42 42 <ul> 43 43 <li><?php printf(__ngettext('%d topic', '%d topics', $deleted_forum->topics), $deleted_forum->topics); ?></li> -
trunk/bb-admin/export.php
r1192 r1385 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 -
trunk/bb-admin/upgrade-functions.php
r1235 r1385 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(); -
trunk/bb-includes/class-bb-taxonomy.php
r1076 r1385 170 170 $select_this = 't.*, tt.*, tr.object_id'; 171 171 172 $query = "SELECT $select_this FROM {$this->db->terms} AS t INNER JOIN {$this->db->term_taxonomy} AS tt ON tt.term_id = t.term_id INNER JOIN {$this->db->term_relationships} AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ($taxonomies) AND tr.object_id IN ($object_ids)$us r_sql ORDER BY $orderby $order";172 $query = "SELECT $select_this FROM {$this->db->terms} AS t INNER JOIN {$this->db->term_taxonomy} AS tt ON tt.term_id = t.term_id INNER JOIN {$this->db->term_relationships} AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ($taxonomies) AND tr.object_id IN ($object_ids)$user_sql ORDER BY $orderby $order"; 173 173 174 174 if ( 'all' == $fields || 'all_with_object_id' == $fields ) { -
trunk/bb-includes/functions.php
r1381 r1385 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 -
trunk/bb-includes/l10n.php
r1220 r1385 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"; -
trunk/bb-includes/locale.php
r1220 r1385 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 -
trunk/bb-includes/pluggable.php
r1382 r1385 76 76 if ( !function_exists('bb_login') ) : 77 77 function bb_login( $login, $password, $remember = false ) { 78 global $wp_auth_object;79 78 if ( $user = bb_check_login( $login, $password ) ) { 80 79 wp_set_auth_cookie( $user->ID, $remember ); -
trunk/bb-includes/registration-functions.php
r1364 r1385 19 19 '[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'. 20 20 '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email)) { 21 if ( $check_domain &&function_exists('checkdnsrr') ) {21 if ( function_exists('checkdnsrr') ) { 22 22 list (, $domain) = explode('@', $email); 23 23 if ( checkdnsrr($domain . '.', 'MX') || checkdnsrr($domain . '.', 'A') ) { … … 163 163 */ 164 164 function bb_send_pass( $user, $pass ) { 165 global $bbdb;166 165 if ( !$user = bb_get_user( $user ) ) 167 166 return false; -
trunk/bb-includes/template-functions.php
r1376 r1385 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 -
trunk/bb-plugins/akismet.php
r1346 r1385 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> -
trunk/bb-plugins/bozo.php
r1174 r1385 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.