summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-09-20 14:48:34 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-09-20 14:48:34 +0000
commita194fea75f7340d53134ff1ecfa5969b03735576 (patch)
treef7c061c4e37d888538d3d59e8307f9d2529b0c25
parentae484584028c752efb5faa4c02259556e853d26e (diff)
downloadwordpress-mu-a194fea75f7340d53134ff1ecfa5969b03735576.tar.gz
wordpress-mu-a194fea75f7340d53134ff1ecfa5969b03735576.tar.xz
wordpress-mu-a194fea75f7340d53134ff1ecfa5969b03735576.zip
WP Merge to rev 4198
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@762 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-includes/category-template.php3
-rw-r--r--wp-includes/category.php2
-rw-r--r--wp-includes/classes.php8
-rw-r--r--wp-includes/post.php8
4 files changed, 11 insertions, 10 deletions
diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php
index 346fbb6..c6d1e45 100644
--- a/wp-includes/category-template.php
+++ b/wp-includes/category-template.php
@@ -219,7 +219,8 @@ function wp_list_categories($args = '') {
'child_of' => 0, 'feed' => '', 'feed_image' => '', 'exclude' => '',
'hierarchical' => true, 'title_li' => __('Categories'));
$r = array_merge($defaults, $r);
- $r['include_last_update_time'] = $r['show_date'];
+ if ( isset($r['show_date']) )
+ $r['include_last_update_time'] = $r['show_date'];
extract($r);
$categories = get_categories($r);
diff --git a/wp-includes/category.php b/wp-includes/category.php
index 6ffb210..76382ad 100644
--- a/wp-includes/category.php
+++ b/wp-includes/category.php
@@ -20,7 +20,7 @@ function &get_categories($args = '') {
parse_str($args, $r);
$defaults = array('type' => 'post', 'child_of' => 0, 'orderby' => 'name', 'order' => 'ASC',
- 'hide_empty' => true, 'include_last_update_time' => false, 'hierarchical' => 1, $exclude => '', $include => '',
+ 'hide_empty' => true, 'include_last_update_time' => false, 'hierarchical' => 1, 'exclude' => '', 'include' => '',
'number' => '');
$r = array_merge($defaults, $r);
if ( 'count' == $r['orderby'] )
diff --git a/wp-includes/classes.php b/wp-includes/classes.php
index 55b46a3..b5f0a68 100644
--- a/wp-includes/classes.php
+++ b/wp-includes/classes.php
@@ -460,13 +460,13 @@ class Walker {
// If flat, start and end the element and skip the level checks.
if ( $flat) {
// Start the element.
- if ( $element->$id_field != 0 ) {
+ if ( isset($element->$id_field) && $element->$id_field != 0 ) {
$cb_args = array_merge( array($output, $element, $depth - 1), $args);
$output = call_user_func_array(array(&$this, 'start_el'), $cb_args);
}
// End the element.
- if ( $element->$id_field != 0 ) {
+ if ( isset($element->$id_field) && $element->$id_field != 0 ) {
$cb_args = array_merge( array($output, $element, $depth - 1), $args);
$output = call_user_func_array(array(&$this, 'end_el'), $cb_args);
}
@@ -655,10 +655,10 @@ class Walker_Category extends Walker {
$link .= ')';
}
- if ( $show_count )
+ if ( isset($show_count) && $show_count )
$link .= ' ('.intval($category->category_count).')';
- if ( $show_date ) {
+ if ( isset($show_date) && $show_date ) {
$link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp);
}
diff --git a/wp-includes/post.php b/wp-includes/post.php
index fa747aa..468ed37 100644
--- a/wp-includes/post.php
+++ b/wp-includes/post.php
@@ -99,7 +99,7 @@ function &get_post(&$post, $output = OBJECT) {
}
}
- if ( defined(WP_IMPORTING) )
+ if ( defined('WP_IMPORTING') )
unset($post_cache);
if ( $output == OBJECT ) {
@@ -923,12 +923,12 @@ function &get_page(&$page, $output = OBJECT) {
wp_cache_add($page->ID, $page, 'pages');
$_page = $page;
} else {
- if ( isset($GLOBALS['page']) && ($page == $GLOBALS['page']->ID) ) {
+ if ( isset($GLOBALS['page']->ID) && ($page == $GLOBALS['page']->ID) ) {
$_page = & $GLOBALS['page'];
wp_cache_add($_page->ID, $_page, 'pages');
- } elseif ( $_page = $GLOBALS['post_cache'][$page] ) {
+ } elseif ( isset($_page) && $_page == $GLOBALS['post_cache'][$page] ) {
return get_post($page, $output);
- } elseif ( $_page = wp_cache_get($page, 'pages') ) {
+ } elseif ( isset($_page) && $_page == wp_cache_get($page, 'pages') ) {
// Got it.
} else {
$query = "SELECT * FROM $wpdb->posts WHERE ID= '$page' LIMIT 1";