Changeset 12752 for trunk/wp-admin/ms-sites.php
- Timestamp:
- 01/18/2010 08:34:48 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/ms-sites.php
r12733 r12752 96 96 <th scope="row"><?php _e('Path') ?></th> 97 97 <td><input name="blog[path]" type="text" id="path" value="<?php echo esc_attr($details['path']) ?>" size="40" style='margin-bottom:5px;' /> 98 <br /><input type='checkbox' style='width:20px;' name='update_home_url' value='update' <?php if ( get_blog_option( $id, 'siteurl' ) == preg_replace('|/+$|', '', 'http://' . $details['domain'] . $details['path']) || get_blog_option( $id, 'home' ) == preg_replace('|/+$|', '', 'http://' . $details['domain'] . $details['path']) ) echo 'checked="checked"'; ?> /> <?php _e( "Update 'siteurl' and 'home' as well." ); ?></td>98 <br /><input type='checkbox' style='width:20px;' name='update_home_url' value='update' <?php if ( get_blog_option( $id, 'siteurl' ) == preg_replace('|/+$|', '', 'http://' . $details['domain'] . $details['path']) || get_blog_option( $id, 'home' ) == preg_replace('|/+$|', '', 'http://' . $details['domain'] . $details['path']) ) echo 'checked="checked"'; ?> /> <?php _e( "Update 'siteurl' and 'home' as well." ); ?></td> 99 99 </tr> 100 100 <tr class="form-field"> … … 109 109 <th scope="row"><?php _e('Public') ?></th> 110 110 <td> 111 <input type='radio' style='width:20px;' name='blog[public]' value='1' <?php if ( $details['public'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?>112 <input type='radio' style='width:20px;' name='blog[public]' value='0' <?php if ( $details['public'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?>111 <input type='radio' style='width:20px;' name='blog[public]' value='1' <?php if ( $details['public'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?> 112 <input type='radio' style='width:20px;' name='blog[public]' value='0' <?php if ( $details['public'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?> 113 113 </td> 114 114 </tr> … … 116 116 <th scope="row"><?php _e( 'Archived' ); ?></th> 117 117 <td> 118 <input type='radio' style='width:20px;' name='blog[archived]' value='1' <?php if ( $details['archived'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?>119 <input type='radio' style='width:20px;' name='blog[archived]' value='0' <?php if ( $details['archived'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?>118 <input type='radio' style='width:20px;' name='blog[archived]' value='1' <?php if ( $details['archived'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?> 119 <input type='radio' style='width:20px;' name='blog[archived]' value='0' <?php if ( $details['archived'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?> 120 120 </td> 121 121 </tr> … … 123 123 <th scope="row"><?php _e( 'Mature' ); ?></th> 124 124 <td> 125 <input type='radio' style='width:20px;' name='blog[mature]' value='1' <?php if ( $details['mature'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?>126 <input type='radio' style='width:20px;' name='blog[mature]' value='0' <?php if ( $details['mature'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?>125 <input type='radio' style='width:20px;' name='blog[mature]' value='1' <?php if ( $details['mature'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?> 126 <input type='radio' style='width:20px;' name='blog[mature]' value='0' <?php if ( $details['mature'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?> 127 127 </td> 128 128 </tr> … … 130 130 <th scope="row"><?php _e( 'Spam' ); ?></th> 131 131 <td> 132 <input type='radio' style='width:20px;' name='blog[spam]' value='1' <?php if ( $details['spam'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?>133 <input type='radio' style='width:20px;' name='blog[spam]' value='0' <?php if ( $details['spam'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?>132 <input type='radio' style='width:20px;' name='blog[spam]' value='1' <?php if ( $details['spam'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?> 133 <input type='radio' style='width:20px;' name='blog[spam]' value='0' <?php if ( $details['spam'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?> 134 134 </td> 135 135 </tr> … … 137 137 <th scope="row"><?php _e( 'Deleted' ); ?></th> 138 138 <td> 139 <input type='radio' style='width:20px;' name='blog[deleted]' value='1' <?php if ( $details['deleted'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?>140 <input type='radio' style='width:20px;' name='blog[deleted]' value='0' <?php if ( $details['deleted'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?>139 <input type='radio' style='width:20px;' name='blog[deleted]' value='1' <?php if ( $details['deleted'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?> 140 <input type='radio' style='width:20px;' name='blog[deleted]' value='0' <?php if ( $details['deleted'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?> 141 141 </td> 142 142 </tr> … … 152 152 $editblog_default_role = 'subscriber'; 153 153 foreach ( $options as $key => $val ) { 154 if ( $val['option_name'] == 'default_role' ) {154 if ( $val['option_name'] == 'default_role' ) { 155 155 $editblog_default_role = $val['option_value']; 156 156 } … … 192 192 $blog_allowed_themes = wpmu_get_blog_allowedthemes( $id ); 193 193 $allowed_themes = get_site_option( "allowedthemes" ); 194 if ( $allowed_themes == false ) {194 if ( $allowed_themes == false ) { 195 195 $allowed_themes = array_keys( $themes ); 196 196 } … … 198 198 foreach( $themes as $key => $theme ) { 199 199 $theme_key = wp_specialchars( $theme['Stylesheet'] ); 200 if ( isset($allowed_themes[$theme_key] ) == false ) {200 if ( isset($allowed_themes[$theme_key] ) == false ) { 201 201 $checked = ( isset($blog_allowed_themes[ $theme_key ]) ) ? 'checked="checked"' : ''; 202 202 $out .= '<tr class="form-field form-required"> … … 223 223 // Blog users 224 224 $blogusers = get_users_of_blog( $id ); 225 if ( is_array( $blogusers ) ) {225 if ( is_array( $blogusers ) ) { 226 226 echo '<div id="blogedit_blogusers" class="postbox"><h3 class="hndle"><span>' . __('Blog Users') . '</span></h3><div class="inside">'; 227 227 echo '<table class="form-table">'; … … 230 230 foreach ( (array) $blogusers as $key => $val ) { 231 231 $t = @unserialize( $val->meta_value ); 232 if ( is_array( $t ) ) {232 if ( is_array( $t ) ) { 233 233 reset( $t ); 234 234 $existing_role = key( $t ); 235 235 } 236 236 echo '<tr><td><a href="user-edit.php?user_id=' . $val->user_id . '">' . $val->user_login . '</a></td>'; 237 if ( $val->user_id != $current_user->data->ID ) {237 if ( $val->user_id != $current_user->data->ID ) { 238 238 ?> 239 239 <td> … … 317 317 $query = "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' "; 318 318 319 if ( isset($_GET['blog_name']) ) {319 if ( isset($_GET['blog_name']) ) { 320 320 $query .= " AND ( {$wpdb->blogs}.domain LIKE '%{$like_s}%' OR {$wpdb->blogs}.path LIKE '%{$like_s}%' ) "; 321 } elseif ( isset($_GET['blog_id']) ) {321 } elseif ( isset($_GET['blog_id']) ) { 322 322 $query .= " AND blog_id = '". absint( $_GET['blog_id'] )."' "; 323 } elseif ( isset($_GET['blog_ip']) ) {323 } elseif ( isset($_GET['blog_ip']) ) { 324 324 $query = "SELECT * 325 325 FROM {$wpdb->blogs}, {$wpdb->registration_log} … … 329 329 } 330 330 331 if ( isset( $_GET['sortby'] ) == false ) {331 if ( isset( $_GET['sortby'] ) == false ) { 332 332 $_GET['sortby'] = 'id'; 333 333 } 334 334 335 if ( $_GET['sortby'] == 'registered' ) {335 if ( $_GET['sortby'] == 'registered' ) { 336 336 $query .= ' ORDER BY registered '; 337 } elseif ( $_GET['sortby'] == 'id' ) {337 } elseif ( $_GET['sortby'] == 'id' ) { 338 338 $query .= ' ORDER BY ' . $wpdb->blogs . '.blog_id '; 339 } elseif ( $_GET['sortby'] == 'lastupdated' ) {339 } elseif ( $_GET['sortby'] == 'lastupdated' ) { 340 340 $query .= ' ORDER BY last_updated '; 341 } elseif ( $_GET['sortby'] == 'blogname' ) {341 } elseif ( $_GET['sortby'] == 'blogname' ) { 342 342 $query .= ' ORDER BY domain '; 343 343 } … … 345 345 $query .= ( $_GET['order'] == 'DESC' ) ? 'DESC' : 'ASC'; 346 346 347 if ( !empty($s) ) {347 if ( !empty($s) ) { 348 348 $total = $wpdb->get_var( str_replace('SELECT *', 'SELECT COUNT(blog_id)', $query) ); 349 349 } else { … … 356 356 // Pagination 357 357 $url2 = "&order=" . $_GET['order'] . "&sortby=" . $_GET['sortby'] . "&s="; 358 if ( $_GET[ 'blog_ip' ] ) {358 if ( $_GET[ 'blog_ip' ] ) { 359 359 $url2 .= "&ip_address=" . urlencode( $s ); 360 360 } else { … … 396 396 <br class="clear" /> 397 397 398 <?php if ( isset($_GET['s']) && !empty($_GET['s']) ) : ?>398 <?php if ( isset($_GET['s']) && !empty($_GET['s']) ) : ?> 399 399 <p><a href="ms-users.php?action=users&s=<?php echo urlencode( stripslashes( $s ) ) ?>"><?php _e('Search Users:') ?> <strong><?php echo stripslashes( $s ); ?></strong></a></p> 400 400 <?php endif; ?> … … 411 411 ); 412 412 413 if ( has_filter( 'wpmublogsaction' ) )413 if ( has_filter( 'wpmublogsaction' ) ) 414 414 $posts_columns['plugins'] = __('Actions'); 415 415 … … 417 417 418 418 $sortby_url = "s="; 419 if ( $_GET[ 'blog_ip' ] ) {419 if ( $_GET[ 'blog_ip' ] ) { 420 420 $sortby_url .= "&ip_address=" . urlencode( $s ); 421 421 } else { … … 430 430 <?php foreach($posts_columns as $column_id => $column_display_name) { 431 431 $column_link = "<a href='ms-sites.php?{$sortby_url}&sortby={$column_id}&"; 432 if ( $_GET['sortby'] == $column_id ) {432 if ( $_GET['sortby'] == $column_id ) { 433 433 $column_link .= $_GET[ 'order' ] == 'DESC' ? 'order=ASC&' : 'order=DESC&'; 434 434 } … … 452 452 $bgcolour = ""; 453 453 foreach ( $status_list as $status => $col ) { 454 if ( get_blog_status( $blog['blog_id'], $status ) == 1 ) {454 if ( get_blog_status( $blog['blog_id'], $status ) == 1 ) { 455 455 $bgcolour = "style='background: $col'"; 456 456 } … … 480 480 $controlActions[] = "<a href='{$protocol}{$blog['domain']}{$blog['path']}wp-admin/' class='edit'>" . __('Backend') . '</a>'; 481 481 482 if ( get_blog_status( $blog['blog_id'], "deleted" ) == '1' )482 if ( get_blog_status( $blog['blog_id'], "deleted" ) == '1' ) 483 483 $controlActions[] = '<a class="delete" href="ms-edit.php?action=confirm&action2=activateblog&ref=' . urlencode( $_SERVER['REQUEST_URI'] ) . '&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to activate the blog %s" ), $blogname ) ) . '">' . __('Activate') . '</a>'; 484 484 else 485 485 $controlActions[] = '<a class="delete" href="ms-edit.php?action=confirm&action2=deactivateblog&ref=' . urlencode( $_SERVER['REQUEST_URI'] ) . '&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to deactivate the blog %s" ), $blogname ) ) . '">' . __('Deactivate') . '</a>'; 486 486 487 if ( get_blog_status( $blog['blog_id'], "archived" ) == '1' )487 if ( get_blog_status( $blog['blog_id'], "archived" ) == '1' ) 488 488 $controlActions[] = '<a class="delete" href="ms-edit.php?action=confirm&action2=unarchiveblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to unarchive the blog %s" ), $blogname ) ) . '">' . __('Unarchive') . '</a>'; 489 489 else 490 490 $controlActions[] = '<a class="delete" href="ms-edit.php?action=confirm&action2=archiveblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to archive the blog %s" ), $blogname ) ) . '">' . __('Archive') . '</a>'; 491 491 492 if ( get_blog_status( $blog['blog_id'], "spam" ) == '1' )492 if ( get_blog_status( $blog['blog_id'], "spam" ) == '1' ) 493 493 $controlActions[] = '<a class="delete" href="ms-edit.php?action=confirm&action2=unspamblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to unspam the blog %s" ), $blogname ) ) . '">' . __('Not Spam') . '</a>'; 494 494 else … … 535 535 echo '<a href="user-edit.php?user_id=' . $val->user_id . '">' . $val->user_login . '</a> ('.$val->user_email.')<br />'; 536 536 } 537 if ( $blogusers_warning != '' ) {537 if ( $blogusers_warning != '' ) { 538 538 echo '<strong>' . $blogusers_warning . '</strong><br />'; 539 539 } … … 545 545 546 546 case 'plugins': ?> 547 <?php if ( has_filter( 'wpmublogsaction' ) ) { ?>547 <?php if ( has_filter( 'wpmublogsaction' ) ) { ?> 548 548 <td valign="top"> 549 549 <?php do_action( "wpmublogsaction", $blog['blog_id'] ); ?> … … 553 553 554 554 default: ?> 555 <?php if ( has_filter( 'manage_blogs_custom_column' ) ) { ?>555 <?php if ( has_filter( 'manage_blogs_custom_column' ) ) { ?> 556 556 <td valign="top"> 557 557 <?php do_action('manage_blogs_custom_column', $column_name, $blog['blog_id']); ?>
Note: See TracChangeset
for help on using the changeset viewer.