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