6.0.0-alpha14
6/30/25

[#7105] Warning displayed on column options page
Summary Warning displayed on column options page
Queue Turba
Queue Version 2.2.1
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester dion.rowney (at) usask (dot) ca
Created 07/23/2008 (6186 days ago)
Due
Updated 07/23/2008 (6186 days ago)
Assigned
Resolved 07/23/2008 (6186 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
07/23/2008 10:39:28 PM Michael Rubinsky Comment #2
State ⇒ Not A Bug
Reply to this comment
07/23/2008 10:24:11 PM dion (dot) rowney (at) usask (dot) ca Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Warning displayed on column options page
Queue ⇒ Turba
Milestone ⇒
Patch ⇒ No
Reply to this comment
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>>}

Saved Queries