Changeset 15918

Show
Ignore:
Timestamp:
04/01/08 17:44:12 (8 months ago)
Author:
rambo
Message:

scripted whitespace normalization

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/MidCOM_2_8/midcom.admin.user/style/midcom-admin-user-personlist-header.php

    r15790 r15918  
    44        <input type="text" id="midcom_admin_user_search" name="midcom_admin_user_search" value="<?php if (isset($_REQUEST['midcom_admin_user_search'])) { echo $_REQUEST['midcom_admin_user_search']; } ?>" /> 
    55    </label> 
    6        <script type="text/javascript"> 
    7        document.getElementById('midcom_admin_user_search').focus(); 
    8        </script> 
     6    <script type="text/javascript"> 
     7    document.getElementById('midcom_admin_user_search').focus(); 
     8    </script> 
    99    <input type="submit" value="<?php echo $_MIDCOM->i18n->get_string('go', 'midcom.admin.user'); ?>" /> 
    1010    <div class="helptext"> 
  • branches/MidCOM_2_8/midgard.admin.asgard/handler/object/manage.php

    r15760 r15918  
    779779                $_MIDCOM->relocate("__mfa/asgard/object/{$this->_request_data['default_mode']}/{$this->_object->guid}/{$data['language_code']}"); 
    780780                // This will exit. 
    781                case 'edit': 
     781            case 'edit': 
    782782                $qf =& $this->_controller->formmanager->form; 
    783783                if(isset($_REQUEST['midcom_helper_datamanager2_save']) && isset($qf->_errors)) 
  • branches/MidCOM_2_8/midgard.admin.asgard/handler/type.php

    r15789 r15918  
    243243        if (isset($_GET['search'])) 
    244244        { 
    245            midgard_admin_asgard_plugin::get_default_mode(&$data); 
     245            midgard_admin_asgard_plugin::get_default_mode(&$data); 
    246246            $data['search_results'] = $this->_search($_GET['search']); 
    247247 
    248            //If there is exactly one result, go there directly 
     248            //If there is exactly one result, go there directly 
    249249            if (sizeof($data['search_results']) == 1) 
    250            { 
     250            { 
    251251                  $_MIDCOM->relocate('__mfa/asgard/object/' . $data['default_mode'] . '/' . $data['search_results'][0]->guid) . '/'; 
    252252                  //this will exit 
    253            } 
     253            } 
    254254            $_MIDCOM->add_jsfile(MIDCOM_STATIC_URL . '/jQuery/jquery.tablesorter.js'); 
    255255            $_MIDCOM->add_link_head 
  • branches/MidCOM_2_8/midgard.admin.asgard/navigation.php

    r15798 r15918  
    247247            echo "<a href=\"{$_MIDGARD['self']}__mfa/asgard/object/{$this->_request_data['default_mode']}/{$object->guid}/\" title=\"GUID: {$object->guid}, ID: {$object->id}\">{$icon}{$label}</a>\n"; 
    248248 
    249            /* If there is exactly one root object, show its children, since  
    250             * this is what the user most likely wants to reach 
    251             */ 
     249        /* If there is exactly one root object, show its children, since  
     250         * this is what the user most likely wants to reach 
     251         */ 
    252252            if ($selected || sizeof($root_objects) == 1) 
    253253            { 
  • branches/MidCOM_2_8/midgard.admin.asgard/style/midgard_admin_asgard_object_copy.php

    r15500 r15918  
    44$data['controller']->display_form(); 
    55?> 
    6  
  • branches/MidCOM_2_8/midgard.admin.asgard/style/midgard_admin_asgard_object_copytree.php

    r15563 r15918  
    2525echo preg_replace('/(<form.*?>)/i', '\1' . $tree_select, $form); 
    2626?> 
    27  
  • branches/MidCOM_2_8/org.routamc.positioning/cron/fetchfireeagle.php

    r15490 r15918  
    1 <?php 
     1<?php 
    22/** 
    33 * @package org.routamc.positioning 
  • branches/MidCOM_2_8/org.routamc.positioning/exec/test-fireeagle.php

    r15490 r15918  
    1 <?php 
     1<?php 
    22$_MIDCOM->auth->require_valid_user(); 
    33 
     
    1717{ 
    1818    $session = new midcom_service_session('org_routamc_positioning_fireeagle'); 
    19        if (   isset($_GET['f']) 
    20            && $_GET['f'] == 'start')  
    21        
    22                // get a request token + secret from FE and redirect to the authorization page 
     19    if (   isset($_GET['f']) 
     20        && $_GET['f'] == 'start')  
     21   
     22        // get a request token + secret from FE and redirect to the authorization page 
    2323        $fireeagle = new FireEagle($fireeagle_consumer_key, $fireeagle_consumer_secret); 
    2424        $request_token = $fireeagle->getRequestToken(); 
     
    3232         
    3333        // Save request token to session and redirect user 
    34                $session->set('auth_state', 'start'); 
    35                $session->set('request_token', $request_token['oauth_token']); 
    36                $session->set('request_secret', $request_token['oauth_token_secret']); 
    37                  
    38                ?> 
    39                <p><a href="<?php echo $fireeagle->getAuthorizeURL($request_token['oauth_token']); ?>" target="_blank">Authorize this application</a></p> 
    40                <p><a href="?f=callback">And then click here</a></p> 
    41                <?php 
     34        $session->set('auth_state', 'start'); 
     35        $session->set('request_token', $request_token['oauth_token']); 
     36        $session->set('request_secret', $request_token['oauth_token_secret']); 
     37         
     38        ?> 
     39        <p><a href="<?php echo $fireeagle->getAuthorizeURL($request_token['oauth_token']); ?>" target="_blank">Authorize this application</a></p> 
     40        <p><a href="?f=callback">And then click here</a></p> 
     41        <?php 
    4242        $_MIDCOM->finish(); 
    4343        die(); 
    44        }  
    45        elseif (   isset($_GET['f']) 
    46                && $_GET['f'] == 'callback') 
     44    }  
     45    elseif (   isset($_GET['f']) 
     46            && $_GET['f'] == 'callback') 
    4747    { 
    48                // the user has authorized us at FE, so now we can pick up our access token + secret 
    49                if (   !$session->exists('auth_state') 
    50                    || $session->get('auth_state') != 'start')  
    51                
    52                        die("Out of sequence."); 
    53                
     48        // the user has authorized us at FE, so now we can pick up our access token + secret 
     49        if (   !$session->exists('auth_state') 
     50            || $session->get('auth_state') != 'start')  
     51       
     52            die("Out of sequence."); 
     53       
    5454 
    5555        $fireeagle = new FireEagle($fireeagle_consumer_key, $fireeagle_consumer_secret, $session->get('request_token'), $session->get('request_secret')); 
  • branches/MidCOM_2_8/org.routamc.positioning/importer/fireeagle.php

    r15490 r15918  
    1 <?php 
     1<?php 
    22/** 
    33 * @package org.routamc.positioning 
  • branches/MidCOM_2_8/org.routamc.positioning/lib/fireeagle.php

    r15587 r15918  
    7474 
    7575  function __construct($consumerKey, 
    76                       $consumerSecret,  
    77                       $oAuthToken = null,  
    78                       $oAuthTokenSecret = null)  { 
     76               $consumerSecret,  
     77               $oAuthToken = null,  
     78               $oAuthTokenSecret = null)  { 
    7979    $this->sha1_method = new OAuthSignatureMethod_HMAC_SHA1(); 
    8080    $this->consumer = new OAuthConsumer($consumerKey, $consumerSecret, NULL); 
     
    152152      $r->user->best_guess = NULL; 
    153153      foreach ($r->user->location_hierarchy as &$loc) { 
    154        $c = $loc->geometry->coordinates; 
    155        switch ($loc->geometry->type) { 
    156        case 'Box': // DEPRECATED 
    157          $loc->bbox = $c; 
    158          $loc->latitude = ($c[0][0] + $c[1][0]) / 2; 
    159          $loc->longitude = ($c[0][1] + $c[1][1]) / 2; 
    160          $loc->geotype = 'box'; 
    161          break; 
    162        case 'Polygon': 
    163          $loc->bbox = $bbox = $loc->geometry->bbox; 
    164          $loc->latitude = ($bbox[0][0] + $bbox[1][0]) / 2; 
    165          $loc->longitude = ($bbox[0][1] + $bbox[1][1]) / 2; 
    166          $loc->geotype = 'box'; 
    167          break; 
    168        case 'Point': 
    169          list($loc->longitude, $loc->latitude) = $c; 
    170          $loc->geotype = 'point'; 
    171          break; 
    172        
    173        if ($loc->best_guess) $r->user->best_guess = $loc; // add shortcut to get 'best guess' loc 
    174        unset($loc); 
     154    $c = $loc->geometry->coordinates; 
     155    switch ($loc->geometry->type) { 
     156    case 'Box': // DEPRECATED 
     157      $loc->bbox = $c; 
     158      $loc->latitude = ($c[0][0] + $c[1][0]) / 2; 
     159      $loc->longitude = ($c[0][1] + $c[1][1]) / 2; 
     160      $loc->geotype = 'box'; 
     161      break; 
     162    case 'Polygon': 
     163      $loc->bbox = $bbox = $loc->geometry->bbox; 
     164      $loc->latitude = ($bbox[0][0] + $bbox[1][0]) / 2; 
     165      $loc->longitude = ($bbox[0][1] + $bbox[1][1]) / 2; 
     166      $loc->geotype = 'box'; 
     167      break; 
     168    case 'Point': 
     169      list($loc->longitude, $loc->latitude) = $c; 
     170      $loc->geotype = 'point'; 
     171      break; 
     172   
     173    if ($loc->best_guess) $r->user->best_guess = $loc; // add shortcut to get 'best guess' loc 
     174    unset($loc); 
    175175      } 
    176176    } 
     
    254254      $url_bits = parse_url($url); 
    255255      if (isset($postData)) { 
    256        self::dump("POST ".$url_bits['path']." HTTP/1.0\nHost: ".$url_bits['host']."\nContent-Type: application/x-www-urlencoded\nContent-Length: ".strlen($postData)."\n\n$postData\n"); 
     256    self::dump("POST ".$url_bits['path']." HTTP/1.0\nHost: ".$url_bits['host']."\nContent-Type: application/x-www-urlencoded\nContent-Length: ".strlen($postData)."\n\n$postData\n"); 
    257257      } else { 
    258        $get_url = $url_bits['path']; 
    259        if ($url_bits['query']) $get_url .= '?' . $url_bits['query']; 
    260        self::dump("GET $get_url HTTP/1.0\nHost: ".$url_bits['host']."\n\n"); 
     258    $get_url = $url_bits['path']; 
     259    if ($url_bits['query']) $get_url .= '?' . $url_bits['query']; 
     260    self::dump("GET $get_url HTTP/1.0\nHost: ".$url_bits['host']."\n\n"); 
    261261      } 
    262262    }