Modified events table to filter properly by event and handle URLs properly

Slight change in tableeditor to allow it to properly filter a value of zero (not treating it as null)
This commit is contained in:
jacob 2010-06-14 19:43:10 +00:00
parent e98ec8751b
commit f090e957c6
3 changed files with 4 additions and 2 deletions

View File

@ -44,7 +44,7 @@ $editor = new TableEditor('events',
"name" => "Event Name",
"eventtype" => "Type",
"summary" => "Summary",
"description_link" => "Link to Description",
"website" => "Link to Description",
"suggested_grades" => "Suggested Grades",
"min_judges" => "Minimum Number of Judges",
"max_judges" => "Maximum Number of Judges"
@ -63,6 +63,7 @@ $editor->setFieldOptions("eventtype",$eventtypes);
$editor->setPrimaryKey("id");
$editor->setRecordType("Event");
$editor->setDefaultSortField("name");
$editor->filterList("conferences_id", $conference['id']);
$editor->execute();
send_footer();

1
db/db.update.182.sql Normal file
View File

@ -0,0 +1 @@
ALTER TABLE `events` CHANGE `description_link` `website` VARCHAR( 256 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL

View File

@ -991,7 +991,7 @@ class TableEditor
if(count($this->fieldFilterList)) {
foreach($this->fieldFilterList AS $k=>$v) {
$where[] = ($v == false) ? $k : "`$k`='$v'";
$where[] = ($v === false) ? $k : "`$k`='$v'";
}
}
return array($sel, $from, $where);