From 453d20adc5f68635b772c0ab0d6e6eea5fe7a93a Mon Sep 17 00:00:00 2001 From: SJ Date: Mon, 17 Sep 2012 16:49:27 +0200 Subject: [PATCH] 0.1.21 fixes --- util/db-mysql.sql | 3 ++- util/db-upgrade-0.20-vs-0.21.sql | 3 ++- webui/view/javascript/piler.js | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/util/db-mysql.sql b/util/db-mysql.sql index de23f360..b266f772 100644 --- a/util/db-mysql.sql +++ b/util/db-mysql.sql @@ -261,7 +261,8 @@ create table if not exists `folder_extra` ( `id` int unsigned not null auto_increment, `uid` int unsigned not null, `name` char(64) not null, - unique(uid, name) + unique(uid, name), + key (`id`) ) ENGINE=InnoDB; diff --git a/util/db-upgrade-0.20-vs-0.21.sql b/util/db-upgrade-0.20-vs-0.21.sql index 1f4eeec7..06bbe1e9 100644 --- a/util/db-upgrade-0.20-vs-0.21.sql +++ b/util/db-upgrade-0.20-vs-0.21.sql @@ -29,7 +29,8 @@ create table if not exists `folder_extra` ( `id` int unsigned not null auto_increment, `uid` int unsigned not null, `name` char(64) not null, - unique(uid, name) + unique(uid, name), + key (`id`) ) ENGINE=InnoDB; create table if not exists `folder_message` ( diff --git a/webui/view/javascript/piler.js b/webui/view/javascript/piler.js index c9f0f01a..41778c73 100644 --- a/webui/view/javascript/piler.js +++ b/webui/view/javascript/piler.js @@ -218,6 +218,7 @@ function assemble_search_term(n, prefix) { var e; var folders = ''; var extra_folders = ''; + var childNodeArray = new Array(); e = document.getElementById(prefix + 'searchtype'); if(e && e.value) { data = data + "searchtype=" + e.value; } @@ -288,7 +289,10 @@ function assemble_search_term(n, prefix) { e = document.getElementById(prefix + 'order'); if(e && e.value) { data = data + "&order=" + e.value; } - var childNodeArray = document.getElementById('folders').getElementsByTagName('*'); + + + a = document.getElementById('folders'); + if(a) { childNodeArray = a.getElementsByTagName('*'); } if(childNodeArray) { for(i=0; i