* Updated text of $Admin#welcome skin (sites cannot be made the front page so easily, anymore)

* Added setup routine to Root.main_action() which is executed when there is an unconfigured root site or no privileged user (admin)
 * Modified $Image#edit skin: check for Image.fileName property insteaed of "created" when deciding whether to show the name and dimension input fields
 * Added missing res.data.title to $Members#register skin
 * Removed app.log() calls when catching login or registration exceptions
 * Added empty User.onLogout() method to get rid of some "errors" in the log file
 * Removed obsolete code
This commit is contained in:
Tobi Schäfer 2008-09-21 17:44:18 +00:00
parent 35be86763d
commit d7d716fa95
8 changed files with 45 additions and 40 deletions

View file

@ -95,8 +95,11 @@ var rome = new JavaImporter(
);
function onStart() {
app.addCronJob("nightly", "*", "*", "*", "*", "5", "0");
if (typeof root === "undefined") {
app.logger.error("Error in database configuration: no root site found.");
return;
}
app.addCronJob("nightly", "*", "*", "*", "*", "5", "0");
// FIXME: Does database exist?
/*var db = getDBConnection("antville");
var rows = db.executeRetrieval("select min(id) as id from site");
@ -104,12 +107,6 @@ function onStart() {
var id = rows.getColumnItem("id");
//Packages.helma.main.Server.getServer().stopApplication(app.name);
rows.release();*/
// call onStart methods of modules
for (var i in app.modules) {
if (app.modules[i].onStart)
app.modules[i].onStart();
}
return;
}
@ -558,7 +555,6 @@ function formatDate(date, pattern) {
try {
return date.format(format, site.getLocale(), site.getTimeZone());
} catch (ex) {
app.log(ex);
return "[Macro error: Invalid date format]";
}
return;