зеркало из https://github.com/mozilla/gecko-dev.git
Make core calendar code work against both trunk and 1.8 branch builds (bug 318850), r=jminta@gmail.com
This commit is contained in:
Родитель
7109ac97be
Коммит
7670235c86
|
@ -122,7 +122,13 @@ calCalendarManager.prototype = {
|
|||
|
||||
var dbService = Components.classes[kStorageServiceContractID].getService(kStorageServiceIID);
|
||||
|
||||
this.mDB = dbService.openSpecialDatabase("profile");
|
||||
if ( "getProfileStorage" in dbService ) {
|
||||
// 1.8 branch
|
||||
this.mDB = dbService.getProfileStorage("profile");
|
||||
} else {
|
||||
// trunk
|
||||
this.mDB = dbService.openSpecialDatabase("profile");
|
||||
}
|
||||
|
||||
for (table in sqlTables) {
|
||||
try {
|
||||
|
|
|
@ -299,9 +299,16 @@ calStorageCalendar.prototype = {
|
|||
this.mDBTwo = dbService.openDatabase (fileURL.file);
|
||||
} else if (aURI.scheme == "moz-profile-calendar") {
|
||||
dbService = Components.classes[kStorageServiceContractID].getService(kStorageServiceIID);
|
||||
this.mDB = dbService.openSpecialDatabase("profile");
|
||||
this.mDBTwo = dbService.openSpecialDatabase("profile");
|
||||
}
|
||||
if ( "getProfileStorage" in dbService ) {
|
||||
// 1.8 branch
|
||||
this.mDB = dbService.getProfileStorage("profile");
|
||||
this.mDBTwo = dbService.getProfileStorage("profile");
|
||||
} else {
|
||||
// trunk
|
||||
this.mDB = dbService.openSpecialDatabase("profile");
|
||||
this.mDBTwo = dbService.openSpecialDatabase("profile");
|
||||
}
|
||||
}
|
||||
|
||||
this.initDB();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче