Changeset 832

Show
Ignore:
Timestamp:
01/08/07 18:25:37 (2 years ago)
Author:
donncha
Message:

WP Merge to 4701

Files:

Legend:

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

    r828 r832  
    2020        $r .= "<input name='meta[$mid][key]' tabindex='6' onkeypress='return killSubmit(\"theList.ajaxUpdater(&#039;meta&#039;,&#039;meta-$mid&#039;);\",event);' type='text' size='20' value='$key' />"; 
    2121        $r .= "</td><td><textarea name='meta[$mid][value]' tabindex='6' rows='2' cols='30'>$value</textarea></td><td align='center'>"; 
    22         $r .= "<input name='updatemeta' type='button' class='updatemeta' tabindex='6' value='Update' onclick='return theList.ajaxUpdater(&#039;meta&#039;,&#039;meta-$mid&#039;);' /><br />"; 
     22        $r .= "<input name='updatemeta' type='button' class='updatemeta' tabindex='6' value='".attribute_escape(__('Update'))."' onclick='return theList.ajaxUpdater(&#039;meta&#039;,&#039;meta-$mid&#039;);' /><br />"; 
    2323        $r .= "<input name='deletemeta[$mid]' type='submit' onclick=\"return deleteSomething( 'meta', $mid, '"; 
    24         $r .= sprintf(__("You are about to delete the &quot;%s&quot; custom field on this post.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop."), $key_js); 
    25         $r .= "' );\" class='deletemeta' tabindex='6' value='Delete' /></td></tr>"; 
     24        $r .= js_escape(sprintf(__("You are about to delete the '%s' custom field on this post.\n'OK' to delete, 'Cancel' to stop."), $key_js)); 
     25        $r .= "' );\" class='deletemeta' tabindex='6' value='".attribute_escape(__('Delete'))."' /></td></tr>"; 
    2626        return $r; 
    2727} 
  • trunk/wp-admin/admin-functions.php

    r830 r832  
    498498                $user->user_pass = $pass1; 
    499499 
    500         if ( !validate_username( $user->user_login ) ) 
     500        if ( !$update && !validate_username( $user->user_login ) ) 
    501501                $errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is invalid.  Please enter a valid username.' )); 
    502502 
     
    601601function return_categories_list( $parent = 0 ) { 
    602602        global $wpdb; 
    603         return $wpdb->get_col( "SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent ORDER BY category_count DESC" ); 
     603        return $wpdb->get_col( "SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent AND ( link_count = 0 OR category_count != 0 ) ORDER BY category_count DESC" ); 
    604604} 
    605605 
     
    679679function return_link_categories_list( $parent = 0 ) { 
    680680        global $wpdb; 
    681         return $wpdb->get_col( "SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent ORDER BY link_count DESC" ); 
     681        return $wpdb->get_col( "SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent AND (category_count = 0  OR link_count != 0) ORDER BY link_count DESC" ); 
    682682} 
    683683 
     
    761761 
    762762                if ( ($category->cat_ID != $default_cat_id ) && ($category->cat_ID != $default_link_cat_id ) ) 
    763                         $edit .= "<td><a href='" . wp_nonce_url( "categories.php?action=delete&amp;cat_ID=$category->cat_ID", 'delete-category_' . $category->cat_ID ) . "' onclick=\"return deleteSomething( 'cat', $category->cat_ID, '" . sprintf( __("You are about to delete the category &quot;%s&quot;.\\nAll of its posts will go into the default category of &quot;%s&quot;\\nAll of its bookmarks will go into the default category of &quot;%s&quot;.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop." ), js_escape( $category->cat_name ), js_escape( get_catname( $default_cat_id )), js_escape( get_catname( $default_link_cat_id ) ) ) . "' );\" class='delete'>".__( 'Delete' )."</a>"; 
     763                        $edit .= "<td><a href='" . wp_nonce_url( "categories.php?action=delete&amp;cat_ID=$category->cat_ID", 'delete-category_' . $category->cat_ID ) . "' onclick=\"return deleteSomething( 'cat', $category->cat_ID, '" . js_escape(sprintf( __("You are about to delete the category '%s'.\nAll of its posts will go into the default category of '%s'\nAll of its bookmarks will go into the default category of '%s'.\n'OK' to delete, 'Cancel' to stop." ), $category->cat_name, get_catname( $default_cat_id ), get_catname( $default_link_cat_id ) )) . "' );\" class='delete'>".__( 'Delete' )."</a>"; 
    764764                else 
    765765                        $edit .= "<td style='text-align:center'>".__( "Default" ); 
     
    809809        <td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e( 'View' ); ?></a></td> 
    810810    <td><?php if ( current_user_can( 'edit_page', $id ) ) { echo "<a href='page.php?action=edit&amp;post=$id' class='edit'>" . __( 'Edit' ) . "</a>"; } ?></td>  
    811     <td><?php if ( current_user_can( 'delete_page', $id ) ) { echo "<a href='" . wp_nonce_url( "page.php?action=delete&amp;post=$id", 'delete-page_' . $id ) .  "' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . sprintf( __("You are about to delete the &quot;%s&quot; page.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop." ), js_escape( get_the_title() ) ) . "' );\">" . __( 'Delete' ) . "</a>"; } ?></td>  
     811    <td><?php if ( current_user_can( 'delete_page', $id ) ) { echo "<a href='" . wp_nonce_url( "page.php?action=delete&amp;post=$id", 'delete-page_' . $id ) .  "' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . js_escape(sprintf( __("You are about to delete the '%s' page.\n'OK' to delete, 'Cancel' to stop." ), get_the_title() ) ) . "' );\">" . __( 'Delete' ) . "</a>"; } ?></td>  
    812812  </tr>  
    813813 
     
    930930                $r .= "\n\t\t<td valign='top'><input name='meta[{$entry['meta_id']}][key]' tabindex='6' type='text' size='20' value='{$entry['meta_key']}' /></td>"; 
    931931                $r .= "\n\t\t<td><textarea name='meta[{$entry['meta_id']}][value]' tabindex='6' rows='2' cols='30'>{$entry['meta_value']}</textarea></td>"; 
    932                 $r .= "\n\t\t<td align='center'><input name='updatemeta' type='submit' class='updatemeta' tabindex='6' value='".__( 'Update' )."' /><br />"; 
     932                $r .= "\n\t\t<td align='center'><input name='updatemeta' type='submit' class='updatemeta' tabindex='6' value='".attribute_escape(__( 'Update' ))."' /><br />"; 
    933933                $r .= "\n\t\t<input name='deletemeta[{$entry['meta_id']}]' type='submit' onclick=\"return deleteSomething( 'meta', {$entry['meta_id']}, '"; 
    934                 $r .= sprintf( __("You are about to delete the &quot;%s&quot; custom field on this post.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop." ), $key_js ); 
    935                 $r .= "' );\" class='deletemeta' tabindex='6' value='".__( 'Delete' )."' /></td>"; 
     934                $r .= js_escape(sprintf( __("You are about to delete the '%s' custom field on this post.\n'OK' to delete, 'Cancel' to stop." ), $key_js ) ); 
     935                $r .= "' );\" class='deletemeta' tabindex='6' value='".attribute_escape(__( 'Delete' ))."' /></td>"; 
    936936                $r .= "\n\t</tr>"; 
    937937        } 
  • trunk/wp-admin/edit-comments.php

    r828 r832  
    158158if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 
    159159        echo " <a href='comment.php?action=editcomment&amp;c=".$comment->comment_ID."'>" .  __('Edit') . '</a>'; 
    160         echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&amp;p=' . $comment->comment_post_ID . '&amp;c=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . js_escape(sprintf(__("You are about to delete this comment by &quot;%s&quot;.\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), $comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> '; 
     160        echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&amp;p=' . $comment->comment_post_ID . '&amp;c=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . js_escape(sprintf(__("You are about to delete this comment by '%s'.\n'Cancel' to stop, 'OK' to delete."), $comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> '; 
    161161        if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) { 
    162162                echo '<span class="unapprove"> | <a href="' . wp_nonce_url('comment.php?action=unapprovecomment&amp;p=' . $comment->comment_post_ID . '&amp;c=' . $comment->comment_ID, 'unapprove-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Unapprove') . '</a> </span>'; 
    163163                echo '<span class="approve"> | <a href="' . wp_nonce_url('comment.php?action=approvecomment&amp;p=' . $comment->comment_post_ID . '&amp;c=' . $comment->comment_ID, 'approve-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Approve') . '</a> </span>'; 
    164164        } 
    165         echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&amp;dt=spam&amp;p=" . $comment->comment_post_ID . "&amp;c=" . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to mark as spam this comment by &quot;%s&quot;.\n&quot;Cancel&quot; to stop, &quot;OK&quot; to mark as spam."), $comment->comment_author))  . "', theCommentList );\">" . __('Spam') . "</a> "; 
     165        echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&amp;dt=spam&amp;p=" . $comment->comment_post_ID . "&amp;c=" . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to mark as spam this comment by '%s'.\n'Cancel' to stop, 'OK' to mark as spam."), $comment->comment_author))  . "', theCommentList );\">" . __('Spam') . "</a> "; 
    166166} 
    167167$post = get_post($comment->comment_post_ID); 
  • trunk/wp-admin/link-manager.php

    r828 r832  
    8888$select_order .= '<option value="order_name"' . (($order_by == 'order_name') ? " selected='selected'" : '') . '>' .  __('Name') . "</option>\n"; 
    8989$select_order .= '<option value="order_url"' . (($order_by == 'order_url') ? " selected='selected'" : '') . '>' .  __('Address') . "</option>\n"; 
     90$select_order .= '<option value="order_rating"' . (($order_by == 'order_rating') ? " selected='selected'" : '') . '>' .  __('Rating') . "</option>\n"; 
    9091$select_order .= "</select>\n"; 
    9192 
     
    176177                                case 'action': 
    177178                                        echo '<td><a href="link.php?link_id='.$link->link_id.'&amp;action=edit" class="edit">'.__('Edit').'</a></td>'; 
    178                                         echo '<td><a href="' . wp_nonce_url('link.php?link_id='.$link->link_id.'&amp;action=delete', 'delete-bookmark_' . $link->link_id ) . '"'." onclick=\"return deleteSomething( 'link', $link->link_id , '".js_escape(sprintf(__("You are about to delete the &quot;%s&quot; link to %s.\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), $link->link_name, $link->link_url )).'\' );" class="delete">'.__('Delete').'</a></td>'; 
     179                                        echo '<td><a href="' . wp_nonce_url('link.php?link_id='.$link->link_id.'&amp;action=delete', 'delete-bookmark_' . $link->link_id ) . '"'." onclick=\"return deleteSomething( 'link', $link->link_id , '".js_escape(sprintf(__("You are about to delete the '%s' link to %s.\n'Cancel' to stop, 'OK' to delete."), $link->link_name, $link->link_url )).'\' );" class="delete">'.__('Delete').'</a></td>'; 
    179180                                        break; 
    180181                                default: 
  • trunk/wp-admin/menu.php

    r810 r832  
    3131 
    3232 
     33$_wp_real_parent_file['post.php'] = 'post-new.php'; // Back-compat 
    3334$submenu['post-new.php'][5] = array(__('Write Post'), 'edit_posts', 'post-new.php'); 
    3435$submenu['post-new.php'][10] = array(__('Write Page'), 'edit_pages', 'page-new.php'); 
     
    8889                } 
    8990        } 
    90          
     91 
    9192        if ( empty($submenu[$parent]) ) 
    9293                unset($submenu[$parent]); 
     
    9596// Loop over the top-level menu. 
    9697// Menus for which the original parent is not acessible due to lack of privs will have the next 
    97 // submenu in line be assigned as the new menu parent.  
     98// submenu in line be assigned as the new menu parent. 
    9899foreach ( $menu as $id => $data ) { 
    99100        if ( empty($submenu[$data[2]]) )  
  • trunk/wp-atom.php

    r810 r832  
    3535                <issued><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></issued> 
    3636                <?php the_category_rss('rdf') ?> 
    37                 <summary type="text/plain" mode="escaped"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary> 
     37                <summary type="<?php bloginfo('html_type'); ?>" mode="escaped"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary> 
    3838<?php if ( !get_option('rss_use_excerpt') ) : ?> 
    3939                <content type="<?php bloginfo('html_type'); ?>" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_content('', 0, '') ?>]]></content> 
  • trunk/wp-includes/cache.php

    r810 r832  
    99        global $wp_object_cache; 
    1010 
     11        if ( ! isset($wp_object_cache) ) 
     12                return; 
    1113        return $wp_object_cache->save(); 
    1214} 
     
    416418 
    417419        function WP_Object_Cache() { 
     420                return $this->__construct(); 
     421        } 
     422         
     423        function __construct() { 
    418424                global $blog_id; 
     425 
     426                register_shutdown_function(array(&$this, "__destruct")); 
    419427 
    420428                if (defined('DISABLE_CACHE')) 
     
    452460                $this->blog_id = $this->hash($blog_id); 
    453461        } 
     462 
     463        function __destruct() { 
     464                $this->save(); 
     465                return true;     
     466        } 
    454467} 
    455468?> 
  • trunk/wp-includes/functions.php

    r828 r832  
    834834                $text = 'Gone'; 
    835835 
    836       if ( substr(php_sapi_name(), 0, 3) == 'cgi' ) 
     836//    if ( substr(php_sapi_name(), 0, 3) == 'cgi' ) 
    837837                @header("HTTP/1.1 $header $text"); 
    838       else 
    839               @header("Status: $header $text"); 
     838//    else 
     839//            @header("Status: $header $text"); 
    840840} 
    841841 
  • trunk/wp-includes/general-template.php

    r828 r832  
    819819        </div> 
    820820        <script type="text/javascript"> 
     821        // <![CDATA[ 
    821822                if ( typeof tinyMCE != "undefined" && tinyMCE.configs.length > 0 ) 
    822823                        document.getElementById('edButtons').style.display = 'block'; 
     824        // ]]> 
    823825        </script> 
    824826 
     
    829831        </div> 
    830832        <script type="text/javascript"> 
     833        // <![CDATA[ 
    831834                if ( typeof tinyMCE != "undefined" && tinyMCE.configs.length > 0 ) 
    832835                        document.getElementById("quicktags").style.display="none"; 
     
    855858                        } 
    856859                } 
     860        // ]]> 
    857861        </script> 
    858862        <?php 
  • trunk/wp-includes/locale.php

    r761 r832  
    8888                $this->meridiem['PM'] = __('PM'); 
    8989 
    90                 $this->_load_locale_data(); 
    91         } 
     90                // Import global locale vars set during inclusion of $locale.php. 
     91                foreach ( $this->locale_vars as $var ) { 
     92                        if ( isset($GLOBALS[$var]) ) 
     93                                $this->$var = $GLOBALS[$var]; 
     94                } 
    9295 
    93         function _load_locale_data() { 
    94                 $locale = get_locale(); 
    95                 $locale_file = ABSPATH . "wp-includes/languages/$locale.php"; 
    96                 if ( !file_exists($locale_file) ) 
    97                         return; 
    98  
    99                 include($locale_file); 
    100  
    101                 foreach ( $this->locale_vars as $var ) { 
    102                         $this->$var = $$var;     
    103                 } 
    10496        } 
    10597 
  • trunk/wp-includes/post-template.php

    r830 r832  
    379379                return false; 
    380380 
    381         if ( !$src = get_attachment_icon_src( $id, $fullsize ) ) 
     381        if ( !$src = get_attachment_icon_src( $post->ID, $fullsize ) ) 
    382382                return false; 
    383383 
     
    416416function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) { 
    417417        $id = (int) $id; 
    418  
    419         if ( $innerHTML = get_attachment_icon($id, $fullsize, $max_dims)) 
     418        if ( !$post = & get_post($id) ) 
     419                return false; 
     420 
     421        if ( $innerHTML = get_attachment_icon($post->ID, $fullsize, $max_dims)) 
    420422                return $innerHTML; 
    421423 
    422         $post = & get_post($id); 
    423424 
    424425        $innerHTML = attribute_escape($post->post_title); 
  • trunk/wp-includes/post.php

    r831 r832  
    14051405function wp_get_attachment_metadata( $post_id, $unfiltered = false ) { 
    14061406        $post_id = (int) $post_id; 
    1407  
    1408         $data = get_post_meta( $post_id, '_wp_attachment_metadata', true ); 
     1407        if ( !$post =& get_post( $post_id ) ) 
     1408                return false; 
     1409 
     1410        $data = get_post_meta( $post->ID, '_wp_attachment_metadata', true ); 
    14091411        if ( $unfiltered ) 
    14101412                return $data; 
    1411         return apply_filters( 'wp_get_attachment_metadata', $data, $post_id ); 
     1413        return apply_filters( 'wp_get_attachment_metadata', $data, $post->ID ); 
    14121414} 
    14131415 
    14141416function wp_update_attachment_metadata( $post_id, $data ) { 
    14151417        $post_id = (int) $post_id; 
    1416         if ( !get_post( $post_id ) ) 
    1417                 return false; 
    1418  
    1419         $old_data = wp_get_attachment_metadata( $post_id, true ); 
    1420  
    1421         $data = apply_filters( 'wp_update_attachment_metadata', $data, $post_id ); 
     1418        if ( !$post =& get_post( $post_id ) ) 
     1419                return false; 
     1420 
     1421        $old_data = wp_get_attachment_metadata( $post->ID, true ); 
     1422 
     1423        $data = apply_filters( 'wp_update_attachment_metadata', $data, $post->ID ); 
    14221424 
    14231425        if ( $old_data ) 
    1424                 return update_post_meta( $post_id, '_wp_attachment_metadata', $data, $old_data ); 
     1426                return update_post_meta( $post->ID, '_wp_attachment_metadata', $data, $old_data ); 
    14251427        else 
    1426                 return add_post_meta( $post_id, '_wp_attachment_metadata', $data ); 
     1428                return add_post_meta( $post->ID, '_wp_attachment_metadata', $data ); 
    14271429} 
    14281430 
     
    14321434                return false; 
    14331435 
    1434         $url = get_the_guid( $post_id ); 
     1436        $url = get_the_guid( $post->ID ); 
    14351437 
    14361438        if ( 'attachment' != $post->post_type || !$url ) 
    14371439                return false; 
    14381440 
    1439         return apply_filters( 'wp_get_attachment_url', $url, $post_id ); 
    1440 } 
    1441  
    1442 function wp_get_attachment_thumb_file( $post_id ) { 
     1441        return apply_filters( 'wp_get_attachment_url', $url, $post->ID ); 
     1442} 
     1443 
     1444function wp_get_attachment_thumb_file( $post_id = 0 ) { 
    14431445        $post_id = (int) $post_id; 
    1444         if ( !$imagedata = wp_get_attachment_metadata( $post_id ) ) 
    1445                 return false; 
    1446  
    1447         $file = get_attached_file( $post_id ); 
     1446        if ( !$post =& get_post( $post_id ) ) 
     1447                return false; 
     1448        if ( !$imagedata = wp_get_attachment_metadata( $post->ID ) ) 
     1449                return false; 
     1450 
     1451        $file = get_attached_file( $post->ID ); 
    14481452 
    14491453        if ( !empty($imagedata['thumb']) && ($thumbfile = str_replace(basename($file), $imagedata['thumb'], $file)) && file_exists($thumbfile) ) 
    1450                 return apply_filters( 'wp_get_attachment_thumb_file', $thumbfile, $post_id ); 
     1454                return apply_filters( 'wp_get_attachment_thumb_file', $thumbfile, $post->ID ); 
    14511455        return false; 
    14521456} 
     
    14541458function wp_get_attachment_thumb_url( $post_id = 0 ) { 
    14551459        $post_id = (int) $post_id; 
    1456         if ( !$url = wp_get_attachment_url( $post_id ) ) 
    1457                 return false; 
    1458  
    1459         if ( !$thumb = wp_get_attachment_thumb_file( $post_id ) ) 
     1460        if ( !$post =& get_post( $post_id ) ) 
     1461                return false; 
     1462        if ( !$url = wp_get_attachment_url( $post->ID ) ) 
     1463                return false; 
     1464 
     1465        if ( !$thumb = wp_get_attachment_thumb_file( $post->ID ) ) 
    14601466                return false; 
    14611467 
    14621468        $url = str_replace(basename($url), basename($thumb), $url); 
    14631469 
    1464         return apply_filters( 'wp_get_attachment_thumb_url', $url, $post_id ); 
     1470        return apply_filters( 'wp_get_attachment_thumb_url', $url, $post->ID ); 
    14651471} 
    14661472 
  • trunk/wp-includes/script-loader.php

    r830 r832  
    2020                $this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20061113' ); 
    2121                $this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.5.0'); 
    22                 $this->add( 'autosave', '/wp-includes/js/autosave.js.php', array('prototype', 'sack'), '4508'); 
     22                $this->add( 'autosave', '/wp-includes/js/autosave-js.php', array('prototype', 'sack'), '4508'); 
    2323                $this->add( 'wp-ajax', '/wp-includes/js/wp-ajax-js.php', array('prototype'), '4459'); 
    2424                $this->add( 'listman', '/wp-includes/js/list-manipulation-js.php', array('wp-ajax', 'fat'), '4583'); 
    25                 $this->add( 'scriptaculous', '/wp-includes/js/scriptaculous/scriptaculous.js', array('prototype'), '1.6.1'); 
    26                 $this->add( 'scriptaculous-dragdrop', '/wp-includes/js/scriptaculous/scriptaculous.js?load=builder,dragdrop', array('prototype'), '1.6.1'); 
    27                 $this->add( 'scriptaculous-slider', '/wp-includes/js/scriptaculous/scriptaculous.js?load=slider,effects', array('prototype'), '1.6.1'); 
    28                 $this->add( 'scriptaculous-controls', '/wp-includes/js/scriptaculous/scriptaculous.js?load=controls', array('prototype'), '1.6.1'); 
     25                $this->add( 'scriptaculous-root', '/wp-includes/js/scriptaculous/wp-scriptaculous.js', array('prototype'), '1.6.1'); 
     26                $this->add( 'scriptaculous-builder', '/wp-includes/js/scriptaculous/builder.js', array('scriptaculous-root'), '1.6.1'); 
     27                $this->add( 'scriptaculous-dragdrop', '/wp-includes/js/scriptaculous/dragdrop.js', array('scriptaculous-builder'), '1.6.1'); 
     28                $this->add( 'scriptaculous-effects', '/wp-includes/js/scriptaculous/effects.js', array('scriptaculous-root'), '1.6.1'); 
     29                $this->add( 'scriptaculous-slider', '/wp-includes/js/scriptaculous/slider.js', array('scriptaculous-effects'), '1.6.1'); 
     30                $this->add( 'scriptaculous-controls', '/wp-includes/js/scriptaculous/controls.js', array('scriptaculous-root'), '1.6.1'); 
     31                $this->add( 'scriptaculous', '', array('scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls'), '1.6.1'); 
    2932                $this->add( 'cropper', '/wp-includes/js/crop/cropper.js', array('scriptaculous-dragdrop'), '1'); 
    3033                if ( is_admin() ) { 
     
    7174                                $this->_print_scripts( $handles[$handle] ); 
    7275                        if ( !in_array($handle, $this->printed) && isset($this->scripts[$handle]) ) { 
    73                                 $ver = $this->scripts[$handle]->ver ? $this->scripts[$handle]->ver : $wp_db_version; 
    74                                 if ( isset($this->args[$handle]) ) 
    75                                         $ver .= '&amp;' . $this->args[$handle]; 
    76                                 $src = 0 === strpos($this->scripts[$handle]->src, 'http://') ? $this->scripts[$handle]->src : get_option( 'siteurl' ) . $this->scripts[$handle]->src; 
    77                                 $src = add_query_arg('ver', $ver, $src); 
    78                                 echo "<script type='text/javascript' src='$src'></script>\n"; 
     76                                if ( $this->scripts[$handle]->src ) { // Else it defines a group. 
     77                                        $ver = $this->scripts[$handle]->ver ? $this->scripts[$handle]->ver : $wp_db_version; 
     78                                        if ( isset($this->args[$handle]) ) 
     79                                                $ver .= '&amp;' . $this->args[$handle]; 
     80                                        $src = 0 === strpos($this->scripts[$handle]->src, 'http://') ? $this->scripts[$handle]->src : get_option( 'siteurl' ) . $this->scripts[$handle]->src; 
     81                                        $src = add_query_arg('ver', $ver, $src); 
     82                                        echo "<script type='text/javascript' src='$src'></script>\n"; 
     83                                } 
    7984                                $this->printed[] = $handle; 
    8085                        } 
  • trunk/wp-includes/wp-db.php

    r822 r832  
    4646         */ 
    4747        function wpdb($dbuser, $dbpassword, $dbname, $dbhost) { 
    48  
    49                 if( defined( "WP_USE_MULTIPLE_DB" ) && CONSTANT( "WP_USE_MULTIPLE_DB" ) == true ) { 
     48                if( defined( "WP_USE_MULTIPLE_DB" ) && CONSTANT( "WP_USE_MULTIPLE_DB" ) == true ) 
    5049                        $this->db_connect(); 
    51                         return true; 
    52                 } 
     50                return $this->__construct($dbuser, $dbpassword, $dbname, $dbhost); 
     51        } 
     52         
     53        function __construct($dbuser, $dbpassword, $dbname, $dbhost) { 
     54                register_shutdown_function(array(&$this, "__destruct")); 
    5355 
    5456                $this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword); 
     
    6769 
    6870                $this->select($dbname, $this->dbh); 
     71        } 
     72 
     73        function __destruct() { 
     74                return true;             
    6975        } 
    7076 
     
    421427 
    422428                header('Content-Type: text/html; charset=utf-8'); 
     429 
     430                if ( strstr($_SERVER['PHP_SELF'], 'wp-admin') ) 
     431                        $admin_dir = ''; 
     432                else 
     433                        $admin_dir = 'wp-admin/'; 
     434 
    423435?> 
    424436<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     
    466478</head> 
    467479<body> 
    468         <h1 id="logo"><img alt="WordPress" src="<?php echo "wp-admin/images/wordpress-logo.png" ?>/></h1> 
     480        <h1 id="logo"><img alt="WordPress" src="<?php echo $admin_dir; ?>images/wordpress-logo.png" /></h1> 
    469481        <p><?php echo $message; ?></p> 
    470482</body> 
  • trunk/wp-settings.php

    r815 r832  
    301301load_default_textdomain(); 
    302302 
     303$locale = get_locale(); 
     304$locale_file = ABSPATH . LANGDIR . "/$locale.php"; 
     305if ( is_readable($locale_file) ) 
     306        require_once($locale_file); 
     307 
    303308// Pull in locale data after loading text domain. 
    304309require_once(ABSPATH . WPINC . '/locale.php');