Index: /trunk/index.php
===================================================================
--- /trunk/index.php (revision 7990)
+++ /trunk/index.php (revision 7991)
@@ -1,5 +1,19 @@
Index: /trunk/wp-app.php
===================================================================
--- /trunk/wp-app.php (revision 7990)
+++ /trunk/wp-app.php (revision 7991)
@@ -1,25 +1,59 @@
+ * @author Modified by Dougal Campbell
+ * @version 1.0.5-dc
*/
+/**
+ * WordPress is handling an Atom Publishing Protocol request.
+ *
+ * @var bool
+ */
define('APP_REQUEST', true);
+/** Set up WordPress environment */
require_once('./wp-load.php');
+
+/** Post Template API */
require_once(ABSPATH . WPINC . '/post-template.php');
+
+/** Atom Publishing Protocol Class */
require_once(ABSPATH . WPINC . '/atomlib.php');
+
+/** Feed Handling API */
require_once(ABSPATH . WPINC . '/feed.php');
$_SERVER['PATH_INFO'] = preg_replace( '/.*\/wp-app\.php/', '', $_SERVER['REQUEST_URI'] );
+/**
+ * Whether to enable Atom Publishing Protocol Logging.
+ *
+ * @name app_logging
+ * @var int|bool
+ */
$app_logging = 0;
-// TODO: Should be an option somewhere
+/**
+ * Whether to always authenticate user. Permanently set to true.
+ *
+ * @name always_authenticate
+ * @var int|bool
+ * @todo Should be an option somewhere
+ */
$always_authenticate = 1;
+/**
+ * log_app() - Writes logging info to a file.
+ *
+ * @uses $app_logging
+ * @package WordPress
+ * @subpackage Logging
+ *
+ * @param string $label Type of logging
+ * @param string $msg Information describing logging reason.
+ */
function log_app($label,$msg) {
global $app_logging;
@@ -33,4 +67,16 @@
if ( !function_exists('wp_set_current_user') ) :
+/**
+ * wp_set_current_user() - Sets the current WordPress User
+ *
+ * Pluggable function which is also found in pluggable.php.
+ *
+ * @see wp-includes/pluggable.php Documentation for this function.
+ * @uses $current_user Global of current user to test whether $id is the same.
+ *
+ * @param int $id The user's ID
+ * @param string $name Optional. The username of the user.
+ * @return WP_User Current user's User object
+ */
function wp_set_current_user($id, $name = '') {
global $current_user;
@@ -45,11 +91,24 @@
endif;
+/**
+ * wa_posts_where_include_drafts_filter() - Filter to add more post statuses
+ *
+ * @param string $where SQL statement to filter
+ * @return string Filtered SQL statement with added post_status for where clause
+ */
function wa_posts_where_include_drafts_filter($where) {
- $where = str_replace("post_status = 'publish'","post_status = 'publish' OR post_status = 'future' OR post_status = 'draft' OR post_status = 'inherit'", $where);
- return $where;
+ $where = str_replace("post_status = 'publish'","post_status = 'publish' OR post_status = 'future' OR post_status = 'draft' OR post_status = 'inherit'", $where);
+ return $where;
}
add_filter('posts_where', 'wa_posts_where_include_drafts_filter');
+/**
+ * @internal
+ * Left undocumented to work on later. If you want to finish, then please do so.
+ *
+ * @package WordPress
+ * @subpackage Publishing
+ */
class AtomServer {
@@ -171,7 +230,7 @@
$categories_url = attribute_escape($this->get_categories_url());
$media_url = attribute_escape($this->get_attachments_url());
- foreach ($this->media_content_types as $med) {
- $accepted_media_types = $accepted_media_types . "" . $med . "";
- }
+ foreach ($this->media_content_types as $med) {
+ $accepted_media_types = $accepted_media_types . "" . $med . "";
+ }
$atom_prefix="atom";
$atom_blogname=get_bloginfo('name');
Index: /trunk/wp-atom.php
===================================================================
--- /trunk/wp-atom.php (revision 7990)
+++ /trunk/wp-atom.php (revision 7991)
@@ -1,3 +1,14 @@
time())
return;
+
foreach ($crons as $timestamp => $cronhooks) {
if ($timestamp > time()) break;
Index: /trunk/wp-feed.php
===================================================================
--- /trunk/wp-feed.php (revision 7990)
+++ /trunk/wp-feed.php (revision 7991)
@@ -1,3 +1,17 @@
element.
+ * @param string $message Optional. Message to display in header.
+ * @param WP_Error $wp_error Optional. WordPress Error Object
+ */
function login_header($title = 'Login', $message = '', $wp_error = '') {
global $error;
@@ -57,4 +79,13 @@
} // End of login_header()
+/**
+ * retrieve_password() - Handles sending password retrieval email to user
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @uses $wpdb WordPress Database object
+ *
+ * @return bool|WP_Error True: when finish. WP_Error on error
+ */
function retrieve_password() {
global $wpdb;
@@ -111,4 +142,14 @@
}
+/**
+ * reset_password() - Handles resetting the user's password
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @uses $wpdb WordPress Database object
+ *
+ * @param string $key Hash to validate sending user's password
+ * @return bool|WP_Error
+ */
function reset_password($key) {
global $wpdb;
@@ -145,4 +186,13 @@
}
+/**
+ * register_new_user() - Handles registering a new user
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @param string $user_login User's username for logging in
+ * @param string $user_email User's email address to send password and add
+ * @return int|WP_Error Either user's ID or error on failure.
+ */
function register_new_user($user_login, $user_email) {
$errors = new WP_Error();
Index: /trunk/wp-mail.php
===================================================================
--- /trunk/wp-mail.php (revision 7990)
+++ /trunk/wp-mail.php (revision 7991)
@@ -1,7 +1,17 @@
+ * @package WordPress
+ */
+
+/**
+ * Whether this is a XMLRPC Request
+ *
+ * @var bool
+ */
define('XMLRPC_REQUEST', true);
@@ -12,8 +23,9 @@
}
-# fix for mozBlog and other cases where '