Make WordPress Core

Changeset 12752 for trunk/wp-app.php


Ignore:
Timestamp:
01/18/2010 08:34:48 PM (17 years ago)
Author:
ryan
Message:

Coding standards, space after if

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-app.php

    r12734 r12752  
    285285
    286286                // redirect to /service in case no path is found.
    287                 if(strlen($path) == 0 || $path == '/')
     287                if (strlen($path) == 0 || $path == '/')
    288288                        $this->redirect($this->get_service_url());
    289289
     
    664664
    665665                $parser = new AtomParser();
    666                 if(!$parser->parse()) {
     666                if (!$parser->parse()) {
    667667                        $this->bad_request();
    668668                }
     
    806806                $location = "{$upload_dir['basedir']}/{$location}";
    807807
    808                 if(!isset($location) || 'attachment' != $entry['post_type'] || empty($filetype['ext']))
     808                if (!isset($location) || 'attachment' != $entry['post_type'] || empty($filetype['ext']))
    809809                        $this->internal_error(__('Error ocurred while accessing post metadata for file location.'));
    810810
     
    900900        function get_attachments_url($page = null) {
    901901                $url = $this->app_base . $this->MEDIA_PATH;
    902                 if(isset($page) && is_int($page)) {
     902                if (isset($page) && is_int($page)) {
    903903                        $url .= "/$page";
    904904                }
     
    937937         */
    938938        function get_entry_url($postID = null) {
    939                 if(!isset($postID)) {
     939                if (!isset($postID)) {
    940940                        global $post;
    941941                        $postID = (int) $post->ID;
     
    968968         */
    969969        function get_media_url($postID = null) {
    970                 if(!isset($postID)) {
     970                if (!isset($postID)) {
    971971                        global $post;
    972972                        $postID = (int) $post->ID;
     
    10011001                log_app('function',"set_current_entry($postID)");
    10021002
    1003                 if(!isset($postID)) {
     1003                if (!isset($postID)) {
    10041004                        // $this->bad_request();
    10051005                        $this->not_found();
     
    10081008                $entry = wp_get_single_post($postID,ARRAY_A);
    10091009
    1010                 if(!isset($entry) || !isset($entry['ID']))
     1010                if (!isset($entry) || !isset($entry['ID']))
    10111011                        $this->not_found();
    10121012
     
    10591059                $this->ENTRY_PATH = $post_type;
    10601060
    1061                 if(!isset($page)) {
     1061                if (!isset($page)) {
    10621062                        $page = 1;
    10631063                }
     
    10881088<subtitle type="text"><?php bloginfo_rss("description") ?></subtitle>
    10891089<link rel="first" type="<?php echo $this->ATOM_CONTENT_TYPE ?>" href="<?php $this->the_entries_url() ?>" />
    1090 <?php if(isset($prev_page)): ?>
     1090<?php if (isset($prev_page)): ?>
    10911091<link rel="previous" type="<?php echo $this->ATOM_CONTENT_TYPE ?>" href="<?php $this->the_entries_url($prev_page) ?>" />
    10921092<?php endif; ?>
    1093 <?php if(isset($next_page)): ?>
     1093<?php if (isset($next_page)): ?>
    10941094<link rel="next" type="<?php echo $this->ATOM_CONTENT_TYPE ?>" href="<?php $this->the_entries_url($next_page) ?>" />
    10951095<?php endif; ?>
     
    11721172<?php } ?>
    11731173        </author>
    1174 <?php if($GLOBALS['post']->post_type == 'attachment') { ?>
     1174<?php if ($GLOBALS['post']->post_type == 'attachment') { ?>
    11751175        <link rel="edit-media" href="<?php $this->the_media_url() ?>" />
    11761176        <content type="<?php echo $GLOBALS['post']->post_mime_type ?>" src="<?php the_guid(); ?>"/>
     
    13651365                }
    13661366                header("Content-Type: $this->ATOM_CONTENT_TYPE");
    1367                 if(isset($ctloc))
     1367                if (isset($ctloc))
    13681368                        header('Content-Location: ' . $ctloc);
    13691369                header('Location: ' . $edit);
     
    14201420                        header('Content-Disposition: attachment; filename=atom.xml');
    14211421                        header('Date: '. date('r'));
    1422                         if($this->do_output)
     1422                        if ($this->do_output)
    14231423                                echo $xml;
    14241424                        log_app('function', "output:\n$xml");
     
    14591459                // if using mod_rewrite/ENV hack
    14601460                // http://www.besthostratings.com/articles/http-auth-php-cgi.html
    1461                 if(isset($_SERVER['HTTP_AUTHORIZATION'])) {
     1461                if (isset($_SERVER['HTTP_AUTHORIZATION'])) {
    14621462                        list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) =
    14631463                                explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
     
    14701470
    14711471                // If Basic Auth is working...
    1472                 if(isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) {
     1472                if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) {
    14731473                        log_app("Basic Auth",$_SERVER['PHP_AUTH_USER']);
    14741474
     
    14941494        function get_accepted_content_type($types = null) {
    14951495
    1496                 if(!isset($types)) {
     1496                if (!isset($types)) {
    14971497                        $types = $this->media_content_types;
    14981498                }
    14991499
    1500                 if(!isset($_SERVER['CONTENT_LENGTH']) || !isset($_SERVER['CONTENT_TYPE'])) {
     1500                if (!isset($_SERVER['CONTENT_LENGTH']) || !isset($_SERVER['CONTENT_TYPE'])) {
    15011501                        $this->length_required();
    15021502                }
     
    15091509                foreach($types as $t) {
    15101510                        list($acceptedType,$acceptedSubtype) = explode('/',$t);
    1511                         if($acceptedType == '*' || $acceptedType == $type) {
    1512                                 if($acceptedSubtype == '*' || $acceptedSubtype == $subtype)
     1511                        if ($acceptedType == '*' || $acceptedType == $type) {
     1512                                if ($acceptedSubtype == '*' || $acceptedSubtype == $subtype)
    15131513                                        return $type . "/" . $subtype;
    15141514                        }
     
    15251525        function process_conditionals() {
    15261526
    1527                 if(empty($this->params)) return;
    1528                 if($_SERVER['REQUEST_METHOD'] == 'DELETE') return;
     1527                if (empty($this->params)) return;
     1528                if ($_SERVER['REQUEST_METHOD'] == 'DELETE') return;
    15291529
    15301530                switch($this->params[0]) {
     
    15771577
    15781578                $match = false;
    1579                 if(!preg_match("/(\d{4}-\d{2}-\d{2})T(\d{2}\:\d{2}\:\d{2})\.?\d{0,3}(Z|[+-]+\d{2}\:\d{2})/", $str, $match))
     1579                if (!preg_match("/(\d{4}-\d{2}-\d{2})T(\d{2}\:\d{2}\:\d{2})\.?\d{0,3}(Z|[+-]+\d{2}\:\d{2})/", $str, $match))
    15801580                        return false;
    15811581
    1582                 if($match[3] == 'Z')
     1582                if ($match[3] == 'Z')
    15831583                        $match[3] == '+0000';
    15841584
     
    15981598                $pubtime = $this->rfc3339_str2time($published);
    15991599
    1600                 if(!$pubtime) {
     1600                if (!$pubtime) {
    16011601                        return array(current_time('mysql'),current_time('mysql',1));
    16021602                } else {
Note: See TracChangeset for help on using the changeset viewer.