Changeset 6711
- Timestamp:
- 02/02/2008 06:42:09 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/default/comments.php
r6343 r6711 1 1 <?php // Do not delete these lines 2 if ( 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))2 if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) 3 3 die ('Please do not load this page directly. Thanks!'); 4 4 -
trunk/wp-content/themes/default/header.php
r6195 r6711 15 15 <?php 16 16 // Checks to see whether it needs a sidebar or not 17 if ( ! $withcomments&& !is_single() ) {17 if ( !empty($withcomments) && !is_single() ) { 18 18 ?> 19 19 #page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg-<?php bloginfo('text_direction'); ?>.jpg") repeat-y top; border: none; } -
trunk/wp-includes/cache.php
r6543 r6711 354 354 355 355 $this->cache[$group][$id] = $data; 356 unset ($this->non_existant_objects[$group][$id]); 356 357 if(isset($this->non_existant_objects[$group][$id])) 358 unset ($this->non_existant_objects[$group][$id]); 357 359 358 360 return true; -
trunk/wp-includes/classes.php
r6552 r6711 186 186 } else { 187 187 // We're showing a feed, so WP is indeed the only thing that last changed 188 if ( $this->query_vars['withcomments']189 || ( !$this->query_vars['withoutcomments']190 && ( $this->query_vars['p']191 || $this->query_vars['name']192 || $this->query_vars['page_id']193 || $this->query_vars['pagename']194 || $this->query_vars['attachment']195 || $this->query_vars['attachment_id']188 if ( !empty($this->query_vars['withcomments']) 189 || ( empty($this->query_vars['withoutcomments']) 190 && ( !empty($this->query_vars['p']) 191 || !empty($this->query_vars['name']) 192 || !empty($this->query_vars['page_id']) 193 || !empty($this->query_vars['pagename']) 194 || !empty($this->query_vars['attachment']) 195 || !empty($this->query_vars['attachment_id']) 196 196 ) 197 197 ) … … 209 209 else $client_etag = false; 210 210 211 $client_last_modified = trim($_SERVER['HTTP_IF_MODIFIED_SINCE']);211 $client_last_modified = empty($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? '' : trim($_SERVER['HTTP_IF_MODIFIED_SINCE']); 212 212 // If string is empty, return 0. If not, attempt to parse into a timestamp 213 213 $client_modified_timestamp = $client_last_modified ? strtotime($client_last_modified) : 0; -
trunk/wp-includes/comment-template.php
r6551 r6711 730 730 731 731 if ( !empty($post->post_password) ) { // if there's a password 732 if ( $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password ) { // and it doesn't match the cookie732 if ( !isset($_COOKIE['wp-postpass_' . COOKIEHASH]) || $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password ) { // and it doesn't match the cookie 733 733 echo __('Enter your password to view comments'); 734 734 return; -
trunk/wp-includes/feed.php
r6517 r6711 146 146 function rss_enclosure() { 147 147 global $post; 148 if ( !empty($post->post_password) && ( $_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) )148 if ( !empty($post->post_password) && (!isset($_COOKIE['wp-postpass_'.COOKIEHASH]) || $_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) ) 149 149 return; 150 150 -
trunk/wp-includes/link-template.php
r6633 r6711 525 525 526 526 $join = ''; 527 $posts_in_ex_cats_sql = ''; 527 528 if ( $in_same_cat || !empty($excluded_categories) ) { 528 529 $join = " INNER JOIN $wpdb->term_relationships AS tr ON p.ID = tr.object_id INNER JOIN $wpdb->term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id"; … … 616 617 preg_match( $qs_regex, $request, $qs_match ); 617 618 618 if ( $qs_match[0]) {619 if ( !empty( $qs_match[0] ) ) { 619 620 $query_string = $qs_match[0]; 620 621 $request = preg_replace( $qs_regex, '', $request ); -
trunk/wp-includes/pluggable.php
r6685 r6711 776 776 $wpp = parse_url(get_option('home')); 777 777 778 $allowed_hosts = (array) apply_filters('allowed_redirect_hosts', array($wpp['host']), $lp['host']);778 $allowed_hosts = (array) apply_filters('allowed_redirect_hosts', array($wpp['host']), isset($lp['host']) ? $lp['host'] : ''); 779 779 780 780 if ( isset($lp['host']) && ( !in_array($lp['host'], $allowed_hosts) && $lp['host'] != strtolower($wpp['host'])) ) -
trunk/wp-includes/post-template.php
r6698 r6711 87 87 88 88 if ( !empty($post->post_password) ) { // if there's a password 89 if ( stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password ) { // and it doesn't match the cookie89 if ( !isset($_COOKIE['wp-postpass_'.COOKIEHASH]) || stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password ) { // and it doesn't match the cookie 90 90 $output = get_the_password_form(); 91 91 return $output; … … 142 142 $output = $post->post_excerpt; 143 143 if ( !empty($post->post_password) ) { // if there's a password 144 if ( $_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password ) { // and it doesn't match the cookie144 if ( !isset($_COOKIE['wp-postpass_'.COOKIEHASH]) || $_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password ) { // and it doesn't match the cookie 145 145 $output = __('There is no excerpt because this is a protected post.'); 146 146 return $output; -
trunk/wp-includes/user.php
r6644 r6711 217 217 $userdata = $user->data; 218 218 $user_login = $user->user_login; 219 $user_level = (int) $user->user_level;219 $user_level = (int) isset($user->user_level) ? $user->user_level : 0; 220 220 $user_ID = (int) $user->ID; 221 221 $user_email = $user->user_email; -
trunk/wp-includes/wp-db.php
r6701 r6711 340 340 341 341 // Extract var out of cached results based x,y vals 342 if ( $this->last_result[$y]) {342 if ( !empty( $this->last_result[$y] ) ) { 343 343 $values = array_values(get_object_vars($this->last_result[$y])); 344 344 } -
trunk/wp-login.php
r6664 r6711 175 175 // 176 176 177 $action = $_REQUEST['action'];177 $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : ''; 178 178 $errors = new WP_Error(); 179 179 … … 352 352 353 353 // Some parts of this script use the main login form to display a message 354 if ( TRUE == $_GET['loggedout'] ) $errors->add('loggedout', __('You are now logged out.'));355 elseif ( 'disabled' == $_GET['registration'] ) $errors->add('registerdiabled', __('User registration is currently not allowed.'));356 elseif ( 'confirm' == $_GET['checkemail'] ) $errors->add('confirm', __('Check your e-mail for the confirmation link.'));357 elseif ( 'newpass' == $_GET['checkemail'] ) $errors->add('newpass', __('Check your e-mail for your new password.'));358 elseif ( 'registered' == $_GET['checkemail'] ) $errors->add('registered', __('Registration complete. Please check your e-mail.'));354 if ( isset($_GET['loggedout']) && TRUE == $_GET['loggedout'] ) $errors->add('loggedout', __('You are now logged out.')); 355 elseif ( isset($_GET['registration']) && 'disabled' == $_GET['registration'] ) $errors->add('registerdiabled', __('User registration is currently not allowed.')); 356 elseif ( isset($_GET['checkemail']) && 'confirm' == $_GET['checkemail'] ) $errors->add('confirm', __('Check your e-mail for the confirmation link.')); 357 elseif ( isset($_GET['checkemail']) && 'newpass' == $_GET['checkemail'] ) $errors->add('newpass', __('Check your e-mail for your new password.')); 358 elseif ( isset($_GET['checkemail']) && 'registered' == $_GET['checkemail'] ) $errors->add('registered', __('Registration complete. Please check your e-mail.')); 359 359 360 360 login_header(__('Login'), '', $errors); … … 362 362 363 363 <form name="loginform" id="loginform" action="wp-login.php" method="post"> 364 <?php if ( !i n_array( $_GET['checkemail'], array('confirm', 'newpass') ) ) : ?>364 <?php if ( !isset($_GET['checkemail']) || !in_array( $_GET['checkemail'], array('confirm', 'newpass') ) ) : ?> 365 365 <p> 366 366 <label><?php _e('Username') ?><br /> … … 385 385 386 386 <p id="nav"> 387 <?php if ( i n_array( $_GET['checkemail'], array('confirm', 'newpass') ) ) : ?>387 <?php if ( isset($_GET['checkemail']) && in_array( $_GET['checkemail'], array('confirm', 'newpass') ) ) : ?> 388 388 <?php elseif (get_option('users_can_register')) : ?> 389 389 <a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=register"><?php _e('Register') ?></a> |
Note: See TracChangeset
for help on using the changeset viewer.