aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEgil Moeller <egil.moller@freecode.no>2010-03-25 22:17:15 +0100
committerEgil Moeller <egil.moller@freecode.no>2010-03-25 22:17:15 +0100
commit7e9a612898c428e4406834dfe3766bccde7830f5 (patch)
treebd86c39b2ed5d884fc073d098b340f7d75e7a7c8
parent27271e4cc005b44ff8254d7cfa753ec4316194f3 (diff)
downloadetherpad-7e9a612898c428e4406834dfe3766bccde7830f5.tar.gz
etherpad-7e9a612898c428e4406834dfe3766bccde7830f5.tar.xz
etherpad-7e9a612898c428e4406834dfe3766bccde7830f5.zip
CaSe BuGfIx
-rw-r--r--etherpad/src/plugins/twitterStyleTags/hooks.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/etherpad/src/plugins/twitterStyleTags/hooks.js b/etherpad/src/plugins/twitterStyleTags/hooks.js
index e3a3e0b..86875fc 100644
--- a/etherpad/src/plugins/twitterStyleTags/hooks.js
+++ b/etherpad/src/plugins/twitterStyleTags/hooks.js
@@ -16,7 +16,7 @@ function padModelWriteToDB(args) {
new_tags[i] = new_tags[i].substring(1);
var new_tags_str = new_tags.join('#')
- var old_tags_row = sqlobj.selectSingle("PAD_TAG_CACHE", { id: args.padId });
+ var old_tags_row = sqlobj.selectSingle("PAD_TAG_CACHE", { PAD_ID: args.padId });
var old_tags_str;
if (old_tags_row !== null)
old_tags_str = old_tags_row['TAGS'];
@@ -29,19 +29,19 @@ function padModelWriteToDB(args) {
log.info({message: 'Updating tags', new_tags:new_tags, old_tags:old_tags});
if (old_tags_row)
- sqlobj.update("PAD_TAG_CACHE", { id: args.padId }, {tags: new_tags.join('#')});
+ sqlobj.update("PAD_TAG_CACHE", {PAD_ID: args.padId }, {TAGS: new_tags.join('#')});
else
- sqlobj.insert("PAD_TAG_CACHE", {id: args.padId, tags: new_tags.join('#')});
+ sqlobj.insert("PAD_TAG_CACHE", {PAD_ID: args.padId, TAGS: new_tags.join('#')});
- sqlobj.deleteRows("PAD_TAG", {pad_id: args.padId});
+ sqlobj.deleteRows("PAD_TAG", {PAD_ID: args.padId});
for (i = 0; i < new_tags.length; i++) {
- var tag_row = sqlobj.selectSingle("TAG", { name: new_tags[i] });
+ var tag_row = sqlobj.selectSingle("TAG", { NAME: new_tags[i] });
if (tag_row === null) {
- sqlobj.insert("TAG", {name: new_tags[i]});
- tag_row = sqlobj.selectSingle("TAG", { name: new_tags[i] });
+ sqlobj.insert("TAG", {NAME: new_tags[i]});
+ tag_row = sqlobj.selectSingle("TAG", { NAME: new_tags[i] });
}
- sqlobj.insert("PAD_TAG", {pad_id: args.padId, tag_id: tag_row['ID']});
+ sqlobj.insert("PAD_TAG", {PAD_ID: args.padId, TAG_ID: tag_row['ID']});
}
}
} \ No newline at end of file