diff --git a/chrome/content/zotero/bindings/tagselector.xml b/chrome/content/zotero/bindings/tagselector.xml index 1d87b97aa..ade32b6f2 100644 --- a/chrome/content/zotero/bindings/tagselector.xml +++ b/chrome/content/zotero/bindings/tagselector.xml @@ -411,7 +411,7 @@ diff --git a/chrome/content/zotero/xpcom/data_access.js b/chrome/content/zotero/xpcom/data_access.js index 3afc2c137..051859318 100644 --- a/chrome/content/zotero/xpcom/data_access.js +++ b/chrome/content/zotero/xpcom/data_access.js @@ -3461,9 +3461,12 @@ Zotero.Tags = new function(){ function search(str){ - var sql = 'SELECT tagID, tag, tagType FROM tags WHERE tag LIKE ? ' - + 'ORDER BY tag COLLATE NOCASE'; - var tags = Zotero.DB.query(sql, '%' + str + '%'); + var sql = 'SELECT tagID, tag, tagType FROM tags'; + if (str) { + sql += ' WHERE tag LIKE ?'; + } + sql += ' ORDER BY tag COLLATE NOCASE'; + var tags = Zotero.DB.query(sql, str ? '%' + str + '%' : undefined); var indexed = {}; for each(var tag in tags) { indexed[tag.tagID] = { diff --git a/chrome/content/zotero/xpcom/fulltext.js b/chrome/content/zotero/xpcom/fulltext.js index 50dd22e3c..e055ad403 100644 --- a/chrome/content/zotero/xpcom/fulltext.js +++ b/chrome/content/zotero/xpcom/fulltext.js @@ -60,6 +60,7 @@ Zotero.Fulltext = new function(){ */ function registerPDFToText() { var exec = Zotero.getZoteroDirectory(); + var fileName = 'pdftotext-' + Zotero.platform.replace(' ', '-'); if (Zotero.isWin) { fileName += '.exe'; @@ -319,7 +320,6 @@ Zotero.Fulltext = new function(){ Zotero.debug('Running pdftotext -nopgbrk -l ' + maxPages + ' "' + file.path + '" "' + cacheFile.path + '"'); var args = ['-nopgbrk', '-l', maxPages, file.path, cacheFile.path]; - Zotero.debug(args); proc.run(true, args, args.length); if (cacheFile.exists()) { diff --git a/chrome/content/zotero/xpcom/notifier.js b/chrome/content/zotero/xpcom/notifier.js index aee779550..0dde11626 100644 --- a/chrome/content/zotero/xpcom/notifier.js +++ b/chrome/content/zotero/xpcom/notifier.js @@ -166,7 +166,7 @@ Zotero.Notifier = new function(){ return true; } - for (i in _observers.items){ + for (var i in _observers.items){ Zotero.debug("Calling notify() on observer with hash '" + i + "'", 4); // Find observers that handle notifications for this type (or all types) if (!_observers.get(i).types || _observers.get(i).types.indexOf(type)!=-1){ @@ -254,9 +254,12 @@ Zotero.Notifier = new function(){ var id = _queue[type][event].ids[i]; var data = _queue[type][event].data[i]; - // Don't send modify on nonexistent items + // Don't send modify on nonexistent items or tags if (event == 'modify') { - if (!Zotero.Items.get(id)) { + if (type == 'item' && !Zotero.Items.get(id)) { + continue; + } + else if (type == 'tag' && !Zotero.Tags.get(id)) { continue; } }