trailing spaces
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Thu, 28 Apr 2022 08:11:59 +0000 (10:11 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Thu, 28 Apr 2022 08:11:59 +0000 (10:11 +0200)
planetlab/includes/plc_peers.php
planetlab/includes/plc_session.php
planetlab/includes/plc_visibletags2.php
plekit/php/columns.php
plekit/php/datepicker.php
plekit/php/details.php
plekit/php/form.php
plekit/php/table.php
plekit/php/table2.php
plekit/php/toggle.php
plekit/php/tophat_api.php

index a4a4dda..b64a391 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-  
+
   // $Id$
 
 require_once 'plc_functions.php';
@@ -32,7 +32,7 @@ class Peers {
   }
 
   function peer ($peer_id) {
-    // use the fake local entry 
+    // use the fake local entry
     if (!$peer_id)
       $peer_id='local';
     return $this->hash[$peer_id];
@@ -55,7 +55,7 @@ class Peers {
       $result = "[local] " . $result;
     return $result;
   }
-  
+
   public function link ($peer_id,$text) {
     if (! $peer_id)
       return href("/",$text);
@@ -74,7 +74,7 @@ class Peers {
     $shortname=strtolower($this->shortname($peer_id));
     return "peer-$shortname";
   }
-  
+
   function block_start ($peer_id) {
     // start a <div> element with 2 classes:
     // (1) generic:  is either peer-local or peer-foreign
@@ -82,7 +82,7 @@ class Peers {
     // e.g. at PLE we'd get <div class='peer-local peer-ple'>
     // or                  <div class='peer-local peer-plc'>
     // see plc_styles.css for how to have the more specific ones override the generic one
-    if ( ! $peer_id ) 
+    if ( ! $peer_id )
       $generic='peer-local';
     else
       $generic='peer-foreign';
@@ -95,14 +95,14 @@ class Peers {
     print "</div>\n";
   }
 
-  // writes a cell in the table with the peer's shortname, link to the peer page, 
+  // writes a cell in the table with the peer's shortname, link to the peer page,
   // and classname set for proper color
   function cell ($table, $peer_id) {
     $shortname=$this->shortname($peer_id);
     $table->cell ($this->link($peer_id,$shortname),
                  array('class'=>$this->classname($peer_id)));
   }
-  
+
 }
 
 ////////////////////////////////////////////////////////////
index 7850d86..ebdc050 100644 (file)
@@ -79,7 +79,7 @@ class PLCSession
       $_SESSION['plc'] = array('auth' => $api->auth,
                               'person' => $person,
                               'expires' => $expires);
-     } 
+     }
     }
 
     function BecomePerson($person_id)
@@ -87,12 +87,12 @@ class PLCSession
        list($person) = $this->api->GetPersons(array($person_id));
        if ($person)
        {
-           //Get this users session if one exists, create 
+           //Get this users session if one exists, create
            //one otherwise
            list($session) = $this->api->GetSessions(array('person_id' => $person['person_id']));
            if (!$session)
            {
-               $session = $this->api->AddSession($person['person_id']);        
+               $session = $this->api->AddSession($person['person_id']);
            }
            else
            {
@@ -112,12 +112,12 @@ class PLCSession
            $_SESSION['plc']['person'] = $this->person;
            $_SESSION['plc']['alt_person'] = $this->alt_person;
             $_SESSION['plc']['alt_auth'] = $this->alt_auth;
-           
-       }       
+
+       }
     }
 
     function BecomeSelf()
-    {  
+    {
        if($this->alt_auth && $this->alt_person )
        {
            $this->person = $this->alt_person;
@@ -129,9 +129,9 @@ class PLCSession
            $_SESSION['plc']['person'] = $_SESSION['plc']['alt_person'];
            unset($_SESSION['plc']['alt_auth']);
             unset($_SESSION['plc']['alt_person']);
-       } 
+       }
     }
-  
+
 
   function logout()
   {
index 8bcdb81..8cdc1d9 100644 (file)
@@ -3,7 +3,7 @@
   // $Id: plc_functions.php 15734 2009-11-13 10:52:31Z thierry $
 
   // utility function for displaying extra columns based on tags and categories
-  // expected type is e.g. 'node' 
+  // expected type is e.g. 'node'
 
 class VisibleTags {
   var $api;
@@ -14,16 +14,16 @@ class VisibleTags {
     $this->type=$type;
     $this->columns=NULL;
   }
-  
+
   // returns an ordered set of columns - compute only once
   function columns () {
     # if cached
-    if ($this->columns != NULL) 
+    if ($this->columns != NULL)
       return $this->columns;
 
     // scan tag types to find relevant additional columns
     $tag_types = $this->api->GetTagTypes(array('category'=>"$type*/ui*"));
-    
+
     $columns = array();
     foreach ($tag_types as $tag_type) {
       $tagname=$tag_type['tagname'];
@@ -38,12 +38,12 @@ class VisibleTags {
       $category_tokens=explode('/',$tag_type['category']);
       foreach ($category_tokens as $token) {
        $assign=explode('=',$token);
-       if (count($assign)==2) 
+       if (count($assign)==2)
          $column[$assign[0]]=$assign[1];
       }
       $columns []= $column;
     }
-    
+
     // sort upon 'rank'
     usort ($columns, create_function('$col1,$col2','return strcmp($col1["header"],$col2["header"]);'));
 
@@ -58,7 +58,7 @@ class VisibleTags {
   function column_names () {
     return array_map(create_function('$tt','return $tt["tagname"];'),$this->columns());
   }
-  
+
   // to add with array_merge to the headers part of the Plekit Table
   function headers () {
     $headers=array();
@@ -76,7 +76,7 @@ class VisibleTags {
        $headers[$headerId]=array('header'=>$column['header'],'headerId'=>$headerId, 'type'=>$column['type'],'tagname'=>$column['tagname'],'title'=>$column['description']);
        }
     /*
-      if ($column['header'] == $column['tagname']) 
+      if ($column['header'] == $column['tagname'])
        $headers[$column['header']]=$column['type'];
       else
        $headers[$column['header']]=array('type'=>$column['type'],'title'=>$column['description']);
@@ -89,7 +89,7 @@ class VisibleTags {
     $notes=array();
     $columns=$this->columns();
     foreach ($columns as $column)
-      if ($column['header'] != $column['tagname']) 
+      if ($column['header'] != $column['tagname'])
        $notes []= strtoupper($column['header']) . ' = ' . $column['description'];
     return $notes;
   }
index e75e4b4..736d09c 100644 (file)
@@ -80,7 +80,7 @@ $tmp_headers[$headerId]=array('header'=>$headerId,'type'=>$column['type'],'tagna
 
 usort ($tmp_headers, create_function('$col1,$col2','return strcmp($col1["label"],$col2["label"]);'));
 
-foreach ($tmp_headers as $t) 
+foreach ($tmp_headers as $t)
 $this->all_headers[$t['header']] = $t;
 
 //$this->all_headers = array_merge($this->all_headers, $tmp_headers);
@@ -108,13 +108,13 @@ else if ($this->all_headers[$label."y"]['visible'])
        return "y";
 else if ($this->all_headers[$label]['visible'])
        return "";
-       
+
 return "";
 }
 
 function node_tags() {
 
-       $fetched_tags = array('node_id','hostname');    
+       $fetched_tags = array('node_id','hostname');
 
        foreach ($this->all_headers as $h)
        {
@@ -127,7 +127,7 @@ function node_tags() {
 
 function print_headers() {
 
-       $headers = "";  
+       $headers = "";
 
        foreach ($this->all_headers as $l => $h)
        {
@@ -138,7 +138,7 @@ function print_headers() {
 
 function get_visible() {
 
-       $visibleHeaders = array();      
+       $visibleHeaders = array();
 
        foreach ($this->all_headers as $h)
        {
@@ -197,7 +197,7 @@ function parse_configuration($column_configuration) {
 }
 
 
-               
+
 
 
 /*
@@ -216,15 +216,15 @@ function convert_data($value, $data_type) {
        if ($data_type == "string")
                return $value;
 
-       if ($data_type == "date") 
+       if ($data_type == "date")
                return date("Y-m-d", $value);
 
-       if ($data_type == "uptime") 
+       if ($data_type == "uptime")
                return (int)((int) $value / 86400);
 
        if (is_numeric($value))
                return ((int) ($value * 10))/10;
-       
+
        return $value;
 
 }
@@ -286,7 +286,7 @@ function getTopHatData($data, $planetlab_nodes) {
        $requested_data = explode(",", $data);
 
        $r = array ('hostname');
-       
+
        foreach ($requested_data as $rd)
                if ($rd) $r[] = $rd;
 
@@ -362,7 +362,7 @@ function fetch_live_data($all_nodes) {
 
 //comon data
        if ($this->comon_live_data != "") {
-       
+
                //print ("live data to be fetched =".$this->comon_live_data);
                $this->ComonData= $this->comon_query_nodes($this->comon_live_data);
                //print_r($this->ComonData);
@@ -392,7 +392,7 @@ function cells($table, $node) {
 
 foreach ($this->all_headers as $h) {
 
-if (!$h['fixed']) { 
+if (!$h['fixed']) {
 
 if ($h['visible'] != "") {
 
@@ -425,7 +425,7 @@ else
        //$node_string.= "\"".$value."\",";
 }
 }
-else 
+else
        if ($node[$h['tagname']])
        {
                $value = $this->convert_data($node[$h['tagname']], $h['type']);
@@ -552,7 +552,7 @@ print ("<table>");
 <input type='hidden' id='source".$h['label']."' value='".$h['source']."'></input>
                <div id='".$h['label']."' name='columnlist' class='".$optionclass."' onclick='highlightOption(this.id)'>
 <table class='columnlist' id='table".$h['label']."'><tr>
-<td class='header'><span class='header'>".$h['label']."</span></td> 
+<td class='header'><span class='header'>".$h['label']."</span></td>
 <td align=left>&nbsp;<span class='short' id ='htitle".$h['label']."'>".$h['title']."</span>&nbsp;</td>
 <td class='smallright'>&nbsp;<span class='short' id ='loading".$h['label']."'></span>&nbsp;</td>
 <td class='smallright'><input id='check".$h['label']."' name='".$h['tagname']."' type='checkbox' ".$selected." ".$disabled." autocomplete='off' value='".$h['label']."' onclick='changeCheckStatus(this.id)'></input></td>
@@ -596,9 +596,9 @@ EOF;
 
   function column_html ($colHeader, $colName, $colId, $fulldesc, $visible) {
 
-       if ($visible) 
+       if ($visible)
                $display = 'display:table-cell';
-       else 
+       else
                $display = 'color:red;display:none';
 
     return "
index 9460e8b..b6b6c8e 100644 (file)
@@ -27,7 +27,7 @@ class PlekitDatepicker {
     $this->id=$id;
     $this->display=$display;
     $this->options=array_merge($datepicker_default_options,$options);
-    
+
   }
 
   function html () {
index 72d1f6a..a3705a6 100644 (file)
@@ -12,7 +12,7 @@ drupal_set_html_head('
 // fieldname=>value
 // and we add in-line editing capabilities
 
-// $editable : if not set, no edition will be allowed in the table 
+// $editable : if not set, no edition will be allowed in the table
 //   this is typically set to false when user does not have write access
 // then each individual th_td provides its form_varname if and only iff edition is desired
 
@@ -23,11 +23,11 @@ drupal_set_html_head('
 // xxx todo : accept optional arguments as an options hash, rather than using the set_ methods which are ugly
 
 class PlekitDetails {
-  
+
   var $editable;
   var $form;
   // various options for the editing area
-  // set manually 
+  // set manually
   var $width;
   var $height;
   var $input_type;
@@ -101,7 +101,7 @@ class PlekitDetails {
     return $old;
   }
 
-  // give a form_varname if the field can be edited 
+  // give a form_varname if the field can be edited
   function th_td ($title,$value,$form_varname="",$options=NULL) {
     print $this->th_td_html ($title,$value,$form_varname,$options);
   }
@@ -109,11 +109,11 @@ class PlekitDetails {
     if (!$options) $options = array();
     if ( ! ($this->editable && $form_varname) ) {
       // xxx hack: if input_type is select, look for the 'value' option to display current value
-      if ($options['input_type'] == "select") 
+      if ($options['input_type'] == "select")
        $value=$options['value'];
       return "<tr><th>$title</th><td>$value</td></tr>";
     } else {
-      // use options if provided, otherwise the latest set_ function 
+      // use options if provided, otherwise the latest set_ function
       if (array_key_exists('input_type',$options)) $input_type=$options['input_type'];
       else $input_type=$this->input_type;
       if (array_key_exists('width',$options)) $width=$options['width'];
@@ -133,7 +133,7 @@ class PlekitDetails {
        if ($height) $html .= " rows=$height";
        $html .= ">$value</textarea>";
       } else {
-       // set id too 
+       // set id too
        $html .= "<input type='$input_type' name='$form_varname' id='$form_varname' value='$value'";
        if ($width) $html .= " size='$width'";
        // handle event callbacks
@@ -151,7 +151,7 @@ class PlekitDetails {
     return $this->th_td_html($title,plc_vertical_table($list,"foo"));
   }
 
-  // only for special cases, not editable 
+  // only for special cases, not editable
   function th_th ($th1,$th2) { print $this->th_th_html ($th1, $th2);}
   function th_th_html ($th1, $th2) {
     return "<tr><th>$th1</th><th>$th2</th></tr>";
@@ -165,7 +165,7 @@ class PlekitDetails {
     $result .=">$title</td></tr>";
     return $result;
   }
-  
+
   // a dummy line for getting some air
   function space () { print $this->space_html(); }
   function space_html () { return "<tr><td colspan='2'>&nbsp;</td></tr>\n"; }
index 6436172..b5aa2de 100644 (file)
@@ -18,13 +18,13 @@ class PlekitForm {
 
   function __construct ($full_url, $values, $options=NULL) {
     // so we can use the various l_* functions:
-    // we parse the url to extract var-values pairs, 
+    // we parse the url to extract var-values pairs,
     // and add them to the 'values' argument if any
 
     // extract var=value settings from url if any
     $split=plekit_split_url($full_url);
     $this->url=$split['url'];
-    
+
     $url_values=$split['values'];
     if ( ! $values ) $values = array();
     if ( $url_values ) $values=array_merge($values,$url_values);
@@ -42,8 +42,8 @@ class PlekitForm {
     if ($this->onSubmit) $html .= " onSubmit='$this->onSubmit'";
     if ($this->onReset) $html .= " onReset='$this->onReset'";
     $html .= ">";
-    if ($this->values) 
-      foreach ($this->values as $key=>$value) 
+    if ($this->values)
+      foreach ($this->values as $key=>$value)
        $html .= $this->hidden_html($key,$value);
     return $html;
   }
@@ -54,12 +54,12 @@ class PlekitForm {
   static function attributes ($options) {
     $html="";
     $names=array('id','size','selected', 'checked',
-                'onfocus','onselect', 'onchange', 
+                'onfocus','onselect', 'onchange',
                 'onkeyup', 'onmouseup', 'onclick', 'onsubmit');
     if ($options['selected']) $options['selected']='selected';
     if ($options['checked']) $options['checked']='checked';
     if ($options) foreach ($options as $key=>$value) {
-       if (in_array(strtolower($key),$names)) 
+       if (in_array(strtolower($key),$names))
          $html .= " $key='$value'";
       }
     return $html;
@@ -91,9 +91,9 @@ class PlekitForm {
   static function textarea_html ($name,$value,$cols,$rows) {
     return "<textarea name='$name' cols='$cols' rows='$rows'>$value</textarea>";
   }
+
   // selectors is an array of hashes with the following keys
-  // (*) display 
+  // (*) display
   // (*) value : the value that the 'name' variable will be assigned
   // (*) optional 'selected': the entry selected initially
   // (*) optional 'disabled': the entry is displayed but not selectable
@@ -144,7 +144,7 @@ class PlekitForm {
     } else {
       foreach ($roles as $role) {
        $selector=role_selector($role);
-       if ($role['role_id'] == $current_id) 
+       if ($role['role_id'] == $current_id)
            $selector['selected']=true;
        $selectors []= $selector;
       }
@@ -156,7 +156,7 @@ class PlekitForm {
 
 // a form with a single button
 class PlekitFormButton extends PlekitForm {
-  
+
   var $button_id;
   var $button_text;
 
@@ -167,8 +167,8 @@ class PlekitFormButton extends PlekitForm {
   }
 
   function html () {
-    return 
-      $this->start_html() . 
+    return
+      $this->start_html() .
       $this->submit_html($this->button_id,$this->button_text).
       $this->end_html();
   }
index 2e75dac..0a21c40 100644 (file)
@@ -16,7 +16,7 @@ drupal_set_html_head('
 ////////////////////////////////////////
 // table_id: <table>'s id tag - WARNING : do not use '-' in table ids as it's used for generating javascript code
 // headers: an associative array; the values can take several forms
-//      simple/legacy form is "label"=>"type" 
+//      simple/legacy form is "label"=>"type"
 //      more advanced form is "label"=>options, it self a dict with the following known keys
 //         (*) 'type': the type for sorting; this is passed to the javascript layer for custom sorting
 //             default is to use 'text', custom sort functions can be specified with e.g. 'type'=>'sortAlphaNumericBottom'
@@ -24,7 +24,7 @@ drupal_set_html_head('
 //             setting type to 'none' gives an non-sortable column
 //        (*) 'title': if set, this is used in the "Sort on ``<title>''" bubble
 // sort_column: the column to sort on at load-time - set to negative number for no onload- sorting
-// options : an associative array to override options 
+// options : an associative array to override options
 //  - bullets1 : set to true if you want decorative bullets in column 1 (need white background)
 //  - stripes : use diferent colors for odd and even rows
 //  - caption : a caption for the table -- never used I'm afraid
@@ -117,7 +117,7 @@ class PlekitTable {
 
     // instantiate paginator callback
     print "<script type='text/javascript'> function $paginator (opts) { plekit_table_paginator (opts,'$this->table_id'); } </script>\n";
-    
+
     // instantiate debug hooks if needed
     if ($this->debug) {
       $cb_init = $this->table_id."_init";
@@ -132,10 +132,10 @@ class PlekitTable {
 
     if ($this->pagesize_area)
       print $this->pagesize_area_html ();
-    if ($this->search_area) 
+    if ($this->search_area)
       print $this->search_area_html ();
-    
-    if ($this->caption) 
+
+    if ($this->caption)
       print "<caption> $this->caption </caption>";
     print "<tr>";
     foreach ($this->headers as $label => $colspec) {
@@ -149,7 +149,7 @@ class PlekitTable {
        $title=NULL;
       }
       switch ($type) {
-      case "none" : 
+      case "none" :
        $class=""; break;
       case "string": case "int": case "float":
        $class="sortable"; break;
@@ -167,15 +167,15 @@ class PlekitTable {
 
   ////////////////////
   // for convenience, the options that apply to the bottom area can be passed here
-  // typically notes will add up to the ones provided so far, and to the default ones 
+  // typically notes will add up to the ones provided so far, and to the default ones
   // xxx default should be used only if applicable
   function end ($options=NULL) {
     $this->set_options($options);
     print $this->bottom_html();
-    if ($this->notes_area) 
+    if ($this->notes_area)
       print $this->notes_area_html();
   }
-                   
+
   ////////////////////
   function pagesize_area_html () {
     $width=count($this->headers);
@@ -184,9 +184,9 @@ class PlekitTable {
 <tr class='pagesize_area'><td class='pagesize_area' colspan='$width'>
 <form class='pagesize' action='satisfy_xhtml_validator'><fieldset>
    <input class='pagesize_input' type='text' id="$pagesize_text_id" value='$this->pagesize'
-      onkeyup='plekit_pagesize_set("$this->table_id","$pagesize_text_id", $this->pagesize);' 
-      size='3' maxlength='4' /> 
-  <label class='pagesize_label'> items/page </label>   
+      onkeyup='plekit_pagesize_set("$this->table_id","$pagesize_text_id", $this->pagesize);'
+      size='3' maxlength='4' />
+  <label class='pagesize_label'> items/page </label>
   <img class='reset' src="/planetlab/icons/clear.png" alt="reset visible size"
       onmousedown='plekit_pagesize_reset("$this->table_id","$pagesize_text_id",$this->pagesize_def);' />
 </fieldset></form></td></tr>
@@ -203,13 +203,13 @@ EOF;
     $result = <<< EOF
 <tr class='search_area'><td class='search_area' colspan='$width'>
 <div class='search'><fieldset>
-   <label class='search_label'> Search </label> 
+   <label class='search_label'> Search </label>
    <input class='search_input' type='text' id='$search_text_id'
       onkeyup='plekit_table_filter("$this->table_id","$search_text_id","$search_and_id");'
       size='$this->search_width' maxlength='256' />
    <label>and</label>
-   <input id='$search_and_id' class='search_and' 
-      type='checkbox' checked='checked' 
+   <input id='$search_and_id' class='search_and'
+      type='checkbox' checked='checked'
       onchange='plekit_table_filter("$this->table_id","$search_text_id","$search_and_id");' />
    <img class='reset' src="/planetlab/icons/clear.png" alt="reset search"
       onmousedown='plekit_table_filter_reset("$this->table_id","$search_text_id","$search_and_id");' />
@@ -238,9 +238,9 @@ EOF;
 
   ////////////////////////////////////////
   function notes_area_html () {
-    $search_notes =  
+    $search_notes =
       array("Enter &amp; or | in the search area to switch between <span class='bold'>AND</span> and <span class='bold'>OR</span> search modes");
-    $sort_notes = 
+    $sort_notes =
       array ("Hold down the shift key to select multiple columns to sort");
 
     if ($this->notes)
@@ -254,7 +254,7 @@ EOF;
       return "";
     $result = "";
     $result .= "<p class='table_note'> <span class='table_note_title'>Notes</span>\n";
-    foreach ($notes as $note) 
+    foreach ($notes as $note)
       $result .= "<br/>$note\n";
     $result .= "</p>";
     return $result;
index d3b6849..a8a69de 100644 (file)
@@ -16,7 +16,7 @@ drupal_set_html_head('
 ////////////////////////////////////////
 // table_id: <table>'s id tag - WARNING : do not use '-' in table ids as it's used for generating javascript code
 // headers: an associative array; the values can take several forms
-//      simple/legacy form is "label"=>"type" 
+//      simple/legacy form is "label"=>"type"
 //      more advanced form is "label"=>options, it self a dict with the following known keys
 //         (*) 'type': the type for sorting; this is passed to the javascript layer for custom sorting
 //             default is to use 'text', custom sort functions can be specified with e.g. 'type'=>'sortAlphaNumericBottom'
@@ -24,7 +24,7 @@ drupal_set_html_head('
 //             setting type to 'none' gives an non-sortable column
 //        (*) 'title': if set, this is used in the "Sort on ``<title>''" bubble
 // sort_column: the column to sort on at load-time - set to negative number for no onload- sorting
-// options : an associative array to override options 
+// options : an associative array to override options
 //  - bullets1 : set to true if you want decorative bullets in column 1 (need white background)
 //  - stripes : use diferent colors for odd and even rows
 //  - caption : a caption for the table -- never used I'm afraid
@@ -120,7 +120,7 @@ class PlekitTable {
 
     // instantiate paginator callback
     print "<script type='text/javascript'> function $paginator (opts) { plekit_table_paginator (opts,'$this->table_id'); } </script>\n";
-    
+
     // instantiate debug hooks if needed
     if ($this->debug) {
       $cb_init = $this->table_id."_init";
@@ -135,10 +135,10 @@ class PlekitTable {
 
     if ($this->pagesize_area)
       print $this->pagesize_area_html ();
-    if ($this->search_area) 
+    if ($this->search_area)
       print $this->search_area_html ();
-    
-    if ($this->caption) 
+
+    if ($this->caption)
       print "<caption> $this->caption </caption>";
     print "<tr>";
 
@@ -168,7 +168,7 @@ if ($this->configurable)
        }
       }
       switch ($type) {
-      case "none" : 
+      case "none" :
        $class=""; break;
       case "string": case "int": case "float":
        $class="sortable"; break;
@@ -193,15 +193,15 @@ if ($this->configurable)
 
   ////////////////////
   // for convenience, the options that apply to the bottom area can be passed here
-  // typically notes will add up to the ones provided so far, and to the default ones 
+  // typically notes will add up to the ones provided so far, and to the default ones
   // xxx default should be used only if applicable
   function end ($options=NULL) {
     $this->set_options($options);
     print $this->bottom_html();
-    if ($this->notes_area) 
+    if ($this->notes_area)
       print $this->notes_area_html();
   }
-                   
+
   ////////////////////
   function pagesize_area_html () {
     $width=count($this->headers);
@@ -210,9 +210,9 @@ if ($this->configurable)
 <tr class='pagesize_area'><td class='pagesize_area' colspan='$width'>
 <form class='pagesize' action='satisfy_xhtml_validator'><fieldset>
    <input class='pagesize_input' type='text' id="$pagesize_text_id" value='$this->pagesize'
-      onkeyup='plekit_pagesize_set("$this->table_id","$pagesize_text_id", $this->pagesize);' 
-      size='3' maxlength='4' /> 
-  <label class='pagesize_label'> items/page </label>   
+      onkeyup='plekit_pagesize_set("$this->table_id","$pagesize_text_id", $this->pagesize);'
+      size='3' maxlength='4' />
+  <label class='pagesize_label'> items/page </label>
   <img class='reset' src="/planetlab/icons/clear.png" alt="reset visible size"
       onmousedown='plekit_pagesize_reset("$this->table_id","$pagesize_text_id",$this->pagesize_def);' />
 </fieldset></form></td></tr>
@@ -229,13 +229,13 @@ EOF;
     $result = <<< EOF
 <tr class='search_area'><td class='search_area' colspan='$width'>
 <div class='search'><fieldset>
-   <label class='search_label'> Search </label> 
+   <label class='search_label'> Search </label>
    <input class='search_input' type='text' id='$search_text_id'
       onkeyup='plekit_table_filter("$this->table_id","$search_text_id","$search_and_id");'
       size='$this->search_width' maxlength='256' />
    <label>and</label>
-   <input id='$search_and_id' class='search_and' 
-      type='checkbox' checked='checked' 
+   <input id='$search_and_id' class='search_and'
+      type='checkbox' checked='checked'
       onchange='plekit_table_filter("$this->table_id","$search_text_id","$search_and_id");' />
    <img class='reset' src="/planetlab/icons/clear.png" alt="reset search"
       onmousedown='plekit_table_filter_reset("$this->table_id","$search_text_id","$search_and_id");' />
@@ -264,9 +264,9 @@ EOF;
 
   ////////////////////////////////////////
   function notes_area_html () {
-    $search_notes =  
+    $search_notes =
       array("Enter &amp; or | in the search area to switch between <span class='bold'>AND</span> and <span class='bold'>OR</span> search modes");
-    $sort_notes = 
+    $sort_notes =
       array ("Hold down the shift key to select multiple columns to sort");
 
     if ($this->notes)
@@ -280,7 +280,7 @@ EOF;
       return "";
     $result = "";
     $result .= "<p class='table_note'> <span class='table_note_title'>Notes</span>\n";
-    foreach ($notes as $note) 
+    foreach ($notes as $note)
       $result .= "<br/>$note\n";
     $result .= "</p>";
     return $result;
index 014be9e..fbe8ff9 100644 (file)
@@ -14,8 +14,8 @@ drupal_set_html_head('
 // (*) area is what gets hidden and shown
 // (*) trigger is the area that can be clicked for toggling
 // (*) image contains a visual indication of the current status
-// 
-// constructor needs 
+//
+// constructor needs
 // (*) id:     an 'id', used for naming the three parts
 // (*) trigger:        the html text for the trigger
 // (*) options:        a hash that can define
@@ -24,11 +24,11 @@ drupal_set_html_head('
 //     - visible : if set to false, start hidden rather than visible
 //     - info-text : the text for help on the tab
 //     - info-visible : whether info needs to be visible at startup
-// 
+//
 // methods are as follows
 // (*) trigger_html ():        return the html code for the trigger
 // (*) image_html ():  returns the html code for the image
-// (*) area_start ():  because we have too many places where php 'prints' code: instead 
+// (*) area_start ():  because we have too many places where php 'prints' code: instead
 // (*) area_end():       of returning it, we do not expect the code for the area to be passed
 //                       so these methods can be used to delimit the area in question
 
@@ -43,7 +43,7 @@ class PlekitToggle {
     if ( ! $options ) $options = array();
     // 'visible' may be set or not; if set to NULL it's considered as undefined
     // so using NULL as the default means 'select from local storage i.e. last status'
-    if (array_key_exists ('visible',$options) && $options['visible']==NULL) 
+    if (array_key_exists ('visible',$options) && $options['visible']==NULL)
       unset ($options['visible']);
     // start-hidden is internal and is always set
     if (array_key_exists ('visible',$options)) {
@@ -111,7 +111,7 @@ class PlekitToggle {
     if (empty($tagname)) $tagname="span";
     $bubble="";
     if (array_key_exists ('bubble',$this->options)) $bubble=$this->options['bubble'];
-    
+
     $html="<$tagname";
     $html .= " id='$trigger_id'";
     $html .= " class='plc-toggle-trigger'";
@@ -136,7 +136,7 @@ class PlekitToggle {
     // xxx in fact the default should be fetched in the browser storage xxx
     $info_visible=TRUE;
     // if info-visible is set, use this value
-    if (array_key_exists ('info-visible',$this->options)) 
+    if (array_key_exists ('info-visible',$this->options))
       $info_visible=$this->options['info-visible'];
 
     $id=$this->id;
@@ -153,7 +153,7 @@ class PlekitToggle {
     $html .= "</td></tr></table></div>";
     return $html;
   }
-    
+
 
   function area_start () { print $this->area_start_html(); }
   function area_start_html () {
@@ -174,7 +174,7 @@ class PlekitToggle {
 
   /* if desired, you can embed the whole (trigger+area) in another div for visual effects */
   function container_start ()          { print $this->container_start_html(); }
-  function container_start_html ()     { 
+  function container_start_html ()     {
     $id=$this->id_name('container');
     $this->nifty=new PlekitNifty ($id,'plc-toggle-container','medium');
     return $this->nifty->start_html();
@@ -188,4 +188,4 @@ class PlekitToggle {
 
 }
 
-?>    
+?>
index 4e690c5..82ee932 100644 (file)
@@ -165,12 +165,12 @@ class TopHatAPI
             $this->error_log('Fault Code ' . $result['faultCode'] . ': ' .
                              $result['faultString'], 1, true);
             $ret[] = NULL;
-           // Thierry - march 30 2007 
-           // using $adm->error() is broken with begin/commit style 
+           // Thierry - march 30 2007
+           // using $adm->error() is broken with begin/commit style
            // this is because error() uses last item in trace and checks for ['errors']
-           // when using begin/commit we do run internal_call BUT internal_call checks for 
+           // when using begin/commit we do run internal_call BUT internal_call checks for
            // multicall's result globally, not individual results, so ['errors'] comes empty
-           // I considered hacking internal_call 
+           // I considered hacking internal_call
            // to *NOT* maintain this->trace at all when invoked with multicall
            // but it is too complex to get all values right
            // so let's go for the hacky way, and just record individual errors at the right place
@@ -240,36 +240,36 @@ class TopHatAPI
 
   // Returns a new session key if a user or node authenticated
   // successfully, faults otherwise.
-  
+
   function GetSession ()
   {
     $args[] = $this->auth;
     return $this->call('GetSession', $args);
   }
-  
+
   // Returns an array of structs containing details about users sessions. If
   // session_filter is specified and is an array of user identifiers or
   // session_keys, or a struct of session attributes, only sessions matching the
   // filter will be returned. If return_fields is specified, only the
   // specified details will be returned.
-  
+
   function GetSessions ($session_filter = NULL)
   {
     $args[] = $this->auth;
     if (func_num_args() > 0) $args[] = $session_filter;
     return $this->call('GetSessions', $args);
   }
-  
+
   // Returns an array of structs containing details about users. If
   // person_filter is specified and is an array of user identifiers or
   // usernames, or a struct of user attributes, only users matching the
   // filter will be returned. If return_fields is specified, only the
   // specified details will be returned.
-  // 
+  //
   // Users and techs may only retrieve details about themselves. PIs
   // may retrieve details about themselves and others at their
   // sites. Admins and nodes may retrieve details about all accounts.
-  
+
   function GetPersons ($person_filter = NULL, $return_fields = NULL)
   {
     $args[] = $this->auth;
@@ -277,10 +277,10 @@ class TopHatAPI
     if (func_num_args() > 1) $args[] = $return_fields;
     return $this->call('GetPersons', $args);
   }
-  
+
   // Returns 1 if the user or node authenticated successfully, faults
   // otherwise.
-  
+
   function AuthCheck ()
   {
     $args[] = $this->auth;