From 87bb8cd69cc593fe6bed330fb1791eac9df87167 Mon Sep 17 00:00:00 2001 From: donncha Date: Tue, 23 Oct 2007 18:28:40 +0000 Subject: Merge with WordPress, rev 6285 and untested git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1125 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-app.php | 40 +++++++--------------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) (limited to 'wp-app.php') diff --git a/wp-app.php b/wp-app.php index 44846a7..dee5cb0 100644 --- a/wp-app.php +++ b/wp-app.php @@ -12,6 +12,7 @@ define('APP_REQUEST', true); require_once('./wp-config.php'); require_once(ABSPATH . WPINC . '/post-template.php'); require_once(ABSPATH . WPINC . '/atomlib.php'); +require_once(ABSPATH . WPINC . '/feed.php'); $_SERVER['PATH_INFO'] = preg_replace( '/.*\/wp-app\.php/', '', $_SERVER['REQUEST_URI'] ); @@ -696,7 +697,7 @@ EOD; } function get_feed($page = 1, $post_type = 'post') { - global $post, $wp, $wp_query, $posts, $wpdb, $blog_id, $post_cache; + global $post, $wp, $wp_query, $posts, $wpdb, $blog_id; log_app('function',"get_feed($page, '$post_type')"); ob_start(); @@ -715,7 +716,6 @@ EOD; $wp_query = $GLOBALS['wp_query']; $wpdb = $GLOBALS['wpdb']; $blog_id = (int) $GLOBALS['blog_id']; - $post_cache = $GLOBALS['post_cache']; log_app('function',"query_posts(# " . print_r($wp_query, true) . "#)"); log_app('function',"total_count(# $wp_query->max_num_pages #)"); @@ -739,7 +739,7 @@ EOD; Copyright -WordPress.com Atom API + ATOM_NS ?>" xmlns:app="ATOMPUB_NS ?>" xml:lang=""> ID); ?> -prep_content(get_the_title()); ?> + <?php echo $content ?> @@ -806,7 +806,7 @@ EOD; post_content ) ) : -list($content_type, $content) = $this->prep_content(get_the_content()); ?> +list($content_type, $content) = prep_atom_text_construct(get_the_content()); ?> @@ -814,37 +814,11 @@ list($content_type, $content) = $this->prep_content(get_the_content()); ?> -prep_content(get_the_excerpt()); ?> + ' . $data . '', true); - $code = xml_get_error_code($parser); - xml_parser_free($parser); - - if (!$code) { - if (strpos($data, '<') === false) { - return array('text', $data); - } else { - $data = "
$data
"; - return array('xhtml', $data); - } - } - - if (strpos($data, ']]>') == false) { - return array('html', ""); - } else { - return array('html', htmlspecialchars($data)); - } - } - function ok() { log_app('Status','200: OK'); header('Content-Type: text/plain'); -- cgit