Changeset 1051

Show
Ignore:
Timestamp:
09/10/07 18:26:30 (1 year ago)
Author:
donncha
Message:

Sync with WP 2.2.3

Files:

Legend:

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

    r972 r1051  
    287287                } 
    288288        } 
    289         die($_POST['post_type']); 
     289        die('0'); 
    290290break; 
    291291default : 
  • trunk/wp-admin/admin-functions.php

    r1034 r1051  
    106106                $_POST['post_date_gmt'] = get_gmt_from_date( $_POST['post_date'] ); 
    107107        } 
     108         
     109        unset($_POST['no_filter']); 
    108110 
    109111        // Create the post. 
     
    284286        } 
    285287 
     288        unset($_POST['no_filter']); 
     289         
    286290        add_meta( $post_ID ); 
    287291 
  • trunk/wp-admin/install-rtl.css

    r804 r1051  
    1 body { font-family: Tahoma, Georgia, "Times New Roman", Times, serif; } 
     1body { font: 13px Tahoma, Georgia, "Times New Roman", Times, serif; } 
    22 
    33ul, ol { padding: 5px 20px 5px 5px; } 
    44 
    5 .step, th { text-align: left; } 
     5h1, h2, h3 { font-family: "Times New Roman", Times, serif; font-weight: 700 } 
     6 
     7.step, th { text-align: left } 
     8 
     9input { font-family: "Times New Roman", Times, serif; padding: 1px } 
     10 
     11#logo { background: url(../wp-content/plugins/WP-Jalali/wp-fa-logo.png) center right no-repeat; text-align: left; } 
     12 
     13#admin_email {direction: ltr; text-align: left; } 
     14 
     15#footer { font-style: normal; } 
  • trunk/wp-admin/options.php

    r1013 r1051  
    2424        } 
    2525} 
    26  
    27 function sanitize_option($option, $value) { // Remember to call stripslashes! 
    28  
    29         switch ($option) { 
    30                 case 'admin_email': 
    31                 case 'new_admin_email': 
    32                         $value = stripslashes($value); 
    33                         $value = sanitize_email($value); 
    34                         break; 
    35  
    36                 case 'default_post_edit_rows': 
    37                 case 'mailserver_port': 
    38                 case 'comment_max_links': 
    39                         $value = stripslashes($value); 
    40                         $value = abs((int) $value); 
    41                         break; 
    42  
    43                 case 'posts_per_page': 
    44                 case 'posts_per_rss': 
    45                         $value = stripslashes($value); 
    46                         $value = (int) $value; 
    47                         if ( empty($value) ) $value = 1; 
    48                         if ( $value < -1 ) $value = abs($value); 
    49                         break; 
    50  
    51                 case 'default_ping_status': 
    52                 case 'default_comment_status': 
    53                         $value = stripslashes($value); 
    54                         // Options that if not there have 0 value but need to be something like "closed" 
    55                         if ( $value == '0' || $value == '') 
    56                                 $value = 'closed'; 
    57                         break; 
    58  
    59                 case 'blogdescription': 
    60                 case 'blogname': 
    61                         if (current_user_can('unfiltered_html') == false) 
    62                                 $value = wp_filter_post_kses( $value ); // calls stripslashes then addslashes 
    63                         $value = stripslashes($value); 
    64                         $value = wp_specialchars( $value ); 
    65                         break; 
    66  
    67                 case 'blog_charset': 
    68                         $value = preg_replace('/[^a-zA-Z0-9_-]/', '', $value); // strips slashes 
    69                         break; 
    70  
    71                 case 'date_format': 
    72                 case 'time_format': 
    73                 case 'mailserver_url': 
    74                 case 'mailserver_login': 
    75                 case 'mailserver_pass': 
    76                 case 'ping_sites': 
    77                 case 'upload_path': 
    78                         $value = strip_tags($value); 
    79                         $value = wp_filter_kses($value); // calls stripslashes then addslashes 
    80                         $value = stripslashes($value); 
    81                         break; 
    82  
    83                 case 'gmt_offset': 
    84                         $value = preg_replace('/[^0-9:.-]/', '', $value); // strips slashes 
    85                         break; 
    86  
    87                 case 'siteurl': 
    88                 case 'home': 
    89                         $value = stripslashes($value); 
    90                         $value = clean_url($value); 
    91                         break; 
    92                 default : 
    93                         $value = stripslashes($value); 
    94                         break; 
    95         } 
    96  
    97         return $value; 
    98 } 
    99  
    10026switch($action) { 
    10127 
  • trunk/wp-admin/rtl.css

    r972 r1051  
    1 #viewarc, #viewcat, #namediv, #emaildiv, #uridiv, #planetnews li, #login ul li, #your-profile fieldset,  
    2         #footer .logo, .alignleft .available-theme { float: right; } 
    3  
    4 #templateside, .alignright { float: left; } 
    5  
    6 #login #send, .readmore, .widefat th { text-align: right; } 
    7  
    8 #postcustomsubmit, form#upload th, .submit, .editform th { text-align: left; } 
    9  
    10 #devnews h4, #wphead h1, #your-profile legend, fieldset.options legend,  
    11         #planetnews li .post { font-family: Tahoma, Georgia, "Times New Roman", Times, serif; } 
    12  
    13 #wphead { padding: .8em 2em .8em 19em; } 
    14  
    15 #wphead h1 { font-size: 2.4em; } 
    16  
    17 #postdiv, #titlediv, #guiddiv, #tagdiv { margin: 0 0 0 8px; } 
    18  
    19 #ed_toolbar input { margin: 3px 0 2px 2px; } 
    20  
    21 #edButtons input, #edButtons input:active { margin: 0px 0 -1px 2px; } 
    22  
    23 body, td { font: 13px Tahoma, "Lucida Grande", "Lucida Sans Unicode", Verdana; } 
    24  
    25 h2 { font: normal 32px/5px serif; } 
    26  
    27 textarea, input, select { font:  13px Tahoma, Verdana, Arial, Helvetica, sans-serif; } 
    28  
    29 .quicktags, .search { font: 12px Tahoma, Georgia, "Times New Roman", Times, serif; } 
    30  
    31 .updated, .confirm { padding: 0 3em 0 1em; } 
     1#viewarc, #viewcat, #namediv, #emaildiv, #uridiv, #planetnews li, #login ul li, #your-profile fieldset, #footer .logo, .alignleft .available-theme { 
     2        float: right; 
     3        } 
     4 
     5#templateside, .alignright { 
     6        float: left; 
     7        } 
     8 
     9#login #send, .readmore, .widefat th { 
     10        text-align: right; 
     11        } 
     12 
     13#postcustomsubmit, form#upload th, .submit, .editform th { 
     14        text-align: left; 
     15        } 
     16 
     17#devnews h4, #wphead h1, #your-profile legend, fieldset.options legend, #planetnews li .post { 
     18        font-family: Tahoma, Georgia, "Times New Roman", Times, serif; 
     19        } 
     20 
     21#wphead { 
     22        padding: .8em 2em .8em 19em; 
     23        } 
     24 
     25#wphead h1 { 
     26        font-size: 2.4em; 
     27        } 
     28 
     29#postdiv, #titlediv, #guiddiv, #tagdiv { 
     30        margin: 0 0 0 8px; 
     31        } 
     32 
     33#ed_toolbar input { 
     34        margin: 3px 0 2px 2px; 
     35        } 
     36 
     37#edButtons input, #edButtons input:active { 
     38        margin: 0px 0 -1px 2px; 
     39        } 
     40 
     41body, td { 
     42        font: 13px Tahoma, "Lucida Grande", "Lucida Sans Unicode", Verdana; 
     43        } 
     44 
     45h1, h2, h3, h4, h5 { 
     46        font-family: "Times New Roman", Times, serif; 
     47        } 
     48h3.dbx-handle { 
     49        font-family: tahoma, Verdana, Arial, Helvetica, sans-serif; 
     50        } 
     51 
     52textarea, input, select { 
     53        font:  13px Tahoma, Verdana, Arial, Helvetica, sans-serif; 
     54        } 
     55 
     56.quicktags, .search { 
     57        font: 12px Tahoma, Georgia, "Times New Roman", Times, serif; 
     58        } 
     59 
     60.updated, .confirm { 
     61        padding: 0 3em 0 1em; 
     62        } 
    3263 
    3364.submit input, .submit input:focus, .button, .button:focus { 
    3465        border-left-color: #999; 
    3566        border-right-color: #ccc; 
    36 
     67       
    3768 
    3869.submit input:active, .button:active { 
    3970        border-left-color: #ccc; 
    4071        border-right-color: #999; 
    41 
     72       
    4273 
    4374#adminmenu { 
    4475        padding: .2em 2em .3em .2em; 
    4576        height: 28px; 
    46 
    47  
    48 #adminmenu li { line-height: 160%; } 
     77        } 
    4978 
    5079#adminmenu a { 
     
    5281        display: block; 
    5382        float: right; 
    54 
     83        font: 700 16px/130% "Times New Roman", Times, serif; 
     84        } 
    5585 
    5686#adminmenu a.current { 
    5787        border-right: 0; 
    5888        border-left: 2px solid #4f96c8; 
    59 
    60  
    61 #submenu, #minisub { padding: 1px 3em 0 2em; } 
    62  
    63 #submenu { height: 28px; } 
    64  
    65 #submenu li { line-height: 160%; } 
     89        } 
     90 
     91#submenu, #minisub { 
     92        padding: 1px 3em 0 2em; 
     93        } 
     94 
     95#submenu { 
     96        height: 28px; 
     97        } 
    6698 
    6799#submenu a { 
     
    69101        display: block; 
    70102        float: right; 
    71 
     103        line-height: 155%; 
     104        } 
    72105 
    73106#submenu .current { 
    74107        border-right: 0; 
    75108        border-left: 2px solid #045290; 
    76 
     109       
    77110 
    78111#currenttheme img { 
     
    80113        margin-right: auto; 
    81114        margin-left: 1em; 
    82 
     115       
    83116 
    84117#postdiv #quicktags { 
    85118        padding-right: 0; 
    86119        padding-left: 6px; 
    87 
     120       
    88121 
    89122.readmore { 
    90123        margin-right: auto; 
    91124        margin-left: 5em; 
    92 
     125       
    93126 
    94127#postexcerpt div, #attachmentlinks div { 
    95128        margin-right: auto; 
    96129        margin-left: 8px; 
    97 
     130       
    98131 
    99132* html #postexcerpt .dbx-toggle-open { 
    100133        padding-right: 0; 
    101134        padding-left: 8px; 
    102 
     135       
    103136 
    104137#searchform { 
     
    106139        margin-right: auto; 
    107140        margin-left: 1em; 
    108 
     141       
    109142 
    110143#poststuff { 
    111144        margin-right: auto; 
    112145        margin-left: 16em; 
    113 
     146       
    114147 
    115148#template div { 
    116149        margin-right: auto; 
    117150        margin-left: 190px; 
    118 
     151       
    119152 
    120153* html #template div { 
    121154        margin-right: auto; 
    122155        margin-left: 0px; 
    123 
     156       
    124157 
    125158#user_info { 
    126159        right: auto; 
    127160        left: 1em; 
    128 
    129  
     161       
     162         
    130163#zeitgeist { 
    131164        float: left; 
    132165        margin-left: auto; 
    133166        margin-right: 1em; 
    134 
     167       
    135168 
    136169#zeitgeist ul { 
    137170        margin: 0 .6em .3em 0; 
    138171        padding: 0 .6em 0 0; 
    139 
     172        } 
     173 
     174.wrap ul { 
     175        margin-left: 500px; 
     176        } 
    140177 
    141178#categorydiv ul { 
    142179        margin-left: auto; 
    143180        margin-right: 10px; 
    144 
    145  
    146 #moremeta fieldset div { margin: 2px 0px 0 0; } 
     181        } 
    147182 
    148183#moremeta { 
    149         margin-right: auto
     184        margin-right: 0
    150185        margin-left: 15px; 
    151186        right: auto; 
    152         left: 5%; 
    153 
    154  
     187        left: 6%; 
     188       
     189         
    155190#moremeta .dbx-content { 
    156191        background: url(images/box-butt.gif) no-repeat bottom left; 
    157         padding-right: 0; 
    158         padding-left: 2px; 
    159 
    160  
    161 #moremeta .dbx-handle { background: #2685af url(images/box-head.gif) no-repeat left; } 
    162  
    163 #moremeta .dbx-box { background: url(images/box-bg.gif) repeat-y left; } 
     192        padding-right: 10px; 
     193        padding-left: 0; 
     194        text-align: right; 
     195        } 
     196         
     197#moremeta .dbx-handle { 
     198        background: #2685af url(images/box-head.gif) no-repeat left; 
     199        margin-top: -2px; 
     200        } 
     201 
     202#moremeta .dbx-box { 
     203        background: url(images/box-bg.gif) repeat-y left; 
     204        padding-bottom: 0; 
     205        } 
    164206 
    165207a.dbx-toggle, a.dbx-toggle:visited { 
    166208        right: auto; 
    167209        left: 2px; 
    168 
    169  
    170 #advancedstuff a.dbx-toggle, #advancedstuff a.dbx-toggle-open:visited { 
    171         right: auto; 
    172         left: 5px; 
    173 
    174  
    175 #advancedstuff a.dbx-toggle-open, #advancedstuff a.dbx-toggle-open:visited { 
    176         right: auto; 
    177         left: 5px; 
    178 
     210        } 
     211 
    179212 
    180213#categorychecklist { 
    181214        margin-right: auto; 
    182215        margin-left: 6px; 
    183 
     216       
    184217 
    185218#ajax-response.alignleft { 
    186219        margin-left: auto; 
    187220        margin-right: 2em; 
    188 
     221       
    189222 
    190223#postdivrich #edButtons { 
    191224        padding-left: 0; 
    192225        padding-right: 3px; 
    193 
     226       
    194227 
    195228.page-numbers { 
    196229        margin-right: auto; 
    197230        margin-left: 3px; 
    198 
     231       
    199232 
    200233a.view-link { 
     
    203236        margin-right:0; 
    204237        margin-left:220px; 
    205 
     238        } 
     239#advancedstuff { 
     240        direction: ltr; 
     241        } 
     242#advancedstuff .dbx-handle { 
     243        text-align: right; 
     244        } 
     245#advancedstuff .dbx-content * { 
     246        direction: rtl; 
     247        } 
  • trunk/wp-admin/widgets-rtl.css

    r972 r1051  
    55* html #palettediv ul { padding: 0 10px 0 0; } 
    66 
    7 #palettediv ul { padding: 0 10px 0 0; } 
     7#palettediv ul { padding: 0 10px 0 0; 
     8 margin-left: 1px!important;} 
    89 
    910* .handle, #lastmodule span { 
  • trunk/wp-includes/default-filters.php

    r972 r1051  
    130130add_filter('sanitize_title', 'sanitize_title_with_dashes'); 
    131131 
     132add_filter('wp_title', 'wp_specialchars'); 
     133 
    132134// RSS filters 
    133135add_filter('the_title_rss', 'strip_tags'); 
  • trunk/wp-includes/feed-rss2-comments.php

    r972 r1051  
    66<!-- generator="wordpress/<?php echo $wp_version ?>" --> 
    77<rss version="2.0"  
    8         xmlns:content="http://purl.org/rss/1.0/modules/content/"> 
     8        xmlns:content="http://purl.org/rss/1.0/modules/content/" 
     9        xmlns:dc="http://purl.org/dc/elements/1.1/" 
     10        > 
    911<channel> 
    1012        <title><?php 
     
    3840                ?></title> 
    3941                <link><?php comment_link() ?></link> 
    40                 <author><?php echo get_comment_author_rss() ?></author> 
     42                <dc:creator><?php echo get_comment_author_rss() ?></dc:creator> 
    4143                <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_comment_time('Y-m-d H:i:s', true), false); ?></pubDate> 
    4244                <guid><?php comment_link() ?></guid> 
  • trunk/wp-includes/formatting.php

    r1005 r1051  
    1212        if ( isset($wp_cockneyreplace) ) { 
    1313                $cockney = array_keys($wp_cockneyreplace); 
    14                 $cockney_replace = array_values($wp_cockneyreplace); 
     14                $cockneyreplace = array_values($wp_cockneyreplace); 
    1515        } else { 
    1616                $cockney = array("'tain't","'twere","'twas","'tis","'twill","'til","'bout","'nuff","'round","'cause"); 
     
    11191119} 
    11201120 
     1121function sanitize_option($option, $value) { // Remember to call stripslashes! 
     1122 
     1123        switch ($option) { 
     1124                case 'admin_email': 
     1125                        $value = sanitize_email($value); 
     1126                        break; 
     1127 
     1128                case 'default_post_edit_rows': 
     1129                case 'mailserver_port': 
     1130                case 'comment_max_links': 
     1131                case 'page_on_front': 
     1132                case 'rss_excerpt_length': 
     1133                case 'default_category': 
     1134                case 'default_email_category': 
     1135                case 'default_link_category': 
     1136                        $value = abs((int) $value); 
     1137                        break; 
     1138 
     1139                case 'posts_per_page': 
     1140                case 'posts_per_rss': 
     1141                        $value = (int) $value; 
     1142                        if ( empty($value) ) $value = 1; 
     1143                        if ( $value < -1 ) $value = abs($value); 
     1144                        break; 
     1145 
     1146                case 'default_ping_status': 
     1147                case 'default_comment_status': 
     1148                        // Options that if not there have 0 value but need to be something like "closed" 
     1149                        if ( $value == '0' || $value == '') 
     1150                                $value = 'closed'; 
     1151                        break; 
     1152 
     1153                case 'blogdescription': 
     1154                case 'blogname': 
     1155                        $value = addslashes($value); 
     1156                        $value = wp_filter_post_kses( $value ); // calls stripslashes then addslashes 
     1157                        $value = stripslashes($value); 
     1158                        $value = wp_specialchars( $value ); 
     1159                        break; 
     1160 
     1161                case 'blog_charset': 
     1162                        $value = preg_replace('/[^a-zA-Z0-9_-]/', '', $value); // strips slashes 
     1163                        break; 
     1164 
     1165                case 'date_format': 
     1166                case 'time_format': 
     1167                case 'mailserver_url': 
     1168                case 'mailserver_login': 
     1169                case 'mailserver_pass': 
     1170                case 'ping_sites': 
     1171                case 'upload_path': 
     1172                        $value = strip_tags($value); 
     1173                        $value = addslashes($value); 
     1174                        $value = wp_filter_kses($value); // calls stripslashes then addslashes 
     1175                        $value = stripslashes($value); 
     1176                        break; 
     1177 
     1178                case 'gmt_offset': 
     1179                        $value = preg_replace('/[^0-9:.-]/', '', $value); // strips slashes 
     1180                        break; 
     1181 
     1182                case 'siteurl': 
     1183                case 'home': 
     1184                        $value = stripslashes($value); 
     1185                        $value = clean_url($value); 
     1186                        break; 
     1187                default : 
     1188                        break; 
     1189        } 
     1190 
     1191        return $value; 
     1192} 
     1193 
    11211194function wp_parse_str( $string, &$array ) { 
    11221195        parse_str( $string, $array ); 
  • trunk/wp-includes/pluggable.php

    r1005 r1051  
    328328        $location = wp_kses_no_null($location); 
    329329 
     330        // remove %0d and %0a from location 
    330331        $strip = array('%0d', '%0a'); 
    331         $location = str_replace($strip, '', $location); 
     332        $found = true; 
     333        while($found) { 
     334                $found = false; 
     335                foreach($strip as $val) { 
     336                        while(strpos($location, $val) !== false) { 
     337                                $found = true; 
     338                                $location = str_replace($val, '', $location); 
     339                        } 
     340                } 
     341        } 
    332342 
    333343        if ( $is_IIS ) { 
     
    437447        $notify_message .= sprintf( __('Spam it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=cdc&dt=spam&c=$comment_id" ) . "\r\n"; 
    438448 
    439         $admin_email = get_option('admin_email'); 
     449        $wp_email = get_option('admin_email'); 
    440450 
    441451        if ( '' == $comment->comment_author ) { 
    442                 $from = "From: \"$blogname\" <$admin_email>"; 
     452                $from = "From: \"$blogname\" <$wp_email>"; 
    443453                if ( '' != $comment->comment_author_email ) 
    444454                        $reply_to = "Reply-To: $comment->comment_author_email"; 
    445455        } else { 
    446                 $from = "From: \"$comment->comment_author\" <$admin_email>"; 
     456                $from = "From: \"$comment->comment_author\" <$wp_email>"; 
    447457                if ( '' != $comment->comment_author_email ) 
    448458                        $reply_to = "Reply-To: \"$comment->comment_author_email\" <$comment->comment_author_email>"; 
  • trunk/wp-includes/plugin.php

    r1005 r1051  
    2020 
    2121        // So the format is wp_filter['tag']['array of priorities']['array of functions serialized']['array of ['array (functions, accepted_args)]'] 
    22         $wp_filter[$tag][$priority][serialize($function_to_add)] = array('function' => $function_to_add, 'accepted_args' => $accepted_args); 
     22        $wp_filter[$tag][$priority][_wp_filter_build_unique_id($tag, $function_to_add, $priority)] = array('function' => $function_to_add, 'accepted_args' => $accepted_args); 
    2323        unset( $merged_filters[ $tag ] ); 
    2424        return true; 
     
    9999function remove_filter($tag, $function_to_remove, $priority = 10, $accepted_args = 1) { 
    100100        global $wp_filter, $merged_filters; 
    101  
    102         unset($GLOBALS['wp_filter'][$tag][$priority][serialize($function_to_remove)]); 
     101         
     102        unset($GLOBALS['wp_filter'][$tag][$priority][_wp_filter_build_unique_id($tag, $function_to_remove, $priority)]); 
    103103        unset( $merged_filters[ $tag ] ); 
    104104 
     
    236236 */ 
    237237function plugin_basename($file) { 
    238         $file = preg_replace('|\\\\+|', '\\\\', $file); 
    239         $file = preg_replace('/^.*wp-content[\\\\\/]plugins[\\\\\/]/', '', $file); 
     238        $file = str_replace('\\','/',$file); // sanitize for Win32 installs 
     239        $file = preg_replace('|/+|','/', $file); // remove any duplicate slash 
     240        $file = preg_replace('|^.*/wp-content/plugins/|','',$file); // get relative path from plugins dir 
    240241        return $file; 
    241242} 
     
    279280} 
    280281 
     282function _wp_filter_build_unique_id($tag, $function, $priority = 10) 
     283{ 
     284        global $wp_filter; 
     285         
     286        // If function then just skip all of the tests and not overwrite the following. 
     287        if( is_string($function) ) 
     288                return $function; 
     289        // Object Class Calling 
     290        else if(is_object($function[0]) ) 
     291        { 
     292                $obj_idx = get_class($function[0]).$function[1]; 
     293                if( is_null($function[0]->wp_filter_id) ) { 
     294                        $count = count((array)$wp_filter[$tag][$priority]); 
     295                        $function[0]->wp_filter_id = $count; 
     296                        $obj_idx .= $count; 
     297                        unset($count); 
     298                } else 
     299                        $obj_idx .= $function[0]->wp_filter_id; 
     300                return $obj_idx; 
     301        } 
     302        // Static Calling 
     303        else if( is_string($function[0]) ) 
     304                return $function[0].$function[1]; 
     305} 
     306 
    281307?> 
  • trunk/wp-includes/query.php

    r972 r1051  
    414414                $qv = &$this->query_vars; 
    415415 
    416                 if ( ! empty($qv['robots']) ) { 
     416                if ( ! empty($qv['robots']) ) 
    417417                        $this->is_robots = true; 
    418                         return; 
    419                 } 
    420  
    421                 if ('404' == $qv['error']) { 
    422                         $this->is_404 = true; 
    423                         if ( !empty($query) ) { 
    424                                 do_action_ref_array('parse_query', array(&$this)); 
    425                         } 
    426                         return; 
    427                 } 
    428418 
    429419                $qv['p'] =  (int) $qv['p']; 
     
    607597                } 
    608598 
     599                if ( !empty($qv['post_type']) ) 
     600                        $qv['post_type'] = sanitize_user($qv['post_type'], true); 
     601 
     602                if ( !empty($qv['post_status']) ) 
     603                        $qv['post_status'] = sanitize_user($qv['post_status'], true); 
     604 
    609605                if ( $this->is_posts_page && !$qv['withcomments'] ) 
    610606                        $this->is_comment_feed = false; 
     
    612608                $this->is_singular = $this->is_single || $this->is_page || $this->is_attachment; 
    613609                // Done correcting is_* for page_on_front and page_for_posts 
     610 
     611                if ('404' == $qv['error']) 
     612                        $this->set_404(); 
    614613 
    615614                if ( !empty($query) ) 
  • trunk/wp-includes/rewrite.php

    r1005 r1051  
    136136                        // Substitute the substring matches into the query. 
    137137                        eval("\$query = \"$query\";"); 
     138                        // Filter out non-public query vars 
     139                        global $wp; 
     140                        parse_str($query, $query_vars); 
     141                        $query = array(); 
     142                        foreach ( $query_vars as $key => $value ) { 
     143                                if ( in_array($key, $wp->public_query_vars) ) 
     144                                        $query[$key] = $value; 
     145                        } 
     146                        // Do the query 
    138147                        $query = new WP_Query($query); 
    139148                        if ( $query->is_single || $query->is_page ) 
  • trunk/wp-includes/rss.php

    r1005 r1051  
    1010define('RSS', 'RSS'); 
    1111define('ATOM', 'Atom'); 
    12 define('MAGPIE_USER_AGENT', 'WordPressMU/' . $wp_version); 
     12define('MAGPIE_USER_AGENT', 'WordPressMU/' . $GLOBALS['wp_version']); 
    1313 
    1414class MagpieRSS { 
     
    592592 
    593593        if ( !defined('MAGPIE_USER_AGENT') ) { 
    594                 $ua = 'WordPress/' . $wp_version
     594                $ua = 'WordPress/' . $GLOBALS['wp_version']
    595595 
    596596                if ( MAGPIE_CACHE_ON ) { 
  • trunk/wp-includes/vars.php

    r1005 r1051  
    22 
    33// On which page are we ? 
    4 if ( preg_match('#([^/]+\.php)$#', $PHP_SELF, $self_matches) ) { 
     4if ( is_admin() ) { 
     5        // wp-admin pages are checked more carefully 
     6        preg_match('#/wp-admin/?(.*?)$#i', $PHP_SELF, $self_matches); 
    57        $pagenow = $self_matches[1]; 
    6 } elseif ( strpos($PHP_SELF, '?') !== false ) { 
    7         $pagenow = explode('/', $PHP_SELF); 
    8         $pagenow = trim($pagenow[(sizeof($pagenow)-1)]); 
    9         $pagenow = explode('?', $pagenow); 
    10         $pagenow = $pagenow[0]; 
     8        $pagenow = preg_replace('#\?.*?$#', '', $pagenow); 
     9        if ( '' === $pagenow || 'index' === $pagenow || 'index.php' === $pagenow ) { 
     10                $pagenow = 'index.php'; 
     11        } else { 
     12                preg_match('#(.*?)(/|$)#', $pagenow, $self_matches); 
     13                $pagenow = strtolower($self_matches[1]); 
     14                if ( '.php' !== substr($pagenow, -4, 4) ) 
     15                        $pagenow .= '.php'; // for Options +Multiviews: /wp-admin/themes/index.php (themes.php is queried) 
     16        } 
    1117} else { 
    12         $pagenow = 'index.php'; 
     18        if ( preg_match('#([^/]+\.php)([?/].*?)?$#i', $PHP_SELF, $self_matches) ) 
     19                $pagenow = strtolower($self_matches[1]); 
     20        else 
     21                $pagenow = 'index.php'; 
    1322} 
    1423 
  • trunk/wp-includes/version.php

    r1038 r1051  
    33// This holds the version number in a separate file so we can bump it without cluttering the SVN 
    44 
    5 $wp_version = 'wordpress-mu-1.2.4'; 
    6 $wporg_version = 'wordpress-2.2.2'; 
     5$wp_version = 'wordpress-mu-1.2.5'; 
     6$wporg_version = 'wordpress-2.2.3'; 
    77$wp_db_version = 5200; 
    88 
  • trunk/wp-includes/widgets.php

    r1013 r1051  
    333333        $title = empty( $options['title'] ) ? __( 'Pages' ) : $options['title']; 
    334334        $sortby = empty( $options['sortby'] ) ? 'menu_order' : $options['sortby']; 
    335         $exclude = empty( $options['exclude'] ) ? '' : '&exclude=' . $options['exclude']; 
     335        $exclude = empty( $options['exclude'] ) ? '' : $options['exclude']; 
    336336         
    337337        if ( $sortby == 'menu_order' ) { 
     
    339339        } 
    340340         
    341         $out = wp_list_pages( 'title_li=&echo=0&sort_column=' . $sortby . $exclude ); 
     341        $out = wp_list_pages( array('title_li' => '', 'echo' => 0, 'sort_column' => $sortby, 'exclude' => $exclude) ); 
    342342         
    343343        if ( !empty( $out ) ) { 
  • trunk/wp-mail.php

    r972 r1051  
    6565                        if (preg_match('/From: /', $line) | preg_match('/Reply-To: /', $line))  { 
    6666                                $author=trim($line); 
    67                         if ( ereg("([a-zA-Z0-9\_\-\.]+@[\a-zA-z0-9\_\-\.]+)", $author , $regs) ) { 
    68                                 $author = $regs[1]; 
    69                                 echo "Author = {$author} <p>"; 
    70                                 $author = $wpdb->escape($author); 
    71                                 $result = $wpdb->get_row("SELECT ID FROM $wpdb->users WHERE user_email='$author' LIMIT 1"); 
    72                                 if (!$result) 
     67                                if ( ereg("([a-zA-Z0-9\_\-\.]+@[\a-zA-z0-9\_\-\.]+)", $author , $regs) ) { 
     68                                        $author = $regs[1]; 
     69                                        echo "Author = {$author} <p>"; 
     70                                        $author = $wpdb->escape($author); 
     71                                        $result = $wpdb->get_row("SELECT ID FROM $wpdb->users WHERE user_email='$author' LIMIT 1"); 
     72                                        if (!$result) 
     73                                                $post_author = 1; 
     74                                        else 
     75                                                $post_author = $result->ID; 
     76                                } else 
    7377                                        $post_author = 1; 
    74                                 else 
    75                                         $post_author = $result->ID; 
    76                         } else 
    77                                 $post_author = 1; 
    7878                        } 
    7979 
  • trunk/xmlrpc.php

    r1005 r1051  
    10471047                if(isset($content_struct["mt_allow_pings"])) { 
    10481048                        if(!is_numeric($content_struct["mt_allow_pings"])) { 
    1049                                 switch($content["mt_allow_pings"]) { 
     1049                                switch($content_struct["mt_allow_pings"]) { 
    10501050                                        case "closed": 
    10511051                                                $ping_status = "closed"; 
     
    12591259                if(isset($content_struct["mt_allow_pings"])) { 
    12601260                        if(!is_numeric($content_struct["mt_allow_pings"])) { 
    1261                                 switch($content["mt_allow_pings"]) { 
     1261                                switch($content_struct["mt_allow_pings"]) { 
    12621262                                        case "closed": 
    12631263                                                $ping_status = "closed";