summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-11-21 16:15:26 +0100
committerYorhel <git@yorhel.nl>2010-11-21 16:15:26 +0100
commita79312bb341bdfbdf14e7aeb3d1ffa6548604960 (patch)
tree9a5830431a5a980295f84d2901306e87f28ece12 /data
parent66e8cbc808775356ea5beeea2f53ab6958ab6c2e (diff)
Implemented the server side of the new release filter selector
There's no validation of the filter string yet, and somehow I don't feel like adding that; it's a lot of code and there's nothing to protect - the values are inserted using parameters into a SELECT query, the worst thing that could happen is the user receiving a 500. Also, I've started using the perl '//=' operator, which was added in 5.10. This removes support for older perls.
Diffstat (limited to 'data')
-rw-r--r--data/script.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/data/script.js b/data/script.js
index 64ae4187..d54b8186 100644
--- a/data/script.js
+++ b/data/script.js
@@ -1842,8 +1842,8 @@ function filLoad() {
tag('input', {type:'button', 'class':'submit', value: mt('_rbrowse_reset'), onclick:function () { byId('fil').value = ''; filDeSerialize()} })
));
filSelectCat(1);
- filDeSerialize();
byId('filselect').onclick = filShow;
+ filDeSerialize();
}
function filSelectCat(n) {
@@ -1922,7 +1922,10 @@ function filDeSerialize() {
for(var fn in f) {
var c = byId('fil_check_'+fn);
c.checked = f[fn] == '' ? false : true;
- fil_cats[0][fn].fil_writefunc(fil_cats[0][fn].fil_contents, f[fn].split(','));
+ var v = f[fn].split(',');
+ for(var i=0; i<v.length; i++)
+ v[i] = v[i].replace(/_([0-9]{2})/g, function (a, e) { return fil_escape[e] });
+ fil_cats[0][fn].fil_writefunc(fil_cats[0][fn].fil_contents, v);
// not very efficient: filSelectField() does a lot of things that can be
// batched after all fields have been updated, and in some cases the
// writefunc() triggers the same filSelectField() as well