[Tickets #7105] Warning displayed on column options page

bugs at horde.org bugs at horde.org
Wed Jul 23 22:24:13 UTC 2008


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/7105
------------------------------------------------------------------------------
  Ticket             | 7105
  Created By         | dion.rowney at usask.ca
  Summary            | Warning displayed on column options page
  Queue              | Turba
  Version            | 2.2.1
  Type               | Bug
  State              | Unconfirmed
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


dion.rowney at usask.ca (2008-07-23 18:24) wrote:

The following warning appears on the config page:

horde/turba/templates/prefs/columnselect.inc


Drag columns to re-arrange them. Check a column to enable it.

       Warning: Invalid argument supplied for foreach() in  
/var/www/html/horde/turba/templates/prefs/columnselect.inc on line 64
    1. First Name
    2. Last Name
    3. Middle Names
etc...

To resolve I added a check in my code and submit it for your consideration:

// First the selected columns in their current order.
>> add>> if ( isset ( $sources[$source] ) ) {
foreach ($sources[$source] as $column) {
     if (substr($column, 0, 2) == '__' || $column == 'name') {
         continue;
     }
     $checked = isset($selected[$column]) ? ' checked="checked"' : '';
     $name = htmlspecialchars('turba-prefs-cols-' . $source . '-' . $column);
     echo '<li id="turba-prefs-cols-' . htmlspecialchars($source) .  
'_' . $i . '"><input name="' . $name . '" id="' . $name . '"  
type="checkbox" class="check
box"' . $checked . ' />' .  
htmlspecialchars($attributes[$column]['label']) . '</li>';
     $i++;
}
>> add>>}






More information about the bugs mailing list