Add mappings for obsolete style ids

This commit is contained in:
Dan Stillman 2012-01-20 17:25:02 -05:00
parent b342999983
commit c89bb04484

View file

@ -107,6 +107,17 @@ Zotero.Styles = new function() {
* @param {String} id
*/
this.get = function(id) {
// Map some obsolete styles to current ones
var mappings = {
"http://www.zotero.org/styles/chicago-note": "http://www.zotero.org/styles/chicago-note-bibliography",
"http://www.zotero.org/styles/mhra_note_without_bibliography": "http://www.zotero.org/styles/mhra",
"http://www.zotero.org/styles/aaa": "http://www.zotero.org/styles/american-anthropological-association"
};
if(mappings[id]) {
Zotero.debug("Mapping " + id + " to " + mappings[id]);
id = mappings[id];
}
if(!_initialized) this.init();
return _styles[id] ? _styles[id] : false;
}