From 84e59d66019050efe503ab117e6622cbd24a468e Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 20 Jan 2012 17:00:53 -0500 Subject: [PATCH] Delete chicago-note.csl, mhra_note_with_bibliography.csl, aaa.csl First two are redundant, third has been renamed Mappings for existing documents forthcoming --- chrome/content/zotero/xpcom/schema.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index 6ce58875d..2d8b4dc75 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -530,8 +530,8 @@ Zotero.Schema = new function(){ continue; } - // Delete incorrectly named files saved via repo pre-1.5b3 switch (file.leafName) { + // Delete incorrectly named files saved via repo pre-1.5b3 case 'ama': case 'apa': case 'apsa': @@ -548,8 +548,21 @@ Zotero.Schema = new function(){ case 'nature': case 'nlm': case 'vancouver': + + // Delete renamed/obsolete files + case 'chicago-note.csl': + case 'mhra_note_without_bibliography.csl': toDelete.push(file); continue; + + // Be a little more careful with this one, in case someone + // created a custom 'aaa' style + case 'aaa.csl': + var str = Zotero.File.getContents(file, false, 300); + if (str.indexOf("American Anthropological Association") != -1) { + toDelete.push(file); + } + continue; } if (forceReinstall || !file.leafName.match(fileNameRE)) {