Changeset 1017
- Timestamp:
- 02/04/2009 12:29:21 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity.php
r974 r1017 36 36 id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, 37 37 item_id int(11) NOT NULL, 38 secondary_item_id int(11) ,38 secondary_item_id int(11) NOT NULL, 39 39 user_id int(11) NOT NULL, 40 40 component_name varchar(75) NOT NULL, … … 52 52 id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, 53 53 item_id int(11) NOT NULL, 54 secondary_item_id int(11) ,54 secondary_item_id int(11) NOT NULL, 55 55 content longtext NOT NULL, 56 56 primary_link varchar(150) NOT NULL, … … 152 152 if ( $bp['current_userid'] ) { 153 153 /* Check to see if the current user has their activity table set up. If not, set them up. */ 154 if ( !$wpdb->get_var(" show tables like'%" . $bp['activity']['table_name_current_user'] . "%'") || get_usermeta( $bp['current_userid'], 'bp-activity-db-version' ) < BP_ACTIVITY_VERSION )154 if ( !$wpdb->get_var("SHOW TABLES LIKE '%" . $bp['activity']['table_name_current_user'] . "%'") || get_usermeta( $bp['current_userid'], 'bp-activity-db-version' ) < BP_ACTIVITY_VERSION ) 155 155 bp_activity_user_install(); 156 156 } … … 158 158 if ( is_site_admin() && $current_blog->blog_id == 1 ) { 159 159 /* Check to see if the site wide activity table is set up. */ 160 if ( !$wpdb->get_var(" show tables like'%" . $bp['activity']['table_name_sitewide'] . "%'") || get_site_option( 'bp-activity-db-version' ) < BP_ACTIVITY_VERSION )160 if ( !$wpdb->get_var("SHOW TABLES LIKE '%" . $bp['activity']['table_name_sitewide'] . "%'") || get_site_option( 'bp-activity-db-version' ) < BP_ACTIVITY_VERSION ) 161 161 bp_activity_sitewide_install(); 162 162 } -
trunk/bp-blogs.php
r974 r1017 110 110 if ( is_site_admin() ) { 111 111 /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */ 112 if ( ( $wpdb->get_var(" show tables like'%" . $bp['blogs']['table_name'] . "%'") == false ) || ( get_site_option('bp-blogs-db-version') < BP_BLOGS_DB_VERSION ) )112 if ( ( $wpdb->get_var("SHOW TABLES LIKE '%" . $bp['blogs']['table_name'] . "%'") == false ) || ( get_site_option('bp-blogs-db-version') < BP_BLOGS_DB_VERSION ) ) 113 113 bp_blogs_install(); 114 114 } -
trunk/bp-core.php
r1012 r1017 55 55 require_once( 'bp-core/bp-core-activation.php' ); 56 56 57 /* Define the slug for member pages and the members directory (e.g. domain.com/[members] ) */57 /* Define the slug for member pages and the members directory (e.g. example.com/[members] ) */ 58 58 define( 'MEMBERS_SLUG', apply_filters( 'bp_members_slug', 'members' ) ); 59 59 … … 103 103 $bp['current_userid'] = $current_userid; 104 104 105 /* The domain for the user currently logged in. eg: http:// domain.com/members/andy */105 /* The domain for the user currently logged in. eg: http://example.com/members/andy */ 106 106 $bp['loggedin_domain'] = bp_core_get_user_domain($current_user->ID); 107 107 … … 109 109 $bp['current_domain'] = bp_core_get_user_domain($current_userid); 110 110 111 /* The component being used eg: http://andy. domain.com/ [profile] */111 /* The component being used eg: http://andy.example.com/ [profile] */ 112 112 $bp['current_component'] = $current_component; // type: string 113 113 114 /* The current action for the component eg: http://andy. domain.com/profile/ [edit] */114 /* The current action for the component eg: http://andy.example.com/profile/ [edit] */ 115 115 $bp['current_action'] = $current_action; // type: string 116 116 117 /* The action variables for the current action eg: http://andy. domain.com/profile/edit/ [group] / [6] */117 /* The action variables for the current action eg: http://andy.example.com/profile/edit/ [group] / [6] */ 118 118 $bp['action_variables'] = $action_variables; // type: array 119 119 120 /* Only used where a component has a sub item, e.g. groups: http://andy. domain.com/groups/ [my-group] / home - manipulated in the actual component not in catch uri code.*/120 /* Only used where a component has a sub item, e.g. groups: http://andy.example.com/groups/ [my-group] / home - manipulated in the actual component not in catch uri code.*/ 121 121 $bp['current_item'] = ''; // type: string 122 122 123 /* The default component to use if none are set and someone visits: http://andy. domain.com/ */123 /* The default component to use if none are set and someone visits: http://andy.example.com/ */ 124 124 $bp['default_component'] = 'profile'; 125 125 … … 197 197 user_id int(11) NOT NULL, 198 198 item_id int(11) NOT NULL, 199 secondary_item_id int(11) ,199 secondary_item_id int(11) NOT NULL, 200 200 component_name varchar(75) NOT NULL, 201 201 component_action varchar(75) NOT NULL, … … 241 241 if ( is_site_admin() ) { 242 242 /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */ 243 if ( ( $wpdb->get_var(" show tables like'%" . $bp['core']['table_name_notifications'] . "%'") == false ) || ( get_site_option('bp-core-db-version') < BP_CORE_DB_VERSION ) )243 if ( ( $wpdb->get_var("SHOW TABLES LIKE '%" . $bp['core']['table_name_notifications'] . "%'") == false ) || ( get_site_option('bp-core-db-version') < BP_CORE_DB_VERSION ) ) 244 244 bp_core_install(); 245 245 } … … 263 263 if ( is_site_admin() ) { 264 264 /* Add the administration tab under the "Site Admin" tab for site administrators */ 265 add_submenu_page( 'wpmu-admin.php', __( "BuddyPress", 'buddypress'), __("BuddyPress", 'buddypress'), 1, "bp_core_admin_settings", "bp_core_admin_settings");265 add_submenu_page( 'wpmu-admin.php', __('BuddyPress', 'buddypress'), __('BuddyPress', 'buddypress'), 1, 'bp_core_admin_settings', 'bp_core_admin_settings' ); 266 266 } 267 267 } … … 272 272 * 273 273 * Checks to see if a component's URL should be in the root, not under a member page: 274 * eg: http:// domain.com/groups/the-group NOT http://domain.com/members/andy/groups/the-group274 * eg: http://example.com/groups/the-group NOT http://example.com/members/andy/groups/the-group 275 275 * 276 276 * @package BuddyPress Core … … 326 326 * 327 327 * Returns the domain for the passed user: 328 * e.g. http:// domain.com/members/andy/328 * e.g. http://example.com/members/andy/ 329 329 * 330 330 * @package BuddyPress Core … … 338 338 if ( !$user_id ) return; 339 339 340 $ud = get_userdata( $user_id);340 $ud = get_userdata( $user_id ); 341 341 342 342 return $bp['root_domain'] . '/' . MEMBERS_SLUG . '/' . $ud->user_login . '/'; … … 347 347 * 348 348 * Returns the domain for the root blog. 349 * eg: http:// domain.com/ OR https://domain.com349 * eg: http://example.com/ OR https://example.com 350 350 * 351 351 * @package BuddyPress Core … … 367 367 * 368 368 * Returns the user id for the user that is currently being viewed. 369 * eg: http://andy. domain.com/ or http://domain.com/andy/369 * eg: http://andy.example.com/ or http://example.com/andy/ 370 370 * 371 371 * @package BuddyPress Core … … 527 527 * 528 528 * Example of a root component: 529 * Groups: http:// domain.com/groups/group-name530 * http://community. domain.com/groups/group-name531 * http:// domain.com/wpmu/groups/group-name529 * Groups: http://example.com/groups/group-name 530 * http://community.example.com/groups/group-name 531 * http://example.com/wpmu/groups/group-name 532 532 * 533 533 * Example of a component that is NOT a root component: 534 * Friends: http:// domain.com/members/andy/friends535 * http://community. domain.com/members/andy/friends536 * http:// domain.com/wpmu/members/andy/friends534 * Friends: http://example.com/members/andy/friends 535 * http://community.example.com/members/andy/friends 536 * http://example.com/wpmu/members/andy/friends 537 537 * 538 538 * @package BuddyPress Core … … 670 670 * 671 671 * Returns a HTML formatted link for a user with the user's full name as the link text. 672 * eg: <a href="http://andy. domain.com/">Andy Peatling</a>672 * eg: <a href="http://andy.example.com/">Andy Peatling</a> 673 673 * Optional parameters will return just the name, or just the URL, or disable "You" text when 674 674 * user matches the logged in user. -
trunk/bp-core/bp-core-catchuri.php
r959 r1017 15 15 * 16 16 * The URI's are broken down as follows: 17 * - http:// domain.com / members / andy / [current_component] / [current_action] / [action_variables] / [action_variables] / ...18 * - OUTSIDE ROOT: http:// domain.com / sites / buddypress / members / andy / [current_component] / [current_action] / [action_variables] / [action_variables] / ...17 * - http:// example.com / members / andy / [current_component] / [current_action] / [action_variables] / [action_variables] / ... 18 * - OUTSIDE ROOT: http:// example.com / sites / buddypress / members / andy / [current_component] / [current_action] / [action_variables] / [action_variables] / ... 19 19 * 20 20 * Example: 21 * - http:// domain.com/members/andy/profile/edit/group/5/21 * - http://example.com/members/andy/profile/edit/group/5/ 22 22 * - $current_component: string 'profile' 23 23 * - $current_action: string 'edit' -
trunk/bp-forums/bp-forums-admin.php
r887 r1017 66 66 <td> 67 67 <input name="target_uri" type="text" id="target_uri" value="<?php echo attribute_escape( $fetch_options['target_uri'] ); ?>" size="60" /><br /> 68 <?php _e( 'The URL of the location you installed bbPress. For example, http:// domain.com/forums/', 'buddypress' ); ?>68 <?php _e( 'The URL of the location you installed bbPress. For example, http://example.com/forums/', 'buddypress' ); ?> 69 69 </td> 70 70 </tr> -
trunk/bp-friends.php
r974 r1017 74 74 if ( is_site_admin() ) { 75 75 /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */ 76 if ( ( $wpdb->get_var(" show tables like'%" . $bp['friends']['table_name'] . "%'") == false ) || ( get_site_option('bp-friends-db-version') < BP_FRIENDS_DB_VERSION ) )76 if ( ( $wpdb->get_var("SHOW TABLES LIKE '%" . $bp['friends']['table_name'] . "%'") == false ) || ( get_site_option('bp-friends-db-version') < BP_FRIENDS_DB_VERSION ) ) 77 77 friends_install(); 78 78 } -
trunk/bp-groups.php
r974 r1017 152 152 if ( is_site_admin() ) { 153 153 /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */ 154 if ( ( $wpdb->get_var(" show tables like'%" . $bp['groups']['table_name'] . "%'") == false ) || ( get_site_option('bp-groups-db-version') < BP_GROUPS_DB_VERSION ) )154 if ( ( $wpdb->get_var("SHOW TABLES LIKE '%" . $bp['groups']['table_name'] . "%'") == false ) || ( get_site_option('bp-groups-db-version') < BP_GROUPS_DB_VERSION ) ) 155 155 groups_install(); 156 156 157 if ( ( function_exists('bp_wire_install') && $wpdb->get_var(" show tables like'%" . $bp['groups']['table_name_wire'] . "%'") == false ) || ( get_site_option('bp-groups-db-version') < BP_GROUPS_DB_VERSION ) )157 if ( ( function_exists('bp_wire_install') && $wpdb->get_var("SHOW TABLES LIKE '%" . $bp['groups']['table_name_wire'] . "%'") == false ) || ( get_site_option('bp-groups-db-version') < BP_GROUPS_DB_VERSION ) ) 158 158 groups_wire_install(); 159 159 } -
trunk/bp-messages.php
r974 r1017 126 126 if ( is_site_admin() ) { 127 127 /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */ 128 if ( ( $wpdb->get_var( " show tables like'%" . $bp['messages']['table_name'] . "%'" ) == false ) || ( get_site_option('bp-messages-db-version') < BP_MESSAGES_DB_VERSION ) )128 if ( ( $wpdb->get_var( "SHOW TABLES LIKE '%" . $bp['messages']['table_name'] . "%'" ) == false ) || ( get_site_option('bp-messages-db-version') < BP_MESSAGES_DB_VERSION ) ) 129 129 messages_install(); 130 130 } -
trunk/bp-xprofile.php
r974 r1017 182 182 global $wpdb, $bp; 183 183 184 if ( is_site_admin() ) { 185 wp_enqueue_script( 'jquery.tablednd', site_url( MUPLUGINDIR . '/bp-core/js/jquery/jquery.tablednd.js' ), array( 'jquery' ), '0.4' ); 186 187 /* Add the administration tab under the "Site Admin" tab for site administrators */ 188 add_submenu_page( 'wpmu-admin.php', __("Profile Fields", 'buddypress'), __("Profile Fields", 'buddypress'), 1, "xprofile_settings", "xprofile_admin" ); 189 190 /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */ 191 if ( ( $wpdb->get_var("show tables like '%" . $bp['profile']['table_name_groups'] . "%'") == false ) || ( get_site_option('bp-xprofile-db-version') < BP_XPROFILE_DB_VERSION ) ) 192 xprofile_install(); 193 194 if ( ( function_exists('bp_wire_install') && $wpdb->get_var("show tables like '%" . $bp['profile']['table_name_wire'] . "%'") == false ) || ( get_site_option('bp-xprofile-db-version') < BP_XPROFILE_DB_VERSION ) ) 195 xprofile_wire_install(); 196 } 184 if ( !is_site_admin() ) 185 return false; 186 187 /* Add the administration tab under the "Site Admin" tab for site administrators */ 188 add_submenu_page( 'wpmu-admin.php', __("Profile Fields", 'buddypress'), __("Profile Fields", 'buddypress'), 1, "xprofile_settings", "xprofile_admin" ); 189 190 /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */ 191 if ( ( $wpdb->get_var("SHOW TABLES LIKE '%" . $bp['profile']['table_name_groups'] . "%'") == false ) || ( get_site_option('bp-xprofile-db-version') < BP_XPROFILE_DB_VERSION ) ) 192 xprofile_install(); 193 194 if ( ( function_exists('bp_wire_install') && $wpdb->get_var("SHOW TABLES LIKE '%" . $bp['profile']['table_name_wire'] . "%'") == false ) || ( get_site_option('bp-xprofile-db-version') < BP_XPROFILE_DB_VERSION ) ) 195 xprofile_wire_install(); 197 196 } 198 197 add_action( 'admin_menu', 'xprofile_add_admin_menu' ); … … 334 333 * 335 334 * This function runs when an action is set for a screen: 336 * domain.com/members/andy/profile/change-avatar/ [delete-avatar]335 * example.com/members/andy/profile/change-avatar/ [delete-avatar] 337 336 * 338 337 * The function will delete the active avatar for a user. … … 347 346 global $bp; 348 347 349 if ( $bp['current_action'] != 'delete-avatar')348 if ( 'delete-avatar' != $bp['current_action'] ) 350 349 return false; 351 350 … … 375 374 return false; 376 375 377 if ( $bp['current_action'] != 'post')376 if ( 'post' != $bp['current_action'] ) 378 377 return false; 379 378 … … 381 380 bp_core_add_message( __('Wire message could not be posted. Please try again.', 'buddypress'), 'error' ); 382 381 } else { 383 bp_core_add_message( __('Wire message successfully posted.', 'buddypress' ) );384 382 bp_core_add_message( __('Wire message successfully posted.', 'buddypress' ) ); 383 385 384 do_action( 'xprofile_new_wire_post', $wire_post_id ); 386 385 } -
trunk/bp-xprofile/bp-xprofile-admin.php
r850 r1017 11 11 function xprofile_admin( $message = '', $type = 'error' ) { 12 12 global $bp; 13 13 14 $type = preg_replace( '|[^a-z]|i', '', $type ); 15 14 16 $groups = BP_XProfile_Group::get_all(); 15 17 16 18 if ( isset($_GET['mode']) && isset($_GET['group_id']) && $_GET['mode'] == "add_field" ) { 17 19 xprofile_admin_manage_field($_GET['group_id']); … … 45 47 ?> 46 48 <div id="message" class="<?php echo $type; ?> fade"> 47 <p><?php echo $message; ?></p>49 <p><?php echo wp_specialchars( $message ); ?></p> 48 50 </div> 49 51 <?php } … … 63 65 </script> 64 66 65 <?php if ( function_exists('wp_nonce_field') )66 67 68 for ( $i = 0; $i < count($groups); $i++ ) { 67 <?php 68 wp_nonce_field('xprofile_reorder_fields'); 69 70 for ( $i = 0; $i < count($groups); $i++ ) { // TODO: foreach 69 71 ?> 70 72 <p> … … 121 123 122 124 <?php } else { ?> 123 <div id="message" class="error"><p> You have no groups.</p></div>125 <div id="message" class="error"><p><?php _e('You have no groups.', 'buddypress' ); ?></p></div> 124 126 <p><a href="admin.php?page=xprofile_settings&mode=add_group"><?php _e( 'Add New Group', 'buddypress' ) ?></a></p> 125 127 <?php } ?> … … 184 186 } 185 187 186 unset($_GET['mode']); 188 unset($_GET['mode']); // TODO: wtf? 187 189 xprofile_admin( $message, $type ); 188 190 } … … 261 263 xprofile_admin($message, $type); 262 264 } 263 264 ?>
Note: See TracChangeset
for help on using the changeset viewer.