Changeset 784

Show
Ignore:
Timestamp:
09/29/06 11:56:38 (2 years ago)
Author:
donncha
Message:

WP Merge to rev 4262

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/comment.php

    r770 r784  
    178178        edit_comment(); 
    179179 
    180         $referredby = $_POST['referredby']; 
    181         if (!empty($referredby)) { 
    182                 wp_redirect($referredby); 
    183         } else { 
    184                 wp_redirect("edit.php?p=$comment_post_ID&c=1#comments"); 
    185         } 
     180        $location = ( empty($_POST['referredby']) ? "edit.php?p=$comment_post_ID&c=1" : $_POST['referredby'] ) . '#comment-' . $comment_ID; 
     181        $location = apply_filters('comment_edit_redirect', $location, $comment_ID); 
     182        wp_redirect($location); 
    186183 
    187184        break; 
  • trunk/wp-admin/inline-uploading.php

    r770 r784  
    11<?php 
    2  
    32require_once('admin.php'); 
    4  
    5 header('Content-Type: text/html; charset=' . get_option('blog_charset')); 
     3@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); 
    64 
    75if (!current_user_can('upload_files')) 
     
    280278 
    281279default: 
    282 wp_die(__('This script was not meant to be called directly.')); 
     280       wp_die(__('This script was not meant to be called directly.')); 
    283281} 
    284282 
    285283?> 
    286284<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    287 <html xmlns="http://www.w3.org/1999/xhtml"
     285<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>
    288286<head> 
    289287<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 
     
    431429</script> 
    432430<style type="text/css"> 
    433 <?php if ( $action == 'links' ) : ?> 
    434 * html { overflow-x: hidden; } 
    435 <?php else : ?> 
    436 * html { overflow-y: hidden; } 
    437 <?php endif; ?> 
    438 body { 
    439         font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana; 
    440         border: none; 
    441         margin: 0px; 
    442         height: 150px; 
    443         background: #dfe8f1; 
    444 
    445 form { 
    446         margin: 3px 2px 0px 6px; 
    447 
    448 #wrap { 
    449         clear: both; 
    450         padding: 0px; 
    451         width: 100%; 
    452 
    453 #images { 
    454         position: absolute; 
    455         clear: both; 
    456         margin: 0px; 
    457         padding: 15px 15px; 
    458         width: <?php echo $images_width; ?>px; 
    459 
    460 #images img { 
    461         background-color: rgb(209, 226, 239); 
    462 
    463 <?php echo $style; ?> 
    464 .attwrap, .attwrap * { 
    465         margin: 0px; 
    466         padding: 0px; 
    467         border: 0px; 
    468 
    469 .imagewrap { 
    470         margin-right: 5px; 
    471         overflow: hidden; 
    472         width: 128px; 
    473 
    474 .otherwrap { 
    475         margin-right: 5px; 
    476         overflow: hidden; 
    477         background-color: #f9fcfe; 
    478 
    479 .otherwrap a { 
    480         display: block; 
    481 
    482 .otherwrap a, .otherwrap a:hover, .otherwrap a:active, .otherwrap a:visited { 
    483         color: blue; 
    484 
    485 .usingicon { 
    486         padding: 0px; 
    487         height: 96px; 
    488         text-align: center; 
    489         width: 128px; 
    490 
    491 .usingtext { 
    492         padding: 3px; 
    493         height: 90px; 
    494         text-align: left; 
    495         width: 122px; 
    496 
    497 .filetype { 
    498         font-size: 80%; 
    499         border-bottom: 3px double #89a 
    500 
    501 .imagewrap, .imagewrap img, .imagewrap a, .imagewrap a img, .imagewrap a:hover img, .imagewrap a:visited img, .imagewrap a:active img { 
    502         text-decoration: none; 
    503 
    504 #upload-menu { 
    505         background: #fff; 
    506         margin: 0px; 
    507         padding: 0; 
    508         list-style: none; 
    509         height: 2em; 
    510         border-bottom: 1px solid #448abd; 
    511         width: 100%; 
    512 
    513 #upload-menu li { 
    514         float: left; 
    515         margin: 0 0 0 .75em; 
    516 
    517 #upload-menu a { 
    518         display: block; 
    519         padding: 5px; 
    520         text-decoration: none; 
    521         color: #000; 
    522         border-top: 3px solid #fff; 
    523 
    524 #upload-menu .current a { 
    525         background: #dfe8f1; 
    526         border-right: 2px solid #448abd; 
    527 
    528 #upload-menu a:hover { 
    529         background: #dfe8f1; 
    530         color: #000; 
    531 
    532 .tip { 
    533         color: rgb(68, 138, 189); 
    534         padding: 2px 1em; 
    535 
    536 .inactive { 
    537         color: #fff; 
    538         padding: 1px 3px; 
    539 
    540 .left { 
    541         float: left; 
    542 
    543 .right { 
    544         float: right; 
    545 
    546 .center { 
    547         text-align: center; 
    548 
    549 #upload-menu li.spacer { 
    550         margin-left: 40px; 
    551 
    552 #title, #descr { 
    553         width: 99%; 
    554         margin-top: 1px; 
    555 
    556 th { 
    557         width: 4.5em; 
    558 
    559 #descr { 
    560         height: 36px; 
    561 
    562 #buttons { 
    563         margin-top: 2px; 
    564         text-align: right; 
    565 
    566 .popup { 
    567         margin: 4px 4px; 
    568         padding: 1px; 
    569         position: absolute; 
    570         width: 114px; 
    571         display: none; 
    572         background-color: rgb(240, 240, 238); 
    573         border-top: 2px solid #fff; 
    574         border-right: 2px solid #ddd; 
    575         border-bottom: 2px solid #ddd; 
    576         border-left: 2px solid #fff; 
    577         text-align: center; 
    578 
    579 .imagewrap .popup { 
    580         opacity: .90; 
    581         filter:alpha(opacity=90); 
    582 
    583 .otherwrap .popup { 
    584         padding-top: 20px; 
    585 
    586 .popup a, .popup a:visited, .popup a:active { 
    587         background-color: transparent; 
    588         display: block; 
    589         width: 100%; 
    590         text-decoration: none; 
    591         color: #246; 
    592 
    593 .popup a:hover { 
    594         background-color: #fff; 
    595         color: #000; 
    596 
    597 .caption { 
    598         text-align: center; 
    599 
    600 #submit { 
    601         margin: 1px; 
    602         width: 99%; 
    603 
    604 #submit input, #submit input:focus { 
    605         background: url( images/fade-butt.png ); 
    606         border: 3px double #999; 
    607         border-left-color: #ccc; 
    608         border-top-color: #ccc; 
    609         color: #333; 
    610         padding: 0.25em; 
    611 
    612 #submit input:active { 
    613         background: #f4f4f4; 
    614         border: 3px double #ccc; 
    615         border-left-color: #999; 
    616         border-top-color: #999; 
    617 
    618 .zerosize { 
    619         width: 0px; 
    620         height: 0px; 
    621         overflow: hidden; 
    622         position: absolute; 
    623 
    624 #links { 
    625         margin: 3px 8px; 
    626         line-height: 2em; 
    627 
    628 #links textarea { 
    629         width: 95%; 
    630         height: 4.5em; 
    631 
     431        <?php if ( $action == 'links' ) : ?> 
     432        * html { overflow-x: hidden; } 
     433        <?php else : ?> 
     434        * html { overflow-y: hidden; } 
     435        <?php endif; ?> 
     436 
     437        body { 
     438                font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana; 
     439                border: none; 
     440                margin: 0px; 
     441                height: 150px; 
     442                background: #dfe8f1; 
     443        } 
     444 
     445        form { margin: 3px 2px 0px 6px; } 
     446 
     447        #wrap { 
     448                clear: both; 
     449                padding: 0px; 
     450                width: 100%; 
     451        } 
     452 
     453        #images { 
     454                position: absolute; 
     455                clear: both; 
     456                margin: 0px; 
     457                padding: 15px 15px; 
     458                width: <?php echo $images_width; ?>px; 
     459        } 
     460 
     461        #images img { background-color: rgb(209, 226, 239); } 
     462 
     463        <?php echo $style; ?> 
     464 
     465        .attwrap, .attwrap * { 
     466                margin: 0px; 
     467                padding: 0px; 
     468                border: 0px; 
     469        } 
     470 
     471        .imagewrap { 
     472                margin-right: 5px; 
     473                overflow: hidden; 
     474                width: 128px; 
     475        } 
     476 
     477        .otherwrap { 
     478                margin-right: 5px; 
     479                overflow: hidden; 
     480                background-color: #f9fcfe; 
     481        } 
     482 
     483        .otherwrap a { display: block; } 
     484 
     485        .otherwrap a, .otherwrap a:hover, .otherwrap a:active, .otherwrap a:visited { color: blue; } 
     486 
     487        .usingicon { 
     488                padding: 0px; 
     489                height: 96px; 
     490                text-align: center; 
     491                width: 128px; 
     492        } 
     493 
     494        .usingtext { 
     495                padding: 3px; 
     496                height: 90px; 
     497                text-align: left; 
     498                width: 122px; 
     499        } 
     500 
     501        .filetype { 
     502                font-size: 80%; 
     503                border-bottom: 3px double #89a; 
     504        } 
     505 
     506        .imagewrap, .imagewrap img, .imagewrap a, .imagewrap a img, .imagewrap a:hover img, .imagewrap a:visited img, .imagewrap a:active img { text-decoration: none; } 
     507 
     508        #upload-menu { 
     509                background: #fff; 
     510                margin: 0px; 
     511                padding: 0; 
     512                list-style: none; 
     513                height: 2em; 
     514                border-bottom: 1px solid #448abd; 
     515                width: 100%; 
     516        } 
     517 
     518        #upload-menu li { 
     519                float: left; 
     520                margin: 0 0 0 .75em; 
     521        } 
     522 
     523        #upload-menu a { 
     524                display: block; 
     525                padding: 5px; 
     526                text-decoration: none; 
     527                color: #000; 
     528                border-top: 3px solid #fff; 
     529        } 
     530 
     531        #upload-menu .current a { 
     532                background: #dfe8f1; 
     533                border-right: 2px solid #448abd; 
     534        } 
     535 
     536        #upload-menu a:hover { 
     537                background: #dfe8f1; 
     538                color: #000; 
     539        } 
     540 
     541        .tip { 
     542                color: rgb(68, 138, 189); 
     543                padding: 2px 1em; 
     544        } 
     545 
     546        .inactive { 
     547                color: #fff; 
     548                padding: 1px 3px; 
     549        } 
     550 
     551        .left { float: left; } 
     552 
     553        .right { float: right; } 
     554 
     555        .center { text-align: center; } 
     556 
     557        #upload-menu li.spacer { margin-left: 40px; } 
     558 
     559        #title, #descr { 
     560                width: 99%; 
     561                margin-top: 1px; 
     562        } 
     563 
     564        th { 
     565                text-align: right; 
     566                width: 4.5em; 
     567        } 
     568 
     569        #descr { height: 36px; } 
     570 
     571        #buttons { 
     572                margin-top: 2px; 
     573                text-align: right; 
     574        } 
     575 
     576        .popup { 
     577                margin: 4px 4px; 
     578                padding: 1px; 
     579                position: absolute; 
     580                width: 114px; 
     581                display: none; 
     582                background-color: rgb(240, 240, 238); 
     583                border-top: 2px solid #fff; 
     584                border-right: 2px solid #ddd; 
     585                border-bottom: 2px solid #ddd; 
     586                border-left: 2px solid #fff; 
     587                text-align: center; 
     588        } 
     589 
     590        .imagewrap .popup { 
     591                opacity: .90; 
     592                filter:alpha(opacity=90); 
     593        } 
     594 
     595        .otherwrap .popup { padding-top: 20px; } 
     596 
     597        .popup a, .popup a:visited, .popup a:active { 
     598                background-color: transparent; 
     599                display: block; 
     600                width: 100%; 
     601                text-decoration: none; 
     602                color: #246; 
     603        } 
     604 
     605        .popup a:hover { 
     606                background-color: #fff; 
     607                color: #000; 
     608        } 
     609 
     610        .caption { text-align: center; } 
     611 
     612        #submit { 
     613                margin: 1px; 
     614                width: 99%; 
     615        } 
     616 
     617        #submit input, #submit input:focus { 
     618                background: url( images/fade-butt.png ); 
     619                border: 3px double #999; 
     620                border-left-color: #ccc; 
     621                border-top-color: #ccc; 
     622                color: #333; 
     623                padding: 0.25em; 
     624        } 
     625 
     626        #submit input:active { 
     627                background: #f4f4f4; 
     628                border: 3px double #ccc; 
     629                border-left-color: #999; 
     630                border-top-color: #999; 
     631        } 
     632 
     633        .zerosize { 
     634                width: 0px; 
     635                height: 0px; 
     636                overflow: hidden; 
     637                position: absolute; 
     638        } 
     639 
     640        #links { 
     641                margin: 3px 8px; 
     642                line-height: 2em; 
     643        } 
     644 
     645        #links textarea { 
     646                width: 95%; 
     647                height: 4.5em; 
     648        } 
    632649</style> 
     650<?php if ( ('rtl' == $wp_locale->text_direction) ): ?> 
     651<style type="text/css"> 
     652        body { font: 13px Tahoma, "Lucida Grande", "Lucida Sans Unicode", Verdana; } 
     653 
     654        .usingtext { text-align: right; } 
     655 
     656        th { text-align: left; } 
     657 
     658        .left, #upload-menu li { float: right; } 
     659 
     660        .right { float: left; } 
     661 
     662        .popup { 
     663                border-right: 2px solid #fff; 
     664                border-left: 2px solid #ddd; 
     665        } 
     666 
     667        #upload-menu .current a { 
     668                border-right: 0; 
     669                border-left: 2px solid #448abd; 
     670        } 
     671 
     672        #submit input, #submit input:focus { 
     673                border-left: 0; 
     674                border-right-color: #ccc; 
     675        } 
     676 
     677        #submit input:active { 
     678                border-left: 0; 
     679                border-right-color: #999; 
     680        } 
     681</style> 
     682<?php endif; ?>  
    633683</head> 
    634684<body> 
    635685<ul id="upload-menu"> 
    636 <li<?php echo $current_1; ?>><a href="<?php echo basename(__FILE__) . "?action=upload&amp;post=$post&amp;all=$all&amp;start=$start"; ?>"><?php _e('Upload'); ?></a></li> 
    637 <?php if ( $attachments = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE post_parent = '$post'") ) { ?> 
    638 <li<?php echo $current_2; ?>><a href="<?php echo basename(__FILE__) . "?action=view&amp;post=$post&amp;all=false"; ?>"><?php _e('Browse'); ?></a></li> 
    639 <?php } ?> 
    640 <?php if ($wpdb->get_var("SELECT count(ID) FROM $wpdb->posts WHERE post_type = 'attachment'")) { ?> 
    641 <li<?php echo $current_3; ?>><a href="<?php echo basename(__FILE__) . "?action=view&amp;post=$post&amp;all=true"; ?>"><?php _e('Browse All'); ?></a></li> 
    642 <?php } ?> 
    643 <li> </li> 
    644 <?php if ( $action == 'view' ) { ?> 
    645 <?php if ( false !== $back ) : ?> 
    646 <li class="spacer"><a href="<?php echo basename(__FILE__) . "?action=$action&amp;post=$post&amp;all=$all&amp;start=0"; ?>" title="<?php _e('First'); ?>">|&laquo;</a></li> 
    647 <li><a href="<?php echo basename(__FILE__) . "?action=$action&amp;post=$post&amp;all=$all&amp;start=$back"; ?>">&laquo; <?php _e('Back'); ?></a></li> 
    648 <?php else : ?> 
    649 <li class="inactive spacer">|&laquo;</li> 
    650 <li class="inactive">&laquo; <?php _e('Back'); ?></li> 
    651 <?php endif; ?> 
    652 <?php if ( false !== $next ) : ?> 
    653 <li><a href="<?php echo basename(__FILE__) . "?action=$action&amp;post=$post&amp;all=$all&amp;start=$next"; ?>"><?php _e('Next &raquo;'); ?></a></li> 
    654 <li><a href="<?php echo basename(__FILE__) . "?action=$action&amp;post=$post&amp;all=$all&amp;last=true"; ?>" title="<?php _e('Last'); ?>">&raquo;|</a></li> 
    655 <?php else : ?> 
    656 <li class="inactive"><?php _e('Next &raquo;'); ?></li> 
    657 <li class="inactive">&raquo;|</li> 
    658 <?php endif; ?> 
    659 <?php } // endif not upload?> 
     686        <li<?php echo $current_1; ?>><a href="<?php echo basename(__FILE__) . "?action=upload&amp;post=$post&amp;all=$all&amp;start=$start"; ?>"><?php _e('Upload'); ?></a></li> 
     687 
     688        <?php if ( $attachments = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE post_parent = '$post'") ): ?> 
     689                <li<?php echo $current_2; ?>><a href="<?php echo basename(__FILE__) . "?action=view&amp;post=$post&amp;all=false"; ?>"><?php _e('Browse'); ?></a></li> 
     690        <?php endif; ?> 
     691 
     692        <?php if ($wpdb->get_var("SELECT count(ID) FROM $wpdb->posts WHERE post_type = 'attachment'")): ?> 
     693                <li<?php echo $current_3; ?>><a href="<?php echo basename(__FILE__) . "?action=view&amp;post=$post&amp;all=true"; ?>"><?php _e('Browse All'); ?></a></li> 
     694        <?php endif; ?> 
     695 
     696        <li> </li> 
     697 
     698        <?php if ( $action == 'view' ): ?> 
     699                <?php if ( false !== $back ): ?> 
     700                        <li class="spacer"><a href="<?php echo basename(__FILE__) . "?action=$action&amp;post=$post&amp;all=$all&amp;start=0"; ?>" title="<?php _e('First'); ?>">|&laquo;</a></li> 
     701                        <li><a href="<?php echo basename(__FILE__) . "?action=$action&amp;post=$post&amp;all=$all&amp;start=$back"; ?>">&laquo; <?php _e('Back'); ?></a></li> 
     702                <?php else: ?> 
     703                        <li class="inactive spacer">|&laquo;</li> 
     704                        <li class="inactive">&laquo; <?php _e('Back'); ?></li> 
     705                <?php endif; ?> 
     706 
     707                <?php if ( false !== $next ): ?> 
     708                        <li><a href="<?php echo basename(__FILE__) . "?action=$action&amp;post=$post&amp;all=$all&amp;start=$next"; ?>"><?php _e('Next &raquo;'); ?></a></li> 
     709                        <li><a href="<?php echo basename(__FILE__) . "?action=$action&amp;post=$post&amp;all=$all&amp;last=true"; ?>" title="<?php _e('Last'); ?>">&raquo;|</a></li> 
     710                <?php else: ?> 
     711                        <li class="inactive"><?php _e('Next &raquo;'); ?></li> 
     712                        <li class="inactive">&raquo;|</li> 
     713                <?php endif; ?> 
     714        <?php endif; ?> 
    660715</ul> 
    661 <?php if ( $action == 'view' ) : ?> 
    662 <div id="wrap"> 
    663 <!--<div class="tip"><?php _e('You can drag and drop these items into your post. Click on one for more options.'); ?></div>--> 
    664 <div id="images"> 
    665 <?php echo $html; ?> 
    666 <?php echo $popups; ?> 
    667 </div> 
    668 </div> 
    669 <?php elseif ( $action == 'upload' ) : ?> 
     716 
     717<?php if ( $action == 'view' ): ?> 
     718        <div id="wrap"> 
     719                <!--<div class="tip"><?php _e('You can drag and drop these items into your post. Click on one for more options.'); ?></div>--> 
     720                <div id="images"> 
     721                        <?php echo $html; ?> 
     722                        <?php echo $popups; ?> 
     723                </div> 
     724        </div> 
     725<?php elseif ( $action == 'upload' ): ?> 
    670726        <?php $upload_err = apply_filters( "pre_upload_error", false );  
    671727        if( $upload_err != false ) { 
    672728                ?><div class="center tip"><?php echo $upload_err ?></div><?php 
    673729        } else { ?> 
    674 <div class="tip"></div> 
    675 <form enctype="multipart/form-data" id="uploadForm" method="post" action="<?php echo basename(__FILE__); ?>"> 
    676 <table style="width:99%;"> 
    677 <tr> 
    678 <th scope="row" align="right"><label for="upload"><?php _e('File:'); ?></label></th> 
    679 <td><input type="file" id="upload" name="image" /></td> 
    680 </tr> 
    681 <tr> 
    682 <th scope="row" align="right"><label for="title"><?php _e('Title:'); ?></label></th> 
    683 <td><input type="text" id="title" name="imgtitle" /></td> 
    684 </tr> 
    685 <tr> 
    686 <th scope="row" align="right"><label for="descr"><?php _e('Description:'); ?></label></th> 
    687 <td><input type="textarea" name="descr" id="descr" value="" /></td> 
    688 </tr> 
    689 <tr id="buttons"> 
    690 <th></th> 
    691 <td> 
    692 <input type="hidden" name="action" value="save" /> 
    693 <input type="hidden" name="post" value="<?php echo $post; ?>" /> 
    694 <input type="hidden" name="all" value="<?php echo $all; ?>" /> 
    695 <input type="hidden" name="start" value="<?php echo $start; ?>" /> 
    696 <?php wp_nonce_field( 'inlineuploading' ); ?> 
    697 <div id="submit"> 
    698 <input type="submit" value="<?php _e('Upload'); ?>" /> 
    699 <?php if ( !empty($all) ) : ?> 
    700 <input type="button" value="<?php _e('Cancel'); ?>" onclick="cancelUpload()" /> 
    701 <?php endif; ?> 
    702 </div> 
    703 </td> 
    704 </tr> 
    705 </table> 
    706 </div> 
    707 </form> 
    708 <?php } ?> 
     730        <div class="tip"></div> 
     731        <form enctype="multipart/form-data" id="uploadForm" method="post" action="<?php echo basename(__FILE__); ?>"> 
     732                <table style="width: 99%"> 
     733                        <tr> 
     734                                <th scope="row"><label for="upload"><?php _e('File:'); ?></label></th> 
     735                                <td><input type="file" id="upload" name="image" /></td> 
     736                        </tr> 
     737                        <tr> 
     738                                <th scope="row"><label for="title"><?php _e('Title:'); ?></label></th> 
     739                                <td><input type="text" id="title" name="imgtitle" /></td> 
     740                        </tr> 
     741                        <tr> 
     742                                <th scope="row"><label for="descr"><?php _e('Description:'); ?></label></th> 
     743                                <td><input type="textarea" name="descr" id="descr" value="" /></td> 
     744                        </tr> 
     745                        <tr id="buttons"> 
     746                                <th></th> 
     747                                <td> 
     748                                        <input type="hidden" name="action" value="save" /> 
     749                                        <input type="hidden" name="post" value="<?php echo $post; ?>" /> 
     750                                        <input type="hidden" name="all" value="<?php echo $all; ?>" /> 
     751                                        <input type="hidden" name="start" value="<?php echo $start; ?>" /> 
     752                                        <?php wp_nonce_field( 'inlineuploading' ); ?> 
     753                                        <div id="submit"> 
     754                                                <input type="submit" value="<?php _e('Upload'); ?>" /> 
     755                                                <?php if ( !empty($all) ): ?> 
     756                                                        <input type="button" value="<?php _e('Cancel'); ?>" onclick="cancelUpload()" /> 
     757                                                <?php endif; ?> 
     758                                        </div> 
     759                                </td> 
     760                        </tr> 
     761                </table> 
     762        </form> 
     763        <?php } ?> 
    709764<?php elseif ( $action == 'links' ) : ?> 
    710 <div id="links"> 
    711 <?php the_attachment_links($attachment); ?> 
    712 </div> 
     765       <div id="links"> 
     766               <?php the_attachment_links($attachment); ?> 
     767       </div> 
    713768<?php endif; ?> 
    714769</body> 
  • trunk/wp-admin/upgrade.php

    r595 r784  
    11<?php 
    22define('WP_INSTALLING', true); 
    3 if (!file_exists('../wp-config.php')) die("There doesn't seem to be a wp-config.php file. Double check that you updated wp-config-sample.php with the proper database connection information and renamed it to wp-config.php."); 
     3if (!file_exists('../wp-config.php')) 
     4        die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://codex.wordpress.org/Installing_WordPress#Step_3:_Set_up_wp-config.php'>We got it</a>. You can <a href='setup-config.php'>create a <code>wp-config.php</code> file through a web interface</a>, but this doesn't work for all server setups. The safest way is to manually create the file."); 
     5 
    46require('../wp-config.php'); 
    57timer_start(); 
    68require_once(ABSPATH . '/wp-admin/upgrade-functions.php'); 
    79 
    8 $step = $_GET['step']; 
    9 if (!$step) $step = 0; 
    10 header( 'Content-Type: text/html; charset=utf-8' ); 
     10if (isset($_GET['step'])) 
     11        $step = $_GET['step']; 
     12else 
     13        $step = 0; 
     14@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); 
    1115?> 
    1216<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    13 <html xmlns="http://www.w3.org/1999/xhtml"
     17<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>
    1418<head> 
    15         <title>WordPress &rsaquo; Upgrade</title> 
    16         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    17         <style media="screen" type="text/css"> 
    18         <!-- 
    19         html { 
    20                 background: #eee; 
    21         } 
    22         body { 
    23                 background: #fff; 
    24                 color: #000; 
    25                 font-family: Georgia, "Times New Roman", Times, serif; 
    26                 margin-left: 20%; 
    27                 margin-right: 20%; 
    28                 padding: .2em 2em; 
    29         } 
    30  
    31         h1 { 
    32                 color: #006; 
    33                 font-size: 18px; 
    34                 font-weight: lighter; 
    35         } 
    36  
    37         h2 { 
    38                 font-size: 16px; 
    39         } 
    40  
    41         p, li, dt { 
    42                 line-height: 140%; 
    43                 padding-bottom: 2px; 
    44         } 
    45  
    46         ul, ol { 
    47                 padding: 5px 5px 5px 20px; 
    48         } 
    49         #logo { 
    50                 margin-bottom: 2em; 
    51         } 
    52 .step a, .step input { 
    53         font-size: 2em; 
    54 
    55 .step, th { 
    56         text-align: right; 
    57 
    58 #footer { 
    59 text-align: center; border-top: 1px solid #ccc; padding-top: 1em; font-style: italic; 
    60 
    61         --> 
    62         </style> 
     19        <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 
     20        <title><?php _e('WordPress &rsaquo; Upgrade'); ?></title> 
     21        <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/install.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
     22        <?php if ( ('rtl' == $wp_locale->text_direction) ) : ?> 
     23        <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/install-rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
     24        <?php endif; ?> 
    6325</head> 
    6426<body> 
     
    6628<?php 
    6729switch($step) { 
    68  
    6930        case 0: 
    70         $goback = wp_specialchars(wp_get_referer()); 
     31               $goback = wp_specialchars(wp_get_referer()); 
    7132?>  
    7233<p><?php _e('This file upgrades you from any previous version of WordPress to the latest. It may take a while though, so be patient.'); ?></p>  
    73        <h2 class="step"><a href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress &raquo;'); ?></a></h2> 
     34<h2 class="step"><a href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress &raquo;'); ?></a></h2> 
    7435<?php 
    75         break; 
     36                break; 
     37        case 1: 
     38                wp_upgrade(); 
    7639 
    77         case 1: 
    78         wp_upgrade(); 
    79         if( $wpdb->get_row( "SELECT blog_id FROM wp_blog_versions WHERE blog_id = '{$wpdb->blogid}'" ) ) { 
    80                 $wpdb->query( "UPDATE wp_blog_versions SET db_version = '{$wp_db_version}' WHERE blog_id = '{$wpdb->blogid}'" ); 
    81         } else { 
    82                 $wpdb->query( "INSERT INTO wp_blog_versions ( `blog_id` , `db_version` , `last_updated` ) VALUES ( '{$wpdb->blogid}', '{$wp_db_version}', NOW());" ); 
    83         } 
     40                if ( empty( $_GET['backto'] ) ) 
     41                        $backto = __get_option('home'); 
     42                else 
     43                        $backto = wp_specialchars( $_GET['backto'] , 1 ); 
     44                if( $wpdb->get_row( "SELECT blog_id FROM wp_blog_versions WHERE blog_id = '{$wpdb->blogid}'" ) ) { 
     45                        $wpdb->query( "UPDATE wp_blog_versions SET db_version = '{$wp_db_version}' WHERE blog_id = '{$wpdb->blogid}'" ); 
     46                } else { 
     47                        $wpdb->query( "INSERT INTO wp_blog_versions ( `blog_id` , `db_version` , `last_updated` ) VALUES ( '{$wpdb->blogid}', '{$wp_db_version}', NOW());" ); 
     48                } 
    8449 
    85         if ( empty( $_GET['backto'] ) ) 
    86                 $backto = __get_option('home'); 
    87         else 
    88                 $backto = wp_specialchars( $_GET['backto'] , 1 ); 
    8950?>  
    9051<h2><?php _e('Step 1'); ?></h2>  
     
    10061 
    10162<?php 
    102         break; 
     63               break; 
    10364} 
    10465?>  
  • trunk/wp-admin/wpmu-admin.php

    r385 r784  
    1919switch( $_GET[ 'action' ] ) { 
    2020    default: 
    21     /* 
    22     // print some global stats. 
    23     $stats = get_sitestats(); 
    24     print "<h2>Site Stats</h2> 
    25     There are currently ".$stats[ 'blogs' ]." <a href='wpmu-blogs.php'>blogs</a> running on this server and ".$stats[ 'users' ]." <a href='wpmu-users.php'>users</a>.</p><br /><br /> 
    26     "; 
     21    ?> 
     22<form name="searchform" action="wpmu-users.php" method="get"> 
     23<p> 
     24<input name="action" value="users" type="hidden" /> 
     25<input name="s" value="" size="17" type="text" />  
     26<input name="submit" value="Search Users &raquo;" type="submit" /> 
     27</p>  
     28</form> 
    2729 
    28     print "<table>"; 
    29     #$blogs = get_blog_list(); 
    30     #print "<br>blogs: <br>"; 
    31     #print_r( $blogs ); 
    32  
    33     $most_active = get_most_active_blogs( 10, false ); 
    34     if( is_array( $most_active ) ) { 
    35         print "<caption>Most Active Blogs</caption>"; 
    36         print "<tr><th scope='col'>ID</th><th scope='col'>Address</th><th scope='col'>Posts</th></tr>"; 
    37         while( list( $key, $details ) = each( $most_active ) ) {  
    38             $class = ('alternate' == $class) ? '' : 'alternate'; 
    39             $url = "http://" . $details[ 'domain' ] . $details[ 'path' ]; 
    40             print "<tr class='$class'><td>" . $details[ 'blog_id' ] . "</td><td><a href='$url'>$url</a></td><td>" . $details[ 'postcount' ] . "</td></tr>"; 
    41         } 
    42     } 
    43     print "</table>"; 
    44  
    45     do_action( "wpmuadmindefaultpage", "" ); 
    46     */ 
     30<form name="searchform" action="wpmu-blogs.php" method="get"> 
     31<p> 
     32<input type='hidden' name='action' value='blogs' /> 
     33<input type="text" name="s" value="" size="17" /> 
     34<input type="submit" name="submit" value="Search Blogs &raquo;" /> 
     35</p> 
     36</form> 
     37<?php 
    4738    break; 
    4839} 
  • trunk/wp-comments-post.php

    r729 r784  
    5858endif; 
    5959 
    60 $location = ( empty( $_POST['redirect_to'] ) ) ? get_permalink( $comment_post_ID ) : $_POST['redirect_to'];  
     60$location = ( empty($_POST['redirect_to']) ? get_permalink($comment_post_ID) : $_POST['redirect_to'] ) . '#comment-' . $comment_id; 
     61$location = apply_filters('comment_post_redirect', $location, $comment); 
    6162 
    62 wp_redirect( $location ); 
     63wp_redirect($location); 
    6364 
    6465?> 
  • trunk/wp-includes/js/tinymce/plugins/wordpress/wordpress.css

    r550 r784  
    2525 
    2626body { 
    27         font-family: Verdana, Arial, Helvetica, sans-serif; 
    28         font-size: 0.9em; 
     27        font-family: Georgia, "Times New Roman", Times, serif; 
     28        font-size: 1em; 
    2929        line-height: 1.2em; 
    3030        padding: .3em; 
    31         background-color: #FFFFFF
     31        background-color: #fff
    3232} 
    3333