Changeset 770
- Timestamp:
- 09/26/2006 03:45:20 PM (20 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 28 edited
-
wp-admin/admin-functions.php (modified) (5 diffs)
-
wp-admin/admin-header.php (modified) (1 diff)
-
wp-admin/admin.php (modified) (2 diffs)
-
wp-admin/comment.php (modified) (1 diff)
-
wp-admin/edit-form-advanced.php (modified) (4 diffs)
-
wp-admin/inline-uploading.php (modified) (2 diffs)
-
wp-admin/menu-header.php (modified) (2 diffs)
-
wp-admin/plugin-editor.php (modified) (2 diffs)
-
wp-admin/plugins.php (modified) (3 diffs)
-
wp-admin/post-new.php (modified) (1 diff)
-
wp-admin/user-edit.php (modified) (3 diffs)
-
wp-admin/wp-admin.css (modified) (5 diffs)
-
wp-includes/bookmark-template.php (modified) (2 diffs)
-
wp-includes/capabilities.php (modified) (2 diffs)
-
wp-includes/classes.php (modified) (3 diffs)
-
wp-includes/cron.php (modified) (2 diffs)
-
wp-includes/general-template.php (modified) (7 diffs)
-
wp-includes/js/autosave.js.php (modified) (2 diffs)
-
wp-includes/js/tinymce/plugins/autosave/editor_plugin_src.js (added)
-
wp-includes/js/tinymce/plugins/autosave/readme.txt (added)
-
wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js (added)
-
wp-includes/js/tinymce/plugins/inlinepopups/readme.txt (added)
-
wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js (modified) (6 diffs)
-
wp-includes/js/tinymce/tiny_mce_config.php (modified) (1 diff)
-
wp-includes/js/tinymce/tiny_mce_gzip.php (modified) (1 diff)
-
wp-includes/l10n.php (modified) (2 diffs)
-
wp-includes/link-template.php (modified) (1 diff)
-
wp-includes/pluggable.php (modified) (5 diffs)
-
wp-includes/query.php (modified) (6 diffs)
-
wp-includes/script-loader.php (modified) (1 diff)
-
wp-includes/wp-db.php (modified) (2 diffs)
-
wp-settings.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r744 r770 798 798 <td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e('View'); ?></a></td> 799 799 <td><?php if ( current_user_can('edit_page', $id) ) { echo "<a href='page.php?action=edit&post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td> 800 <td><?php if ( current_user_can(' edit_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>800 <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> 801 801 </tr> 802 802 … … 1266 1266 } 1267 1267 1268 function the_quicktags() {1269 echo '1270 <div id="quicktags">1271 ';1272 wp_print_scripts( 'quicktags' );1273 echo ' <script type="text/javascript">1274 //<![CDATA[1275 if ( typeof tinyMCE == "undefined" || tinyMCE.configs.length < 1 ) edToolbar();1276 //]]>1277 </script>1278 </div>1279 ';1280 echo '1281 <script type="text/javascript">1282 function edInsertContent(myField, myValue) {1283 //IE support1284 if (document.selection) {1285 myField.focus();1286 sel = document.selection.createRange();1287 sel.text = myValue;1288 myField.focus();1289 }1290 //MOZILLA/NETSCAPE support1291 else if (myField.selectionStart || myField.selectionStart == "0") {1292 var startPos = myField.selectionStart;1293 var endPos = myField.selectionEnd;1294 myField.value = myField.value.substring(0, startPos)1295 + myValue1296 + myField.value.substring(endPos, myField.value.length);1297 myField.focus();1298 myField.selectionStart = startPos + myValue.length;1299 myField.selectionEnd = startPos + myValue.length;1300 } else {1301 myField.value += myValue;1302 myField.focus();1303 }1304 }1305 </script>1306 ';1307 }1308 1309 1268 function get_broken_themes() { 1310 1269 global $wp_broken_themes; … … 1737 1696 1738 1697 $wp_plugins = array (); 1739 $plugin_loc = 'wp-content/plugins'; 1740 $plugin_root = ABSPATH.$plugin_loc; 1698 $plugin_root = ABSPATH . PLUGINDIR; 1741 1699 1742 1700 // Files in wp-content/plugins directory … … 2021 1979 } 2022 1980 2023 function user_can_richedit() {2024 if ( 'true' != get_user_option('rich_editing') )2025 return false;2026 2027 if ( preg_match('!opera[ /][2-8]|konqueror|safari!i', $_SERVER['HTTP_USER_AGENT']) )2028 return false;2029 2030 return true; // Best guess2031 }2032 2033 1981 function the_attachment_links($id = false) { 2034 1982 $id = (int) $id; … … 2084 2032 function update_home_siteurl($old_value, $value) { 2085 2033 global $wp_rewrite, $user_login, $user_pass_md5; 2034 2035 if ( defined("WP_INSTALLING") ) 2036 return; 2037 2086 2038 // If home changed, write rewrite rules to new location. 2087 2039 $wp_rewrite->flush_rules(); -
trunk/wp-admin/admin-header.php
r761 r770 14 14 ?> 15 15 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 16 <html xmlns="http://www.w3.org/1999/xhtml" >16 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> 17 17 <head> 18 18 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> -
trunk/wp-admin/admin.php
r743 r770 61 61 } 62 62 63 if (! file_exists(ABSPATH . "wp-content/plugins/$plugin_page") && ! file_exists(ABSPATH . "wp-content/mu-plugins/$plugin_page"))63 if (! file_exists(ABSPATH . PLUGINDIR . "/$plugin_page") && ! file_exists(ABSPATH . "wp-content/mu-plugins/$plugin_page")) 64 64 wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page))); 65 65 … … 72 72 include(ABSPATH . "wp-content/mu-plugins/$plugin_page"); 73 73 else 74 include(ABSPATH . "wp-content/plugins/$plugin_page");74 include(ABSPATH . PLUGINDIR . "/$plugin_page"); 75 75 } 76 76 -
trunk/wp-admin/comment.php
r729 r770 13 13 case 'editcomment': 14 14 $title = __('Edit Comment'); 15 if ( user_can_richedit() ) 16 wp_enqueue_script( 'wp_tiny_mce' ); 15 17 16 require_once ('admin-header.php'); 18 17 -
trunk/wp-admin/edit-form-advanced.php
r734 r770 105 105 </fieldset> 106 106 107 <fieldset class="dbx-box">107 <fieldset id="poststatusdiv" class="dbx-box"> 108 108 <h3 class="dbx-handle"><?php _e('Post Status') ?></h3> 109 109 <div class="dbx-content"><?php if ( current_user_can('publish_posts') ) : ?> … … 115 115 116 116 <?php if ( current_user_can('edit_posts') ) : ?> 117 <fieldset class="dbx-box">117 <fieldset id="posttimestampdiv" class="dbx-box"> 118 118 <h3 class="dbx-handle"><?php _e('Post Timestamp'); ?>:</h3> 119 119 <div class="dbx-content"><?php touch_time(($action == 'edit')); ?></div> … … 121 121 <?php endif; ?> 122 122 123 <?php if ( $authors = get_editable_authors( $current_user->id ) ) : // TODO: ROLE SYSTEM ?> 123 <?php 124 $authors = get_editable_authors( $current_user->id ); // TODO: ROLE SYSTEM 125 if ( $authors && count( $authors ) > 1 ) : 126 ?> 124 127 <fieldset id="authordiv" class="dbx-box"> 125 128 <h3 class="dbx-handle"><?php _e('Post Author'); ?>:</h3> … … 207 210 208 211 <div class="dbx-box-wrapper"> 209 <fieldset class="dbx-box">212 <fieldset id="trackbacksdiv" class="dbx-box"> 210 213 <div class="dbx-handle-wrapper"> 211 214 <h3 class="dbx-handle"><?php _e('Trackbacks') ?></h3> -
trunk/wp-admin/inline-uploading.php
r729 r770 414 414 if (!win) win = top; 415 415 tinyMCE = win.tinyMCE; 416 richedit = ( typeof tinyMCE == 'object' && tinyMCE.configs.length > 0 );417 416 function sendToEditor(n) { 418 417 o = document.getElementById('div'+n); … … 424 423 h = h.replace(new RegExp('<IMG', 'g'), '<img'); // Lowercase again 425 424 h = h.replace(new RegExp('(<img .+?")>', 'g'), '$1 />'); // XHTML 426 if ( richedit)425 if ( typeof tinyMCE != 'undefined' && tinyMCE.getInstanceById('content') ) 427 426 win.tinyMCE.execCommand('mceInsertContent', false, h); 428 427 else -
trunk/wp-admin/menu-header.php
r729 r770 13 13 14 14 if ( !empty($submenu[$item[2]]) || current_user_can($item[1]) ) { 15 if ( file_exists(ABSPATH . "wp-content/plugins/{$item[2]}") )15 if ( file_exists(ABSPATH . PLUGINDIR . "/{$item[2]}") ) 16 16 echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/admin.php?page={$item[2]}'$class>{$item[0]}</a></li>"; 17 17 else … … 41 41 $menu_hook = get_plugin_page_hook($item[2], $parent_file); 42 42 43 if (file_exists(ABSPATH . "wp-content/plugins/{$item[2]}") || ! empty($menu_hook)) {43 if (file_exists(ABSPATH . PLUGINDIR . "/{$item[2]}") || ! empty($menu_hook)) { 44 44 if ( 'admin.php' == $pagenow ) 45 45 echo "\n\t<li><a href='" . get_option('siteurl') . "/wp-admin/admin.php?page={$item[2]}'$class>{$item[0]}</a></li>"; -
trunk/wp-admin/plugin-editor.php
r729 r770 16 16 17 17 $file = validate_file_to_edit($file, $plugin_files); 18 $real_file = get_real_file_to_edit( "wp-content/plugins/$file");18 $real_file = get_real_file_to_edit( PLUGINDIR . "/$file"); 19 19 20 20 switch($action) { … … 48 48 require_once('admin-header.php'); 49 49 50 update_recently_edited( "wp-content/plugins/$file");50 update_recently_edited(PLUGINDIR . "/$file"); 51 51 52 52 if (!is_file($real_file)) -
trunk/wp-admin/plugins.php
r729 r770 17 17 sort($current); 18 18 update_option('active_plugins', $current); 19 include(ABSPATH . 'wp-content/plugins/' . trim( $_GET['plugin'] ));19 include(ABSPATH . PLUGINDIR . '/' . trim( $_GET['plugin'] )); 20 20 do_action('activate_' . trim( $_GET['plugin'] )); 21 21 } … … 50 50 // plugins. 51 51 foreach ($check_plugins as $check_plugin) { 52 if (!file_exists(ABSPATH . 'wp-content/plugins/' . $check_plugin)) {52 if (!file_exists(ABSPATH . PLUGINDIR . '/' . $check_plugin)) { 53 53 $current = get_option('active_plugins'); 54 54 $key = array_search($check_plugin, $current); … … 131 131 ?> 132 132 133 <p><?php _e( 'If something goes wrong with a plugin and you can’t use WordPress, delete or rename that file in the <code>wp-content/plugins</code> directory and it will be automatically deactivated.'); ?></p>133 <p><?php _e(sprintf('If something goes wrong with a plugin and you can’t use WordPress, delete or rename that file in the <code>%s</code> directory and it will be automatically deactivated.', PLUGINDIR)); ?></p> 134 134 135 135 <h2><?php _e('Get More Plugins'); ?></h2> 136 <p><?php _e( 'You can find additional plugins for your site in the <a href="http://wordpress.org/extend/plugins/">WordPress plugin directory</a>. To install a plugin you generally just need to upload the plugin file into your <code>wp-content/plugins</code> directory. Once a plugin is uploaded, you may activate it here.'); ?></p>136 <p><?php _e(sprintf('You can find additional plugins for your site in the <a href="http://wordpress.org/extend/plugins/">WordPress plugin directory</a>. To install a plugin you generally just need to upload the plugin file into your <code>%s</code> directory. Once a plugin is uploaded, you may activate it here.', PLUGINDIR)); ?></p> 137 137 138 138 </div> -
trunk/wp-admin/post-new.php
r729 r770 55 55 56 56 <?php if ( $is_NS4 || $is_gecko || $is_winIE ) { ?> 57 <div class="wrap">57 <div id="wp-bookmarklet" class="wrap"> 58 58 <h3><?php _e('WordPress bookmarklet'); ?></h3> 59 59 <p><?php _e('Right click on the following link and choose "Add to favorites" to create a posting shortcut.'); ?></p> -
trunk/wp-admin/user-edit.php
r729 r770 16 16 $errors = new WP_Error('head', __('You do not have permission to edit this user.')); 17 17 18 $user_id = (int) $user_id; 19 20 if ( !$user_id ) 21 wp_die(__('Invalid user ID.')); 22 18 23 switch ($action) { 19 24 case 'switchposts': … … 30 35 31 36 if ( !current_user_can('edit_user', $user_id) ) 32 $errors = new WP_Error('head', __('You do not have permission to edit this user.')); 33 34 if ( !isset($errors) ) 35 $errors = edit_user($user_id); 37 wp_die(__('You do not have permission to edit this user.')); 38 39 $errors = edit_user($user_id); 36 40 37 41 if( !is_wp_error( $errors ) ) { … … 43 47 44 48 default: 49 $profileuser = get_user_to_edit($user_id); 50 51 if ( !current_user_can('edit_user', $user_id) ) 52 wp_die(__('You do not have permission to edit this user.')); 53 45 54 include ('admin-header.php'); 46 47 $profileuser = get_user_to_edit($user_id);48 49 if ( !current_user_can('edit_user', $user_id) )50 if ( !is_wp_error( $errors ) )51 $errors = new WP_Error('head', __('You do not have permission to edit this user.'));52 55 ?> 53 56 -
trunk/wp-admin/wp-admin.css
r761 r770 491 491 } 492 492 493 #quicktags {494 margin-left: -1px;495 }496 497 493 #currenttheme img { 498 494 float: left; … … 513 509 } 514 510 511 #postdivrich #quicktags { 512 background: #f0f0ee; 513 padding: 0px; 514 border: 1px solid #ccc; 515 border-bottom: none; 516 } 517 #postdiv #quicktags { 518 padding-right: 6px; 519 } 520 #postdivrich #quicktags { 521 display: none; 522 } 523 #quicktags #ed_toolbar { 524 padding: 0px 2px; 525 } 526 527 #ed_toolbar input { 528 background: #fff url( images/fade-butt.png ) repeat-x 0px -2px; 529 margin: 3px 2px 2px; 530 } 531 515 532 #quicktags #ed_strong { 516 533 font-weight: bold; … … 532 549 #quicktags #ed_code { 533 550 font-family: "Courier New", Courier, mono; 551 margin-bottom: 3px; 534 552 } 535 553 … … 988 1006 margin-bottom: -7px; 989 1007 padding: 6px 1em 0 3px; 1008 height: 19px; 1009 font-size: 12px; 990 1010 background: #2685af url(images/box-head-right.gif) no-repeat top right; 991 1011 } … … 1119 1139 margin-left: 2em; 1120 1140 } 1141 #postdivrich #edButtons { 1142 padding-left: 3px; 1143 } 1144 #postdivrich #content, #postdivrich #content:active { 1145 border: 1px solid #ccc; 1146 } 1147 #edButtons input, #edButtons input:active { 1148 margin: 0px 2px -1px; 1149 } 1150 #edButtons input.edButtonFore, #edButtons input.edButtonFore:active { 1151 background: #f0f0ee; 1152 border-bottom: 1px solid #f0f0ee; 1153 } 1154 #edButtons input.edButtonBack, #edButtons input.edButtonBack:active { 1155 background: #fff url( images/fade-butt.png ) repeat-x 0px 15px; 1156 border-bottom: 1px solid #ccc; 1157 } -
trunk/wp-includes/bookmark-template.php
r734 r770 231 231 232 232 // Display the category name 233 echo ' <li id="linkcat-' . $cat->cat_ID . '" ><h2>' . $cat->cat_name . "</h2>\n\t<ul>\n";233 echo ' <li id="linkcat-' . $cat->cat_ID . '" class="linkcat"><h2>' . $cat->cat_name . "</h2>\n\t<ul>\n"; 234 234 // Call get_links() with all the appropriate params 235 235 get_links($cat->cat_ID, '<li>', "</li>", "\n", true, 'name', false); … … 341 341 if ( empty($bookmarks) ) 342 342 continue; 343 $output .= "<li id= \"linkcat-$cat->cat_ID\">$title_before$cat->cat_name$title_after\n\t<ul>\n";343 $output .= "<li id='linkcat-$cat->cat_ID' class='linkcat'>$title_before$cat->cat_name$title_after\n\t<ul>\n"; 344 344 $output .= _walk_bookmarks($bookmarks, $r); 345 345 $output .= "\n\t</ul>\n</li>\n"; -
trunk/wp-includes/capabilities.php
r729 r770 325 325 //echo "post ID: {$args[0]}<br/>"; 326 326 $page = get_page($args[0]); 327 $page_author_data = get_userdata($p ost->post_author);327 $page_author_data = get_userdata($page->post_author); 328 328 //echo "current user id : $user_id, page author id: " . $page_author_data->ID . "<br/>"; 329 329 // If the user is the author... … … 379 379 //echo "post ID: {$args[0]}<br/>"; 380 380 $page = get_page($args[0]); 381 $page_author_data = get_userdata($p ost->post_author);381 $page_author_data = get_userdata($page->post_author); 382 382 //echo "current user id : $user_id, page author id: " . $page_author_data->ID . "<br/>"; 383 383 // If the user is the author... -
trunk/wp-includes/classes.php
r762 r770 1 1 <?php 2 3 class retrospam_mgr {4 var $spam_words;5 var $comments_list;6 var $found_comments;7 8 function retrospam_mgr() {9 global $wpdb;10 11 $list = explode("\n", get_option('moderation_keys') );12 $list = array_unique( $list );13 $this->spam_words = $list;14 15 $this->comment_list = $wpdb->get_results("SELECT comment_ID AS ID, comment_content AS text, comment_approved AS approved, comment_author_url AS url, comment_author_ip AS ip, comment_author_email AS email FROM $wpdb->comments ORDER BY comment_ID ASC");16 } // End of class constructor17 18 function move_spam( $id_list ) {19 global $wpdb;20 $cnt = 0;21 $id_list = explode( ',', $id_list );22 23 foreach ( $id_list as $comment ) {24 if ( $wpdb->query("update $wpdb->comments set comment_approved = '0' where comment_ID = '$comment'") ) {25 $cnt++;26 }27 }28 echo "<div class='updated'><p> ";29 printf(__('%d comment(s) moved to the moderation queue.'), $cnt);30 echo "</p></div>\n";31 } // End function move_spam32 33 function find_spam() {34 $in_queue = 0;35 36 foreach( $this->comment_list as $comment ) {37 if( $comment->approved == 1 ) {38 foreach( $this->spam_words as $word ) {39 $word = trim($word);40 if ( empty( $word ) )41 continue;42 $fulltext = strtolower($comment->email.' '.$comment->url.' '.$comment->ip.' '.$comment->text);43 if( false !== strpos( $fulltext, strtolower($word) ) ) {44 $this->found_comments[] = $comment->ID;45 break;46 }47 }48 } else {49 $in_queue++;50 }51 }52 return array( 'found' => $this->found_comments, 'in_queue' => $in_queue );53 } // End function find_spam54 55 function display_edit_form( $counters ) {56 $numfound = count($counters[found]);57 $numqueue = $counters[in_queue];58 59 $body = '<p>' . sprintf(__('Suspected spam comments: %s'), "<strong>$numfound</strong>") . '</p>';60 61 if ( count($counters[found]) > 0 ) {62 $id_list = implode( ',', $counters[found] );63 $body .= '<p><a href="options-discussion.php?action=retrospam&move=true&ids='.$id_list.'">'. __('Move suspect comments to moderation queue »') . '</a></p>';64 65 }66 $head = '<div class="wrap"><h2>' . __('Check Comments Results:') . '</h2>';67 68 $foot .= '<p><a href="options-discussion.php">' . __('« Return to Discussion Options page.') . '</a></p></div>';69 70 return $head . $body . $foot;71 } // End function display_edit_form72 73 }74 2 75 3 class WP { … … 110 38 $this->did_permalink = true; 111 39 112 $pathinfo = $_SERVER['PATH_INFO']; 40 if ( isset($_SERVER['PATH_INFO']) ) 41 $pathinfo = $_SERVER['PATH_INFO']; 42 else 43 $pathinfo = ''; 113 44 $pathinfo_array = explode('?', $pathinfo); 114 45 $pathinfo = str_replace("%", "%25", $pathinfo_array[0]); … … 118 49 $self = $_SERVER['PHP_SELF']; 119 50 $home_path = parse_url(get_option('home')); 120 $home_path = $home_path['path']; 51 if ( isset($home_path['path']) ) 52 $home_path = $home_path['path']; 53 else 54 $home_path = ''; 121 55 $home_path = trim($home_path, '/'); 122 56 -
trunk/wp-includes/cron.php
r753 r770 103 103 104 104 $keys = array_keys( $crons ); 105 if ( $keys[0] > time() )105 if ( isset($keys[0]) && $keys[0] > time() ) 106 106 return; 107 107 … … 124 124 ); 125 125 return array_merge( apply_filters( 'cron_schedules', array() ), $schedules ); 126 } 127 128 function wp_get_schedule($hook, $args = array()) { 129 $crons = _get_cron_array(); 130 $key = md5(serialize($args)); 131 if ( empty($crons) ) 132 return false; 133 foreach ( $crons as $timestamp => $cron ) { 134 if ( isset( $cron[$hook][$key] ) ) 135 return $cron[$hook][$key]['schedule']; 136 } 137 return false; 126 138 } 127 139 -
trunk/wp-includes/general-template.php
r734 r770 127 127 global $wp_version; 128 128 $output = $wp_version; 129 break; 130 case 'language': 131 $output = get_locale(); 132 $output = str_replace('_', '-', $output); 133 break; 134 case 'text_direction': 135 global $wp_locale; 136 $output = $wp_locale->text_direction; 129 137 break; 130 138 case 'name': … … 737 745 } 738 746 739 /** 740 * Places a textarea according to the current user's preferences, filled with $content. 741 * Also places a script block that enables tabbing between Title and Content. 742 * 743 * @param string Editor contents 744 * @param string (optional) Previous form field's ID (for tabbing support) 745 */ 747 function user_can_richedit() { 748 $can = true; 749 750 if ( 'true' != get_user_option('rich_editing') || preg_match('!opera[ /][2-8]|konqueror|safari!i', $_SERVER['HTTP_USER_AGENT']) ) 751 $can = false; 752 753 return apply_filters('user_can_richedit', $can); 754 } 755 746 756 function the_editor($content, $id = 'content', $prev_id = 'title') { 747 757 $rows = get_option('default_post_edit_rows'); … … 751 761 $rows = "rows='$rows'"; 752 762 753 the_quicktags(); 754 755 if ( user_can_richedit() ) 763 if ( user_can_richedit() ) : 756 764 add_filter('the_editor_content', 'wp_richedit_pre'); 765 766 // The following line moves the border so that the active button "attaches" to the toolbar. Only IE needs it. 767 ?> 768 <style type="text/css"> 769 #postdivrich table, #postdivrich #quicktags {border-top: none;} 770 #quicktags {border-bottom: none; padding-bottom: 2px; margin-bottom: -1px;} 771 #edButtons {border-bottom: 1px solid #ccc;} 772 </style> 773 <div id='edButtons' style='display:none;'> 774 <div class='zerosize'><input accesskey='e' type='button' onclick='switchEditors("<?php echo $id; ?>")' /></div> 775 <input id='edButtonPreview' class='edButtonFore' type='button' value='<?php _e('Compose'); ?>' /> 776 <input id='edButtonHTML' class='edButtonBack' type='button' value='<?php _e('HTML'); ?>' onclick='switchEditors("<?php echo $id; ?>")' /> 777 </div> 778 <script type="text/javascript"> 779 if ( typeof tinyMCE != "undefined" && tinyMCE.configs.length > 0 ) 780 document.getElementById('edButtons').style.display = 'block'; 781 </script> 782 783 <?php endif; ?> 784 <div id="quicktags"> 785 <?php wp_print_scripts( 'quicktags' ); ?> 786 <script type="text/javascript">edToolbar()</script> 787 </div> 788 <script type="text/javascript"> 789 if ( typeof tinyMCE != "undefined" && tinyMCE.configs.length > 0 ) 790 document.getElementById("quicktags").style.display="none"; 791 792 function edInsertContent(myField, myValue) { 793 //IE support 794 if (document.selection) { 795 myField.focus(); 796 sel = document.selection.createRange(); 797 sel.text = myValue; 798 myField.focus(); 799 } 800 //MOZILLA/NETSCAPE support 801 else if (myField.selectionStart || myField.selectionStart == "0") { 802 var startPos = myField.selectionStart; 803 var endPos = myField.selectionEnd; 804 myField.value = myField.value.substring(0, startPos) 805 + myValue 806 + myField.value.substring(endPos, myField.value.length); 807 myField.focus(); 808 myField.selectionStart = startPos + myValue.length; 809 myField.selectionEnd = startPos + myValue.length; 810 } else { 811 myField.value += myValue; 812 myField.focus(); 813 } 814 } 815 </script> 816 <?php 757 817 758 818 $the_editor = apply_filters('the_editor', "<div><textarea class='mceEditor' $rows cols='40' name='$id' tabindex='2' id='$id'>%s</textarea></div>\n"); … … 765 825 //<!-- 766 826 edCanvas = document.getElementById('<?php echo $id; ?>'); 767 <?php if ( user_can_richedit() ) : ?>827 <?php if ( $prev_id && user_can_richedit() ) : ?> 768 828 // This code is meant to allow tabbing from Title to Post (TinyMCE). 769 829 if ( tinyMCE.isMSIE ) … … 772 832 e = e ? e : window.event; 773 833 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { 774 var i = tinyMCE. selectedInstance;834 var i = tinyMCE.getInstanceById('<?php echo $id; ?>'); 775 835 if(typeof i == 'undefined') 776 836 return true; 777 tinyMCE.execCommand("mceStartTyping");837 tinyMCE.execCommand("mceStartTyping"); 778 838 this.blur(); 779 839 i.contentWindow.focus(); … … 787 847 e = e ? e : window.event; 788 848 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { 789 var i = tinyMCE. selectedInstance;849 var i = tinyMCE.getInstanceById('<?php echo $id; ?>'); 790 850 if(typeof i == 'undefined') 791 851 return true; 792 tinyMCE.execCommand("mceStartTyping");852 tinyMCE.execCommand("mceStartTyping"); 793 853 this.blur(); 794 854 i.contentWindow.focus(); … … 808 868 } 809 869 870 function language_attributes() { 871 $output = ''; 872 if ( $dir = get_bloginfo('text_direction') ) 873 $output = "dir=\"$dir\""; 874 if ( $lang = get_bloginfo('language') ) { 875 if ( $dir ) $output .= ' '; 876 $output .= "lang=\"$lang\" xml:lang=\"$lang\""; 877 } 878 879 echo $output; 880 } 810 881 ?> -
trunk/wp-includes/js/autosave.js.php
r743 r770 73 73 function autosave() { 74 74 var form = $('post'); 75 var rich = ((typeof tinyMCE != "undefined") && tinyMCE.getInstanceById('content')) ? true : false; 75 76 76 77 autosaveAjax = new sack(); 77 78 78 79 /* Gotta do this up here so we can check the length when tinyMCE is in use */ 79 if ( typeof tinyMCE == "undefined" || tinyMCE.configs.length < 1 ) {80 if ( typeof tinyMCE == "undefined" || tinyMCE.configs.length < 1 || rich == false ) { 80 81 autosaveAjax.setVar("content", form.content.value); 81 82 } else { … … 111 112 autosaveAjax.setVar("excerpt", form.excerpt.value); 112 113 113 if ( typeof tinyMCE == "undefined" || tinyMCE.configs.length < 1 ) {114 if ( typeof tinyMCE == "undefined" || tinyMCE.configs.length < 1 || rich == false ) { 114 115 autosaveAjax.setVar("content", form.content.value); 115 116 } else { -
trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js
r723 r770 39 39 + '<input type="button" accesskey="u" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Undo\',false);" />' 40 40 + '<input type="button" accesskey="y" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Redo\',false);" />' 41 + '<input type="button" accesskey="e" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceCodeEditor\',false);" />'42 41 + '<input type="button" accesskey="h" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'wpHelp\',false);" />' 43 + '<input type="button" accesskey="b" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'wpAdv\',false);" />' 42 + '<input type="button" accesskey="b" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Bold\',false);" />' 43 + '<input type="button" accesskey="v" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'wpAdv\',false);" />' 44 44 + '</div>'; 45 45 return buttons+hiddenControls; … … 242 242 // Remove anonymous, empty paragraphs. 243 243 content = content.replace(new RegExp('<p>(\\s| )*</p>', 'mg'), ''); 244 244 245 245 // Handle table badness. 246 246 content = content.replace(new RegExp('<(table( [^>]*)?)>.*?<((tr|thead)( [^>]*)?)>', 'mg'), '<$1><$3>'); … … 249 249 content = content.replace(new RegExp('</tr>.*?<(tr|/table)>', 'mg'), '</tr><$1>'); 250 250 content = content.replace(new RegExp('<(/?(table|tbody|tr|th|td)[^>]*)>(\\s*|(<br ?/?>)*)*', 'g'), '<$1>'); 251 251 252 252 // Pretty it up for the source editor. 253 253 var blocklist = 'blockquote|ul|ol|li|table|thead|tr|th|td|div|h\\d|pre|p'; 254 254 content = content.replace(new RegExp('\\s*</('+blocklist+')>\\s*', 'mg'), '</$1>\n'); 255 content = content.replace(new RegExp('\\s*<(('+blocklist+')[^>]*)> \\s*', 'mg'), '\n<$1>');255 content = content.replace(new RegExp('\\s*<(('+blocklist+')[^>]*)>', 'mg'), '\n<$1>'); 256 256 content = content.replace(new RegExp('<((li|/?tr|/?thead|/?tfoot)( [^>]*)?)>', 'g'), '\t<$1>'); 257 257 content = content.replace(new RegExp('<((td|th)( [^>]*)?)>', 'g'), '\t\t<$1>'); … … 295 295 296 296 // Get it ready for wpautop. 297 content = content.replace(new RegExp(' [\\s]*<p>[\\s]*', 'mgi'), '');298 content = content.replace(new RegExp(' [\\s]*</p>[\\s]*', 'mgi'), '\n\n');299 content = content.replace(new RegExp('\\n\\s*\\n \\s*\\n*', 'mgi'), '\n\n');297 content = content.replace(new RegExp('\\s*<p>', 'mgi'), ''); 298 content = content.replace(new RegExp('\\s*</p>\\s*', 'mgi'), '\n\n'); 299 content = content.replace(new RegExp('\\n\\s*\\n', 'mgi'), '\n\n'); 300 300 content = content.replace(new RegExp('\\s*<br ?/?>\\s*', 'gi'), '\n'); 301 301 … … 310 310 content = content.replace(new RegExp('\\s*(<p[^>]+>.*</p>)', 'mg'), '\n$1'); 311 311 312 // Trim any whitespace 313 content = content.replace(new RegExp('^\\s*', ''), ''); 312 // Trim trailing whitespace 314 313 content = content.replace(new RegExp('\\s*$', ''), ''); 315 314 … … 469 468 } 470 469 } 470 471 function switchEditors(id) { 472 var inst = tinyMCE.getInstanceById(id); 473 var qt = document.getElementById('quicktags'); 474 var H = document.getElementById('edButtonHTML'); 475 var P = document.getElementById('edButtonPreview'); 476 var ta = document.getElementById(id); 477 var pdr = ta.parentNode; 478 479 if ( inst ) { 480 edToggle(H, P); 481 482 if ( tinyMCE.isMSIE && !tinyMCE.isOpera ) { 483 // IE rejects the later overflow assignment so we skip this step. 484 // Alternate code might be nice. Until then, IE reflows. 485 } else { 486 // Lock the fieldset's height to prevent reflow/flicker 487 pdr.style.height = pdr.clientHeight + 'px'; 488 pdr.style.overflow = 'hidden'; 489 } 490 491 // Save the coords of the bottom right corner of the rich editor 492 var table = document.getElementById(inst.editorId + '_parent').getElementsByTagName('table')[0]; 493 var y1 = table.offsetTop + table.offsetHeight; 494 495 if ( TinyMCE_AdvancedTheme._getCookie("TinyMCE_" + inst.editorId + "_height") == null ) { 496 var expires = new Date(); 497 expires.setTime(expires.getTime() + 3600000 * 24 * 30); 498 var offset = tinyMCE.isMSIE ? 1 : 2; 499 TinyMCE_AdvancedTheme._setCookie("TinyMCE_" + inst.editorId + "_height", "" + (table.offsetHeight - offset), expires); 500 } 501 502 // Unload the rich editor 503 inst.triggerSave(false, false); 504 htm = inst.formElement.value; 505 tinyMCE.removeMCEControl(id); 506 document.getElementById(id).value = htm; 507 --tinyMCE.idCounter; 508 509 // Reveal Quicktags and textarea 510 qt.style.display = 'block'; 511 ta.style.display = 'inline'; 512 513 // Set the textarea height to match the rich editor 514 y2 = ta.offsetTop + ta.offsetHeight; 515 ta.style.height = (ta.clientHeight + y1 - y2) + 'px'; 516 517 // Tweak the widths 518 ta.parentNode.style.paddingRight = '2px'; 519 520 if ( tinyMCE.isMSIE && !tinyMCE.isOpera ) { 521 } else { 522 // Unlock the fieldset's height 523 pdr.style.height = 'auto'; 524 pdr.style.overflow = 'display'; 525 } 526 } else { 527 edToggle(P, H); 528 edCloseAllTags(); // :-( 529 530 if ( tinyMCE.isMSIE && !tinyMCE.isOpera ) { 531 } else { 532 // Lock the fieldset's height 533 pdr.style.height = pdr.clientHeight + 'px'; 534 pdr.style.overflow = 'hidden'; 535 } 536 537 // Hide Quicktags and textarea 538 qt.style.display = 'none'; 539 ta.style.display = 'none'; 540 541 // Tweak the widths 542 ta.parentNode.style.paddingRight = '0px'; 543 544 // Load the rich editor with formatted html 545 if ( tinyMCE.isMSIE ) { 546 ta.value = wpautop(ta.value); 547 tinyMCE.addMCEControl(ta, id); 548 } else { 549 htm = wpautop(ta.value); 550 tinyMCE.addMCEControl(ta, id); 551 tinyMCE.getInstanceById(id).execCommand('mceSetContent', null, htm); 552 } 553 554 if ( tinyMCE.isMSIE && !tinyMCE.isOpera ) { 555 } else { 556 // Unlock the fieldset's height 557 pdr.style.height = 'auto'; 558 pdr.style.overflow = 'display'; 559 } 560 } 561 } 562 563 function edToggle(A, B) { 564 A.className = 'edButtonFore'; 565 B.className = 'edButtonBack'; 566 567 B.onclick = A.onclick; 568 A.onclick = null; 569 } 570 571 function wpautop(pee) { 572 pee = pee + "\n\n"; 573 pee = pee.replace(new RegExp('<br />\\s*<br />', 'gi'), "\n\n"); 574 pee = pee.replace(new RegExp('(<(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6])[^>]*>)', 'gi'), "\n$1"); 575 pee = pee.replace(new RegExp('(</(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6])>)', 'gi'), "$1\n\n"); 576 pee = pee.replace(new RegExp("\\r\\n|\\r", 'g'), "\n"); 577 pee = pee.replace(new RegExp("\\n\\s*\\n+", 'g'), "\n\n"); 578 pee = pee.replace(new RegExp('\n*([^\Z]+?)\\n{2}', 'mg'), "<p>$1</p>\n"); 579 pee = pee.replace(new RegExp('<p>\\s*?</p>', 'gi'), ''); 580 pee = pee.replace(new RegExp('<p>\\s*(</?(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|hr|pre|select|form|blockquote|address|math|p|h[1-6])[^>]*>)\\s*</p>', 'gi'), "$1"); 581 pee = pee.replace(new RegExp("<p>(<li.+?)</p>", 'gi'), "$1"); 582 pee = pee.replace(new RegExp('<p><blockquote([^>]*)>', 'gi'), "<blockquote$1><p>"); 583 pee = pee.replace(new RegExp('</blockquote></p>', 'gi'), '</p></blockquote>'); 584 pee = pee.replace(new RegExp('<p>\\s*(</?(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|hr|pre|select|form|blockquote|address|math|p|h[1-6])[^>]*>)', 'gi'), "$1"); 585 pee = pee.replace(new RegExp('(</?(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6])[^>]*>)\\s*</p>', 'gi'), "$1"); 586 pee = pee.replace(new RegExp('\\s*\\n', 'gi'), "<br />\n"); 587 pee = pee.replace(new RegExp('(</?(?:table|thead|tfoot|caption|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6])[^>]*>)\\s*<br />', 'gi'), "$1"); 588 pee = pee.replace(new RegExp('<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)', 'gi'), '$1'); 589 pee = pee.replace(new RegExp('^((?: )*)\\s', 'mg'), '$1 '); 590 //pee = pee.replace(new RegExp('(<pre.*?>)(.*?)</pre>!ise', " stripslashes('$1') . stripslashes(clean_pre('$2')) . '</pre>' "); // Hmm... 591 return pee; 592 } -
trunk/wp-includes/js/tinymce/tiny_mce_config.php
r761 r770 29 29 $plugins = implode($plugins, ','); 30 30 31 $mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', 'separator', 'bullist', 'numlist', 'outdent', 'indent', 'separator', 'justifyleft', 'justifycenter', 'justifyright', 'separator', 'link', 'unlink', 'image', 'wp_more', 'separator', 'spellchecker', 'separator', ' code', 'wp_help', 'wp_adv_start', 'wp_adv', 'separator', 'formatselect', 'underline', 'justifyfull', 'forecolor', 'separator', 'pastetext', 'pasteword', 'separator', 'removeformat', 'cleanup', 'separator', 'charmap', 'separator', 'undo', 'redo', 'wp_adv_end'));31 $mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', 'separator', 'bullist', 'numlist', 'outdent', 'indent', 'separator', 'justifyleft', 'justifycenter', 'justifyright', 'separator', 'link', 'unlink', 'image', 'wp_more', 'separator', 'spellchecker', 'separator', 'wp_help', 'wp_adv_start', 'wp_adv', 'separator', 'formatselect', 'underline', 'justifyfull', 'forecolor', 'separator', 'pastetext', 'pasteword', 'separator', 'removeformat', 'cleanup', 'separator', 'charmap', 'separator', 'undo', 'redo', 'wp_adv_end')); 32 32 $mce_buttons = implode($mce_buttons, ','); 33 33 -
trunk/wp-includes/js/tinymce/tiny_mce_gzip.php
r618 r770 36 36 37 37 // Fall back on en.js 38 if ( empty($text) ) 39 $text = file_get_contents(realpath(sprintf($path, 'en'))); 38 $file = realpath(sprintf($path, 'en')); 39 if ( empty($text) && file_exists($file) ) 40 $text = file_get_contents($file); 40 41 41 42 // Send lang file through gettext -
trunk/wp-includes/l10n.php
r566 r770 1 1 <?php 2 3 if ( defined('WPLANG') && '' != constant('WPLANG') ) {4 include_once(ABSPATH . 'wp-includes/streams.php');5 include_once(ABSPATH . 'wp-includes/gettext.php');6 }7 8 2 function get_locale() { 9 3 global $locale; … … 76 70 77 71 $locale = get_locale(); 78 $mofile = ABSPATH . "wp-includes/languages/$locale.mo";72 $mofile = ABSPATH . LANGDIR . "/$locale.mo"; 79 73 80 74 load_textdomain('default', $mofile); 81 75 } 82 76 83 function load_plugin_textdomain($domain, $path = 'wp-content/plugins') {77 function load_plugin_textdomain($domain, $path = false) { 84 78 $locale = get_locale(); 79 if ( false === $path ) 80 $path = PLUGINDIR; 85 81 86 82 $mofile = ABSPATH . "$path/$domain-$locale.mo"; -
trunk/wp-includes/link-template.php
r729 r770 483 483 preg_match('#FROM\s(.*)\sORDER BY#siU', $wp_query->request, $matches); 484 484 $fromwhere = $matches[1]; 485 $numposts = $wpdb->get_var("SELECT COUNT(DISTINCT ID) FROM $fromwhere");485 $numposts = $wpdb->get_var("SELECT COUNT(DISTINCT $wpdb->posts.ID) FROM $fromwhere"); 486 486 $max_num_pages = ceil($numposts / $posts_per); 487 487 } else { -
trunk/wp-includes/pluggable.php
r737 r770 264 264 // http://support.microsoft.com/kb/q176113/ 265 265 if ( !function_exists('wp_redirect') ) : 266 function wp_redirect($location ) {266 function wp_redirect($location, $status = 302) { 267 267 global $is_IIS; 268 268 … … 272 272 $strip = array('%0d', '%0a'); 273 273 $location = str_replace($strip, '', $location); 274 275 status_header($status); 274 276 275 277 if ($is_IIS) … … 295 297 $password = md5( md5($password) ); // Double hash the password in the cookie. 296 298 299 if ( empty($home) ) 300 $cookiepath = COOKIEPATH; 301 else 302 $cookiepath = preg_replace('|https?://[^/]+|i', '', $home . '/' ); 303 304 if ( empty($siteurl) ) { 305 $sitecookiepath = SITECOOKIEPATH; 306 $cookiehash = COOKIEHASH; 307 } else { 308 $sitecookiepath = preg_replace('|https?://[^/]+|i', '', $siteurl . '/' ); 309 $cookiehash = md5($siteurl); 310 } 311 297 312 if ( $remember ) 298 313 $expire = time() + 31536000; … … 300 315 $expire = 0; 301 316 302 global $base; 303 setcookie(USER_COOKIE, $username, $expire, $base, COOKIE_DOMAIN); 304 setcookie(PASS_COOKIE, $password, $expire, $base, COOKIE_DOMAIN); 317 setcookie(USER_COOKIE, $username, $expire, $cookiepath, COOKIE_DOMAIN); 318 setcookie(PASS_COOKIE, $password, $expire, $cookiepath, COOKIE_DOMAIN); 319 320 if ( $cookiepath != $sitecookiepath ) { 321 setcookie(USER_COOKIE, $username, $expire, $sitecookiepath, COOKIE_DOMAIN); 322 setcookie(PASS_COOKIE, $password, $expire, $sitecookiepath, COOKIE_DOMAIN); 323 } 305 324 } 306 325 endif; … … 308 327 if ( !function_exists('wp_clearcookie') ) : 309 328 function wp_clearcookie() { 310 global $base; 311 setcookie(USER_COOKIE, ' ', time() - 31536000, $base, COOKIE_DOMAIN); 312 setcookie(PASS_COOKIE, ' ', time() - 31536000, $base, COOKIE_DOMAIN); 329 setcookie(USER_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN); 330 setcookie(PASS_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN); 331 setcookie(USER_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN); 332 setcookie(PASS_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN); 313 333 } 314 334 endif; -
trunk/wp-includes/query.php
r744 r770 330 330 $this->parse_query(''); 331 331 } 332 333 function fill_query_vars($array) { 334 $keys = array( 335 'error' 336 , 'm' 337 , 'p' 338 , 'subpost' 339 , 'subpost_id' 340 , 'attachment' 341 , 'attachment_id' 342 , 'name' 343 , 'hour' 344 , 'static' 345 , 'pagename' 346 , 'page_id' 347 , 'second' 348 , 'minute' 349 , 'hour' 350 , 'day' 351 , 'monthnum' 352 , 'year' 353 , 'w' 354 , 'category_name' 355 , 'author_name' 356 , 'feed' 357 , 'tb' 358 , 'paged' 359 , 'comments_popup' 360 , 'preview' 361 ); 362 363 foreach ($keys as $key) { 364 if ( !isset($array[$key])) 365 $array[$key] = ''; 366 } 367 368 return $array; 369 } 332 370 333 371 // Parse a query string and set query type booleans. … … 342 380 $this->query_vars = $qv; 343 381 } 344 382 383 $qv = $this->fill_query_vars($qv); 384 345 385 if ( ! empty($qv['robots']) ) { 346 386 $this->is_robots = true; … … 531 571 // Shorthand. 532 572 $q = &$this->query_vars; 573 574 $q = $this->fill_query_vars($q); 533 575 534 576 // First let's clear some variables … … 541 583 $limits = ''; 542 584 $join = ''; 585 $search = ''; 543 586 544 587 if ( !isset($q['post_type']) ) … … 910 953 911 954 if (($q['what_to_show'] == 'posts')) { 912 $q['offset'] = abs(intval($q['offset']));913 955 if ( empty($q['offset']) ) { 914 956 $pgstrt = ''; … … 916 958 $limits = 'LIMIT '.$pgstrt.$q['posts_per_page']; 917 959 } else { // we're ignoring $page and using 'offset' 960 $q['offset'] = abs(intval($q['offset'])); 918 961 $pgstrt = $q['offset'] . ', '; 919 962 $limits = 'LIMIT ' . $pgstrt . $q['posts_per_page']; -
trunk/wp-includes/script-loader.php
r760 r770 16 16 $this->add( 'quicktags', '/wp-includes/js/quicktags.js', false, '3517' ); 17 17 $this->add( 'colorpicker', '/wp-includes/js/colorpicker.js', false, '3517' ); 18 $this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '0 8152006' );19 $this->add( 'wp_tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('tiny_mce'), '0 4162006' );18 $this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '09212006' ); 19 $this->add( 'wp_tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('tiny_mce'), '09212006' ); 20 20 $this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.5.0'); 21 $this->add( 'autosave', '/wp-includes/js/autosave.js.php', array('prototype', 'sack'), '4 183');21 $this->add( 'autosave', '/wp-includes/js/autosave.js.php', array('prototype', 'sack'), '4206'); 22 22 $this->add( 'wp-ajax', '/wp-includes/js/wp-ajax-js.php', array('prototype'), '4187'); 23 23 $this->add( 'listman', '/wp-includes/js/list-manipulation-js.php', array('wp-ajax', 'fat'), '4187'); -
trunk/wp-includes/wp-db.php
r761 r770 284 284 if ( $query ) 285 285 $this->query($query); 286 287 if ( !isset($this->last_result[$y]) ) 288 return null; 286 289 287 290 if ( $output == OBJECT ) { … … 434 437 } 435 438 436 $wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST); 439 if ( ! isset($wpdb) ) 440 $wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST); 437 441 ?> -
trunk/wp-settings.php
r737 r770 4 4 5 5 // Turn register globals off 6 function unregister_GLOBALS() {6 function wp_unregister_GLOBALS() { 7 7 if ( !ini_get('register_globals') ) 8 8 return; … … 20 20 } 21 21 22 unregister_GLOBALS();22 wp_unregister_GLOBALS(); 23 23 24 24 unset( $wp_filter, $cache_userdata, $cache_lastcommentmodified, $cache_lastpostdate, $cache_settings, $category_cache, $cache_categories ); … … 85 85 86 86 define('WPINC', 'wp-includes'); 87 if ( !defined('LANGDIR') ) 88 define('LANGDIR', WPINC . '/languages'); // no leading slash, no trailing slash 89 if ( !defined('PLUGINDIR') ) 90 define('PLUGINDIR', 'wp-content/plugins'); // no leading slash, no trailing slash 87 91 if ( file_exists(ABSPATH . 'wp-content/db.php') ) 88 92 require (ABSPATH . 'wp-content/db.php');
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)