Changeset 8944
- Timestamp:
- 09/21/2008 08:41:25 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/categories.php
r8923 r8944 14 14 wp_reset_vars(array('action', 'cat')); 15 15 16 if ( $_GET['action'] == 'delete' && isset($_GET['delete']) )16 if ( isset( $_GET['action'] ) && $_GET['action'] == 'delete' && isset($_GET['delete']) ) 17 17 $action = 'bulk-delete'; 18 18 … … 155 155 156 156 <?php 157 $pagenum = absint( $_GET['pagenum'] );157 $pagenum = isset( $_GET['pagenum'] ) ? absint( $_GET['pagenum'] ) : 0; 158 158 if ( empty($pagenum) ) 159 159 $pagenum = 1; 160 if( ! $catsperpage|| $catsperpage < 0 )160 if( ! isset( $catsperpage ) || $catsperpage < 0 ) 161 161 $catsperpage = 20; 162 162 -
trunk/wp-admin/edit-category-form.php
r8656 r8944 6 6 * @subpackage Administration 7 7 */ 8 9 /** 10 * @var object 11 */ 12 if ( ! isset( $category ) ) 13 $category = (object) array(); 8 14 9 15 if ( ! empty($cat_ID) ) { … … 25 31 do_action('add_category_form_pre', $category); 26 32 } 33 34 /** 35 * @ignore 36 * @since 2.7 37 * @internal Used to prevent errors in page when no category is being edited. 38 * 39 * @param object $category 40 */ 41 function _fill_empty_category(&$category) { 42 if ( ! isset( $category->name ) ) 43 $category->name = ''; 44 45 if ( ! isset( $category->slug ) ) 46 $category->slug = ''; 47 48 if ( ! isset( $category->parent ) ) 49 $category->parent = ''; 50 51 if ( ! isset( $category->description ) ) 52 $category->description = ''; 53 } 54 55 _fill_empty_category($category); 27 56 ?> 28 57 -
trunk/wp-admin/edit-form-advanced.php
r8893 r8944 370 370 </p> 371 371 <h4><?php _e( 'Post Password' ); ?></h4> 372 <p><label class="hidden" for="post_password"><?php _e('Password Protect This Post') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php echo attribute_escape( $post->post_password ); ?>" /></p>372 <p><label class="hidden" for="post_password"><?php _e('Password Protect This Post') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php if ( isset( $post->post_password ) ) echo attribute_escape( $post->post_password ); ?>" /></p> 373 373 <p><?php _e('Setting a password will require people who visit your blog to enter the above password to view this post and its comments.'); ?></p> 374 374 <?php -
trunk/wp-admin/edit-link-categories.php
r8923 r8944 96 96 97 97 <?php 98 $pagenum = absint( $_GET['pagenum'] );98 $pagenum = isset( $_GET['pagenum'] ) ? absint( $_GET['pagenum'] ) : 0; 99 99 if ( empty($pagenum) ) 100 100 $pagenum = 1; 101 if( ! $catsperpage|| $catsperpage < 0 )101 if( ! isset( $catsperpage ) || $catsperpage < 0 ) 102 102 $catsperpage = 20; 103 103 -
trunk/wp-admin/edit-link-category-form.php
r8656 r8944 6 6 * @subpackage Administration 7 7 */ 8 9 /** 10 * @var object 11 */ 12 if ( ! isset( $category ) ) 13 $category = (object) array(); 8 14 9 15 if ( ! empty($cat_ID) ) { … … 25 31 do_action('add_link_category_form_pre', $category); 26 32 } 33 34 /** 35 * @ignore 36 * @since 2.7 37 * @internal Used to prevent errors in page when no category is being edited. 38 * 39 * @param object $category 40 */ 41 function _fill_empty_link_category(&$category) { 42 if ( ! isset( $category->name ) ) 43 $category->name = ''; 44 45 if ( ! isset( $category->slug ) ) 46 $category->slug = ''; 47 48 if ( ! isset( $category->description ) ) 49 $category->description = ''; 50 } 51 52 _fill_empty_link_category($category); 27 53 ?> 28 54 -
trunk/wp-admin/edit-tag-form.php
r8656 r8944 37 37 <tr class="form-field form-required"> 38 38 <th scope="row" valign="top"><label for="name"><?php _e('Tag name') ?></label></th> 39 <td><input name="name" id="name" type="text" value="<?php echo attribute_escape($tag->name); ?>" size="40" aria-required="true" />39 <td><input name="name" id="name" type="text" value="<?php if ( isset( $tag->name ) ) echo attribute_escape($tag->name); ?>" size="40" aria-required="true" /> 40 40 <p><?php _e('The name is how the tag appears on your site.'); ?></p></td> 41 41 </tr> 42 42 <tr class="form-field"> 43 43 <th scope="row" valign="top"><label for="slug"><?php _e('Tag slug') ?></label></th> 44 <td><input name="slug" id="slug" type="text" value="<?php echo attribute_escape(apply_filters('editable_slug', $tag->slug)); ?>" size="40" />44 <td><input name="slug" id="slug" type="text" value="<?php if ( isset( $tag->slug ) ) echo attribute_escape(apply_filters('editable_slug', $tag->slug)); ?>" size="40" /> 45 45 <p><?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p></td> 46 46 </tr> -
trunk/wp-admin/edit-tags.php
r8930 r8944 14 14 wp_reset_vars(array('action', 'tag')); 15 15 16 if ( $_GET['action'] == 'delete' && isset($_GET['delete_tags']) )16 if ( isset( $_GET['action'] ) && $_GET['action'] == 'delete' && isset($_GET['delete_tags']) ) 17 17 $action = 'bulk-delete'; 18 18 … … 162 162 163 163 <?php 164 $pagenum = absint( $_GET['pagenum'] );164 $pagenum = isset( $_GET['pagenum'] ) ? absint( $_GET['pagenum'] ) : 0; 165 165 if ( empty($pagenum) ) 166 166 $pagenum = 1; 167 if( ! $tagsperpage|| $tagsperpage < 0 )167 if( ! isset( $tagsperpage ) || $tagsperpage < 0 ) 168 168 $tagsperpage = 20; 169 169 … … 202 202 <?php 203 203 204 $searchterms = trim( $_GET['s'] );204 $searchterms = isset( $_GET['s'] ) ? trim( $_GET['s'] ) : ''; 205 205 206 206 $count = tag_rows( $pagenum, $tagsperpage, $searchterms ); -
trunk/wp-admin/includes/user.php
r8701 r8944 231 231 $user->display_name = attribute_escape($user->display_name); 232 232 $user->nickname = attribute_escape($user->nickname); 233 $user->aim = attribute_escape($user->aim);234 $user->yim = attribute_escape($user->yim);235 $user->jabber = attribute_escape($user->jabber);236 $user->description = wp_specialchars($user->description);233 $user->aim = isset( $user->aim ) && !empty( $user->aim ) ? attribute_escape($user->aim) : ''; 234 $user->yim = isset( $user->yim ) && !empty( $user->yim ) ? attribute_escape($user->yim) : ''; 235 $user->jabber = isset( $user->jabber ) && !empty( $user->jabber ) ? attribute_escape($user->jabber) : ''; 236 $user->description = isset( $user->description ) && !empty( $user->description ) ? wp_specialchars($user->description) : ''; 237 237 238 238 return $user; -
trunk/wp-admin/includes/widgets.php
r8912 r8944 60 60 continue; 61 61 62 if ( ! isset( $widget['params'][0] ) ) 63 $widget['params'][0] = array(); 62 64 ob_start(); 63 64 65 $args = wp_list_widget_controls_dynamic_sidebar( array( 0 => array( 'widget_id' => $widget['id'], 'widget_name' => $widget['name'], '_display' => 'template', '_show' => $show ), 1 => $widget['params'][0] ) ); 66 $sidebar_args = call_user_func_array( 'wp_widget_control', $args ); 65 67 $widget_control_template = ob_get_contents(); 66 68 ob_end_clean(); … … 231 233 232 234 $id_format = $widget['id']; 235 236 if ( ! isset( $sidebar_args['_show'] ) ) 237 $sidebar_args['_show'] = ''; 238 239 if ( ! isset( $sidebar_args['_display'] ) ) 240 $sidebar_args['_display'] = ''; 241 233 242 // We aren't showing a widget control, we're outputing a template for a mult-widget control 234 243 if ( 'all' == $sidebar_args['_show'] && 'template' == $sidebar_args['_display'] && isset($control['params'][0]['number']) ) { -
trunk/wp-admin/menu.php
r8905 r8944 125 125 } 126 126 unset($submenu[$old_parent]); 127 $_wp_submenu_nopriv[$new_parent] = $_wp_submenu_nopriv[$old_parent]; 127 128 if ( isset($_wp_submenu_nopriv[$old_parent]) ) 129 $_wp_submenu_nopriv[$new_parent] = $_wp_submenu_nopriv[$old_parent]; 128 130 } 129 131 } -
trunk/wp-admin/upload.php
r8901 r8944 178 178 // Use $_GET instead of is_ since they can override each other 179 179 $h2_author = ''; 180 $_GET['author'] = (int) $_GET['author'];180 $_GET['author'] = isset( $_GET['author'] ) ? (int) $_GET['author'] : 0; 181 181 if ( $_GET['author'] != 0 ) { 182 182 if ( $_GET['author'] == '-' . $user_ID ) { // author exclusion -
trunk/wp-admin/user-edit.php
r8845 r8944 158 158 </div> 159 159 <?php endif; ?> 160 <?php if ( is _wp_error( $errors ) ) : ?>160 <?php if ( isset( $errors ) && is_wp_error( $errors ) ) : ?> 161 161 <div class="error"> 162 162 <ul> -
trunk/wp-includes/feed.php
r8800 r8944 495 495 function self_link() { 496 496 echo 'http' 497 . ( $_SERVER['https'] == 'on'? 's' : '' ) . '://'497 . ( (isset($_SERVER['https']) && $_SERVER['https'] == 'on') ? 's' : '' ) . '://' 498 498 . $_SERVER['HTTP_HOST'] 499 499 . wp_specialchars(stripslashes($_SERVER['REQUEST_URI']), 1); -
trunk/wp-includes/functions.php
r8784 r8944 803 803 function make_url_footnote( $content ) { 804 804 preg_match_all( '/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches ); 805 $ j = 0;805 $links_summary = "\n"; 806 806 for ( $i=0; $i<count($matches[0]); $i++ ) { 807 $links_summary = ( !$j ) ? "\n" : $links_summary;808 $j++;809 807 $link_match = $matches[0][$i]; 810 808 $link_number = '['.($i+1).']'; -
trunk/wp-includes/taxonomy.php
r8782 r8944 716 716 $cache[ $key ] = array(); 717 717 wp_cache_set( 'get_terms', $cache, 'terms' ); 718 return apply_filters('get_terms', array(), $taxonomies, $args); 718 $terms = apply_filters('get_terms', array(), $taxonomies, $args); 719 return $terms; 719 720 } 720 721
Note: See TracChangeset
for help on using the changeset viewer.