Changeset 832
- Timestamp:
- 01/08/07 18:25:37 (2 years ago)
- Files:
-
- trunk/wp-admin/admin-ajax.php (modified) (1 diff)
- trunk/wp-admin/admin-functions.php (modified) (6 diffs)
- trunk/wp-admin/edit-comments.php (modified) (1 diff)
- trunk/wp-admin/link-manager.php (modified) (2 diffs)
- trunk/wp-admin/menu.php (modified) (3 diffs)
- trunk/wp-atom.php (modified) (1 diff)
- trunk/wp-includes/cache.php (modified) (3 diffs)
- trunk/wp-includes/functions.php (modified) (1 diff)
- trunk/wp-includes/general-template.php (modified) (3 diffs)
- trunk/wp-includes/js/autosave-js.php (added)
- trunk/wp-includes/js/autosave.js.php (deleted)
- trunk/wp-includes/locale.php (modified) (1 diff)
- trunk/wp-includes/post-template.php (modified) (2 diffs)
- trunk/wp-includes/post.php (modified) (3 diffs)
- trunk/wp-includes/script-loader.php (modified) (2 diffs)
- trunk/wp-includes/wp-db.php (modified) (4 diffs)
- trunk/wp-settings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-ajax.php
r828 r832 20 20 $r .= "<input name='meta[$mid][key]' tabindex='6' onkeypress='return killSubmit(\"theList.ajaxUpdater('meta','meta-$mid');\",event);' type='text' size='20' value='$key' />"; 21 21 $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('meta','meta-$mid');' /><br />";22 $r .= "<input name='updatemeta' type='button' class='updatemeta' tabindex='6' value='".attribute_escape(__('Update'))."' onclick='return theList.ajaxUpdater('meta','meta-$mid');' /><br />"; 23 23 $r .= "<input name='deletemeta[$mid]' type='submit' onclick=\"return deleteSomething( 'meta', $mid, '"; 24 $r .= 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=' 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>"; 26 26 return $r; 27 27 } trunk/wp-admin/admin-functions.php
r830 r832 498 498 $user->user_pass = $pass1; 499 499 500 if ( ! validate_username( $user->user_login ) )500 if ( !$update && !validate_username( $user->user_login ) ) 501 501 $errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is invalid. Please enter a valid username.' )); 502 502 … … 601 601 function return_categories_list( $parent = 0 ) { 602 602 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" ); 604 604 } 605 605 … … 679 679 function return_link_categories_list( $parent = 0 ) { 680 680 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" ); 682 682 } 683 683 … … 761 761 762 762 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&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 "%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." ), 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&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>"; 764 764 else 765 765 $edit .= "<td style='text-align:center'>".__( "Default" ); … … 809 809 <td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e( 'View' ); ?></a></td> 810 810 <td><?php if ( current_user_can( 'edit_page', $id ) ) { echo "<a href='page.php?action=edit&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&post=$id", 'delete-page_' . $id ) . "' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . sprintf( __("You are about to delete the "%s" page.\\n"OK" to delete, "Cancel" 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&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> 812 812 </tr> 813 813 … … 930 930 $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>"; 931 931 $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 />"; 933 933 $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 "%s" custom field on this post.\\n"OK" to delete, "Cancel" 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>"; 936 936 $r .= "\n\t</tr>"; 937 937 } trunk/wp-admin/edit-comments.php
r828 r832 158 158 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 159 159 echo " <a href='comment.php?action=editcomment&c=".$comment->comment_ID."'>" . __('Edit') . '</a>'; 160 echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&p=' . $comment->comment_post_ID . '&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> ';160 echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&p=' . $comment->comment_post_ID . '&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> '; 161 161 if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) { 162 162 echo '<span class="unapprove"> | <a href="' . wp_nonce_url('comment.php?action=unapprovecomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID, 'unapprove-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Unapprove') . '</a> </span>'; 163 163 echo '<span class="approve"> | <a href="' . wp_nonce_url('comment.php?action=approvecomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID, 'approve-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Approve') . '</a> </span>'; 164 164 } 165 echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&dt=spam&p=" . $comment->comment_post_ID . "&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> ";165 echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&dt=spam&p=" . $comment->comment_post_ID . "&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> "; 166 166 } 167 167 $post = get_post($comment->comment_post_ID); trunk/wp-admin/link-manager.php
r828 r832 88 88 $select_order .= '<option value="order_name"' . (($order_by == 'order_name') ? " selected='selected'" : '') . '>' . __('Name') . "</option>\n"; 89 89 $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"; 90 91 $select_order .= "</select>\n"; 91 92 … … 176 177 case 'action': 177 178 echo '<td><a href="link.php?link_id='.$link->link_id.'&action=edit" class="edit">'.__('Edit').'</a></td>'; 178 echo '<td><a href="' . wp_nonce_url('link.php?link_id='.$link->link_id.'&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>';179 echo '<td><a href="' . wp_nonce_url('link.php?link_id='.$link->link_id.'&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>'; 179 180 break; 180 181 default: trunk/wp-admin/menu.php
r810 r832 31 31 32 32 33 $_wp_real_parent_file['post.php'] = 'post-new.php'; // Back-compat 33 34 $submenu['post-new.php'][5] = array(__('Write Post'), 'edit_posts', 'post-new.php'); 34 35 $submenu['post-new.php'][10] = array(__('Write Page'), 'edit_pages', 'page-new.php'); … … 88 89 } 89 90 } 90 91 91 92 if ( empty($submenu[$parent]) ) 92 93 unset($submenu[$parent]); … … 95 96 // Loop over the top-level menu. 96 97 // 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. 98 99 foreach ( $menu as $id => $data ) { 99 100 if ( empty($submenu[$data[2]]) ) trunk/wp-atom.php
r810 r832 35 35 <issued><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></issued> 36 36 <?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> 38 38 <?php if ( !get_option('rss_use_excerpt') ) : ?> 39 39 <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 9 9 global $wp_object_cache; 10 10 11 if ( ! isset($wp_object_cache) ) 12 return; 11 13 return $wp_object_cache->save(); 12 14 } … … 416 418 417 419 function WP_Object_Cache() { 420 return $this->__construct(); 421 } 422 423 function __construct() { 418 424 global $blog_id; 425 426 register_shutdown_function(array(&$this, "__destruct")); 419 427 420 428 if (defined('DISABLE_CACHE')) … … 452 460 $this->blog_id = $this->hash($blog_id); 453 461 } 462 463 function __destruct() { 464 $this->save(); 465 return true; 466 } 454 467 } 455 468 ?> trunk/wp-includes/functions.php
r828 r832 834 834 $text = 'Gone'; 835 835 836 if ( substr(php_sapi_name(), 0, 3) == 'cgi' )836 // if ( substr(php_sapi_name(), 0, 3) == 'cgi' ) 837 837 @header("HTTP/1.1 $header $text"); 838 else839 @header("Status: $header $text");838 // else 839 // @header("Status: $header $text"); 840 840 } 841 841 trunk/wp-includes/general-template.php
r828 r832 819 819 </div> 820 820 <script type="text/javascript"> 821 // <![CDATA[ 821 822 if ( typeof tinyMCE != "undefined" && tinyMCE.configs.length > 0 ) 822 823 document.getElementById('edButtons').style.display = 'block'; 824 // ]]> 823 825 </script> 824 826 … … 829 831 </div> 830 832 <script type="text/javascript"> 833 // <![CDATA[ 831 834 if ( typeof tinyMCE != "undefined" && tinyMCE.configs.length > 0 ) 832 835 document.getElementById("quicktags").style.display="none"; … … 855 858 } 856 859 } 860 // ]]> 857 861 </script> 858 862 <?php trunk/wp-includes/locale.php
r761 r832 88 88 $this->meridiem['PM'] = __('PM'); 89 89 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 } 92 95 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 }104 96 } 105 97 trunk/wp-includes/post-template.php
r830 r832 379 379 return false; 380 380 381 if ( !$src = get_attachment_icon_src( $ id, $fullsize ) )381 if ( !$src = get_attachment_icon_src( $post->ID, $fullsize ) ) 382 382 return false; 383 383 … … 416 416 function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) { 417 417 $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)) 420 422 return $innerHTML; 421 423 422 $post = & get_post($id);423 424 424 425 $innerHTML = attribute_escape($post->post_title); trunk/wp-includes/post.php
r831 r832 1405 1405 function wp_get_attachment_metadata( $post_id, $unfiltered = false ) { 1406 1406 $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 ); 1409 1411 if ( $unfiltered ) 1410 1412 return $data; 1411 return apply_filters( 'wp_get_attachment_metadata', $data, $post _id);1413 return apply_filters( 'wp_get_attachment_metadata', $data, $post->ID ); 1412 1414 } 1413 1415 1414 1416 function wp_update_attachment_metadata( $post_id, $data ) { 1415 1417 $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 ); 1422 1424 1423 1425 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 ); 1425 1427 else 1426 return add_post_meta( $post _id, '_wp_attachment_metadata', $data );1428 return add_post_meta( $post->ID, '_wp_attachment_metadata', $data ); 1427 1429 } 1428 1430 … … 1432 1434 return false; 1433 1435 1434 $url = get_the_guid( $post _id);1436 $url = get_the_guid( $post->ID ); 1435 1437 1436 1438 if ( 'attachment' != $post->post_type || !$url ) 1437 1439 return false; 1438 1440 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 1444 function wp_get_attachment_thumb_file( $post_id = 0 ) { 1443 1445 $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 ); 1448 1452 1449 1453 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 ); 1451 1455 return false; 1452 1456 } … … 1454 1458 function wp_get_attachment_thumb_url( $post_id = 0 ) { 1455 1459 $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 ) ) 1460 1466 return false; 1461 1467 1462 1468 $url = str_replace(basename($url), basename($thumb), $url); 1463 1469 1464 return apply_filters( 'wp_get_attachment_thumb_url', $url, $post _id);1470 return apply_filters( 'wp_get_attachment_thumb_url', $url, $post->ID ); 1465 1471 } 1466 1472 trunk/wp-includes/script-loader.php
r830 r832 20 20 $this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20061113' ); 21 21 $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'); 23 23 $this->add( 'wp-ajax', '/wp-includes/js/wp-ajax-js.php', array('prototype'), '4459'); 24 24 $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'); 29 32 $this->add( 'cropper', '/wp-includes/js/crop/cropper.js', array('scriptaculous-dragdrop'), '1'); 30 33 if ( is_admin() ) { … … 71 74 $this->_print_scripts( $handles[$handle] ); 72 75 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 .= '&' . $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 .= '&' . $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 } 79 84 $this->printed[] = $handle; 80 85 } trunk/wp-includes/wp-db.php
r822 r832 46 46 */ 47 47 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 ) 50 49 $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")); 53 55 54 56 $this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword); … … 67 69 68 70 $this->select($dbname, $this->dbh); 71 } 72 73 function __destruct() { 74 return true; 69 75 } 70 76 … … 421 427 422 428 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 423 435 ?> 424 436 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> … … 466 478 </head> 467 479 <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> 469 481 <p><?php echo $message; ?></p> 470 482 </body> trunk/wp-settings.php
r815 r832 301 301 load_default_textdomain(); 302 302 303 $locale = get_locale(); 304 $locale_file = ABSPATH . LANGDIR . "/$locale.php"; 305 if ( is_readable($locale_file) ) 306 require_once($locale_file); 307 303 308 // Pull in locale data after loading text domain. 304 309 require_once(ABSPATH . WPINC . '/locale.php');
