Sourcecode in Global/objectFunctions.js:
1: function onStart() {
2: // load application messages and modules
3: var dir = new Helma.File(app.dir);
4: var arr = dir.list();
5: for (var i in arr) {
6: var fname = arr[i];
7: if (fname.startsWith("messages.")) {
8: var name = fname.substring(fname.indexOf(".") + 1, fname.length);
9: var msgFile = new Helma.File(dir, fname);
10: app.data[name] = new Packages.helma.util.SystemProperties(msgFile.getAbsolutePath());
11: app.log("loaded application messages (language: " + name + ")");
12: }
13: }
14: // build macro help
15: app.data.macros = buildMacroHelp();
16: //eval(macroHelpFile.readAll());
17: app.log("loaded macro help file");
18: // creating the vector for referrer-logging
19: app.data.accessLog = new java.util.Vector();
20: // creating the hashtable for storyread-counting
21: app.data.readLog = new java.util.Hashtable();
22: // define the global mail queue
23: app.data.mailQueue = new Array();
24: // init constants
25: initConstants();
26: // call onStart methods of modules
27: for (var i in app.modules) {
28: if (app.modules[i].onStart)
29: app.modules[i].onStart();
30: }
31: return;
32: }
|