<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[12734] trunk: Coding style cleanups</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12734">12734</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-01-15 22:25:40 +0000 (Fri, 15 Jan 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Coding style cleanups</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpactivatephp">trunk/wp-activate.php</a></li>
<li><a href="#trunkwpappphp">trunk/wp-app.php</a></li>
<li><a href="#trunkwpincludesloadphp">trunk/wp-includes/load.php</a></li>
<li><a href="#trunkwpsettingsphp">trunk/wp-settings.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpactivatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-activate.php (12733 => 12734)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-activate.php        2010-01-15 22:11:12 UTC (rev 12733)
+++ trunk/wp-activate.php        2010-01-15 22:25:40 UTC (rev 12734)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx"> require( 'wp-blog-header.php' );
</span><span class="cx"> require_once( ABSPATH . WPINC . '/registration.php');
</span><span class="cx">
</span><del>-if( is_object( $wp_object_cache ) )
</del><ins>+if ( is_object( $wp_object_cache ) )
</ins><span class="cx">         $wp_object_cache->cache_enabled = false;
</span><span class="cx">
</span><span class="cx"> do_action("activate_header");
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx">                                 ?>
</span><span class="cx">                                 <h2><?php _e('Your account is now active!'); ?></h2>
</span><span class="cx">                                 <?php
</span><del>-                         if( $signup->domain . $signup->path == '' ) {
</del><ins>+                         if ( $signup->domain . $signup->path == '' ) {
</ins><span class="cx">                                  printf(__('<p class="lead-in">Your account has been activated. You may now <a href="%1$s">login</a> to the site using your chosen username of "%2$s". Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.</p>'), 'http://' . $current_site->domain . $current_site->path . 'wp-login.php', $signup->user_login, $signup->user_email, 'http://' . $current_site->domain . $current_site->path . 'wp-login.php?action=lostpassword');
</span><span class="cx">                          } else {
</span><span class="cx">                                  printf(__('<p class="lead-in">Your blog at <a href="%1$s">%2$s</a> is active. You may now login to your blog using your chosen username of "%3$s". Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.</p>'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, 'http://' . $current_site->domain . $current_site->path . 'wp-login.php?action=lostpassword');
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx">                                 <p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $password; ?></p>
</span><span class="cx">                         </div>
</span><span class="cx">
</span><del>-                        <?php if( $url != 'http://' . $current_site->domain . $current_site->path ) : ?>
</del><ins>+                        <?php if ( $url != 'http://' . $current_site->domain . $current_site->path ) : ?>
</ins><span class="cx">                                 <p class="view"><?php printf(__('Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Login</a>'), $url, $url . 'wp-login.php' ); ?></p>
</span><span class="cx">                         <?php else: ?>
</span><span class="cx">                                 <p class="view"><?php printf( __( 'Your account is now activated. <a href="%1$s">Login</a> or go back to the <a href="%2$s">homepage</a>.' ), 'http://' . $current_site->domain . $current_site->path . 'wp-login.php', 'http://' . $current_site->domain . $current_site->path ); ?></p>
</span></span></pre></div>
<a id="trunkwpappphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-app.php (12733 => 12734)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-app.php        2010-01-15 22:11:12 UTC (rev 12733)
+++ trunk/wp-app.php        2010-01-15 22:25:40 UTC (rev 12734)
</span><span class="lines">@@ -265,7 +265,7 @@
</span><span class="cx">         function handle_request() {
</span><span class="cx">                 global $always_authenticate;
</span><span class="cx">
</span><del>-                if( !empty( $_SERVER['ORIG_PATH_INFO'] ) )
</del><ins>+                if ( !empty( $_SERVER['ORIG_PATH_INFO'] ) )
</ins><span class="cx">                         $path = $_SERVER['ORIG_PATH_INFO'];
</span><span class="cx">                 else
</span><span class="cx">                         $path = $_SERVER['PATH_INFO'];
</span><span class="lines">@@ -278,41 +278,39 @@
</span><span class="cx">                 //$this->process_conditionals();
</span><span class="cx">
</span><span class="cx">                 // exception case for HEAD (treat exactly as GET, but don't output)
</span><del>-                if($method == 'HEAD') {
</del><ins>+                if ($method == 'HEAD') {
</ins><span class="cx">                         $this->do_output = false;
</span><span class="cx">                         $method = 'GET';
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 // redirect to /service in case no path is found.
</span><del>-                if(strlen($path) == 0 || $path == '/') {
</del><ins>+                if(strlen($path) == 0 || $path == '/')
</ins><span class="cx">                         $this->redirect($this->get_service_url());
</span><del>-                }
</del><span class="cx">
</span><span class="cx">                 // check to see if AtomPub is enabled
</span><del>-                if( !get_option( 'enable_app' ) )
</del><ins>+                if ( !get_option( 'enable_app' ) )
</ins><span class="cx">                         $this->forbidden( sprintf( __( 'AtomPub services are disabled on this blog. An admin user can enable them at %s' ), admin_url('options-writing.php') ) );
</span><span class="cx">
</span><span class="cx">                 // dispatch
</span><del>-                foreach($this->selectors as $regex => $funcs) {
-                        if(preg_match($regex, $path, $matches)) {
-                        if(isset($funcs[$method])) {
</del><ins>+                foreach ( $this->selectors as $regex => $funcs ) {
+                        if ( preg_match($regex, $path, $matches) ) {
+                                if ( isset($funcs[$method]) ) {
</ins><span class="cx">
</span><del>-                                // authenticate regardless of the operation and set the current
-                                // user. each handler will decide if auth is required or not.
-                                if(!$this->authenticate()) {
-                                        if ($always_authenticate) {
-                                                $this->auth_required('Credentials required.');
</del><ins>+                                        // authenticate regardless of the operation and set the current
+                                        // user. each handler will decide if auth is required or not.
+                                        if ( !$this->authenticate() ) {
+                                                if ( $always_authenticate )
+                                                        $this->auth_required('Credentials required.');
</ins><span class="cx">                                         }
</span><del>-                                }
</del><span class="cx">
</span><del>-                                array_shift($matches);
-                                call_user_func_array(array(&$this,$funcs[$method]), $matches);
-                                exit();
-                        } else {
-                                // only allow what we have handlers for...
-                                $this->not_allowed(array_keys($funcs));
</del><ins>+                                        array_shift($matches);
+                                        call_user_func_array(array(&$this,$funcs[$method]), $matches);
+                                        exit();
+                                } else {
+                                        // only allow what we have handlers for...
+                                        $this->not_allowed(array_keys($funcs));
+                                }
</ins><span class="cx">                         }
</span><del>-                        }
</del><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 // oops, nothing found
</span><span class="lines">@@ -327,7 +325,7 @@
</span><span class="cx">         function get_service() {
</span><span class="cx">                 log_app('function','get_service()');
</span><span class="cx">
</span><del>-                if( !current_user_can( 'edit_posts' ) )
</del><ins>+                if ( !current_user_can( 'edit_posts' ) )
</ins><span class="cx">                         $this->auth_required( __( 'Sorry, you do not have the right to access this blog.' ) );
</span><span class="cx">
</span><span class="cx">                 $entries_url = esc_attr($this->get_entries_url());
</span><span class="lines">@@ -338,7 +336,7 @@
</span><span class="cx">                         $accepted_media_types = $accepted_media_types . "<accept>" . $med . "</accept>";
</span><span class="cx">                 }
</span><span class="cx">                 $atom_prefix="atom";
</span><del>-                $atom_blogname=get_bloginfo('name');
</del><ins>+                $atom_blogname = get_bloginfo('name');
</ins><span class="cx">                 $service_doc = <<<EOD
</span><span class="cx"> <service xmlns="$this->ATOMPUB_NS" xmlns:$atom_prefix="$this->ATOM_NS">
</span><span class="cx"> <workspace>
</span><span class="lines">@@ -368,16 +366,16 @@
</span><span class="cx">         function get_categories_xml() {
</span><span class="cx">                 log_app('function','get_categories_xml()');
</span><span class="cx">
</span><del>-                if( !current_user_can( 'edit_posts' ) )
</del><ins>+                if ( !current_user_can( 'edit_posts' ) )
</ins><span class="cx">                         $this->auth_required( __( 'Sorry, you do not have the right to access this blog.' ) );
</span><span class="cx">
</span><span class="cx">                 $home = esc_attr(get_bloginfo_rss('url'));
</span><span class="cx">
</span><span class="cx">                 $categories = "";
</span><span class="cx">                 $cats = get_categories(array('hierarchical' => 0, 'hide_empty' => 0));
</span><del>-                foreach ((array) $cats as $cat) {
</del><ins>+                foreach ( (array) $cats as $cat ) {
</ins><span class="cx">                         $categories .= " <category term=\"" . esc_attr($cat->name) . "\" />\n";
</span><del>-}
</del><ins>+                }
</ins><span class="cx">                 $output = <<<EOD
</span><span class="cx"> <app:categories xmlns:app="$this->ATOMPUB_NS"
</span><span class="cx">         xmlns="$this->ATOM_NS"
</span><span class="lines">@@ -385,8 +383,8 @@
</span><span class="cx">         $categories
</span><span class="cx"> </app:categories>
</span><span class="cx"> EOD;
</span><del>-        $this->output($output, $this->CATEGORIES_CONTENT_TYPE);
-}
</del><ins>+                $this->output($output, $this->CATEGORIES_CONTENT_TYPE);
+        }
</ins><span class="cx">
</span><span class="cx">         /**
</span><span class="cx">          * Create new post.
</span><span class="lines">@@ -398,24 +396,24 @@
</span><span class="cx">                 $this->get_accepted_content_type($this->atom_content_types);
</span><span class="cx">
</span><span class="cx">                 $parser = new AtomParser();
</span><del>-                if(!$parser->parse()) {
</del><ins>+                if ( !$parser->parse() )
</ins><span class="cx">                         $this->client_error();
</span><del>-                }
</del><span class="cx">
</span><span class="cx">                 $entry = array_pop($parser->feed->entries);
</span><span class="cx">
</span><span class="cx">                 log_app('Received entry:', print_r($entry,true));
</span><span class="cx">
</span><span class="cx">                 $catnames = array();
</span><del>-                foreach($entry->categories as $cat)
</del><ins>+                foreach ( $entry->categories as $cat ) {
</ins><span class="cx">                         array_push($catnames, $cat["term"]);
</span><ins>+                }
</ins><span class="cx">
</span><span class="cx">                 $wp_cats = get_categories(array('hide_empty' => false));
</span><span class="cx">
</span><span class="cx">                 $post_category = array();
</span><span class="cx">
</span><del>-                foreach($wp_cats as $cat) {
-                        if(in_array($cat->name, $catnames))
</del><ins>+                foreach ( $wp_cats as $cat ) {
+                        if ( in_array($cat->name, $catnames) )
</ins><span class="cx">                                 array_push($post_category, $cat->term_id);
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -423,7 +421,7 @@
</span><span class="cx">
</span><span class="cx">                 $cap = ($publish) ? 'publish_posts' : 'edit_posts';
</span><span class="cx">
</span><del>-                if(!current_user_can($cap))
</del><ins>+                if ( !current_user_can($cap) )
</ins><span class="cx">                         $this->auth_required(__('Sorry, you do not have the right to edit/publish new posts.'));
</span><span class="cx">
</span><span class="cx">                 $blog_ID = (int ) $blog_id;
</span><span class="lines">@@ -448,7 +446,7 @@
</span><span class="cx">                 if ( is_wp_error( $postID ) )
</span><span class="cx">                         $this->internal_error($postID->get_error_message());
</span><span class="cx">
</span><del>-                if (!$postID)
</del><ins>+                if ( !$postID )
</ins><span class="cx">                         $this->internal_error(__('Sorry, your entry could not be posted. Something wrong happened.'));
</span><span class="cx">
</span><span class="cx">                 // getting warning here about unable to set headers
</span><span class="lines">@@ -475,7 +473,7 @@
</span><span class="cx">         function get_post($postID) {
</span><span class="cx">                 global $entry;
</span><span class="cx">
</span><del>-                if( !current_user_can( 'edit_post', $postID ) )
</del><ins>+                if ( !current_user_can( 'edit_post', $postID ) )
</ins><span class="cx">                         $this->auth_required( __( 'Sorry, you do not have the right to access this post.' ) );
</span><span class="cx">
</span><span class="cx">                 $this->set_current_entry($postID);
</span><span class="lines">@@ -498,9 +496,8 @@
</span><span class="cx">                 $this->get_accepted_content_type($this->atom_content_types);
</span><span class="cx">
</span><span class="cx">                 $parser = new AtomParser();
</span><del>-                if(!$parser->parse()) {
</del><ins>+                if ( !$parser->parse() )
</ins><span class="cx">                         $this->bad_request();
</span><del>-                }
</del><span class="cx">
</span><span class="cx">                 $parsed = array_pop($parser->feed->entries);
</span><span class="cx">
</span><span class="lines">@@ -510,7 +507,7 @@
</span><span class="cx">                 global $entry;
</span><span class="cx">                 $this->set_current_entry($postID);
</span><span class="cx">
</span><del>-                if(!current_user_can('edit_post', $entry['ID']))
</del><ins>+                if ( !current_user_can('edit_post', $entry['ID']) )
</ins><span class="cx">                         $this->auth_required(__('Sorry, you do not have the right to edit this post.'));
</span><span class="cx">
</span><span class="cx">                 $publish = (isset($parsed->draft) && trim($parsed->draft) == 'yes') ? false : true;
</span><span class="lines">@@ -533,9 +530,8 @@
</span><span class="cx">
</span><span class="cx">                 $result = wp_update_post($postdata);
</span><span class="cx">
</span><del>-                if (!$result) {
</del><ins>+                if ( !$result )
</ins><span class="cx">                         $this->internal_error(__('For some strange yet very annoying reason, this post could not be edited.'));
</span><del>-                }
</del><span class="cx">
</span><span class="cx">                 do_action( 'atompub_put_post', $ID, $parsed );
</span><span class="cx">
</span><span class="lines">@@ -556,16 +552,15 @@
</span><span class="cx">                 global $entry;
</span><span class="cx">                 $this->set_current_entry($postID);
</span><span class="cx">
</span><del>-                if(!current_user_can('edit_post', $postID)) {
</del><ins>+                if ( !current_user_can('edit_post', $postID) )
</ins><span class="cx">                         $this->auth_required(__('Sorry, you do not have the right to delete this post.'));
</span><del>-                }
</del><span class="cx">
</span><del>-                if ($entry['post_type'] == 'attachment') {
</del><ins>+                if ( $entry['post_type'] == 'attachment' ) {
</ins><span class="cx">                         $this->delete_attachment($postID);
</span><span class="cx">                 } else {
</span><span class="cx">                         $result = wp_delete_post($postID);
</span><span class="cx">
</span><del>-                        if (!$result) {
</del><ins>+                        if ( !$result ) {
</ins><span class="cx">                                 $this->internal_error(__('For some strange yet very annoying reason, this post could not be deleted.'));
</span><span class="cx">                         }
</span><span class="cx">
</span><span class="lines">@@ -583,10 +578,10 @@
</span><span class="cx">          * @param int $postID Optional. Post ID.
</span><span class="cx">          */
</span><span class="cx">         function get_attachment($postID = null) {
</span><del>-                if( !current_user_can( 'upload_files' ) )
</del><ins>+                if ( !current_user_can( 'upload_files' ) )
</ins><span class="cx">                         $this->auth_required( __( 'Sorry, you do not have permission to upload files.' ) );
</span><span class="cx">
</span><del>-                if (!isset($postID)) {
</del><ins>+                if ( !isset($postID) ) {
</ins><span class="cx">                         $this->get_attachments();
</span><span class="cx">                 } else {
</span><span class="cx">                         $this->set_current_entry($postID);
</span><span class="lines">@@ -605,12 +600,12 @@
</span><span class="cx">
</span><span class="cx">                 $type = $this->get_accepted_content_type();
</span><span class="cx">
</span><del>-                if(!current_user_can('upload_files'))
</del><ins>+                if ( !current_user_can('upload_files') )
</ins><span class="cx">                         $this->auth_required(__('You do not have permission to upload files.'));
</span><span class="cx">
</span><span class="cx">                 $fp = fopen("php://input", "rb");
</span><span class="cx">                 $bits = null;
</span><del>-                while(!feof($fp)) {
</del><ins>+                while ( !feof($fp) ) {
</ins><span class="cx">                         $bits .= fread($fp, 4096);
</span><span class="cx">                 }
</span><span class="cx">                 fclose($fp);
</span><span class="lines">@@ -678,7 +673,7 @@
</span><span class="cx">                 global $entry;
</span><span class="cx">                 $this->set_current_entry($postID);
</span><span class="cx">
</span><del>-                if(!current_user_can('edit_post', $entry['ID']))
</del><ins>+                if ( !current_user_can('edit_post', $entry['ID']) )
</ins><span class="cx">                         $this->auth_required(__('Sorry, you do not have the right to edit this post.'));
</span><span class="cx">
</span><span class="cx">                 extract($entry);
</span><span class="lines">@@ -694,9 +689,8 @@
</span><span class="cx">
</span><span class="cx">                 $result = wp_update_post($postdata);
</span><span class="cx">
</span><del>-                if (!$result) {
</del><ins>+                if ( !$result )
</ins><span class="cx">                         $this->internal_error(__('For some strange yet very annoying reason, this post could not be edited.'));
</span><del>-                }
</del><span class="cx">
</span><span class="cx">                 log_app('function',"put_attachment($postID)");
</span><span class="cx">                 $this->ok();
</span><span class="lines">@@ -716,14 +710,13 @@
</span><span class="cx">                 global $entry;
</span><span class="cx">                 $this->set_current_entry($postID);
</span><span class="cx">
</span><del>-                if(!current_user_can('edit_post', $postID)) {
</del><ins>+                if ( !current_user_can('edit_post', $postID) )
</ins><span class="cx">                         $this->auth_required(__('Sorry, you do not have the right to delete this post.'));
</span><del>-                }
</del><span class="cx">
</span><span class="cx">                 $location = get_post_meta($entry['ID'], '_wp_attached_file', true);
</span><span class="cx">                 $filetype = wp_check_filetype($location);
</span><span class="cx">
</span><del>-                if(!isset($location) || 'attachment' != $entry['post_type'] || empty($filetype['ext']))
</del><ins>+                if ( !isset($location) || 'attachment' != $entry['post_type'] || empty($filetype['ext']) )
</ins><span class="cx">                         $this->internal_error(__('Error ocurred while accessing post metadata for file location.'));
</span><span class="cx">
</span><span class="cx">                 // delete file
</span><span class="lines">@@ -732,9 +725,8 @@
</span><span class="cx">                 // delete attachment
</span><span class="cx">                 $result = wp_delete_post($postID);
</span><span class="cx">
</span><del>-                if (!$result) {
</del><ins>+                if ( !$result )
</ins><span class="cx">                         $this->internal_error(__('For some strange yet very annoying reason, this post could not be deleted.'));
</span><del>-                }
</del><span class="cx">
</span><span class="cx">                 log_app('function',"delete_attachment($postID). File '$location' deleted.");
</span><span class="cx">                 $this->ok();
</span><span class="lines">@@ -754,27 +746,26 @@
</span><span class="cx">                 $this->set_current_entry($postID);
</span><span class="cx">
</span><span class="cx">                 // then whether user can edit the specific post
</span><del>-                if(!current_user_can('edit_post', $postID)) {
</del><ins>+                if ( !current_user_can('edit_post', $postID) )
</ins><span class="cx">                         $this->auth_required(__('Sorry, you do not have the right to edit this post.'));
</span><del>-                }
</del><span class="cx">
</span><span class="cx">                 $location = get_post_meta($entry['ID'], '_wp_attached_file', true);
</span><span class="cx">                 $location = get_option ('upload_path') . '/' . $location;
</span><span class="cx">                 $filetype = wp_check_filetype($location);
</span><span class="cx">
</span><del>-                if(!isset($location) || 'attachment' != $entry['post_type'] || empty($filetype['ext']))
</del><ins>+                if ( !isset($location) || 'attachment' != $entry['post_type'] || empty($filetype['ext']) )
</ins><span class="cx">                         $this->internal_error(__('Error ocurred while accessing post metadata for file location.'));
</span><span class="cx">
</span><span class="cx">                 status_header('200');
</span><span class="cx">                 header('Content-Type: ' . $entry['post_mime_type']);
</span><span class="cx">                 header('Connection: close');
</span><span class="cx">
</span><del>-                if ($fp = fopen($location, "rb")) {
</del><ins>+                if ( $fp = fopen($location, "rb") ) {
</ins><span class="cx">                         status_header('200');
</span><span class="cx">                         header('Content-Type: ' . $entry['post_mime_type']);
</span><span class="cx">                         header('Connection: close');
</span><span class="cx">
</span><del>-                        while(!feof($fp)) {
</del><ins>+                        while ( !feof($fp) ) {
</ins><span class="cx">                                 echo fread($fp, 4096);
</span><span class="cx">                         }
</span><span class="cx">
</span><span class="lines">@@ -797,7 +788,7 @@
</span><span class="cx">         function put_file($postID) {
</span><span class="cx">
</span><span class="cx">                 // first check if user can upload
</span><del>-                if(!current_user_can('upload_files'))
</del><ins>+                if ( !current_user_can('upload_files') )
</ins><span class="cx">                         $this->auth_required(__('You do not have permission to upload files.'));
</span><span class="cx">
</span><span class="cx">                 // check for not found
</span><span class="lines">@@ -805,9 +796,8 @@
</span><span class="cx">                 $this->set_current_entry($postID);
</span><span class="cx">
</span><span class="cx">                 // then whether user can edit the specific post
</span><del>-                if(!current_user_can('edit_post', $postID)) {
</del><ins>+                if ( !current_user_can('edit_post', $postID) )
</ins><span class="cx">                         $this->auth_required(__('Sorry, you do not have the right to edit this post.'));
</span><del>-                }
</del><span class="cx">
</span><span class="cx">                 $upload_dir = wp_upload_dir( );
</span><span class="cx">                 $location = get_post_meta($entry['ID'], '_wp_attached_file', true);
</span><span class="lines">@@ -820,7 +810,7 @@
</span><span class="cx">
</span><span class="cx">                 $fp = fopen("php://input", "rb");
</span><span class="cx">                 $localfp = fopen($location, "w+");
</span><del>-                while(!feof($fp)) {
</del><ins>+                while ( !feof($fp) ) {
</ins><span class="cx">                         fwrite($localfp,fread($fp, 4096));
</span><span class="cx">                 }
</span><span class="cx">                 fclose($fp);
</span><span class="lines">@@ -837,9 +827,8 @@
</span><span class="cx">                 $post_data = compact('ID', 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt');
</span><span class="cx">                 $result = wp_update_post($post_data);
</span><span class="cx">
</span><del>-                if (!$result) {
</del><ins>+                if ( !$result )
</ins><span class="cx">                         $this->internal_error(__('Sorry, your entry could not be posted. Something wrong happened.'));
</span><del>-                }
</del><span class="cx">
</span><span class="cx">                 wp_update_attachment_metadata( $postID, wp_generate_attachment_metadata( $postID, $location ) );
</span><span class="cx">
</span><span class="lines">@@ -856,15 +845,13 @@
</span><span class="cx">          * @return string
</span><span class="cx">          */
</span><span class="cx">         function get_entries_url($page = null) {
</span><del>-                if ( isset($GLOBALS['post_type']) && ( $GLOBALS['post_type'] == 'attachment' ) ) {
</del><ins>+                if ( isset($GLOBALS['post_type']) && ( $GLOBALS['post_type'] == 'attachment' ) )
</ins><span class="cx">                         $path = $this->MEDIA_PATH;
</span><del>-                } else {
</del><ins>+                else
</ins><span class="cx">                         $path = $this->ENTRIES_PATH;
</span><del>-                }
</del><span class="cx">                 $url = $this->app_base . $path;
</span><del>-                if(isset($page) && is_int($page)) {
</del><ins>+                if ( isset($page) && is_int($page) )
</ins><span class="cx">                         $url .= "/$page";
</span><del>-                }
</del><span class="cx">                 return $url;
</span><span class="cx">         }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludesloadphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/load.php (12733 => 12734)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/load.php        2010-01-15 22:11:12 UTC (rev 12733)
+++ trunk/wp-includes/load.php        2010-01-15 22:25:40 UTC (rev 12734)
</span><span class="lines">@@ -271,10 +271,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function wp_not_installed() {
</span><del>-        if( is_multisite() ) {
-                        if ( !is_blog_installed() && !defined('WP_INSTALLING') ) {
</del><ins>+        if ( is_multisite() ) {
+                        if ( !is_blog_installed() && !defined('WP_INSTALLING') )
</ins><span class="cx">                                         die( __( 'The blog you have requested is not installed properly. Please contact the system administrator.' ) ); // have to die here ~ Mark
</span><del>-                        }
</del><span class="cx">         } elseif ( !is_blog_installed() && (strpos($_SERVER['PHP_SELF'], 'install.php') === false && !defined('WP_INSTALLING')) ) {
</span><span class="cx">                 if ( defined('WP_SITEURL') )
</span><span class="cx">                         $link = WP_SITEURL . '/wp-admin/install.php';
</span><span class="lines">@@ -329,7 +328,6 @@
</span><span class="cx">                 unset($plugin);
</span><span class="cx">         }
</span><span class="cx">         unset($current_plugins);
</span><del>-
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function wp_set_internal_encoding() {
</span></span></pre></div>
<a id="trunkwpsettingsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-settings.php (12733 => 12734)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-settings.php        2010-01-15 22:11:12 UTC (rev 12733)
+++ trunk/wp-settings.php        2010-01-15 22:25:40 UTC (rev 12734)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> require (ABSPATH . WPINC . '/default-filters.php');
</span><span class="cx"> include_once(ABSPATH . WPINC . '/pomo/mo.php');
</span><span class="cx">
</span><del>-if( is_multisite() && SHORTINIT ) // stop most of WP being loaded, we just want the basics
</del><ins>+if ( SHORTINIT ) // stop most of WP being loaded, we just want the basics
</ins><span class="cx">         return false;
</span><span class="cx">
</span><span class="cx"> require_once (ABSPATH . WPINC . '/l10n.php');
</span><span class="lines">@@ -110,8 +110,8 @@
</span><span class="cx">
</span><span class="cx"> wp_default_constants('wp_included');
</span><span class="cx">
</span><del>-if( is_multisite() )
- ms_network_settings();
</del><ins>+if ( is_multisite() )
+ ms_network_settings();
</ins><span class="cx">
</span><span class="cx"> wp_default_constants('ms_network_settings_loaded');
</span><span class="cx">
</span><span class="lines">@@ -121,7 +121,7 @@
</span><span class="cx"> * Used to load network wide plugins
</span><span class="cx"> * @since 3.0
</span><span class="cx"> */
</span><del>-if( is_multisite() )
</del><ins>+if ( is_multisite() )
</ins><span class="cx">         ms_network_plugins();
</span><span class="cx">
</span><span class="cx"> do_action('muplugins_loaded');
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx"> * Used to check site status
</span><span class="cx"> * @since 3.0
</span><span class="cx"> */
</span><del>-if( is_multisite() ) {
</del><ins>+if ( is_multisite() ) {
</ins><span class="cx">         ms_site_check();
</span><span class="cx">         ms_network_cookies();
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>