Changeset 713

Show
Ignore:
Timestamp:
08/01/06 17:14:06 (2 years ago)
Author:
donncha
Message:

WP Merge
Display newest updated blogs on home page
Sidebar and footer: added links to signup and main blog

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/edit-form-advanced.php

    r638 r713  
    217217</div> 
    218218 
     219<div class="dbx-box-wrapper"> 
    219220<fieldset id="postcustom" class="dbx-box"> 
     221<div class="dbx-handle-wrapper"> 
    220222<h3 class="dbx-handle"><?php _e('Custom Fields') ?></h3> 
     223</div> 
     224<div class="dbx-content-wrapper"> 
    221225<div id="postcustomstuff" class="dbx-content"> 
    222226<table cellpadding="3"> 
     
    233237</div> 
    234238</fieldset> 
     239</div> 
    235240 
    236241<?php do_action('dbx_post_advanced'); ?> 
  • trunk/wp-admin/list-manipulation-js.php

    r708 r713  
    3030                this.encVar('cookie', document.cookie); 
    3131                this.requestFile=f?f:'<?php echo $handler; ?>';this.getResponseElement(r);this.method='POST'; 
    32                 this.onLoading=function(){this.myResponseElement.innerHTML="<?php _e('Sending Data...'); ?>";}; 
    33                 this.onLoaded=function(){this.myResponseElement.innerHTML="<?php _e('Data Sent...'); ?>";}; 
    34                 this.onInteractive=function(){this.myResponseElement.innerHTML="<?php _e('Processing Data...'); ?>";}; 
    3532        } 
    3633 
  • trunk/wp-admin/post.php

    r638 r713  
    9494        $post_ID = edit_post(); 
    9595 
     96        $referredby = ''; 
     97        if ( !empty($_POST['referredby']) ) 
     98                $referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']); 
     99        $referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer()); 
     100         
    96101        if ($_POST['save']) { 
    97102                $location = wp_get_referer(); 
     
    100105        } elseif ($_POST['deletemeta']) { 
    101106                $location = wp_get_referer() . '&message=3#postcustom'; 
    102         } elseif (!empty($_POST['referredby']) && $_POST['referredby'] != wp_get_referer()) { 
     107        } elseif (!empty($referredby) && $referredby != $referer) { 
    103108                $location = $_POST['referredby']; 
    104109                if ( $_POST['referredby'] == 'redo' ) 
  • trunk/wp-content/themes/default/footer.php

    r439 r713  
    11 
     2<?php $current_site = get_current_site(); ?> 
    23<hr /> 
    34<div id="footer"> 
    45        <p> 
    56                <?php bloginfo('name'); ?> is proudly powered by  
    6                 <a href="http://wordpress.org/">WordPress</a> 
     7                <a href="http://mu.wordpress.org/">WordPress MU</a> running on <a href="http://<?php echo $current_site->domain . $current_site->path ?>"><?php echo $current_site->site_name ?></a>. <a href="http://<?php echo $current_site->domain . $current_site->path ?>wp-signup.php" title="Create a new blog">Create a new blog</a> and join in the fun! 
    78                <br /><a href="feed:<?php bloginfo('rss2_url'); ?>">Entries (RSS)</a> 
    89                and <a href="feed:<?php bloginfo('comments_rss2_url'); ?>">Comments (RSS)</a>. 
  • trunk/wp-content/themes/default/sidebar.php

    r663 r713  
    5959                                        <li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li> 
    6060                                        <li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress</a></li> 
     61                                        <?php $current_site = get_current_site(); ?> 
     62                                        <li><a href="http://<?php echo $current_site->domain . $current_site->path ?>wp-signup.php" title="Create a new blog">New Blog</a></li> 
     63                                        <li><a href="http://<?php echo $current_site->domain . $current_site->path ?>" title="<?php echo $current_site->site_name ?>"><?php echo $current_site->site_name ?></a></li> 
    6164                                        <?php wp_meta(); ?> 
    6265                                </ul> 
  • trunk/wp-content/themes/home/home.php

    r588 r713  
    11<?php get_header(); ?> 
    22 
    3        <div id="content" class="widecolumn"> 
     3<div id="content" class="widecolumn"> 
    44                                 
    5         <h2>WordPress &micro;</h2> 
    6         <p>This is a <a href="http://mu.wordpress.org/">WordPress Mu</a> powered site.</p> 
    7         <p>You can: <ul><li> <a href="wp-login.php">Login</a> </li><li> <a href="wp-signup.php">Create a new blog</a></li><li> Edit this file at <code>wp-content/themes/home/home.php</code> with your favourite text editor and customize this screen.</li></ul></p> 
    8 <h3>News Blog</h3> 
    9  
     5<h2>WordPress &micro;</h2> 
     6<p>This is a <a href="http://mu.wordpress.org/">WordPress Mu</a> powered site.</p> 
     7<p>You can: <ul><li> <a href="wp-login.php">Login</a> </li><li> <a href="wp-signup.php">Create a new blog</a></li><li> Edit this file at <code>wp-content/themes/home/home.php</code> with your favourite text editor and customize this screen.</li></ul></p> 
     8<h3>The Latest News</h3> 
    109<ul> 
     10<strong>Site News</strong> 
    1111<?php  
    1212query_posts('showposts=7'); 
     
    1515<?php endwhile; ?><?php endif; ?> 
    1616</ul> 
    17  
     17<?php 
     18$blogs = get_last_updated(); 
     19if( is_array( $blogs ) ) { 
     20        ?> 
     21        <ul> 
     22        <strong>Updated Blogs</strong> 
     23        <?php foreach( $blogs as $details ) { 
     24                ?><li><a href="http://<?php echo $details[ 'domain' ] . $details[ 'path' ] ?>"><?php echo get_blog_option( $details[ 'blog_id' ], 'blogname' ) ?></a></li><?php 
     25        } 
     26        ?> 
     27        </ul> 
     28        <?php 
     29
     30?> 
    1831</div> 
    1932 
  • trunk/wp-includes/author-template.php

    r559 r713  
    134134} 
    135135 
    136 function get_author_link($echo = false, $author_id, $author_nicename) { 
     136function get_author_link($echo = false, $author_id, $author_nicename = '') { 
    137137        global $wpdb, $wp_rewrite, $post, $cache_userdata; 
    138138        $auth_ID = $author_id; 
     
    143143                $link = $file . '?author=' . $auth_ID; 
    144144        } else { 
    145                 if ( '' == $author_nicename ) 
    146                         $author_nicename = $cache_userdata[$author_id]->user_nicename; 
     145                if ( '' == $author_nicename ) { 
     146                        $user = get_userdata($author_id); 
     147                        if ( !empty($user->user_nicename) ) 
     148                                $author_nicename = $user->user_nicename; 
     149                } 
    147150                $link = str_replace('%author%', $author_nicename, $link); 
    148151                $link = get_settings('home') . trailingslashit($link); 
  • trunk/wp-includes/wp-db.php

    r685 r713  
    101101                array ('query' => $this->last_query, 'error_str' => $str); 
    102102 
     103                $str = htmlspecialchars($str, ENT_QUOTES); 
     104                $query = htmlspecialchars($this->last_query, ENT_QUOTES); 
    103105                // Is error output turned on or not.. 
    104106                if ( $this->show_errors ) { 
     
    106108                        print "<div id='error'> 
    107109                        <p class='wpdberror'><strong>WordPress database error:</strong> [$str]<br /> 
    108                         <code>$this->last_query</code></p> 
     110                        <code>$query</code></p> 
    109111                        </div>"; 
    110112                } else { 
  • trunk/wp-includes/wpmu-functions.php

    r681 r713  
    503503function get_last_updated( $display = false ) { 
    504504        global $wpdb; 
    505         $blogs = $wpdb->get_results( "SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = '$wpdb->siteid' AND last_updated != '0000-00-00 00:00:00' ORDER BY last_updated DESC limit 0,40", ARRAY_A ); 
    506         if( is_array( $blogs ) ) { 
    507                 while( list( $key, $details ) = each( $blogs ) ) {  
    508                         if( get_blog_status( $details[ 'blog_id' ], 'archived' ) == '1' ) 
    509                                 unset( $blogs[ $key ] ); 
    510                 } 
    511         } 
     505        $blogs = $wpdb->get_results( "SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = '$wpdb->siteid' AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' AND last_updated != '0000-00-00 00:00:00' ORDER BY last_updated DESC limit 0,40", ARRAY_A ); 
    512506 
    513507        return $blogs; 
     
    13661360} 
    13671361 
     1362function get_current_site() { 
     1363        global $current_site; 
     1364        return $current_site; 
     1365} 
     1366 
    13681367?> 
  • trunk/wp-login.php

    r705 r713  
    9393 
    9494case 'retrievepassword': 
    95         $user_data = get_userdatabylogin($_POST['user_login']); 
     95        $user_data = get_userdatabylogin(trim($_POST['user_login'])); 
    9696        // redefining user_login ensures we return the right case in the email 
    9797        $user_login = $user_data->user_login;