From f090e957c6da8894385cefb1906f6e55eb3e3fb7 Mon Sep 17 00:00:00 2001 From: jacob Date: Mon, 14 Jun 2010 19:43:10 +0000 Subject: [PATCH] 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) --- admin/events.php | 3 ++- db/db.update.182.sql | 1 + tableeditor.class.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 db/db.update.182.sql diff --git a/admin/events.php b/admin/events.php index 35ba642..995abdd 100644 --- a/admin/events.php +++ b/admin/events.php @@ -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(); diff --git a/db/db.update.182.sql b/db/db.update.182.sql new file mode 100644 index 0000000..71ea8f1 --- /dev/null +++ b/db/db.update.182.sql @@ -0,0 +1 @@ +ALTER TABLE `events` CHANGE `description_link` `website` VARCHAR( 256 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL diff --git a/tableeditor.class.php b/tableeditor.class.php index aaa62a6..78af9ea 100644 --- a/tableeditor.class.php +++ b/tableeditor.class.php @@ -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);