Ticket #590: repack_all.patch
| File repack_all.patch, 61.4 kB (added by momo360modena, 5 months ago) |
|---|
-
wp-admin/users.php
old new 411 411 ?> 412 412 </ul> 413 413 <p id="post-search"> 414 <input type="text" id="post-search-input" name="usersearch" value="<?php echo attribute_escape($wp_user_search->search_term); ?>" />415 <input type="submit" value="<?php _e( 'Search Users' ); ?>" class="button" />414 <input type="text" id="post-search-input" name="usersearch" value="<?php echo attribute_escape($wp_user_search->search_term); ?>" /> 415 <input type="submit" value="<?php _e( 'Search Users' ); ?>" class="button" /> 416 416 </p> 417 417 418 418 <div class="tablenav"> … … 422 422 <?php endif; ?> 423 423 424 424 <div class="alignleft"> 425 <input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" /> 426 <select name="new_role"><option value=''><?php _e('Change role to…') ?></option>"<?php wp_dropdown_roles(); ?></select> 427 <input type="submit" value="<?php _e('Change'); ?>" name="changeit" class="button-secondary" /> 428 <?php wp_nonce_field('bulk-users'); ?> 425 <input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" /> 426 <select name="new_role"> 427 <option value=''><?php _e('Change role to…') ?></option> 428 <?php wp_dropdown_roles(); ?> 429 </select> 430 <input type="submit" value="<?php _e('Change'); ?>" name="changeit" class="button-secondary" /> 431 <?php wp_nonce_field('bulk-users'); ?> 429 432 </div> 430 433 431 434 <br class="clear" /> … … 505 508 506 509 <?php if( apply_filters('show_adduser_fields', true) ) {?> 507 510 <div class="wrap"> 508 <h2 id="add-new-user"><?php _e('Add User From Community') ?></h2>511 <h2 id="add-new-user"><?php _e('Add user from community') ?></h2> 509 512 <div class="narrow"> 510 513 <form action="" method="post" name="adduser" id="adduser"> 511 514 <?php wp_nonce_field('add-user') ?> 512 515 <input type='hidden' name='action' value='addexistinguser'> 513 516 <p><?php _e('Type the e-mail address of another user to add them to your blog.')?></p> 514 <table> 515 <tr><th scope="row"><?php _e('User E-Mail:')?> </th><td><input type="text" name="newuser" id="newuser"></td></tr> 516 <tr> 517 518 <table class="form-table"> 519 <tr class="form-field form-required"> 520 <th scope="row"><?php _e('User E-Mail')?></th> 521 <td><input type="text" name="newuser" id="newuser" /></td> 522 </tr> 523 <tr class="form-field"> 517 524 <th scope="row"><?php _e('Role:') ?></th> 518 <td><select name="new_role" id="new_role"><?php 519 foreach($wp_roles->role_names as $role => $name) { 520 $selected = ''; 521 if( $role == 'subscriber' ) 522 $selected = 'selected="selected"'; 523 echo "<option {$selected} value=\"{$role}\">{$name}</option>"; 524 } 525 ?></select></td> 525 <td> 526 <select name="new_role" id="new_role"> 527 <?php wp_dropdown_roles('subscriber'); ?> 528 </select> 529 </td> 526 530 </tr> 527 531 </table> 528 532 <p class="submit"> -
wp-admin/wpmu-admin.php
old new 3 3 4 4 $title = __('WordPress MU › Admin'); 5 5 $parent_file = 'wpmu-admin.php'; 6 7 function index_css() { 8 wp_admin_css( 'css/dashboard' ); 9 } 10 add_action( 'admin_head', 'index_css' ); 11 6 12 require_once('admin-header.php'); 7 13 8 14 if( is_site_admin() == false ) { 9 15 wp_die( __('<p>You do not have permission to access this page.</p>') ); 10 16 } 11 17 12 if (isset($_GET['updated'])) { 13 ?> 14 <div id="message" class="updated fade"><p><?php _e('Options saved.') ?></p></div> 15 <?php 16 } 18 global $wpdb; 19 $c_users = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->users}"); 20 $c_blogs = $wpdb->get_var("SELECT COUNT(blog_id) FROM {$wpdb->blogs}"); 21 22 $user_text = sprintf( __ngettext( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) ); 23 $blog_text = sprintf( __ngettext( '%s blog', '%s blogs', $c_blogs ), number_format_i18n( $c_blogs ) ); 24 25 $sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text ); 17 26 ?> 18 27 19 28 <div class="wrap"> 20 29 <h2><?php _e('WordPress MU : Admin') ?></h2> 30 31 <div id="rightnow"> 32 <h3 class="reallynow"> 33 <span><?php _e('Right Now'); ?></span> 34 35 <a href="wpmu-blogs.php#form-add-blog" class="rbutton"><strong><?php _e('Create a New Blog'); ?></strong></a> 36 <a href="wpmu-users.php#form-add-user" class="rbutton"><?php _e('Create a New User'); ?></a> 37 <br class="clear" /> 38 </h3> 39 40 <p class="youhave"><?php echo $sentence; ?></p> 21 41 <?php do_action('wpmuadminresult', ''); ?> 22 42 23 43 <form name="searchform" action="wpmu-users.php" method="get"> 24 44 <p> 25 45 <input type="hidden" name="action" value="users" /> 26 46 <input type="text" name="s" value="" size="17" /> 27 <input type="submit" name="submit" value="<?php _e("Search Users »"); ?>" />47 <input class="button" type="submit" name="submit" value="<?php _e("Search Users »"); ?>" /> 28 48 </p> 29 49 </form> 30 50 … … 32 52 <p> 33 53 <input type="hidden" name="action" value="blogs" /> 34 54 <input type="text" name="s" value="" size="17" /> 35 <input type="submit" name="submit" value="<?php _e("Search Blogs »"); ?>" />55 <input class="button" type="submit" name="submit" value="<?php _e("Search Blogs »"); ?>" /> 36 56 </p> 37 57 </form> 58 59 <?php do_action( 'mu_rightnow_end' ); ?> 60 <?php do_action( 'mu_activity_box_end' ); ?> 61 </div><!-- rightnow --> 38 62 </div> 39 63 40 64 <?php include('admin-footer.php'); ?> -
wp-admin/wpmu-blogs.php
old new 3 3 4 4 $title = __('WordPress MU › Admin › Blogs'); 5 5 $parent_file = 'wpmu-admin.php'; 6 6 7 wp_enqueue_script( 'listman' ); 8 wp_enqueue_script( 'admin-forms' ); 9 7 10 require_once('admin-header.php'); 8 11 if( is_site_admin() == false ) { 9 12 wp_die( __('<p>You do not have permission to access this page.</p>') ); … … 15 18 <div id="message" class="updated fade"><p> 16 19 <?php 17 20 switch ($_GET['action']) { 21 case 'all_notspam': 22 _e('Blogs mark as not spam !'); 23 break; 18 24 case 'all_spam': 19 25 _e('Blogs mark as spam !'); 20 26 break; … … 285 291 286 292 $query = "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' "; 287 293 288 if( !empty($_GET['s']) ) {294 if( isset($_GET['blog_name']) ) { 289 295 $s = trim($_GET['s']); 290 296 $query = "SELECT blog_id, {$wpdb->blogs}.domain, {$wpdb->blogs}.path, registered, last_updated 291 297 FROM {$wpdb->blogs}, {$wpdb->site} 292 298 WHERE site_id = '{$wpdb->siteid}' 293 299 AND {$wpdb->blogs}.site_id = {$wpdb->site}.id 294 300 AND ( {$wpdb->blogs}.domain LIKE '%{$s}%' OR {$wpdb->blogs}.path LIKE '%{$s}%' )"; 295 } elseif( !empty($_GET['blog_id']) ) {301 } elseif( isset($_GET['blog_id']) ) { 296 302 $query = "SELECT * 297 303 FROM {$wpdb->blogs} 298 304 WHERE site_id = '{$wpdb->siteid}' 299 AND blog_id = '".intval($_GET[' blog_id'])."'";300 } elseif( !empty($_GET['ip_address']) ) {305 AND blog_id = '".intval($_GET['s'])."'"; 306 } elseif( isset($_GET['blog_ip']) ) { 301 307 $query = "SELECT * 302 308 FROM {$wpdb->blogs}, {$wpdb->registration_log} 303 309 WHERE site_id = '{$wpdb->siteid}' 304 310 AND {$wpdb->blogs}.blog_id = {$wpdb->registration_log}.blog_id 305 AND {$wpdb->registration_log}.IP LIKE ('%".$_GET[' ip_address']."%')";311 AND {$wpdb->registration_log}.IP LIKE ('%".$_GET['s']."%')"; 306 312 } 307 313 308 314 if( isset( $_GET['sortby'] ) == false ) { … … 321 327 322 328 $query .= ( $_GET['order'] == 'DESC' ) ? 'DESC' : 'ASC'; 323 329 324 if( !empty($_GET['s']) || !empty($_GET['blog_id']) || !empty($_GET['ip_address'])) {330 if( !empty($_GET['s']) ) { 325 331 $blog_list = $wpdb->get_results( $query, ARRAY_A ); 326 332 $total = count($blog_list); 327 333 } else { … … 341 347 'current' => $apage 342 348 )); 343 349 ?> 344 <script type="text/javascript"> 345 <!-- 346 var checkflag = "false"; 347 348 function check_all_rows() { 349 var button1 = document.getElementById('check_all1'); 350 var button2 = document.getElementById('check_all2'); 351 352 field = document.formlist; 353 if (checkflag == "false") { 354 for (i = 0; i < field.length; i++) { 355 if( field[i].name == 'allblogs[]' ) { 356 field[i].checked = true; 357 } 358 } 359 checkflag = "true"; 360 button1.value = "<?php _e('Uncheck All') ?>"; 361 button2.value = "<?php _e('Uncheck All') ?>"; 362 } else { 363 for (i = 0; i < field.length; i++) { 364 if( field[i].name == 'allblogs[]' ) { 365 field[i].checked = false; 366 } 367 } 368 checkflag = "false"; 369 button1.value = "<?php _e('Check All') ?>"; 370 button2.value = "<?php _e('Check All') ?>" 371 } 372 } 373 // --> 374 </script> 375 <div class="wrap"> 350 351 <div class="wrap" style="position:relative;"> 376 352 <h2><?php _e('Blogs') ?></h2> 377 <div style="float:right; padding:0 20px; margin-top:20px;">378 <?php if ( $blog_navigation ) echo "<p class='pagenav'>$blog_navigation</p>"; ?>379 </div>380 353 381 <form id="searchform" action="wpmu-blogs.php" method="get"> 382 <input type="hidden" name="action" value="blogs" /> 383 <fieldset> 384 <legend><?php _e('Search blogs by name…') ?></legend> 385 <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo stripslashes(wp_specialchars($_GET['s'], 1)); ?>" size="17" /> 386 </fieldset> 387 388 <fieldset> 389 <legend><?php _e('by blog ID…') ?></legend> 390 <input type="text" name="blog_id" value="<?php if (isset($_GET['blog_id'])) echo wp_specialchars($_GET['blog_id'], 1); ?>" size="10" /> 391 </fieldset> 392 393 <fieldset> 394 <legend><?php _e('by IP address…') ?></legend> 395 <input type="text" name="ip_address" value="<?php if (isset($_GET['ip_address'])) echo wp_specialchars($_GET['ip_address'], 1); ?>" size="10" /> 396 </fieldset> 397 <input type="submit" name="submit" id="post-query-submit" value="<?php _e('Search') ?>" class="button" /> 354 <form id="searchform" action="wpmu-blogs.php" method="get" style="position:absolute;right:0;top:0;"> 355 <input type="hidden" name="action" value="blogs" /> 356 <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo stripslashes(wp_specialchars($_GET['s'], 1)); ?>" size="17" /> 357 <input type="submit" class="button" name="blog_name" value="<?php _e('Search blogs by name') ?>" /> 358 <input type="submit" class="button" name="blog_id" value="<?php _e('by blog ID') ?>" /> 359 <input type="submit" class="button" name="blog_ip" value="<?php _e('by IP address') ?>" /> 398 360 </form> 361 362 <form id="form-blog-list" action="wpmu-edit.php?action=allblogs" method="post"> 363 364 <div class="tablenav"> 365 <?php if ( $blog_navigation ) echo "<div class='tablenav-pages'>$blog_navigation</div>"; ?> 399 366 367 <div class="alignleft"> 368 <input type="submit" value="<?php _e('Delete') ?>" name="allblog_delete" class="button-secondary delete" /> 369 <input type="submit" value="<?php _e('Mark as Spam') ?>" name="allblog_spam" class="button-secondary" /> 370 <input type="submit" value="<?php _e('Not Spam') ?>" name="allblog_notspam" class="button-secondary" /> 371 <?php wp_nonce_field( 'allblogs' ); ?> 372 <br class="clear" /> 373 </div> 374 </div> 375 376 <br class="clear" /> 400 377 401 <br style="clear:both;" />402 403 378 <?php if( isset($_GET['s']) && !empty($_GET['s']) ) : ?> 404 379 <p><a href="wpmu-users.php?action=users&s=<?php echo stripslashes(wp_specialchars($_GET['s'], 1)) ?>"><?php _e('Search Users:') ?> <strong><?php echo stripslashes(wp_specialchars($_GET['s'], 1)); ?></strong></a></p> 405 <?php endif; ?> 406 380 <?php endif; ?> 381 407 382 <?php 408 383 // define the columns to display, the syntax is 'internal name' => 'display name' 384 $blogname_columns = ( constant( "VHOST" ) == 'yes' ) ? __('Domain') : __('Path'); 409 385 $posts_columns = array( 410 'id' => __('ID'),411 'blogname' => __('Blog Name'),412 'lastupdated' => __('Last Updated'),413 'registered' => __('Registered'),414 'users' => __('Users'),415 'plugins' => __('Actions')386 'id' => __('ID'), 387 'blogname' => $blogname_columns, 388 'lastupdated' => __('Last Updated'), 389 'registered' => __('Registered'), 390 'users' => __('Users'), 391 'plugins' => __('Actions') 416 392 ); 417 393 $posts_columns = apply_filters('manage_posts_columns', $posts_columns); 418 394 419 395 // you can not edit these at the moment 420 $posts_columns['control_view'] = '';421 396 $posts_columns['control_edit'] = ''; 422 397 $posts_columns['control_backend'] = ''; 423 398 $posts_columns['control_deactivate']= ''; … … 427 402 428 403 $sortby_url = "s=" . $_GET['s'] . "&ip_address=" . $_GET['ip_address']; 429 404 ?> 430 <form name="formlist" action="wpmu-edit.php?action=allblogs" method="post">431 <input style="margin:5px 0;" id="check_all1" class="button" type="button" value="<?php _e('Check All') ?>" onclick="check_all_rows()" />432 405 433 406 <table width="100%" cellpadding="3" cellspacing="3" class="widefat"> 434 407 <thead> 435 408 <tr> 436 <?php foreach($posts_columns as $column_id => $column_display_name) { ?> 437 <?php $column_link = "<a href='wpmu-blogs.php?{$sortby_url}&sortby={$column_id}&"; 409 <th scope="col" class="check-column"><input type="checkbox" onclick="checkAll(document.getElementById('form-blog-list'));" /></th> 410 <?php foreach($posts_columns as $column_id => $column_display_name) { 411 $column_link = "<a href='wpmu-blogs.php?{$sortby_url}&sortby={$column_id}&"; 438 412 if( $_GET['sortby'] == $column_id ) { 439 413 $column_link .= $_GET[ 'order' ] == 'DESC' ? 'order=ASC&' : 'order=DESC&'; 440 414 } 441 415 $column_link .= "apage={$apage}'>{$column_display_name}</a>"; 442 $col_url = $column_id == 'users' || $column_id == 'plugins' ? $column_display_name : $column_link; 443 ?><th scope="col"><?php echo $col_url ?></th> 416 417 $col_url = ($column_id == 'users' || $column_id == 'plugins') ? $column_display_name : $column_link; 418 ?> 419 <th scope="col"><?php echo $col_url ?></th> 444 420 <?php } ?> 445 421 </tr> 446 422 </thead> … … 463 439 464 440 $blogname = ( constant( "VHOST" ) == 'yes' ) ? str_replace('.'.$current_site->domain, '', $blog['domain']) : $blog['path']; 465 441 foreach( $posts_columns as $column_name=>$column_display_name ) { 466 switch($column_name) { 442 switch($column_name) { 467 443 case 'id': ?> 444 <th scope="row" class="check-column"> 445 <input type='checkbox' id='blog_<?php echo $blog['blog_id'] ?>' name='allblogs[]' value='<?php echo $blog['blog_id'] ?>' /> 446 </th> 468 447 <th scope="row"> 469 < input type='checkbox' id='blog_<?php echo $blog['blog_id'] ?>' name='allblogs[]' value='<?php echo $blog['blog_id'] ?>' /> <label for='blog_<?php echo $blog['blog_id'] ?>'><?php echo $blog['blog_id'] ?></label>448 <?php echo $blog['blog_id'] ?> 470 449 </th> 471 450 <?php 472 451 break; 473 452 474 453 case 'blogname': ?> 475 454 <td valign="top"> 476 < label for='blog_<?php echo $blog['blog_id'] ?>'><?php echo $blogname ?></label>455 <a href="http://<?php echo $blog['domain']. $blog['path']; ?>" rel="permalink"><?php echo $blogname; ?></a> 477 456 </td> 478 457 <?php 479 458 break; … … 507 486 </td> 508 487 <?php 509 488 break; 510 case 'control_view': ?>511 <td valign="top">512 <a href="http://<?php echo $blog['domain']. $blog['path']; ?>" rel="permalink" class="edit"><?php _e('View'); ?></a>513 </td>514 <?php515 break;516 489 case 'control_edit': ?> 517 490 <td valign="top"> 518 491 <?php echo "<a href='wpmu-blogs.php?action=editblog&id=".$blog['blog_id']."' class='edit'>" . __('Edit') . "</a>"; ?> … … 596 569 597 570 </tbody> 598 571 </table> 599 600 <div style="float:right; padding:0 20px; margin-top:20px;"> 601 <?php if ( $blog_navigation ) echo "<p class='pagenav'>$blog_navigation</p>"; ?> 572 </form> 602 573 </div> 603 <input style="margin:5px 0;" id="check_all2" type="button" class="button" value="<?php _e('Check All') ?>" onclick="check_all_rows()" />604 574 605 <h3><?php _e('Update selected blogs:') ?></h3>606 <ul style="list-style:none;">607 <li><input type='radio' name='blogfunction' id='delete' value='delete' /> <label for='delete'><?php _e('Delete') ?></label></li>608 <li><input type='radio' name='blogfunction' id='spam' value='spam' /> <label for='spam'><?php _e('Mark as Spam') ?></label></li>609 </ul>610 611 <p class="submit" style="width: 220px">612 <?php wp_nonce_field( "allblogs" ); ?>613 <input type='hidden' name='redirect' value='<?php echo $_SERVER['REQUEST_URI'] ?>' />614 <input type='submit' class="button" value='<?php _e('Apply Changes') ?>' /></p>615 </form>616 </div>617 618 575 <div class="wrap"> 619 576 <h2><?php _e('Add Blog') ?></h2> 620 577 <form method="post" action="wpmu-edit.php?action=addblog"> 621 578 <?php wp_nonce_field('add-blog') ?> 622 <table c ellpadding="3" cellspacing="3">623 <tr >579 <table class="form-table"> 580 <tr class="form-field form-required"> 624 581 <th style="text-align:center;" scope='row'><?php _e('Blog Address') ?></th> 625 582 <td> 626 583 <?php if( constant( "VHOST" ) == 'yes' ) : ?> … … 630 587 <?php endif; ?> 631 588 </td> 632 589 </tr> 633 <tr><th style="text-align:center;" scope='row'><?php _e('Blog Title') ?></th><td><input name="blog[title]" type="text" size="20" title="<?php _e('Title') ?>"/></td></tr> 634 <tr><th style="text-align:center;" scope='row'><?php _e('Admin Email') ?></th><td><input name="blog[email]" type="text" size="20" title="<?php _e('Email') ?>"/></td></tr> 635 <tr><td colspan='2'><?php _e('A new user will be created if the above email address is not in the database.') ?></td></tr> 636 <tr><td colspan='2'><?php _e('The username and password will be mailed to this email address.') ?></td></tr> 590 <tr class="form-field form-required"> 591 <th style="text-align:center;" scope='row'><?php _e('Blog Title') ?></th> 592 <td><input name="blog[title]" type="text" size="20" title="<?php _e('Title') ?>"/></td> 593 </tr> 594 <tr class="form-field form-required"> 595 <th style="text-align:center;" scope='row'><?php _e('Admin Email') ?></th> 596 <td><input name="blog[email]" type="text" size="20" title="<?php _e('Email') ?>"/></td> 597 </tr> 598 <tr class="form-field"> 599 <td colspan='2'><?php _e('A new user will be created if the above email address is not in the database.') ?><br /><?php _e('The username and password will be mailed to this email address.') ?></td> 600 </tr> 637 601 </table> 638 <input class="button" type="submit" name="go" value="<?php _e('Add Blog') ?>" /> 602 <p class="submit"> 603 <input class="button" type="submit" name="go" value="<?php _e('Add Blog') ?>" /></p> 639 604 </form> 640 605 </div> 641 606 <?php -
wp-admin/wpmu-edit.php
old new 249 249 check_admin_referer('allblogs'); 250 250 foreach ( (array) $_POST['allblogs'] as $key => $val ) { 251 251 if( $val != '0' && $val != '1' ) { 252 if( $_POST['blogfunction'] == 'delete' ) { 252 if ( isset($_POST['allblog_delete']) ) { 253 $blogfunction = 'all_delete'; 253 254 wpmu_delete_blog( $val, true ); 254 } elseif( $_POST['blogfunction'] == 'spam' ) { 255 } elseif ( isset($_POST['allblog_spam']) ) { 256 $blogfunction = 'all_spam'; 255 257 update_blog_status( $val, "spam", '1', 0 ); 256 258 set_time_limit(60); 259 } elseif ( isset($_POST['allblog_notspam']) ) { 260 $blogfunction = 'all_notspam'; 261 update_blog_status( $val, "spam", '0', 0 ); 262 set_time_limit(60); 257 263 } 258 264 } 259 265 } 260 266 261 wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'all_'.$_POST['blogfunction']), $_SERVER['HTTP_REFERER'] ) );267 wp_redirect( add_query_arg( array('updated' => 'true', 'action' => $blogfunction), $_SERVER['HTTP_REFERER'] ) ); 262 268 exit(); 263 269 break; 264 270 … … 386 392 foreach ( (array) $_POST['allusers'] as $key => $val ) { 387 393 if( $val != '' && $val != '0' && $val != '1' ) { 388 394 $user_details = get_userdata( $val ); 389 if ( $_POST['userfunction'] == 'delete') {395 if ( isset($_POST['alluser_delete']) ) { 390 396 wpmu_delete_user($val); 391 } elseif( $_POST['userfunction'] == 'spam' ) { 397 $userfunction = 'all_delete'; 398 } elseif ( isset($_POST['alluser_spam']) ) { 399 $userfunction = 'all_spam'; 392 400 $blogs = get_blogs_of_user( $val, true ); 393 401 foreach ( (array) $blogs as $key => $details ) { 402 if ( $details->userblog_id == 1 ) { continue; } // main blog not a spam ! 394 403 update_blog_status( $details->userblog_id, "spam", '1' ); 395 404 do_action( "make_spam_blog", $details->userblog_id ); 396 405 } 397 406 update_user_status( $val, "spam", '1', 1 ); 398 } elseif ( $_POST[ 'userfunction' ] == 'notspam' ) { 407 } elseif ( isset($_POST['alluser_notspam']) ) { 408 $userfunction = 'all_notspam'; 399 409 $blogs = get_blogs_of_user( $val, true ); 400 410 foreach ( (array) $blogs as $key => $details ) { 401 411 update_blog_status( $details->userblog_id, "spam", '0' ); … … 404 414 } 405 415 } 406 416 } 407 wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'all_'.$_POST['userfunction']), $_SERVER['HTTP_REFERER'] ) );417 wp_redirect( add_query_arg( array('updated' => 'true', 'action' => $userfunction), $_SERVER['HTTP_REFERER'] ) ); 408 418 exit(); 409 419 break; 410 420 -
wp-admin/wpmu-options.php
old new 1 <?php 2 require_once('admin.php'); 3 $title = __('WordPress MU › Admin › Site Options'); 4 $parent_file = 'wpmu-admin.php'; 5 6 include('admin-header.php'); 7 8 if( is_site_admin() == false ) { 9 wp_die( __('<p>You do not have permission to access this page.</p>') ); 10 } 11 12 if (isset($_GET['updated'])) { 13 ?> 14 <div id="message" class="updated fade"><p><?php _e('Options saved.') ?></p></div> 15 <?php 16 } 17 ?> 18 19 <div class="wrap"> 20 <h2><?php _e('Site Options') ?></h2> 21 <form method="post" action="wpmu-edit.php?action=siteoptions"> 22 <?php wp_nonce_field( "siteoptions" ); ?> 23 24 <fieldset class="options"> 25 <legend><?php _e('Operational Settings <em>(These settings cannot be modified by blog owners)</em>') ?></legend> 26 <table width="100%" cellspacing="2" cellpadding="5" class="editform"> 27 <tr valign="top"> 28 <th scope="row"><?php _e('Site Name:') ?></th> 29 <td> 30 <input name="site_name" type="text" id="site_name" style="width: 95%" value="<?php echo $current_site->site_name ?>" size="45" /> 31 <br /> 32 <?php _e('What you would like to call this website.') ?> 33 </td> 34 </tr> 35 36 <tr valign="top"> 37 <th scope="row"><?php _e('Site Admin Email:') ?></th> 38 <td> 39 <input name="admin_email" type="text" id="admin_email" style="width: 95%" value="<?php echo stripslashes( get_site_option('admin_email') ) ?>" size="45" /> 40 <br /> 41 <?php printf( __( 'Registration and support mails will come from this address. Make it generic like "support@%s"' ), $current_site->domain ); ?> 42 </td> 43 </tr> 44 45 <tr valign="top"> 46 <th scope="row"><?php _e('Allow new registrations') ?></th> 47 <?php 48 if( !get_site_option('registration') ) 49 update_site_option( 'registration', 'all' ); 50 ?> 51 <td> 52 <label><input name="registration" type="radio" id="registration1" value='none' <?php echo get_site_option('registration') == 'none' ? 'checked="checked"' : ''; ?> /> <?php _e('Disabled'); ?></label><br /> 53 <label><input name="registration" type="radio" id="registration2" value='all' <?php echo get_site_option('registration') == 'all' ? 'checked="checked"' : ''; ?> /> <?php _e('Enabled for all. Blogs and user accounts can be created.'); ?></label><br /> 54 <label><input name="registration" type="radio" id="registration3" value='user' <?php echo get_site_option('registration') == 'user' ? 'checked="checked"' : ''; ?> /> <?php _e('Enabled for users only. Only user account can be created.'); ?></label><br /> 55 <label><input name="registration" type="radio" id="registration4" value='blog' <?php echo get_site_option('registration') == 'blog' ? 'checked="checked"' : ''; ?> /> <?php _e('Enabled for blogs only. Only logged in users can create new blogs.'); ?></label><br /> 56 <?php _e('Disable or enable registration and who or what can be registered. (Default=all)') ?> 57 </td> 58 </tr> 59 60 <tr valign="top"> 61 <th scope="row"><?php _e('Registration notification') ?></th> 62 <?php 63 if( !get_site_option('registrationnotification') ) 64 update_site_option( 'registrationnotification', 'yes' ); 65 ?> 66 <td> 67 <input name="registrationnotification" type="radio" id="registrationnotification1" value='yes' <?php echo get_site_option('registrationnotification') == 'yes' ? 'checked="checked"' : ''; ?> /> <?php _e('Yes'); ?><br /> 68 <input name="registrationnotification" type="radio" id="registrationnotification2" value='no' <?php echo get_site_option('registrationnotification') == 'no' ? 'checked="checked"' : ''; ?> /> <?php _e('No'); ?><br /> 69 <?php _e('Send the site admin an email notification every time someone registers a blog or user account.') ?> 70 </td> 71 </tr> 72 73 <tr valign="top"> 74 <th scope="row"><?php _e('Welcome Email:') ?></th> 75 <td> 76 <textarea name="welcome_email" id="welcome_email" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('welcome_email') ) ?></textarea> 77 <br /> 78 <?php _e('The welcome email sent to new blog owners.') ?> 79 </td> 80 </tr> 81 82 <tr valign="top"> 83 <th scope="row"><?php _e('First Post:') ?></th> 84 <td> 85 <textarea name="first_post" id="first_post" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('first_post') ) ?></textarea> 86 <br /> 87 <?php _e('First post on a new blog.') ?> 88 </td> 89 </tr> 90 91 <tr valign="top"> 92 <th scope="row"><?php _e('Banned Names:') ?></th> 93 <td> 94 <input name="illegal_names" type="text" id="illegal_names" style="width: 95%" value="<?php echo implode( " ", get_site_option('illegal_names') ); ?>" size="45" /> 95 <br /> 96 <?php _e('Users are not allowed to register these blogs. Separate names by spaces.') ?> 97 </td> 98 </tr> 99 100 <tr valign="top"> 101 <th scope="row"><?php _e('Limited Email Registrations:') ?></th> 102 <td> 103 <input name="limited_email_domains" type="text" id="limited_email_domains" style="width: 95%" value="<?php echo get_site_option('limited_email_domains') == '' ? '' : @implode( " ", get_site_option('limited_email_domains') ); ?>" size="45" /> 104 <br /> 105 <?php _e('If you want to limit blog registrations to certain domains. Separate domains by spaces.') ?> 106 </td> 107 </tr> 108 109 <tr valign="top"> 110 <th scope="row"><?php _e('Banned Email Domains:') ?></th> 111 <td> 112 <textarea name="banned_email_domains" id="banned_email_domains" cols='40' rows='5'><?php echo get_site_option('banned_email_domains') == '' ? '' : @implode( "\n", get_site_option('banned_email_domains') ); ?></textarea> 113 &
