Changeset 4953
- Timestamp:
- 02/27/2007 03:24:54 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/app.php
r4937 r4953 24 24 25 25 $_SERVER['PATH_INFO'] = $action; 26 26 27 27 if ($eid) { 28 28 $_SERVER['PATH_INFO'] .= "/$eid"; … … 174 174 array_push($this->entry->categories, $attrs); 175 175 } 176 176 177 177 $this->ns_decls = array(); 178 178 } … … 202 202 203 203 array_shift($this->ns_contexts); 204 204 205 205 #print str_repeat(" ", $this->depth * $this->indent) . "end_element('$name')" ."\n"; 206 206 … … 343 343 } else { 344 344 // only allow what we have handlers for... 345 $this->not_allowed(array_keys($funcs)); 345 $this->not_allowed(array_keys($funcs)); 346 346 } 347 347 } … … 454 454 455 455 function put_post($postID) { 456 456 457 457 // checked for valid content-types (atom+xml) 458 458 // quick check and exit … … 509 509 $this->auth_required('Sorry, you do not have the right to delete this post.'); 510 510 } 511 511 512 512 if ($entry['post_type'] == 'attachment') { 513 $this->delete_attachment($postID); 513 $this->delete_attachment($postID); 514 514 } else { 515 515 $result = wp_delete_post($postID); … … 524 524 525 525 } 526 526 527 527 function get_attachment($postID = NULL) { 528 528 … … 552 552 } 553 553 fclose($fp); 554 554 555 555 $slug = ''; 556 556 if ( isset( $_SERVER['HTTP_SLUG'] ) ) … … 565 565 566 566 log_app('wp_upload_bits returns:',print_r($file,true)); 567 567 568 568 $url = $file['url']; 569 569 $file = $file['file']; … … 719 719 fclose($fp); 720 720 fclose($localfp); 721 721 722 722 log_app('function',"put_file($postID)"); 723 723 $this->ok(); … … 761 761 echo $url; 762 762 } 763 763 764 764 function get_attachments_url($page = NULL) { 765 765 global $use_querystring; … … 791 791 $postID = $GLOBALS['post']->ID; 792 792 } 793 793 794 794 if ($use_querystring) { 795 795 $url = get_bloginfo('url') . '/' . $this->script_name . '?action=/' . $this->ENTRY_PATH . "&eid=$postID"; … … 813 813 $postID = $GLOBALS['post']->ID; 814 814 } 815 815 816 816 if ($use_querystring) { 817 817 $url = get_bloginfo('url') . '/' . $this->script_name . '?action=/' . $this->MEDIA_SINGLE_PATH ."&eid=$postID"; … … 874 874 } 875 875 $page = (int) $page; 876 877 $count = get_option('posts_per_rss'); 876 877 $count = get_option('posts_per_rss'); 878 878 $query = "paged=$page&posts_per_page=$count&order=DESC"; 879 879 if($post_type == 'attachment') { … … 888 888 $blog_id = $GLOBALS['blog_id']; 889 889 $post_cache = $GLOBALS['post_cache']; 890 890 891 891 892 892 $total_count = $this->get_posts_count(); … … 1057 1057 exit; 1058 1058 } 1059 1059 1060 1060 function not_found() { 1061 1061 log_app('Status','404: Not Found'); … … 1078 1078 exit; 1079 1079 } 1080 1080 1081 1081 function created($post_ID, $content, $post_type = 'post') { 1082 1082 global $use_querystring; … … 1152 1152 $login_data = array(); 1153 1153 $already_md5 = false; 1154 1154 1155 1155 log_app("authenticate()",print_r($_ENV, true)); 1156 1156 … … 1210 1210 1211 1211 function process_conditionals() { 1212 1212 1213 1213 if(empty($this->params)) return; 1214 1214 if($_SERVER['REQUEST_METHOD'] == 'DELETE') return; … … 1241 1241 $client_modified_timestamp = $client_last_modified ? strtotime($client_last_modified) : 0; 1242 1242 1243 // Make a timestamp for our most recent modification... 1243 // Make a timestamp for our most recent modification... 1244 1244 $wp_modified_timestamp = strtotime($wp_last_modified); 1245 1245 -
trunk/wp-admin/admin-ajax.php
r4882 r4953 227 227 $_POST['post_category'] = explode(",", $_POST['catslist']); 228 228 if($_POST['post_type'] == 'page' || empty($_POST['post_category'])) 229 unset($_POST['post_category']); 230 229 unset($_POST['post_category']); 230 231 231 if($_POST['post_ID'] < 0) { 232 232 $_POST['temp_ID'] = $_POST['post_ID']; -
trunk/wp-admin/admin-functions.php
r4884 r4953 682 682 // No selected categories, strange 683 683 $checked_categories[] = $default; 684 } 684 } 685 685 } else { 686 686 $checked_categories[] = $default; … … 738 738 // No selected categories, strange 739 739 $checked_categories[] = $default; 740 } 740 } 741 741 } else { 742 742 $checked_categories[] = $default; … … 779 779 $output = ob_get_contents(); 780 780 ob_end_clean(); 781 781 782 782 $output = apply_filters('cat_rows', $output); 783 783 … … 1317 1317 if ( isset( $plugin_page ) && isset( $_wp_submenu_nopriv[$parent][$plugin_page] ) ) 1318 1318 return false; 1319 1319 1320 1320 if ( empty( $parent) ) { 1321 1321 if ( isset( $_wp_menu_nopriv[$pagenow] ) ) … … 1329 1329 return false; 1330 1330 if ( isset( $plugin_page ) && isset( $_wp_submenu_nopriv[$key][$plugin_page] ) ) 1331 return false; 1331 return false; 1332 1332 } 1333 1333 return true; … … 1451 1451 $parent_file = $_wp_real_parent_file[$parent_file]; 1452 1452 return $parent_file; 1453 } 1453 } 1454 1454 } 1455 1455 … … 1458 1458 if ( isset( $_wp_real_parent_file[$parent_file] ) ) 1459 1459 $parent_file = $_wp_real_parent_file[$parent_file]; 1460 return $parent_file; 1460 return $parent_file; 1461 1461 } 1462 1462 … … 1898 1898 // Compute the URL 1899 1899 $url = $uploads['url'] . "/$filename"; 1900 1900 1901 1901 $return = apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ) ); 1902 1902 … … 2057 2057 wp_clearcookie(); 2058 2058 // Set cookies for new paths. 2059 wp_setcookie( $user_login, $user_pass_md5, true, get_option( 'home' ), get_option( 'siteurl' )); 2059 wp_setcookie( $user_login, $user_pass_md5, true, get_option( 'home' ), get_option( 'siteurl' )); 2060 2060 } 2061 2061 -
trunk/wp-admin/custom-header.php
r4910 r4953 18 18 function js_includes() { 19 19 wp_enqueue_script('cropper'); 20 wp_enqueue_script('colorpicker'); 20 wp_enqueue_script('colorpicker'); 21 21 } 22 22 … … 116 116 pickColor('<?php echo HEADER_TEXTCOLOR; ?>'); 117 117 } 118 118 119 119 function hide_text() { 120 120 $('name').style.display = 'none'; … … 127 127 Event.observe( $('hidetext'), 'click', show_text ); 128 128 } 129 129 130 130 function show_text() { 131 131 $('name').style.display = 'block'; … … 135 135 $('textcolor').value = '<?php echo HEADER_TEXTCOLOR; ?>'; 136 136 $('hidetext').value = '<?php _e('Hide Text'); ?>'; 137 Event.stopObserving( $('hidetext'), 'click', show_text ); 137 Event.stopObserving( $('hidetext'), 'click', show_text ); 138 138 Event.observe( $('hidetext'), 'click', hide_text ); 139 139 } -
trunk/wp-admin/import/blogger.php
r4896 r4953 56 56 } 57 57 $this->token = $matches[1]; 58 58 59 59 wp_redirect( remove_query_arg( array( 'token', 'noheader' ) ) ); 60 60 } … … 370 370 if ( ! $sock ) return; // TODO: Error handling 371 371 $response = $this->_txrx( $sock, $request ); 372 372 373 373 $response = $this->parse_response( $response ); 374 374 375 375 // Extract the entries and send for insertion 376 376 preg_match_all( '/<entry[^>]*>.*?<\/entry>/s', $response['body'], $matches ); … … 438 438 $entry = "<feed>$entry</feed>"; 439 439 $AtomParser = new AtomParser(); 440 $AtomParser->parse( $entry ); 440 $AtomParser->parse( $entry ); 441 441 $this->import_comment($AtomParser->entry); 442 442 unset($AtomParser); … … 624 624 $options .= "<option value='$user->user_id'$sel>$user->display_name</option>"; 625 625 } 626 626 627 627 return $options; 628 628 } … … 707 707 global $wpdb; 708 708 $options = get_option( 'blogger_importer' ); 709 709 710 710 if ( isset( $options['token'] ) ) 711 711 $this->revoke( $options['token'] ); … … 923 923 array_push($this->entry->categories, $attrs['term']); 924 924 } 925 925 926 926 $this->ns_decls = array(); 927 927 } … … 951 951 952 952 array_shift($this->ns_contexts); 953 953 954 954 #print str_repeat(" ", $this->depth * $this->indent) . "end_element('$name')" ."\n"; 955 955 -
trunk/wp-admin/import/greymatter.php
r4608 r4953 92 92 if (!chdir($gmpath)) 93 93 wp_die(sprintf(__("Wrong path, %s\ndoesn't exist\non the server"), $gmpath)); 94 94 95 95 $this->header(); 96 96 ?> … … 129 129 $user_id = wp_insert_user($user_info); 130 130 $this->gmnames[$userdata[0]] = $user_id; 131 131 132 132 printf('<li>'.__('user %s...').' <strong>'.__('Done').'</strong></li>', "<em>$user_login</em>"); 133 133 } … … 214 214 $user_url=$wpdb->escape(""); 215 215 $user_joindate=$wpdb->escape($user_joindate); 216 216 217 217 $user_info = array("user_login"=>$user_login, "user_pass"=>$pass1, "user_nickname"=>$user_nickname, "user_email"=>$user_email, "user_url"=>$user_url, "user_ip"=>$user_ip, "user_domain"=>$user_domain, "user_browser"=>$user_browser, "dateYMDhour"=>$user_joindate, "user_level"=>0, "user_idmode"=>"nickname"); 218 218 $user_id = wp_insert_user($user_info); 219 219 $this->gmnames[$postinfo[1]] = $user_id; 220 220 221 221 echo ': '; 222 222 printf(__('registered deleted user %s at level 0 '), "<em>$user_login</em>"); 223 223 } 224 224 225 225 if (array_key_exists($postinfo[1], $this->gmnames)) { 226 226 $post_author = $this->gmnames[$postinfo[1]]; … … 228 228 $post_author = $user_id; 229 229 } 230 230 231 231 $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_excerpt', 'post_status', 'comment_status', 'ping_status', 'post_modified', 'post_modified_gmt'); 232 232 $post_ID = wp_insert_post($postdata); -
trunk/wp-admin/link-import.php
r4734 r4953 13 13 <?php 14 14 switch ($step) { 15 case 0: 16 { 17 include_once('admin-header.php'); 18 if ( !current_user_can('manage_links') ) 19 wp_die(__('Cheatin’ uh?')); 15 case 0: { 16 include_once('admin-header.php'); 17 if ( !current_user_can('manage_links') ) 18 wp_die(__('Cheatin’ uh?')); 20 19 21 20 $opmltype = 'blogrolling'; // default. 22 21 ?> 23 22 24 23 <div class="wrap"> 24 25 25 <h2><?php _e('Import your blogroll from another system') ?> </h2> 26 26 <form enctype="multipart/form-data" action="link-import.php" method="post" name="blogroll"> … … 40 40 <input id="userfile" name="userfile" type="file" size="30" /> 41 41 </div> 42 43 42 44 43 </div> … … 61 60 </div> 62 61 <?php 63 64 62 break; 63 } // end case 0 65 64 66 65 case 1: { 67 66 check_admin_referer('import-bookmarks'); 68 67 69 70 71 68 include_once('admin-header.php'); 69 if ( !current_user_can('manage_links') ) 70 wp_die(__('Cheatin’ uh?')); 72 71 ?> 73 72 <div class="wrap"> 74 73 75 74 <h2><?php _e('Importing...') ?></h2> 76 75 <?php 77 $cat_id = $_POST['cat_id']; 78 if (($cat_id == '') || ($cat_id == 0)) { 79 $cat_id = 1; 80 } 76 $cat_id = $_POST['cat_id']; 77 if ( $cat_id == '' || $cat_id == 0 ) 78 $cat_id = 1; 81 79 82 $opml_url = $_POST['opml_url']; 83 if (isset($opml_url) && $opml_url != '' && $opml_url != 'http://') { 84 $blogrolling = true; 85 } 86 else // try to get the upload file. 87 { 88 $overrides = array('test_form' => false, 'test_type' => false); 89 $file = wp_handle_upload($_FILES['userfile'], $overrides); 80 $opml_url = $_POST['opml_url']; 81 if ( isset($opml_url) && $opml_url != '' && $opml_url != 'http://' ) { 82 $blogrolling = true; 83 } else { // try to get the upload file. 84 $overrides = array('test_form' => false, 'test_type' => false); 85 $file = wp_handle_upload($_FILES['userfile'], $overrides); 90 86 91 92 87 if ( isset($file['error']) ) 88 wp_die($file['error']); 93 89 94 95 96 97 90 $url = $file['url']; 91 $opml_url = $file['file']; 92 $blogrolling = false; 93 } 98 94 99 if (isset($opml_url) && $opml_url != '') {100 101 95 if ( isset($opml_url) && $opml_url != '' ) { 96 $opml = wp_remote_fopen($opml_url); 97 include_once('link-parse-opml.php'); 102 98 103 104 for ($i = 0; $i < $link_count; $i++) {105 106 107 if ('http' == substr($titles[$i], 0, 4))108 109 $link = array( 'link_url' => $urls[$i], 'link_name' => $wpdb->escape($names[$i]), 'link_category' => array($cat_id), 'link_description' => $wpdb->escape($descriptions[$i]), 'link_owner' => $user_ID, 'link_rss' => $feeds[$i]); 110 111 112 99 $link_count = count($names); 100 for ( $i = 0; $i < $link_count; $i++ ) { 101 if ('Last' == substr($titles[$i], 0, 4)) 102 $titles[$i] = ''; 103 if ( 'http' == substr($titles[$i], 0, 4) ) 104 $titles[$i] = ''; 105 $link = array( 'link_url' => $urls[$i], 'link_name' => $wpdb->escape($names[$i]), 'link_category' => array($cat_id), 'link_description' => $wpdb->escape($descriptions[$i]), 'link_owner' => $user_ID, 'link_rss' => $feeds[$i]); 106 wp_insert_link($link); 107 echo sprintf('<p>'.__('Inserted <strong>%s</strong>').'</p>', $names[$i]); 108 } 113 109 ?> 114 <p><?php printf(__('Inserted %1$d links into category %2$s. All done! Go <a href="%3$s">manage those links</a>.'), $link_count, $cat_id, 'link-manager.php') ?></p> 110 111 <p><?php printf(__('Inserted %1$d links into category %2$s. All done! Go <a href="%3$s">manage those links</a>.'), $link_count, $cat_id, 'link-manager.php') ?></p> 112 115 113 <?php 116 117 118 119 120 114 } // end if got url 115 else 116 { 117 echo "<p>" . __("You need to supply your OPML url. Press back on your browser and try again") . "</p>\n"; 118 } // end else 121 119 122 123 120 if ( ! $blogrolling ) 121 @unlink($opml_url); 124 122 ?> 125 123 </div> 126 124 <?php 127 128 125 break; 126 } // end case 1 129 127 } // end switch 130 128 -
trunk/wp-admin/menu.php
r4694 r4953 15 15 else 16 16 $menu[10] = array(__('Manage'), 'edit_posts', 'edit.php'); 17 17 18 18 $menu[15] = array(__('Comments'), 'edit_posts', 'edit-comments.php'); 19 19 $menu[20] = array(__('Blogroll'), 'manage_links', 'link-manager.php'); … … 105 105 $_wp_real_parent_file[$old_parent] = $new_parent; 106 106 $menu[$id][2] = $new_parent; 107 107 108 108 foreach ($submenu[$old_parent] as $index => $data) { 109 109 $submenu[$new_parent][$index] = $submenu[$old_parent][$index]; -
trunk/wp-admin/options.php
r4656 r4953 79 79 } 80 80 81 return $value; 81 return $value; 82 82 } 83 83 … … 151 151 if (stristr($value, "\n")) echo "<textarea class='$class' name='$option->option_name' id='$option->option_name' cols='30' rows='5'>$value</textarea>"; 152 152 else echo "<input class='$class' type='text' name='$option->option_name' id='$option->option_name' size='30' value='" . $value . "'$disabled />"; 153 153 154 154 echo "</td> 155 155 <td>$option->option_description</td> -
trunk/wp-admin/page.php
r4915 r4953 108 108 109 109 if ( isset($_POST['save']) ) 110 $location = "page.php?action=edit&post=$page_ID"; 110 $location = "page.php?action=edit&post=$page_ID"; 111 111 } else { 112 112 if ($_POST['save']) { -
trunk/wp-admin/post.php
r4780 r4953 48 48 $post_ID = $p = (int) $_GET['post']; 49 49 $post = get_post($post_ID); 50 50 51 51 if ( 'page' == $post->post_type ) { 52 52 wp_redirect("page.php?action=edit&post=$post_ID"); … … 120 120 $referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']); 121 121 $referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer()); 122 122 123 123 if ($_POST['save']) { 124 124 $location = "post.php?action=edit&post=$post_ID"; -
trunk/wp-admin/upgrade-schema.php
r4860 r4953 3 3 4 4 $charset_collate = ''; 5 5 6 6 if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') ) { 7 7 if ( ! empty($wpdb->charset) ) 8 8 $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset"; 9 9 if ( ! empty($wpdb->collate) ) 10 $charset_collate .= " COLLATE $wpdb->collate"; 10 $charset_collate .= " COLLATE $wpdb->collate"; 11 11 } 12 12 -
trunk/wp-admin/upload-functions.php
r4767 r4953 14 14 if ( isset($attachment_data['width']) ) 15 15 list($width,$height) = wp_shrink_dimensions($attachment_data['width'], $attachment_data['height'], 171, 128); 16 16 17 17 ob_start(); 18 18 the_title(); … … 20 20 ob_end_clean(); 21 21 $post_content = apply_filters( 'content_edit_pre', $post->post_content ); 22 22 23 23 $class = 'text'; 24 24 $innerHTML = get_attachment_innerHTML( $id, false, $dims ); … … 286 286 global $wpdb, $action, $paged; 287 287 $old_vars = compact( 'paged' ); 288 288 289 289 switch ( $action ) : 290 290 case 'edit' : -
trunk/wp-admin/upload-js.php
r4768 r4953 190 190 new Insertion.Top('upload-content', h); 191 191 if (e) Event.stop(e); 192 return false; 192 return false; 193 193 }, 194 194 … … 265 265 return false; 266 266 } 267 267 268 268 }; 269 269 theFileList.initializeVars(); -
trunk/wp-includes/bookmark-template.php
r4800 r4953 343 343 //output one single list using title_li for the title 344 344 $bookmarks = get_bookmarks("limit=$limit&category=$category&show_updated=$show_updated&orderby=$orderby&order=$order&hide_invisible=$hide_invisible&show_updated=$show_updated"); 345 345 346 346 if ( !empty($bookmarks) ) { 347 347 if ( !empty( $title_li ) ){ -
trunk/wp-includes/bookmark.php
r4529 r4953 73 73 if (!empty($exclusions)) 74 74 $exclusions .= ')'; 75 75 76 76 if ( ! empty($category_name) ) { 77 77 if ( $cat_id = $wpdb->get_var("SELECT cat_ID FROM $wpdb->categories WHERE cat_name='$category_name' LIMIT 1") ) -
trunk/wp-includes/cache.php
r4856 r4953 387 387 return $this->__construct(); 388 388 } 389 389 390 390 function __construct() { 391 391 global $blog_id; … … 430 430 function __destruct() { 431 431 $this->save(); 432 return true; 432 return true; 433 433 } 434 434 } -
trunk/wp-includes/category-template.php
r4903 r4953 248 248 } else { 249 249 global $wp_query; 250 250 251 251 if ( is_category() ) 252 252 $r['current_category'] = $wp_query->get_queried_object_id(); -
trunk/wp-includes/classes.php
r4893 r4953 415 415 $output = call_user_func_array(array(&$this, 'start_el'), $cb_args); 416 416 } 417 417 418 418 // End the element. 419 419 if ( isset($element->$id_field) && $element->$id_field != 0 ) { … … 421 421 $output = call_user_func_array(array(&$this, 'end_el'), $cb_args); 422 422 } 423 424 continue; 425 } 426 423 424 continue; 425 } 426 427 427 // Walk the tree. 428 428 if ( !empty($previous_element) && ($element->$parent_field == $previous_element->$id_field) ) { … … 513 513 514 514 $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page->ID) . '" title="' . attribute_escape($page->post_title) . '">' . $page->post_title . '</a>'; 515 515 516 516 if ( !empty($show_date) ) { 517 517 if ( 'modified' == $show_date ) … … 519 519 else 520 520 $time = $page->post_date; 521 521 522 522 $output .= " " . mysql2date($date_format, $time); 523 523 } … … 525 525 return $output; 526 526 } 527 527 528 528 function end_el($output, $page, $depth) { 529 529 $output .= "</li>\n"; … … 614 614 $link .= ')'; 615 615 } 616 616 617 617 if ( isset($show_count) && $show_count ) 618 618 $link .= ' (' . intval($category->category_count) . ')'; 619 619 620 620 if ( isset($show_date) && $show_date ) { 621 621 $link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp); -
trunk/wp-includes/cron.php
r4834 r4953 55 55 function wp_clear_scheduled_hook( $hook ) { 56 56 $args = array_slice( func_get_args(), 1 ); 57 57 58 58 while ( $timestamp = wp_next_scheduled( $hook, $args ) ) 59 59 wp_unschedule_event( $timestamp, $hook, $args ); … … 74 74 function spawn_cron() { 75 75 $crons = _get_cron_array(); 76 76 77 77 if ( !is_array($crons) ) 78 78 return; 79 79 80 80 $keys = array_keys( $crons ); 81 81 if ( array_shift( $keys ) > time() ) … … 99 99 100 100 $crons = _get_cron_array(); 101 101 102 102 if ( !is_array($crons) ) 103 103 return; -
trunk/wp-includes/feed-atom-comments.php
r4934 r4953 17 17 ?></title> 18 18 <subtitle type="text"><?php bloginfo_rss('description'); ?></subtitle> 19 19 20 20 <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastcommentmodified('GMT')); ?></updated> 21 21 <generator uri="http://wordpress.org/" version="<?php bloginfo('version'); ?>">WordPress</generator> 22 22 23 23 <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" content="<?php bloginfo_rss('home'); ?>" /> 24 24 <link rel="self" type="application/atom+xml" href="<?php bloginfo_rss('comments_atom_url'); ?>" /> … … 42 42 ?></title> 43 43 <link rel="alternate" href="<?php comment_link(); ?>" type="<?php bloginfo_rss('content_type'); ?>" /> 44 44 45 45 <author> 46 46 <name><?php comment_author_rss(); ?></name> … … 48 48 49 49 </author> 50 50 51 51 <id><?php comment_link(); ?></id> 52 52 <updated><?php echo mysql2date('D, d M Y H:i:s +0000', get_comment_time('Y-m-d H:i:s', true), false); ?></updated> -
trunk/wp-includes/feed-atom.php
r4930 r4953 14 14 <title type="text"><?php bloginfo_rss('name') ?></title> 15 15 <subtitle type="text"><?php bloginfo_rss("description") ?></subtitle> 16 16 17 17 <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT')); ?></updated> 18 18 <generator uri="http://wordpress.org/" version="<?php bloginfo_rss('version'); ?>">WordPress</generator> -
trunk/wp-includes/formatting.php
r4900 r4953 22 22 23 23 $dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/(\s|\A|")\'/', '/(\d+)"/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A)"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/'); 24 $dynamic_replacements = array('’$1','$1‘', '$1″', '$1′', '$1’$2', '$1“$2', '”$1', '’$1', '$1×$2'); 24 $dynamic_replacements = array('’$1','$1‘', '$1″', '$1′', '$1’$2', '$1“$2', '”$1', '’$1', '$1×$2'); 25 25 26 26 for ( $i = 0; $i < $stop; $i++ ) { -
trunk/wp-includes/general-template.php
r4928 r4953 352 352 $arcresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS `year`, count(ID) as posts FROM $wpdb->posts WHERE post_type ='post' AND post_status = 'publish' GROUP BY YEAR(post_date) ORDER BY post_date DESC" . $limit); 353 353 if ($arcresults) { 354 355 356 357 354 $afterafter = $after; 355 foreach ($arcresults as $arcresult) { 356 $url = get_year_link($arcresult->year); 357 $text = sprintf('%d', $arcresult->year); 358 358 if ($show_post_count) 359 360 361 362 } 359 $after = ' ('.$arcresult->posts.')' . $afterafter; 360 echo get_archives_link($url, $text, $format, $before, $after); 361 } 362 } 363 363 } elseif ( 'daily' == $type ) { 364 364 $arcresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, DAYOFMONTH(post_date) AS `dayofmonth`, count(ID) as posts FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date), DAYOFMONTH(post_date) ORDER BY post_date DESC" . $limit); -
trunk/wp-includes/gettext.php
r4917 r4953 309 309 # results in parse error in eval 310 310 $string .= ';'; 311 311 312 312 $total = 0; 313 313 $plural = 0; -
trunk/wp-includes/js/autosave-js.php
r4760 r4953 29 29 ((now.getSeconds() < 10) ? ":0" : ":") + now.getSeconds(); 30 30 } 31 31 32 32 function autosave_update_nonce() { 33 33 var response = nonceAjax.response; … … 39 39 var res = parseInt(response); 40 40 var message; 41 41 42 42 if(isNaN(res)) { 43 43 message = "<?php echo js_escape(__('Error: ')); ?>" + response; … … 71 71 var res = parseInt(response); 72 72 var message; 73 73 74 74 if(isNaN(res)) { 75 75 message = "<?php echo js_escape(__('Error: ')); ?>" + response; … … 128 128 } 129 129 catslist = goodcats.join(","); 130 130 131 131 autosaveAjax.setVar("action", "autosave"); 132 132 autosaveAjax.setVar("cookie", document.cookie); … … 140 140 autosaveAjax.setVar("ping_status", 'open'); 141 141 if(form.excerpt) 142 autosaveAjax.setVar("excerpt", form.excerpt.value); 143 142 autosaveAjax.setVar("excerpt", form.excerpt.value); 143 144 144 if ( typeof tinyMCE == "undefined" || tinyMCE.configs.length < 1 || rich == false ) { 145 145 autosaveAjax.setVar("content", form.content.value); … … 148 148 autosaveAjax.setVar("content", form.content.value); 149 149 } 150 150 151 151 autosaveAjax.requestFile = "<?php echo get_option('siteurl'); ?>/wp-admin/admin-ajax.php"; 152 152 autosaveAjax.method = "POST"; -
trunk/wp-includes/js/tinymce/tiny_mce_config.php
r4932 r4953 41 41 $mce_browsers = apply_filters('mce_browsers', array('msie', 'gecko', 'opera', 'safari')); 42 42 $mce_browsers = implode($mce_browsers, ','); 43 43 44 44 $mce_popups_css = get_option('siteurl') . '/wp-includes/js/tinymce/plugins/wordpress/popups.css'; 45 45 $mce_css = get_option('siteurl') . '/wp-includes/js/tinymce/plugins/wordpress/wordpress.css'; -
trunk/wp-includes/link-template.php
r4929 r4953 263 263 } 264 264 265 return apply_filters('post_comments_feed_link', $url); 265 return apply_filters('post_comments_feed_link', $url); 266 266 } 267 267 -
trunk/wp-includes/pluggable.php
r4947 r4953 164 164 $phpmailer = new PHPMailer(); 165 165 } 166 166 167 167 $mail = compact('to', 'subject', 'message', 'headers'); 168 168 $mail = apply_filters('wp_mail', $mail); -
trunk/wp-includes/post-template.php
r4925 r4953 102 102 $output .= ' <a href="'. get_permalink() . "#more-$id\" class=\"more-link\">$more_link_text</a>"; 103 103 } 104 104 105 105 } 106 106 if ( $preview ) // preview fix for javascript bug with foreign languages -
trunk/wp-includes/post.php
r4873 r4953 81 81 $extended = ''; 82 82 } 83 83 84 84 // Strip leading and trailing whitespace 85 85 $main = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $main); … … 556 556 $post_date_gmt = get_gmt_from_date($post_date); 557 557 } 558 558 559 559 if ( 'publish' == $post_status ) { 560 560 $now = gmdate('Y-m-d H:i:59'); … … 705 705 if ( 'future' == $post_status ) 706 706 wp_schedule_single_event(strtotime($post_date_gmt. ' GMT'), 'publish_future_post', array($post_ID)); 707 707 708 708 do_action('save_post', $post_ID); 709 709 do_action('wp_insert_post', $post_ID); … … 1108 1108 if (!empty($authors)) { 1109 1109 $post_authors = preg_split('/[\s,]+/',$authors); 1110 1110 1111 1111 if ( count($post_authors) ) { 1112 1112 foreach ( $post_authors as $post_author ) { -
trunk/wp-includes/query.php
r4940 r4953 201 201 global $wp_query; 202 202 203 return $wp_query->is_singular; 203 return $wp_query->is_singular; 204 204 } 205 205 … … 286 286 var $in_the_loop = false; 287 287 var $post; 288 288 289 289 var $comments; 290 290 var $comment_count = 0; … … 361 361 $this->parse_query(''); 362 362 } 363 363 364 364 function fill_query_vars($array) { 365 365 $keys = array( … … 396 396 $array[$key] = ''; 397 397 } 398 398 399 399 return $array; 400 400 } … … 411 411 $this->query_vars = $qv; 412 412 } 413 413 414 414 $qv = $this->fill_query_vars($qv); 415 415 416 416 if ( ! empty($qv['robots']) ) { 417 417 $this->is_robots = true; … … 610 610 // Shorthand. 611 611 $q = &$this->query_vars; 612 612 613 613 $q = $this->fill_query_vars($q); 614 614 … … 1002 1002 } 1003 1003 } 1004 1004 1005 1005 // Comments feeds 1006 1006 if ( $this->is_comment_feed && ( $this->is_archive || $this->is_search || !$this->is_singular ) ) { … … 1014 1014 $cgroupby = ''; 1015 1015 } 1016 1016 1017 1017 $cjoin = apply_filters('comment_feed_join', $cjoin); 1018 1018 $cwhere = apply_filters('comment_feed_where', $cwhere); 1019 1019 $cgroupby = apply_filters('comment_feed_groupby', $cgroupby); 1020 1020 1021 1021 $this->comments = (array) $wpdb->get_results("SELECT $distinct $wpdb->comments.* FROM $wpdb->comments $cjoin $cwhere $cgroupby ORDER BY comment_date_gmt DESC LIMIT " . get_settings('posts_per_rss')); 1022 1022 $this->comment_count = count($this->comments); 1023 1023 1024 1024 $post_ids = array(); 1025 1025 1026 1026 foreach ($this->comments as $comment) 1027 1027 $post_ids[] = (int) $comment->comment_post_ID; 1028 1028 1029 1029 $post_ids = join(',', $post_ids); 1030 1030 $join = ''; … … 1062 1062 $this->comment_count = count($this->comments); 1063 1063 } 1064 1064 1065 1065 if ( !empty($limits) ) { 1066 1066 $found_posts_query = apply_filters( 'found_posts_query', 'SELECT FOUND_ROWS()' ); … … 1069 1069 $this->max_num_pages = ceil($this->found_posts / $q['posts_per_page']); 1070 1070 } 1071 1071 1072 1072 // Check post status to determine if post should be displayed. 1073 1073 if ( !empty($this->posts) && ($this->is_single || $this->is_page) ) { … … 1149 1149 } 1150 1150 } 1151 1151 1152 1152 function next_comment() { 1153 1153 $this->current_comment++; 1154 1154 1155 1155 $this->comment = $this->comments[$this->current_comment]; 1156 1156 return $this->comment; 1157 1157 } 1158 1158 1159 1159 function the_comment() { 1160 1160 global $comment; 1161 1161 1162 1162 $comment = $this->next_comment(); 1163 1163 1164 1164 if ($this->current_comment == 0) { 1165 1165 do_action('comment_loop_start'); 1166 1166 } 1167 1167 } 1168 1168 1169 1169 function have_comments() { 1170 1170 if ($this->current_comment + 1 < $this->comment_count) { … … 1173 1173 $this->rewind_comments(); 1174 1174 } 1175 1175 1176 1176 return false; 1177 1177 } 1178 1178 1179 1179 function rewind_comments() { 1180 1180 $this->current_comment = -1; -
trunk/wp-includes/theme.php
r4778 r4953 187 187 $parent_dir = dirname(dirname($theme_file)); 188 188 if ( file_exists("$theme_root/$parent_dir/$template/index.php") ) { 189 $template = "$parent_dir/$template"; 189 $template = "$parent_dir/$template"; 190 190 } else { 191 191 $wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.')); … … 485 485 486 486 function header_textcolor() { 487 echo get_header_textcolor(); 487 echo get_header_textcolor(); 488 488 } 489 489 … … 493 493 494 494 function header_image() { 495 echo get_header_image(); 495 echo get_header_image(); 496 496 } 497 497 -
trunk/wp-includes/wp-db.php
r4860 r4953 49 49 return $this->__construct($dbuser, $dbpassword, $dbname, $dbhost); 50 50 } 51 51 52 52 function __construct($dbuser, $dbpassword, $dbname, $dbhost) { 53 53 register_shutdown_function(array(&$this, "__destruct")); … … 80 80 81 81 function __destruct() { 82 return true; 82 return true; 83 83 } 84 84 … … 182 182 $this->result = @mysql_query($query, $this->dbh); 183 183 ++$this->num_queries; 184 184 185 185 if (SAVEQUERIES) 186 186 $this->queries[] = array( $query, $this->timer_stop() ); … … 256 256 if ( $query ) 257 257 $this->query($query); 258 258 259 259 if ( !isset($this->last_result[$y]) ) 260 260 return null; -
trunk/wp-login.php
r4902 r4953 97 97 98 98 do_action('lostpassword_post'); 99 99 100 100 if ( empty( $errors ) ) { 101 101 $user_data = get_userdatabylogin(trim($_POST['user_login'])); … … 329 329 } 330 330 } 331 331 332 332 if ( $_POST && empty( $user_login ) ) 333 333 $errors['user_login'] = __('<strong>ERROR</strong>: The username field is empty.'); -
trunk/xmlrpc.php
r4915 r4953 505 505 $category["description"] = ""; 506 506 } 507 507 508 508 $new_category = array( 509 509 "cat_name" => $category["name"],
Note: See TracChangeset
for help on using the changeset viewer.