Ticket #12460: 12460.patch
| File 12460.patch, 16.8 KB (added by , 16 years ago) |
|---|
-
wp-admin/css/ms.dev.css
1 /* Blog Switcher */2 3 #all-my-blogs-tab a.current {4 position: relative;5 padding-bottom: 10px;6 }7 8 #all-my-blogs {9 position: absolute;10 top: 30px;11 left: 0;12 right: 0;13 _width: 100%; /* IE6 Hack */14 margin: 4px 7px;15 padding: 6px 10px;16 font-size: 12px;17 }18 19 #all-my-blogs * {20 margin: 0;21 }22 23 form#all-my-blogs p, form#all-my-blogs p * {24 vertical-align: middle;25 }26 27 #all-my-blogs a {28 font-size: 10px;29 text-decoration: underline;30 margin: 0 14px;31 }32 33 #all-my-blogs a:hover, #all-my-blogs a:active {34 text-decoration: none;35 }36 37 form#wpmu-search {38 position:absolute;39 right:0;40 top:0;41 }42 43 1 /* Site Admin Menu */ 44 2 #adminmenu .menu-icon-site div.wp-menu-image { 45 3 background: transparent url('../images/site-admin.png') no-repeat scroll 0px -33px; … … 49 7 background: transparent url('../images/site-admin.png') no-repeat scroll 0px -1px; 50 8 } 51 9 52 /* Dashboard: M USpecific Data */10 /* Dashboard: MS Specific Data */ 53 11 #dashboard_right_now p.musub { 54 12 margin-top: 12px; 55 13 border-top: 1px solid #ececec; … … 59 17 #dashboard_right_now td.b a.musublink { 60 18 font-size: 16px; 61 19 } 20 62 21 tr.site-deleted { 63 background:#f 55;22 background:#ff8573; 64 23 } 65 24 tr.site-spammed { 66 25 background:#faa; 67 26 } 68 27 tr.site-archived { 69 background:#f ee;28 background:#ffebe8; 70 29 } 30 tr.site-mature { 31 background: #fecac2; 32 } -
wp-admin/ms-admin.php
32 32 <h2><?php echo esc_html( $title ); ?></h2> 33 33 34 34 <ul class="subsubsub"> 35 <li><a href="ms-sites.php#form-add- blog" class="rbutton"><strong><?php _e('Create a New Site'); ?></strong></a> | </li>35 <li><a href="ms-sites.php#form-add-site" class="rbutton"><strong><?php _e('Create a New Site'); ?></strong></a> | </li> 36 36 <li><a href="ms-users.php#form-add-user" class="rbutton"><?php _e('Create a New User'); ?></a></li> 37 37 </ul> 38 <br clear= 'all'/>38 <br clear="all" /> 39 39 40 40 <p class="youhave"><?php echo $sentence; ?></p> 41 41 <?php do_action('wpmuadminresult', ''); ?> … … 43 43 <form name="searchform" action="ms-users.php" method="get"> 44 44 <p> 45 45 <input type="hidden" name="action" value="users" /> 46 <input type="text" name="s" value="" size="17"/>47 <input class="button" type="submit" name="submit"value="<?php esc_attr_e("Search Users"); ?>" />46 <input type="text" name="s" value="" /> 47 <input class="button" type="submit" value="<?php esc_attr_e("Search Users"); ?>" /> 48 48 </p> 49 49 </form> 50 50 51 51 <form name="searchform" action="ms-sites.php" method="get"> 52 52 <p> 53 53 <input type="hidden" name="action" value="blogs" /> 54 <input type="text" name="s" value="" size="17"/>55 <input class="button" type="submit" name="blog_name"value="<?php esc_attr_e("Search Sites"); ?>" />54 <input type="text" name="s" value="" /> 55 <input class="button" type="submit" value="<?php esc_attr_e("Search Sites"); ?>" /> 56 56 </p> 57 57 </form> 58 58 -
wp-admin/ms-edit.php
418 418 break; 419 419 420 420 case "mature": 421 check_admin_referer('mature'); 422 if ( ! current_user_can( 'manage_sites' ) ) 423 wp_die( __('You do not have permission to access this page.') ); 424 421 425 update_blog_status( $id, 'mature', '1' ); 422 426 do_action( 'mature_blog', $id ); 423 427 wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'mature'), $_POST['ref'] ) ); … … 425 429 break; 426 430 427 431 case "unmature": 432 check_admin_referer('unmature'); 433 if ( ! current_user_can( 'manage_sites' ) ) 434 wp_die( __('You do not have permission to access this page.') ); 435 428 436 update_blog_status( $id, 'mature', '0' ); 429 437 do_action( 'unmature_blog', $id ); 430 438 wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'umature'), $_POST['ref'] ) ); -
wp-admin/ms-sites.php
17 17 $id = isset($_GET['id']) ? intval( $_GET['id'] ) : 0; 18 18 $protocol = is_ssl() ? 'https://' : 'http://'; 19 19 20 if ( isset($_GET['updated']) && $_GET['updated'] == 'true' ) {20 if ( isset($_GET['updated']) && $_GET['updated'] == 'true' && ! empty($_GET['action']) ) { 21 21 ?> 22 22 <div id="message" class="updated fade"><p> 23 23 <?php 24 24 switch ($_GET['action']) { 25 25 case 'all_notspam': 26 _e('Sites mark as not spam !');26 _e('Sites mark as not spam.'); 27 27 break; 28 28 case 'all_spam': 29 _e('Sites mark as spam !');29 _e('Sites mark as spam.'); 30 30 break; 31 31 case 'all_delete': 32 _e('Sites deleted !');32 _e('Sites deleted.'); 33 33 break; 34 34 case 'delete': 35 _e('Site deleted !');35 _e('Site deleted.'); 36 36 break; 37 37 case 'add-blog': 38 _e('Site added !');38 _e('Site added.'); 39 39 break; 40 40 case 'archive': 41 _e('Site archived !');41 _e('Site archived.'); 42 42 break; 43 43 case 'unarchive': 44 _e('Site unarchived !');44 _e('Site unarchived.'); 45 45 break; 46 46 case 'activate': 47 _e('Site activated !');47 _e('Site activated.'); 48 48 break; 49 49 case 'deactivate': 50 _e('Site deactivated !');50 _e('Site deactivated.'); 51 51 break; 52 52 case 'unspam': 53 _e('Site mark as not spam !');53 _e('Site mark as not spam.'); 54 54 break; 55 55 case 'spam': 56 _e('Site mark as spam !');56 _e('Site mark as spam.'); 57 57 break; 58 case 'u mature':59 _e('Site mark as not mature !');58 case 'unmature': 59 _e('Site mark as not mature.'); 60 60 break; 61 61 case 'mature': 62 _e('Site mark as mature !');62 _e('Site mark as mature.'); 63 63 break; 64 64 default: 65 _e(' Options saved !');65 _e('Settings saved.'); 66 66 break; 67 67 } 68 68 ?> … … 323 323 <?php 324 324 break; 325 325 326 // List blogs326 // List sites 327 327 case 'list': 328 328 default: 329 329 $pagenum = isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 0; … … 341 341 342 342 $query = "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' "; 343 343 344 if ( isset( $_GET['blogstatus'] ) ) {345 if ( 'deleted' == $_GET['blogstatus'] ) {346 $query .= " AND {$wpdb->blogs}.deleted = '1' ";347 } elseif ( 'archived' == $_GET['blogstatus'] ) {348 $query .= " AND {$wpdb->blogs}.archived = '1' ";349 } elseif ( 'spam' == $_GET['blogstatus'] ) {350 $query .= " AND {$wpdb->blogs}.spam = '1' ";351 }352 }353 354 344 if ( isset( $_GET['searchaction'] ) ) { 355 345 if ( 'name' == $_GET['searchaction'] ) { 356 346 $query .= " AND ( {$wpdb->blogs}.domain LIKE '%{$like_s}%' OR {$wpdb->blogs}.path LIKE '%{$like_s}%' ) "; … … 400 390 else 401 391 $mode = esc_attr( $_GET['mode'] ); 402 392 403 // for subsubsub and $blog_list404 $status_list = array( 'archived' => array( 'site-archived', __('Archived') ), 'spam' => array( 'site-spammed', __('Spam') ), 'deleted' => array( 'site-deleted', __('Deleted') ) );405 393 ?> 406 394 407 395 <div class="wrap"> … … 414 402 ?> 415 403 </h2> 416 404 417 <ul class="subsubsub">418 <?php419 $status_links = array();420 $status_class = '';421 $count = get_blog_count();422 423 if ( empty($_GET['blogstatus']) || $_GET['blogstatus'] == 'all' )424 $status_class = ' class="current"';425 426 $status_links[] = "<li><a href='ms-sites.php?blogstatus=all'$status_class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $count, 'sites' ), number_format_i18n( $count ) ) . '</a>';427 428 foreach ( $status_list as $status => $col ) {429 $status_class = '';430 431 if ( empty( $count->$status ) )432 continue;433 434 if ( isset( $_GET['blogstatus'] ) && ( $_GET['blogstatus'] == $status ) )435 $status_class = ' class="current"';436 437 $status_links[] = "<li><a href='ms-sites.php?blogstatus=$status'$status_class>" . sprintf( $col[1] . ' <span class="count">(%s)</span>' , number_format_i18n( $count->$status ) ) . '</a>';438 };439 440 echo implode( " |</li>\n", $status_links ) . '</li>';441 unset( $status_links );442 ?>443 </ul>444 445 405 <form action="ms-sites.php" method="get" id="ms-search"> 446 406 <p class="search-box"> 447 407 <input type="hidden" name="action" value="blogs" /> … … 509 469 <table class="widefat"> 510 470 <thead> 511 471 <tr> 512 <th style=""class="manage-column column-cb check-column" id="cb" scope="col">472 <th class="manage-column column-cb check-column" id="cb" scope="col"> 513 473 <input type="checkbox" /> 514 474 </th> 515 475 <?php … … 552 512 </tfoot> 553 513 <tbody id="the-list"> 554 514 <?php 515 $status_list = array( 'archived' => array( 'site-archived', __('Archived') ), 'spam' => array( 'site-spammed', __('Spam') ), 'deleted' => array( 'site-deleted', __('Deleted') ), 'mature' => array( 'site-mature', __('Mature') ) ); 555 516 if ( $blog_list ) { 556 517 $class = ''; 557 518 foreach ( $blog_list as $blog ) { … … 599 560 echo '<p>' . sprintf( _x( '%1$s – <em>%2$s', '%1$s: site name. %2$s: site tagline.' ), get_blog_option( $blog['blog_id'], 'blogname' ), get_blog_option( $blog['blog_id'], 'blogdescription ' ) ) . '</em></p>'; 600 561 601 562 $actions = array(); 602 $actions[] = '< a href="ms-sites.php?action=editblog&id=' . $blog['blog_id'] . '" class="edit">' . __('Edit') . '</a>';603 $actions[] = "< a href='" . get_admin_url($blog['blog_id']) . "' class='edit'>" . __('Backend') . '</a>';563 $actions[] = '<span class="edit"><a href="ms-sites.php?action=editblog&id=' . $blog['blog_id'] . '">' . __('Edit') . '</a><span>'; 564 $actions[] = "<span class='backend'><a href='" . get_admin_url($blog['blog_id']) . "' class='edit'>" . __('Backend') . '</a></span>'; 604 565 605 566 if ( get_blog_status( $blog['blog_id'], "deleted" ) == '1' ) 606 $actions[] = '< 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 site %s" ), $blogname ) ) . '">' . __('Activate') . '</a>';567 $actions[] = '<span class="activate"><a 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 site %s" ), $blogname ) ) . '">' . __('Activate') . '</a></span>'; 607 568 else 608 $actions[] = '< 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 site %s" ), $blogname ) ) . '">' . __('Deactivate') . '</a>';569 $actions[] = '<span class="activate"><a 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 site %s" ), $blogname ) ) . '">' . __('Deactivate') . '</a></span>'; 609 570 610 571 if ( get_blog_status( $blog['blog_id'], "archived" ) == '1' ) 611 $actions[] = '< a class="delete" href="ms-edit.php?action=confirm&action2=unarchiveblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to unarchive the site %s" ), $blogname ) ) . '">' . __('Unarchive') . '</a>';572 $actions[] = '<span class="archive"><a href="ms-edit.php?action=confirm&action2=unarchiveblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to unarchive the site %s." ), $blogname ) ) . '">' . __('Unarchive') . '</a></span>'; 612 573 else 613 $actions[] = '< a class="delete" href="ms-edit.php?action=confirm&action2=archiveblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to archive the site %s" ), $blogname ) ) . '">' . __('Archive') . '</a>';574 $actions[] = '<span class="archive"><a href="ms-edit.php?action=confirm&action2=archiveblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to archive the site %s." ), $blogname ) ) . '">' . __('Archive') . '</a></span>'; 614 575 615 576 if ( get_blog_status( $blog['blog_id'], "spam" ) == '1' ) 616 $actions[] = '< a class="delete" href="ms-edit.php?action=confirm&action2=unspamblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to unspam the site %s" ), $blogname ) ) . '">' . __('Not Spam') . '</a>';577 $actions[] = '<span class="spam"><a href="ms-edit.php?action=confirm&action2=unspamblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to unspam the site %s." ), $blogname ) ) . '">' . __('Not Spam') . '</a></span>'; 617 578 else 618 $actions[] = '< a class="delete" href="ms-edit.php?action=confirm&action2=spamblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to mark the site %s as spam" ), $blogname ) ) . '">' . __("Spam") . '</a>';579 $actions[] = '<span class="spam"><a href="ms-edit.php?action=confirm&action2=spamblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to mark the site %s as spam." ), $blogname ) ) . '">' . __("Spam") . '</a></span>'; 619 580 620 $actions[] = '<a class="delete" href="ms-edit.php?action=confirm&action2=deleteblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to delete the site %s" ), $blogname ) ) . '">' . __("Delete") . '</a>'; 581 if ( get_blog_status( $blog['blog_id'], "mature" ) == '1' ) 582 $actions[] = '<span class="mature"><a href="ms-edit.php?action=confirm&action2=unmatureblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to unmature the site %s." ), $blogname ) ) . '">' . __('Not Mature') . '</a></span>'; 583 else 584 $actions[] = '<span class="mature"><a href="ms-edit.php?action=confirm&action2=matureblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to mark the site %s as mature." ), $blogname ) ) . '">' . __("Mature") . '</a></span>'; 621 585 622 $actions[] = "<a href='" . get_home_url($blog['blog_id']) . "' rel='permalink'>" . __('Visit') . '</a>'; 586 $actions[] = '<span class="delete"><a href="ms-edit.php?action=confirm&action2=deleteblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to delete the site %s." ), $blogname ) ) . '">' . __("Delete") . '</a></span>'; 587 588 $actions[] = "<span class='view'><a href='" . get_home_url($blog['blog_id']) . "' rel='permalink'>" . __('Visit') . '</a>'; 623 589 ?> 624 590 625 591 <?php if ( count($actions) ) : ?> -
wp-admin/my-sites.php
28 28 require_once('admin-header.php'); 29 29 30 30 if ( $updated ) { ?> 31 <div id="message" class="updated fade"><p><strong><?php _e( ' Your site preferences have been updated.' ); ?></strong></p></div>31 <div id="message" class="updated fade"><p><strong><?php _e( 'Settings saved.' ); ?></strong></p></div> 32 32 <?php } ?> 33 33 34 34 <div class="wrap"> 35 35 <?php screen_icon(); ?> 36 <h2><?php e cho esc_html($title); ?></h2>36 <h2><?php esc_html_e($title); ?></h2> 37 37 <form id="myblogs" action="" method="post"> 38 38 <?php 39 39 choose_primary_blog(); 40 40 do_action( 'myblogs_allblogs_options' ); 41 ?><table class='widefat'> <?php 41 ?> 42 <br clear="all" /> 43 <table class="widefat fixed"> 44 <?php 42 45 $settings_html = apply_filters( 'myblogs_options', '', 'global' ); 43 46 if ( $settings_html != '' ) { 44 47 echo "<tr><td valign='top'><h3>" . __( 'Global Settings' ) . "</h3></td><td>"; … … 63 66 foreach ( $rows as $row ) { 64 67 $c = $c == "alternate" ? '' : 'alternate'; 65 68 echo "<tr class='$c'>"; 66 $ t = '';69 $i = 0; 67 70 foreach ( $row as $user_blog ) { 68 $ t = $t == 'border-right: 1px solid #ccc;'? '' : 'border-right: 1px solid #ccc;';69 echo "<td valign='top' style='$ t; width:50%'>";71 $s = $i == 3 ? '' : 'border-right: 1px solid #ccc;'; 72 echo "<td valign='top' style='$s'>"; 70 73 echo "<h3>{$user_blog->blogname}</h3>"; 71 74 echo "<p>" . apply_filters( "myblogs_blog_actions", "<a href='{$user_blog->siteurl}'>" . __( 'Visit' ) . "</a> | <a href='{$user_blog->siteurl}/wp-admin/'>" . __( 'Dashboard' ) . "</a>", $user_blog ) . "</p>"; 72 75 echo apply_filters( 'myblogs_options', '', $user_blog ); 73 76 echo "</td>"; 77 $i++; 74 78 } 75 79 echo "</tr>"; 76 80 }?> … … 78 82 <input type="hidden" name="action" value="updateblogsettings" /> 79 83 <?php wp_nonce_field('update-my-sites'); ?> 80 84 <p> 81 <input type="submit" class="button-primary" value="<?php _e('Update Options') ?>" name="submit"/>85 <input type="submit" class="button-primary" value="<?php _e('Update Options') ?>" /> 82 86 </p> 83 87 </form> 84 88 </div>