Make WordPress Core

Changeset 9506


Ignore:
Timestamp:
11/04/2008 03:22:24 AM (18 years ago)
Author:
ryan
Message:

Notice fixes from filosofo and Viper007Bond. see #7509

Location:
trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/categories.php

    r9477 r9506  
    231231</div>
    232232
    233 <br class="clear" />
    234233</form>
     234
     235<div class="form-wrap">
     236<p><?php printf(__('<strong>Note:</strong><br />Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category <strong>%s</strong>.'), apply_filters('the_category', get_catname(get_option('default_category')))) ?></p>
     237<p><?php printf(__('Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.'), 'admin.php?import=wp-cat2tag') ?></p>
     238</div>
     239
    235240</div>
    236241</div><!-- /col-right -->
     
    279284<?php } ?>
    280285
    281 <div class="form-wrap">
    282 <p><?php printf(__('<strong>Note:</strong><br />Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category <strong>%s</strong>.'), apply_filters('the_category', get_catname(get_option('default_category')))) ?></p>
    283 <p><?php printf(__('Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.'), 'admin.php?import=wp-cat2tag') ?></p>
    284 </div>
    285 
    286286</div>
    287287</div><!-- /col-left -->
  • trunk/wp-admin/edit-attachment-rows.php

    r9180 r9506  
    129129                        $t_time = get_the_time(__('Y/m/d g:i:s A'));
    130130                        $m_time = $post->post_date;
    131                         $time = get_post_time( 'G', true );
     131                        $time = get_post_time( 'G', true, $post );
    132132                        if ( ( abs($t_diff = time() - $time) ) < 86400 ) {
    133133                                if ( $t_diff < 0 )
  • trunk/wp-admin/edit-form-advanced.php

    r9491 r9506  
    205205if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post->ID ) { ?>
    206206<?php if ( current_user_can('publish_posts') ) : ?>
    207         <?php if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?>
     207        <?php if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?>
    208208                <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _e('Schedule') ?>" />
    209209        <?php else : ?>
  • trunk/wp-admin/edit-link-categories.php

    r9481 r9506  
    181181<div class="col-wrap">
    182182
    183 <?php if ( current_user_can('manage_categories') ) {
     183<?php if ( isset( $category ) && current_user_can('manage_categories') ) {
    184184        $category = (object) array(); $category->parent = 0; do_action('add_link_category_form_pre', $category); ?>
    185185
     
    199199        <label for="slug"><?php _e('Category slug') ?></label>
    200200        <input name="slug" id="slug" type="text" value="" size="40" />
    201     <p><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p>
     201        <p><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p>
    202202</div>
    203203
  • trunk/wp-admin/edit-link-form.php

    r9363 r9506  
    7171
    7272<?php
    73 if ( 'edit' == $_GET['action'] && current_user_can('manage_links') )
     73if ( !empty($_GET['action']) && 'edit' == $_GET['action'] && current_user_can('manage_links') )
    7474        echo "<a class='submitdelete' href='" . wp_nonce_url("link.php?action=delete&amp;link_id=$link->link_id", 'delete-bookmark_' . $link->link_id) . "' onclick=\"if ( confirm('" . js_escape( sprintf( __("You are about to delete this link '%s'\n'Cancel' to stop, 'OK' to delete."), $link->link_name )) . "') ) { return true;}return false;\">" . __('Delete&nbsp;link') . "</a>";
    7575?>
     
    342342-->
    343343<?php
    344 echo $form;
    345 echo $link_added;
     344if ( !empty($form) )
     345        echo $form;
     346if ( !empty($link_added) )
     347        echo $link_added;
    346348
    347349wp_nonce_field( $nonce_action );
  • trunk/wp-admin/edit-page-form.php

    r9491 r9506  
    191191if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post->ID ) { ?>
    192192<?php if ( current_user_can('publish_posts') ) : ?>
    193         <?php if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?>
     193        <?php if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?>
    194194                <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _e('Schedule') ?>" />
    195195        <?php else : ?>
  • trunk/wp-admin/import/blogger.php

    r8645 r9506  
    815815                } elseif ( isset($_GET['token']) )
    816816                        $this->auth();
    817                 elseif ( $this->token && $this->token_is_valid() )
     817                elseif ( isset($this->token) && $this->token_is_valid() )
    818818                        $this->show_blogs();
    819819                else
  • trunk/wp-admin/includes/plugin-install.php

    r9328 r9506  
    174174                <input type="text" name="s" id="search-field" value="<?php echo attribute_escape($term) ?>" />
    175175                <input type="submit" name="search" value="<?php echo attribute_escape(__('Search')) ?>" class="button" />
    176                 <?php echo $after_submit ?>
    177176        </form><?php
    178177}
  • trunk/wp-admin/includes/template.php

    r9491 r9506  
    12431243                                $t_time = get_the_time(__('Y/m/d g:i:s A'));
    12441244                                $m_time = $post->post_date;
    1245                                 $time = get_post_time('G', true);
     1245                                $time = get_post_time('G', true, $post);
    12461246
    12471247                                if ( ( abs(time() - $time) ) < 86400 ) {
  • trunk/wp-admin/link.php

    r8697 r9506  
    1818        wp_die( __('You do not have sufficient permissions to edit the links for this blog.') );
    1919
    20 if ('' != $_POST['deletebookmarks'])
     20if ( !empty($_POST['deletebookmarks']) )
    2121        $action = 'deletebookmarks';
    22 if ('' != $_POST['move'])
     22if ( !empty($_POST['move']) )
    2323        $action = 'move';
    24 if ('' != $_POST['linkcheck'])
    25         $linkcheck = $_POST[linkcheck];
     24if ( !empty($_POST['linkcheck']) )
     25        $linkcheck = $_POST['linkcheck'];
    2626
    2727$this_file = 'link-manager.php';
  • trunk/wp-admin/options.php

    r9487 r9506  
    7171                foreach ( $options as $option ) {
    7272                        $option = trim($option);
    73                         $value = $_POST[$option];
     73                        $value = null;
     74                        if ( isset($_POST[$option]) )
     75                                $value = $_POST[$option];
    7476                        if ( !is_array($value) ) $value = trim($value);
    7577                        $value = stripslashes_deep($value);
  • trunk/wp-admin/upload.php

    r9414 r9506  
    185185foreach ( $matches as $type => $reals )
    186186        foreach ( $reals as $real )
    187                 $num_posts[$type] += $_num_posts[$real];
     187                $num_posts[$type] = ( isset( $num_posts[$type] ) ) ? $num_posts[$type] + $_num_posts[$real] : $_num_posts[$real];
    188188
    189189$class = empty($_GET['post_mime_type']) && ! isset($_GET['detached']) ? ' class="current"' : '';
     
    195195                continue;
    196196
    197         if ( wp_match_mime_types($mime_type, $_GET['post_mime_type']) )
     197        if ( !empty($_GET['post_mime_type']) && wp_match_mime_types($mime_type, $_GET['post_mime_type']) )
    198198                $class = ' class="current"';
    199199
  • trunk/wp-admin/user-edit.php

    r9390 r9506  
    223223<tr>
    224224<th scope="row"><?php _e( 'Keyboard Shortcuts' ); ?></th>
    225 <td><label for="comment_shortcuts"><input type="checkbox" name="comment_shortcuts" id="comment_shortcuts" value="true" <?php checked('true', $profileuser->comment_shortcuts); ?> /> <?php _e( 'Enable keyboard shortcuts for comment moderation. <a href="http://codex.wordpress.org/Keyboard_Shortcuts">More information</a>' ); ?></label></td>
     225<td><label for="comment_shortcuts"><input type="checkbox" name="comment_shortcuts" id="comment_shortcuts" value="true" <?php if ( !empty($profileuser->comment_shortcuts) ) checked('true', $profileuser->comment_shortcuts); ?> /> <?php _e( 'Enable keyboard shortcuts for comment moderation. <a href="http://codex.wordpress.org/Keyboard_Shortcuts">More information</a>' ); ?></label></td>
    226226</tr>
    227227<?php
  • trunk/wp-includes/canonical.php

    r9475 r9506  
    6262        $redirect = $original;
    6363        $redirect_url = false;
     64
     65        // Notice fixing
     66        if ( !isset($redirect['path']) )  $redirect['path'] = '';
     67        if ( !isset($redirect['query']) ) $redirect['query'] = '';
    6468
    6569        if ( is_singular() && 1 > $wp_query->post_count && ($id = get_query_var('p')) ) {
  • trunk/wp-includes/category.php

    r9080 r9506  
    278278        $tags = get_terms( 'post_tag', $args );
    279279
    280         if ( empty( $tags ) )
    281                 return array();
     280        if ( empty( $tags ) ) {
     281                $return = array();
     282                return $return;
     283        }
    282284
    283285        $tags = apply_filters( 'get_tags', $tags, $args );
  • trunk/wp-includes/rewrite.php

    r9300 r9506  
    16271627
    16281628                $site_root = parse_url(get_option('siteurl'));
    1629                 $site_root = trailingslashit($site_root['path']);
     1629                if ( isset( $site_root['path'] ) ) {
     1630                        $site_root = trailingslashit($site_root['path']);
     1631                }
    16301632
    16311633                $home_root = parse_url(get_option('home'));
    1632                 $home_root = trailingslashit($home_root['path']);
     1634                if ( isset( $home_root['path'] ) ) {
     1635                        $home_root = trailingslashit($home_root['path']);
     1636                }
    16331637
    16341638                $rules = "<IfModule mod_rewrite.c>\n";
  • trunk/wp-includes/widgets.php

    r9234 r9506  
    15521552        }
    15531553
     1554        $default_args = array( 'show_author' => 0, 'show_date' => 0, 'show_summary' => 0 );
     1555        $args = wp_parse_args( $args, $default_args );
    15541556        extract( $args, EXTR_SKIP );
    15551557
Note: See TracChangeset for help on using the changeset viewer.