Compare commits
42 commits
release-1.
...
release-1.
Author | SHA1 | Date | |
---|---|---|---|
6a5a389d01 | |||
573e90b732 | |||
cba12bbae7 | |||
bd96bf8388 | |||
900470348b | |||
4486f2d238 | |||
31f249fc79 | |||
ff62e260cf | |||
347cb98020 | |||
516babe96f | |||
bc98042790 | |||
a5e6c8b596 | |||
791e099ade | |||
0af26a4e7b | |||
c0adce4ea8 | |||
20f0be8868 | |||
94ac026e76 | |||
ca2f3a87b5 | |||
6584f1dd7d | |||
6c80b3f2e9 | |||
828b85ba4c | |||
4a16d91deb | |||
d221466d4a | |||
f2db3263d9 | |||
b8791d0887 | |||
df20ca2efc | |||
57c6322c1e | |||
1f16ce5377 | |||
cd50b46cba | |||
69ff389353 | |||
192f133ba6 | |||
a0c7ee608e | |||
5b0ba00ba9 | |||
3b7d2e577b | |||
1d27d412c8 | |||
9410d97946 | |||
2b35e1ddf4 | |||
3f602c6d5b | |||
5a1b4cf2e3 | |||
4db44c389b | |||
|
9776619fb4 | ||
47deac6732 |
32 changed files with 248 additions and 228 deletions
|
@ -23,10 +23,10 @@
|
||||||
<target name="init">
|
<target name="init">
|
||||||
<property name="name" value="antville" />
|
<property name="name" value="antville" />
|
||||||
<property name="year" value="1998-${year}" />
|
<property name="year" value="1998-${year}" />
|
||||||
<property name="version" value="1.2" />
|
<property name="version" value="1.2.1" />
|
||||||
<property name="package.name" value="${name}-${version}" />
|
<property name="package.name" value="${name}-${version}" />
|
||||||
|
|
||||||
<property name="antville.src" value="http://antville.googlecode.com/svn/trunk" />
|
<property name="antville.src" value="http://antville.googlecode.com/svn/branches/release_1_2_1" />
|
||||||
<property name="helma.src" value="http://dev.helma.org/svn/helma/helma/trunk" />
|
<property name="helma.src" value="http://dev.helma.org/svn/helma/helma/trunk" />
|
||||||
<property name="apps.src" value="http://dev.helma.org/svn/apps" />
|
<property name="apps.src" value="http://dev.helma.org/svn/apps" />
|
||||||
|
|
||||||
|
|
|
@ -229,7 +229,7 @@ PoParser.prototype.writeToFile = function(output) {
|
||||||
buf.append(' * Messages for locale "' + this.localeKey + '"\n');
|
buf.append(' * Messages for locale "' + this.localeKey + '"\n');
|
||||||
buf.append(' */\n');
|
buf.append(' */\n');
|
||||||
var fname = objPath + "." + this.localeKey + ".js";
|
var fname = objPath + "." + this.localeKey + ".js";
|
||||||
objPath += "xxx['" + this.localeKey + "']";
|
objPath += "['" + this.localeKey + "']";
|
||||||
buf.append('global.' + objPath + ' = {\n');
|
buf.append('global.' + objPath + ' = {\n');
|
||||||
// write messages
|
// write messages
|
||||||
for (var i=0;i<this.messages.length; i++) {
|
for (var i=0;i<this.messages.length; i++) {
|
||||||
|
|
|
@ -363,7 +363,7 @@ Admin.updateHealth = function() {
|
||||||
Admin.updateDomains = function() {
|
Admin.updateDomains = function() {
|
||||||
res.push();
|
res.push();
|
||||||
for (var key in app.properties) {
|
for (var key in app.properties) {
|
||||||
if (key.startsWith("domain.")) {
|
if (key.startsWith("domain.") && !key.endsWith("*")) {
|
||||||
res.writeln(getProperty(key) + "\t\t" + key.substr(7));
|
res.writeln(getProperty(key) + "\t\t" + key.substr(7));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,7 @@ Api.getUser = function(name, password) {
|
||||||
} else if (user.status === User.BLOCKED) {
|
} else if (user.status === User.BLOCKED) {
|
||||||
throw Error("The user account " + name + " is currently blocked");
|
throw Error("The user account " + name + " is currently blocked");
|
||||||
}
|
}
|
||||||
|
session.login(user);
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -218,7 +218,7 @@ function scheduler() {
|
||||||
Admin.commitEntries();
|
Admin.commitEntries();
|
||||||
Admin.commitRequests();
|
Admin.commitRequests();
|
||||||
Admin.invokeCallbacks();
|
Admin.invokeCallbacks();
|
||||||
//Admin.updateDomains();
|
Admin.updateDomains();
|
||||||
Admin.updateHealth();
|
Admin.updateHealth();
|
||||||
return 5000;
|
return 5000;
|
||||||
}
|
}
|
||||||
|
@ -785,7 +785,7 @@ function sendMail(recipient, subject, body, options) {
|
||||||
}
|
}
|
||||||
var mail = new helma.Mail(getProperty("smtp", "localhost"),
|
var mail = new helma.Mail(getProperty("smtp", "localhost"),
|
||||||
getProperty("smtp.port", "25"));
|
getProperty("smtp.port", "25"));
|
||||||
mail.setFrom(root.replyTo);
|
mail.setFrom(root.replyTo || "root@localhost");
|
||||||
if (recipient instanceof Array) {
|
if (recipient instanceof Array) {
|
||||||
for (var i in recipient) {
|
for (var i in recipient) {
|
||||||
mail.addBCC(recipient[i]);
|
mail.addBCC(recipient[i]);
|
||||||
|
@ -817,16 +817,16 @@ function getLocale(language) {
|
||||||
* @returns {Object[]} A sorted array containing the corresponding locales
|
* @returns {Object[]} A sorted array containing the corresponding locales
|
||||||
*/
|
*/
|
||||||
function getLocales(language) {
|
function getLocales(language) {
|
||||||
var result = [], locale;
|
var result = [], locale, localeString;
|
||||||
var displayLocale = getLocale(language);
|
|
||||||
var locales = java.util.Locale.getAvailableLocales();
|
var locales = java.util.Locale.getAvailableLocales();
|
||||||
for (var i in locales) {
|
for (var i in locales) {
|
||||||
locale = locales[i].toString();
|
locale = locales[i];
|
||||||
if (!locale.toString().contains("_")) {
|
localeString = locale.toString();
|
||||||
|
if (!localeString.contains("_")) {
|
||||||
result.push({
|
result.push({
|
||||||
value: locale,
|
value: localeString,
|
||||||
display: locales[i].getDisplayName(displayLocale),
|
display: locale.getDisplayName(locale),
|
||||||
"class": jala.i18n.getCatalog(jala.i18n.getLocale(locale)) ? "translated" : ""
|
"class": jala.i18n.getCatalog(jala.i18n.getLocale(localeString)) ? "translated" : ""
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -851,8 +851,8 @@ function getTimeZones(language) {
|
||||||
offset = timeZone.getRawOffset();
|
offset = timeZone.getRawOffset();
|
||||||
result.push({
|
result.push({
|
||||||
value: zone,
|
value: zone,
|
||||||
display: /* timeZone.getDisplayName(timeZone.inDaylightTime(now),
|
display: timeZone.getDisplayName(timeZone.inDaylightTime(now),
|
||||||
java.util.TimeZone.LONG, locale) */ " (UTC" + (offset /
|
java.util.TimeZone.LONG, locale) + " (UTC" + (offset /
|
||||||
Date.ONEHOUR).format("+00;-00") + ":" + (Math.abs(offset %
|
Date.ONEHOUR).format("+00;-00") + ":" + (Math.abs(offset %
|
||||||
Date.ONEHOUR) / Date.ONEMINUTE).format("00") + ")"
|
Date.ONEHOUR) / Date.ONEMINUTE).format("00") + ")"
|
||||||
});
|
});
|
||||||
|
@ -1202,3 +1202,24 @@ var wait = function(millis) {
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {Object} param
|
||||||
|
* @param {String} type
|
||||||
|
*/
|
||||||
|
function version_macro(param, type) {
|
||||||
|
var version = Root.VERSION.split("-");
|
||||||
|
var number = version[0];
|
||||||
|
switch (type) {
|
||||||
|
case "major":
|
||||||
|
res.write(number.split(".")[0]);
|
||||||
|
break;
|
||||||
|
case "minor":
|
||||||
|
res.write(number);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
res.write(Root.VERSION);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -95,8 +95,8 @@ function gettext_macro(param, text /*, value1, value2, ...*/) {
|
||||||
if (!text) {
|
if (!text) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var re = /(\s*)(?:\r|\n)\s*/g;
|
var re = /\s+/g;
|
||||||
var args = [text.replace(re, "$1")];
|
var args = [text.replace(re, String.SPACE)];
|
||||||
for (var i=2; i<arguments.length; i+=1) {
|
for (var i=2; i<arguments.length; i+=1) {
|
||||||
args.push(arguments[i]);
|
args.push(arguments[i]);
|
||||||
}
|
}
|
||||||
|
@ -118,8 +118,8 @@ function ngettext_macro(param, singular, plural /*, value1, value2, ...*/) {
|
||||||
if (!singular || !plural) {
|
if (!singular || !plural) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var re = /(\s*)(?:\r|\n)\s*/g;
|
var re = /\s+/g;
|
||||||
var args = [singular.replace(re, "$1"), plural.replace(re, "$1")];
|
var args = [singular.replace(re, String.SPACE), plural.replace(re, String.SPACE)];
|
||||||
for (var i=3; i<arguments.length; i+=1) {
|
for (var i=3; i<arguments.length; i+=1) {
|
||||||
args.push(arguments[i]);
|
args.push(arguments[i]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,7 +229,7 @@ Layout.prototype.reset_action = function() {
|
||||||
Layout.prototype.export_action = function() {
|
Layout.prototype.export_action = function() {
|
||||||
res.contentType = "application/zip";
|
res.contentType = "application/zip";
|
||||||
var zip = this.getArchive(res.skinpath);
|
var zip = this.getArchive(res.skinpath);
|
||||||
res.setHeader("Content-Disposition",
|
res.setHeader("Content-Disposition",
|
||||||
"attachment; filename=" + this.site.name + "-layout.zip");
|
"attachment; filename=" + this.site.name + "-layout.zip");
|
||||||
res.writeBinary(zip.getData());
|
res.writeBinary(zip.getData());
|
||||||
return;
|
return;
|
||||||
|
@ -268,7 +268,7 @@ Layout.prototype.import_action = function() {
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
res.message = ex;
|
res.message = ex;
|
||||||
app.log(ex);
|
app.log(ex);
|
||||||
temp.removeDirectory();
|
temp && temp.removeDirectory();
|
||||||
res.redirect(this.href(req.action));
|
res.redirect(this.href(req.action));
|
||||||
}
|
}
|
||||||
res.redirect(this.href());
|
res.redirect(this.href());
|
||||||
|
@ -326,17 +326,26 @@ Layout.prototype.getSkinPath = function() {
|
||||||
*/
|
*/
|
||||||
Layout.prototype.reset = function() {
|
Layout.prototype.reset = function() {
|
||||||
var skinFiles = app.getSkinfilesInPath([app.dir]);
|
var skinFiles = app.getSkinfilesInPath([app.dir]);
|
||||||
var content, file;
|
var content, dir, file;
|
||||||
for (var name in skinFiles) {
|
for (var name in skinFiles) {
|
||||||
if (content = skinFiles[name][name]) {
|
if (content = skinFiles[name][name]) {
|
||||||
var dir = this.getFile(name);
|
dir = this.getFile(name);
|
||||||
var file = new helma.File(dir, name + ".skin");
|
file = new helma.File(dir, name + ".skin");
|
||||||
dir.makeDirectory();
|
dir.makeDirectory();
|
||||||
file.open();
|
file.open();
|
||||||
file.write(content);
|
file.write(content);
|
||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: Reset the Site skin of root separately
|
||||||
|
content = skinFiles.Root.Site;
|
||||||
|
file = new helma.File(this.getFile("Root"), "Site.skin");
|
||||||
|
dir.makeDirectory();
|
||||||
|
file.open();
|
||||||
|
file.write(content);
|
||||||
|
file.close()
|
||||||
|
|
||||||
this.touch();
|
this.touch();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -358,6 +367,10 @@ Layout.prototype.getArchive = function(skinPath) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: Add the Site skin of root separately
|
||||||
|
file = new helma.File(this.getFile("Root"), "Site.skin");
|
||||||
|
file.exists() && zip.add(file, "Root");
|
||||||
|
|
||||||
var data = new HopObject;
|
var data = new HopObject;
|
||||||
data.images = new HopObject;
|
data.images = new HopObject;
|
||||||
this.images.forEach(function() {
|
this.images.forEach(function() {
|
||||||
|
|
|
@ -40,12 +40,6 @@ $(function() {
|
||||||
<input type="hidden" name="digest" id="digest" />
|
<input type="hidden" name="digest" id="digest" />
|
||||||
<table border="0" cellspacing="0" cellpadding="3">
|
<table border="0" cellspacing="0" cellpadding="3">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="small"><% gettext "Activation Code" suffix=":" %></td>
|
|
||||||
<td><input type="text" name="activation" id="activation"
|
|
||||||
value="<% request.activation encoding="form" %>" /></td>
|
|
||||||
<td colspan="2"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="small"><% gettext "Username" suffix=":" %></td>
|
<td class="small"><% gettext "Username" suffix=":" %></td>
|
||||||
<td><input type="text" name="name" id="name" tabindex="1" size="20"
|
<td><input type="text" name="name" id="name" tabindex="1" size="20"
|
||||||
value="<% request.name encoding="form" %>" /></td>
|
value="<% request.name encoding="form" %>" /></td>
|
||||||
|
@ -104,11 +98,6 @@ $(function() {
|
||||||
<input type="hidden" name="hash" id="hash" />
|
<input type="hidden" name="hash" id="hash" />
|
||||||
<table border="0" cellspacing="0" cellpadding="3">
|
<table border="0" cellspacing="0" cellpadding="3">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="small"><% gettext "Activation Code" suffix=":" %></td>
|
|
||||||
<td><input type="text" name="activation" id="activation"
|
|
||||||
value="<% request.activation encoding="form" %>" /></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="small"><% gettext Username suffix=: %></td>
|
<td class="small"><% gettext Username suffix=: %></td>
|
||||||
<td><input type="text" name="name" size="30"
|
<td><input type="text" name="name" size="30"
|
||||||
value="<% request.name encoding="form" %>" /></td>
|
value="<% request.name encoding="form" %>" /></td>
|
||||||
|
|
|
@ -92,10 +92,6 @@ Members.prototype.main_action = function() {
|
||||||
|
|
||||||
Members.prototype.register_action = function() {
|
Members.prototype.register_action = function() {
|
||||||
if (req.postParams.register) {
|
if (req.postParams.register) {
|
||||||
if (req.postParams.activation) {
|
|
||||||
app.log("Detected form submit with completed honeypot field: " + req.data);
|
|
||||||
res.redirect(root.href());
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
var title = res.handlers.site.title;
|
var title = res.handlers.site.title;
|
||||||
var user = User.register(req.postParams);
|
var user = User.register(req.postParams);
|
||||||
|
@ -178,10 +174,6 @@ Members.prototype.reset_action = function() {
|
||||||
|
|
||||||
Members.prototype.login_action = function() {
|
Members.prototype.login_action = function() {
|
||||||
if (req.postParams.login) {
|
if (req.postParams.login) {
|
||||||
if (req.postParams.activation) {
|
|
||||||
app.log("Detected form submit with completed honeypot field: " + req.data);
|
|
||||||
res.redirect(root.href());
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
var user = User.login(req.postParams);
|
var user = User.login(req.postParams);
|
||||||
res.message = gettext('Welcome to {0}, {1}. Have fun!',
|
res.message = gettext('Welcome to {0}, {1}. Have fun!',
|
||||||
|
@ -339,7 +331,6 @@ Members.prototype.add_action = function() {
|
||||||
}
|
}
|
||||||
} else if (req.postParams.add) {
|
} else if (req.postParams.add) {
|
||||||
try {
|
try {
|
||||||
res.handlers.sender = User.getMembership();
|
|
||||||
var membership = this.addMembership(req.postParams);
|
var membership = this.addMembership(req.postParams);
|
||||||
membership.notify(req.action, membership.creator.email,
|
membership.notify(req.action, membership.creator.email,
|
||||||
gettext('[{0}] Notification of membership change', root.title));
|
gettext('[{0}] Notification of membership change', root.title));
|
||||||
|
@ -404,65 +395,3 @@ Members.prototype.addMembership = function(data) {
|
||||||
this.add(membership);
|
this.add(membership);
|
||||||
return membership;
|
return membership;
|
||||||
}
|
}
|
||||||
|
|
||||||
Members.prototype.modSorua_action = function() {
|
|
||||||
if (!app.data.modSorua) app.data.modSorua = new Array();
|
|
||||||
var returnUrl = req.data["sorua-return-url"];
|
|
||||||
var failUrl = req.data["sorua-fail-url"];
|
|
||||||
var userID = req.data["sorua-user"];
|
|
||||||
var action = req.data["sorua-action"];
|
|
||||||
if (action == "authenticate") { // authenticate-action
|
|
||||||
if (session.user && (userID == null || userID == "" || session.user.name == userID)) {
|
|
||||||
// store returnUrl + timestamp + userID
|
|
||||||
app.data.modSorua[returnUrl] = {time: new Date(), userID: session.user.name};
|
|
||||||
res.redirect(returnUrl);
|
|
||||||
} else if (failUrl) {
|
|
||||||
res.redirect(failUrl);
|
|
||||||
} else {
|
|
||||||
session.data.modSorua = {returnUrl: returnUrl,
|
|
||||||
userID: userID};
|
|
||||||
res.redirect(this.href("modSoruaLoginForm"));
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (action == "verify") {
|
|
||||||
// first remove outdated entries
|
|
||||||
var now = new Date();
|
|
||||||
var arr = new Array();
|
|
||||||
for (var i in app.data.modSorua) {
|
|
||||||
if (app.data.modSorua[i] && app.data.modSorua[i].time &&
|
|
||||||
now.valueOf() - app.data.modSorua[i].time.valueOf() < 1000 * 60)
|
|
||||||
arr[i] = app.data.modSorua[i];
|
|
||||||
}
|
|
||||||
app.data.modSorua = arr;
|
|
||||||
// now check whether returnUrl has been used recently
|
|
||||||
if (app.data.modSorua[returnUrl]) {
|
|
||||||
res.status = 200;
|
|
||||||
res.write("user:" + app.data.modSorua[returnUrl].userID);
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
res.status = 403;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else { // handle wrong call of AuthURI
|
|
||||||
res.redirect(root.href("main"));
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Members.prototype.modSoruaLoginForm_action = function() {
|
|
||||||
if (!session.data.modSorua || !session.data.modSorua.returnUrl)
|
|
||||||
res.redirect(root.href()); // should not happen anyways
|
|
||||||
if (req.data.login) {
|
|
||||||
try {
|
|
||||||
res.message = this.evalLogin(req.data.name, req.data.password);
|
|
||||||
var returnUrl = session.data.modSorua.returnUrl;
|
|
||||||
app.data.modSorua[returnUrl] = {time: new Date(), userID: req.data.name};
|
|
||||||
res.redirect(returnUrl);
|
|
||||||
} catch (err) {
|
|
||||||
res.message = err.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
res.data.action = this.href("modSoruaLoginForm");
|
|
||||||
this.renderSkin("modSorua");
|
|
||||||
}
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<% #main %>
|
<% #main %>
|
||||||
<% if <% param.header %> is true then <% poll.skin #header suffix=<br /> %> else
|
<% if <% param.header %> is true then <% poll.skin #header suffix="<br />" %> else
|
||||||
<% poll.question prefix='<div class="pollTitle">' suffix="</div> %> %>
|
<% poll.question prefix='<div class="pollTitle">' suffix="</div> %> %>
|
||||||
<form method="post" action="<% poll.href %>">
|
<form method="post" action="<% poll.href %>">
|
||||||
<table border="0" cellspacing="2" cellpadding="2">
|
<table border="0" cellspacing="2" cellpadding="2">
|
||||||
|
|
|
@ -1,22 +1,3 @@
|
||||||
<% #main %>
|
|
||||||
<p><% gettext 'Antville is an open source project aimed at the development of a
|
|
||||||
simple site hosting system with many advanced
|
|
||||||
<a href="http://code.google.com/p/antville/wiki/AntvilleFeatures">features</a>.' %></p>
|
|
||||||
<p><% gettext 'One Antville installation can easily host up to several thousands
|
|
||||||
of <a href="{0}">sites</a>.' <% site.href sites %> %></p>
|
|
||||||
<p><% site.link create <% gettext "Create a site. It only takes a few clicks." %> %></p>
|
|
||||||
<p>
|
|
||||||
<% gettext "Total sites hosted here" suffix=: %> <% root.size %><br />
|
|
||||||
<% gettext "Number of public sites" suffix=: %> <% root.sites.size %>
|
|
||||||
</p>
|
|
||||||
<table border="0" cellpadding="1" cellspacing="0">
|
|
||||||
<colgroup>
|
|
||||||
<col width="150" />
|
|
||||||
<col width="*" />
|
|
||||||
</colgroup>
|
|
||||||
<% root.loop updates skin=$Site#listItem limit=25 %>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<% #create %>
|
<% #create %>
|
||||||
<p class="storyTitle"><% response.title %></p>
|
<p class="storyTitle"><% response.title %></p>
|
||||||
<div>
|
<div>
|
||||||
|
@ -150,6 +131,10 @@ alphabetical order." %></p>
|
||||||
<td class="small"><% gettext 'Queued Callbacks' %>:</td>
|
<td class="small"><% gettext 'Queued Callbacks' %>:</td>
|
||||||
<td><% param.callbacks %></td>
|
<td><% param.callbacks %></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="small"><% gettext Version %>:</td>
|
||||||
|
<td><% version %></td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<% #stylesheet %>
|
<% #stylesheet %>
|
||||||
|
@ -183,7 +168,7 @@ ul.skinmgrTree a.selected {
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.skinmgrTree li div {
|
ul.skinmgrTree li div {
|
||||||
font-family:<% value "base font size" %>;
|
font-family:<% value "small font" %>;
|
||||||
font-size:<% value "small font size" %>;
|
font-size:<% value "small font size" %>;
|
||||||
color:<% value "base font color" %>;
|
color:<% value "base font color" %>;
|
||||||
}
|
}
|
||||||
|
@ -208,10 +193,6 @@ div.skin div.title {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activation {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.translated {
|
.translated {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @constant */
|
/** @constant */
|
||||||
Root.VERSION = "1.2";
|
Root.VERSION = "1.2.1";
|
||||||
|
|
||||||
this.handleMetadata("creationDelay");
|
this.handleMetadata("creationDelay");
|
||||||
this.handleMetadata("creationScope");
|
this.handleMetadata("creationScope");
|
||||||
|
|
|
@ -1,7 +1,21 @@
|
||||||
<% #main %>
|
<% #main %>
|
||||||
<% root.skin Root#welcome %>
|
<p><% gettext 'Antville is an open source project aimed at the development of a
|
||||||
<% // Render the list of updated sites %>
|
simple site hosting system with many advanced
|
||||||
<% root.skin $Root#main %>
|
<a href="http://code.google.com/p/antville/wiki/AntvilleFeatures">features</a>.' %></p>
|
||||||
|
<p><% gettext 'One Antville installation can easily host up to several thousands
|
||||||
|
of <a href="{0}">sites</a>.' <% site.href sites %> %></p>
|
||||||
|
<p><% site.link create <% gettext "Create a site. It only takes a few clicks." %> %></p>
|
||||||
|
<p>
|
||||||
|
<% gettext "Total sites hosted here" suffix=: %> <% root.size %><br />
|
||||||
|
<% gettext "Number of public sites" suffix=: %> <% root.sites.size %>
|
||||||
|
</p>
|
||||||
|
<table border="0" cellpadding="1" cellspacing="0">
|
||||||
|
<colgroup>
|
||||||
|
<col width="150" />
|
||||||
|
<col width="*" />
|
||||||
|
</colgroup>
|
||||||
|
<% list updates 25 skin=$Site#listItem %>
|
||||||
|
</table>
|
||||||
|
|
||||||
<% #navigation %>
|
<% #navigation %>
|
||||||
<div class="navigation">
|
<div class="navigation">
|
||||||
|
|
|
@ -186,7 +186,7 @@ referrers.push(new Antville.Referrer("<% param.referrer %>",
|
||||||
<tr>
|
<tr>
|
||||||
<td class="small"><% gettext Paging suffix=: %></td>
|
<td class="small"><% gettext Paging suffix=: %></td>
|
||||||
<td><% site.input pageSize size="5" maxlength="2" %>
|
<td><% site.input pageSize size="5" maxlength="2" %>
|
||||||
<% gettext "{0} per page" <% gettext "days" %> %></td>
|
<% gettext "{0} per page" <% gettext "stories" %> %></td>
|
||||||
<% // site.select pageMode %>
|
<% // site.select pageMode %>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -233,7 +233,6 @@ Site.prototype.getPermission = function(action) {
|
||||||
case "error":
|
case "error":
|
||||||
case "notfound":
|
case "notfound":
|
||||||
case "robots.txt":
|
case "robots.txt":
|
||||||
case "search":
|
|
||||||
case "search.xml":
|
case "search.xml":
|
||||||
case "user.js":
|
case "user.js":
|
||||||
return true;
|
return true;
|
||||||
|
@ -243,6 +242,7 @@ Site.prototype.getPermission = function(action) {
|
||||||
case "comments.xml":
|
case "comments.xml":
|
||||||
case "rss.xml":
|
case "rss.xml":
|
||||||
case "rss.xsl":
|
case "rss.xsl":
|
||||||
|
case "search":
|
||||||
case "stories.xml":
|
case "stories.xml":
|
||||||
return Site.require(Site.PUBLIC) ||
|
return Site.require(Site.PUBLIC) ||
|
||||||
(Site.require(Site.RESTRICTED) &&
|
(Site.require(Site.RESTRICTED) &&
|
||||||
|
@ -259,6 +259,7 @@ Site.prototype.getPermission = function(action) {
|
||||||
|
|
||||||
case "subscribe":
|
case "subscribe":
|
||||||
return Site.require(Site.PUBLIC) &&
|
return Site.require(Site.PUBLIC) &&
|
||||||
|
User.require(User.REGULAR) &&
|
||||||
!Membership.require(Membership.SUBSCRIBER);
|
!Membership.require(Membership.SUBSCRIBER);
|
||||||
|
|
||||||
case "unsubscribe":
|
case "unsubscribe":
|
||||||
|
@ -914,12 +915,15 @@ Site.prototype.getDiskSpace = function(quota) {
|
||||||
* @param {String} href
|
* @param {String} href
|
||||||
*/
|
*/
|
||||||
Site.prototype.processHref = function(href) {
|
Site.prototype.processHref = function(href) {
|
||||||
var scheme = req.servletRequest ? req.servletRequest.scheme : "http";
|
if (["localhost", "127.0.0.1"].indexOf(req.data.http_host) > -1) {
|
||||||
var domain = getProperty("domain." + this.name);
|
var site = app.properties.hrefRootPrototype ? this.name : String.EMPTY;
|
||||||
if (domain) {
|
return [app.appsProperties.mountPoint, "/", site, href].join(String.EMPTY);
|
||||||
href = [scheme, "://", domain, href].join(String.EMPTY);
|
}
|
||||||
} else if (domain = getProperty("domain.www")) {
|
var domain, scheme = req.servletRequest ? req.servletRequest.scheme : "http";
|
||||||
href = [scheme, "://", domain, "/", this.name, href].join(String.EMPTY);
|
if (domain = getProperty("domain." + this.name)) {
|
||||||
|
return [scheme, "://", domain, href].join(String.EMPTY);
|
||||||
|
} else if (domain = getProperty("domain.*")) {
|
||||||
|
return [scheme, "://", this.name, ".", domain, href].join(String.EMPTY);
|
||||||
}
|
}
|
||||||
return href;
|
return href;
|
||||||
}
|
}
|
||||||
|
|
|
@ -281,7 +281,7 @@ a:hover {text-decoration: underline;}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dayHeader {
|
.dayHeader {
|
||||||
font-family: <% value "small font size" %>;
|
font-family: <% value "small font" %>;
|
||||||
font-size: <% value "small font size" %>;
|
font-size: <% value "small font size" %>;
|
||||||
color: <% value "small font color" %>;
|
color: <% value "small font color" %>;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
|
@ -275,25 +275,29 @@ Skin.prototype.getFormValue = function(name) {
|
||||||
* @returns {String}
|
* @returns {String}
|
||||||
*/
|
*/
|
||||||
Skin.prototype.getSource = function() {
|
Skin.prototype.getSource = function() {
|
||||||
var skinSet = app.getSkinfilesInPath(res.skinpath)[this.prototype];
|
var skin;
|
||||||
if (skinSet) {
|
// FIXME: Maintain skin inheritance by checking if we target the Site skin of root
|
||||||
var mainSkin = skinSet[this.prototype];
|
if (res.handlers.site === root && this.prototype === "Site") {
|
||||||
if (mainSkin) {
|
skin = this.getSubskin("Root");
|
||||||
var skin = createSkin(mainSkin).getSubskin(this.name);
|
if (skin) {
|
||||||
if (skin) {
|
return skin.getSource();
|
||||||
return skin.getSource();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null; //String.EMPTY;
|
skin = this.getSubskin();
|
||||||
|
if (skin) {
|
||||||
|
return skin.getSource();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {String} source
|
* @param {String} source
|
||||||
*/
|
*/
|
||||||
Skin.prototype.setSource = function(source) {
|
Skin.prototype.setSource = function(source) {
|
||||||
var skin = this.getMainSkin();
|
// FIXME: Maintain skin inheritance by checking if we target the Site skin of root
|
||||||
|
var prototype = (res.handlers.site === root && this.prototype === "Site") ? "Root" : this.prototype;
|
||||||
|
var skin = this.getMainSkin(prototype);
|
||||||
if (!skin) {
|
if (!skin) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -335,17 +339,36 @@ Skin.prototype.setSource = function(source) {
|
||||||
* @returns {java.io.File}
|
* @returns {java.io.File}
|
||||||
*/
|
*/
|
||||||
Skin.prototype.getStaticFile = function() {
|
Skin.prototype.getStaticFile = function() {
|
||||||
return new java.io.File(res.skinpath[0], this.prototype + "/" +
|
// FIXME: Maintain skin inheritance by checking if we target the Site skin of root
|
||||||
this.prototype + ".skin");
|
var prototype = (res.handlers.site === root && this.prototype === "Site") ? "Root" : this.prototype;
|
||||||
|
return new java.io.File(res.skinpath[0], prototype + "/" + this.prototype + ".skin");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param {String} prototype
|
||||||
* @returns {Skin}
|
* @returns {Skin}
|
||||||
*/
|
*/
|
||||||
Skin.prototype.getMainSkin = function() {
|
Skin.prototype.getMainSkin = function(prototype) {
|
||||||
var skinSet = app.getSkinfilesInPath(res.skinpath)[this.prototype];
|
var source, skinSet = app.getSkinfilesInPath(res.skinpath)[prototype || this.prototype];
|
||||||
if (skinSet && skinSet[this.prototype]) {
|
if (skinSet) {
|
||||||
return createSkin(skinSet[this.prototype]);
|
source = skinSet[this.prototype];
|
||||||
|
if (source !== null) {
|
||||||
|
return createSkin(source);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param prototype
|
||||||
|
* @param name
|
||||||
|
* @returns {Skin}
|
||||||
|
*/
|
||||||
|
Skin.prototype.getSubskin = function(prototype, name) {
|
||||||
|
var mainSkin = this.getMainSkin(prototype);
|
||||||
|
if (mainSkin) {
|
||||||
|
return mainSkin.getSubskin(name || this.name);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,32 +169,20 @@ Skins.prototype.getSkin = function(group, name) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {String} type
|
|
||||||
* @returns {String}
|
* @returns {String}
|
||||||
*/
|
*/
|
||||||
Skins.prototype.getOutline = function(type) {
|
Skins.prototype.getOutline = function() {
|
||||||
var key = "outline:" + type;
|
var skinfiles, prototype, skin, subskins, names, skins = [];
|
||||||
var outline = this.cache[key];
|
|
||||||
if (outline) {
|
|
||||||
return outline;
|
|
||||||
}
|
|
||||||
|
|
||||||
var prototype, skin, subskins, names, skins = [];
|
|
||||||
var options = Skin.getPrototypeOptions();
|
var options = Skin.getPrototypeOptions();
|
||||||
|
|
||||||
for each (var option in options) {
|
for each (var option in options) {
|
||||||
prototype = option.value;
|
|
||||||
names = [];
|
names = [];
|
||||||
for (var name in app.skinfiles[prototype]) {
|
prototype = option.value;
|
||||||
if (name === prototype && type !== "custom") {
|
skinfiles = app.getSkinfilesInPath(res.skinpath);
|
||||||
skin = createSkin(app.skinfiles[prototype][name]);
|
skin = createSkin(skinfiles[prototype][prototype]);
|
||||||
subskins = skin.getSubskinNames();
|
subskins = skin.getSubskinNames();
|
||||||
for each (var subskin in subskins) {
|
for each (var subskin in subskins) {
|
||||||
names.push(subskin);
|
names.push(subskin);
|
||||||
}
|
|
||||||
} else if (name !== prototype && type === "custom") {
|
|
||||||
names.push(name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
names.sort();
|
names.sort();
|
||||||
skins.push([prototype, names]);
|
skins.push([prototype, names]);
|
||||||
|
@ -221,5 +209,5 @@ Skins.prototype.getOutline = function(type) {
|
||||||
html.closeTag("li");
|
html.closeTag("li");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this.cache[key] = res.pop();
|
return res.pop();
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ comments = collection(Comment)
|
||||||
comments.local = id
|
comments.local = id
|
||||||
comments.foreign = site_id
|
comments.foreign = site_id
|
||||||
comments.filter = story.id = content.story_id and story.status <> 'closed' and \
|
comments.filter = story.id = content.story_id and story.status <> 'closed' and \
|
||||||
story.comment_mode <> 'disabled'
|
story.comment_mode <> 'disabled' and content.status <> 'deleted'
|
||||||
comments.filter.additionalTables = content as story
|
comments.filter.additionalTables = content as story
|
||||||
comments.order = content.modified desc
|
comments.order = content.modified desc
|
||||||
comments.maxSize = 100
|
comments.maxSize = 100
|
||||||
|
@ -67,7 +67,7 @@ comments.maxSize = 100
|
||||||
union = collection(Story)
|
union = collection(Story)
|
||||||
union.local = id
|
union.local = id
|
||||||
union.foreign = site_id
|
union.foreign = site_id
|
||||||
union.filter = status <> 'closed' and status <> 'pending'
|
union.filter = status <> 'closed' and status <> 'pending' and status <> 'deleted'
|
||||||
union.order = modified desc
|
union.order = modified desc
|
||||||
union.maxSize = 100
|
union.maxSize = 100
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right" valign="baseline" class="small"><% param.position %></td>
|
<td align="right" valign="baseline" class="small"><% param.position %></td>
|
||||||
<td align="right" valign="baseline"><% story.requests %></td>
|
<td align="right" valign="baseline"><% story.requests %></td>
|
||||||
<td valign="baseline"><% story.created "yyyy-MM-dd" %></td>
|
<td valign="baseline" style="white-space: nowrap"><% story.created "yyyy-MM-dd" %></td>
|
||||||
<td valign="baseline"><% story.title | default <% story.text | clip 5 %> | story.link %></td>
|
<td valign="baseline"><% story.title | default <% story.text | clip 5 %> | story.link %></td>
|
||||||
<td valign="baseline"><% story.creator %></td>
|
<td valign="baseline"><% story.creator %></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -64,7 +64,7 @@ User.getStatus = defineConstants(User, markgettext("Blocked"),
|
||||||
* @returns {String}
|
* @returns {String}
|
||||||
*/
|
*/
|
||||||
User.getSalt = function() {
|
User.getSalt = function() {
|
||||||
var salt = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 8);;
|
var salt = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 8);
|
||||||
var random = java.security.SecureRandom.getInstance("SHA1PRNG");
|
var random = java.security.SecureRandom.getInstance("SHA1PRNG");
|
||||||
random.nextBytes(salt);
|
random.nextBytes(salt);
|
||||||
return Packages.sun.misc.BASE64Encoder().encode(salt);
|
return Packages.sun.misc.BASE64Encoder().encode(salt);
|
||||||
|
@ -241,6 +241,22 @@ User.getLocation = function() {
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename a user account.
|
||||||
|
* @param {String} currentName The current name of the user account.
|
||||||
|
* @param {String} newName The desired name of the user account.
|
||||||
|
*/
|
||||||
|
User.rename = function(currentName, newName) {
|
||||||
|
var user = User.getByName(currentName);
|
||||||
|
if (user) {
|
||||||
|
user.forEach(function() {
|
||||||
|
this.name = newName;
|
||||||
|
});
|
||||||
|
user.name = newName;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A User object represents a login to Antville.
|
* A User object represents a login to Antville.
|
||||||
* @name User
|
* @name User
|
||||||
|
|
|
@ -50,11 +50,13 @@ cron.nightly.minute = 0
|
||||||
#sessionTimeout = 30
|
#sessionTimeout = 30
|
||||||
#requestTimeout = 10
|
#requestTimeout = 10
|
||||||
|
|
||||||
## Options for rewriting URL output
|
## Options for rewriting URL output;
|
||||||
|
## enable the first three when mapping individual domains (see below)
|
||||||
#baseUri = /
|
#baseUri = /
|
||||||
#hrefSkin = $Site#href
|
|
||||||
#hrefFunction = processHref
|
#hrefFunction = processHref
|
||||||
#hrefRootPrototype = Site
|
#hrefRootPrototype = Site
|
||||||
|
#hrefSkin = $Site#href
|
||||||
|
|
||||||
## List of individual domain mappings
|
## List of default and individual domain mappings
|
||||||
|
#domain.* = antville.org
|
||||||
#domain.foo = bar.foo.org
|
#domain.foo = bar.foo.org
|
||||||
|
|
|
@ -209,8 +209,6 @@ function imageoftheday_macro(param) {
|
||||||
return image_macro(param);
|
return image_macro(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
var support_macro = new Function;
|
|
||||||
|
|
||||||
function renderColorAsString(c) {
|
function renderColorAsString(c) {
|
||||||
return c && c.isHexColor() ? "#" + c : c;
|
return c && c.isHexColor() ? "#" + c : c;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
// $URL$
|
// $URL$
|
||||||
//
|
//
|
||||||
|
|
||||||
Root.VERSION = "1.2-compatible";
|
Root.VERSION += "-compatible";
|
||||||
|
|
||||||
Root.prototype.rss_action = function() {
|
Root.prototype.rss_action = function() {
|
||||||
return res.redirect(root.href("rss.xml"));
|
return res.redirect(root.href("rss.xml"));
|
||||||
|
|
|
@ -57,7 +57,7 @@ Root.prototype.updater_action = function() {
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}, [], -1);
|
}, [], -1);
|
||||||
this.renderSkin("Root");
|
this.renderSkin("~Root");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ Root.prototype.nonames_action = function() {
|
||||||
});
|
});
|
||||||
status("finished");
|
status("finished");
|
||||||
}, [], -1);
|
}, [], -1);
|
||||||
this.renderSkin("Root");
|
this.renderSkin("~Root");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ Root.prototype.galleries_action = function() {
|
||||||
});
|
});
|
||||||
status("finished");
|
status("finished");
|
||||||
}, [], -1);
|
}, [], -1);
|
||||||
this.renderSkin("Root");
|
this.renderSkin("~Root");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
// Apply with enabled updater repository via ant patch -Dpatch.id=20100401
|
// Apply with enabled updater repository via ant patch -Dpatch.id=20100401
|
||||||
|
|
||||||
var sql = new Sql;
|
var sql = new Sql;
|
||||||
|
|
||||||
|
// Correct Image.contentLength property for some images
|
||||||
sql.retrieve("select id from image");
|
sql.retrieve("select id from image");
|
||||||
sql.traverse(function() {
|
sql.traverse(function() {
|
||||||
var image = Image.getById(this.id);
|
var image = Image.getById(this.id);
|
||||||
|
|
|
@ -28,6 +28,10 @@ var sql = new Sql;
|
||||||
var template;
|
var template;
|
||||||
|
|
||||||
// Remove MySQL-specific constraints (enum types)
|
// Remove MySQL-specific constraints (enum types)
|
||||||
|
// The database user needs ÒalterÓ permission for this patch:
|
||||||
|
// mysql -e "grant all on antville.* to 'antville'@'localhost'"
|
||||||
|
// Afterwards user permissions should be restored:
|
||||||
|
// mysql -e "grant select, insert, update, delete on antville.* to 'antville'@'localhost'"
|
||||||
if (app.getDbSource("antville").isMySQL()) {
|
if (app.getDbSource("antville").isMySQL()) {
|
||||||
template = "alter table $0 modify column $1 varchar(20) default null";
|
template = "alter table $0 modify column $1 varchar(20) default null";
|
||||||
sql.execute(template, "account", "status");
|
sql.execute(template, "account", "status");
|
||||||
|
@ -56,3 +60,10 @@ sql.execute(template, "subscriber", "Subscriber");
|
||||||
sql.execute(template, 'contributor', 'Contributor');
|
sql.execute(template, 'contributor', 'Contributor');
|
||||||
sql.execute(template, 'manager', 'Manager');
|
sql.execute(template, 'manager', 'Manager');
|
||||||
sql.execute(template, 'owner', 'Owner');
|
sql.execute(template, 'owner', 'Owner');
|
||||||
|
|
||||||
|
// Convert notification modes to lowercase
|
||||||
|
root.forEach(function() {
|
||||||
|
if (this.notificationMode !== null) {
|
||||||
|
this.notificationMode = this.notificationMode.toLowerCase()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
44
extra/updater/patch-20101209.js
Normal file
44
extra/updater/patch-20101209.js
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
//
|
||||||
|
// The Antville Project
|
||||||
|
// http://code.google.com/p/antville
|
||||||
|
//
|
||||||
|
// Copyright 2001-2007 by The Antville People
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
// $Revision$
|
||||||
|
// $LastChangedBy$
|
||||||
|
// $LastChangedDate$
|
||||||
|
// $URL$
|
||||||
|
//
|
||||||
|
|
||||||
|
// Apply with enabled updater repository via ant patch -Dpatch.id=20101209
|
||||||
|
|
||||||
|
root.forEach(function() {
|
||||||
|
var site = this;
|
||||||
|
var locale = site.locale;
|
||||||
|
// Update locales to new format
|
||||||
|
if (locale.contains("_")) {
|
||||||
|
site.locale = locale.substr(0, locale.lastIndexOf("_"));
|
||||||
|
}
|
||||||
|
// Update time zones to new format
|
||||||
|
var timeZone = site.timeZone;
|
||||||
|
switch (timeZone) {
|
||||||
|
case "CET":
|
||||||
|
site.timeZone = "Europe/Vienna";
|
||||||
|
break;
|
||||||
|
case "GMT":
|
||||||
|
site.timeZone = "Europe/London";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
|
@ -26,7 +26,7 @@ msgstr ""
|
||||||
"Project-Id-Version: Antville-1.2-compatible\n"
|
"Project-Id-Version: Antville-1.2-compatible\n"
|
||||||
"Report-Msgid-Bugs-To: mail@antville.org\n"
|
"Report-Msgid-Bugs-To: mail@antville.org\n"
|
||||||
"POT-Creation-Date: 2010-06-05 09:16+0200\n"
|
"POT-Creation-Date: 2010-06-05 09:16+0200\n"
|
||||||
"PO-Revision-Date: 2010-06-05 09:19+0100\n"
|
"PO-Revision-Date: 2011-01-06 18:15+0100\n"
|
||||||
"Last-Translator: Tobi Schäfer <interface@p3k.org>\n"
|
"Last-Translator: Tobi Schäfer <interface@p3k.org>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
|
@ -700,7 +700,7 @@ msgstr "Hauptseite"
|
||||||
#: /Users/tobi/Projects/helma/apps/antville/code/Root/Site.skin:10
|
#: /Users/tobi/Projects/helma/apps/antville/code/Root/Site.skin:10
|
||||||
#: /Users/tobi/Projects/helma/apps/antville/code/Site/Site.skin:17
|
#: /Users/tobi/Projects/helma/apps/antville/code/Site/Site.skin:17
|
||||||
msgid "Galleries"
|
msgid "Galleries"
|
||||||
msgstr "Gallerien"
|
msgstr "Galerien"
|
||||||
|
|
||||||
#: /Users/tobi/Projects/helma/apps/antville/code/Admin/$Admin.skin:269
|
#: /Users/tobi/Projects/helma/apps/antville/code/Admin/$Admin.skin:269
|
||||||
#: /Users/tobi/Projects/helma/apps/antville/code/Site/$Site.skin:171
|
#: /Users/tobi/Projects/helma/apps/antville/code/Site/$Site.skin:171
|
||||||
|
@ -1703,7 +1703,7 @@ msgstr "Website {0} wurde erfolgreich abonniert."
|
||||||
#: /Users/tobi/Projects/helma/apps/antville/code/Site/Site.js:629
|
#: /Users/tobi/Projects/helma/apps/antville/code/Site/Site.js:629
|
||||||
#, java-format
|
#, java-format
|
||||||
msgid "Successfully unsubscribed from site {0}."
|
msgid "Successfully unsubscribed from site {0}."
|
||||||
msgstr "Das Abonnement von Website {0} wurde erfolgreich storniert."
|
msgstr "Das Abonnement der Website {0} wurde erfolgreich storniert."
|
||||||
|
|
||||||
#: /Users/tobi/Projects/helma/apps/antville/code/Layout/Layout.js:151
|
#: /Users/tobi/Projects/helma/apps/antville/code/Layout/Layout.js:151
|
||||||
msgid "Successfully updated the layout."
|
msgid "Successfully updated the layout."
|
||||||
|
|
|
@ -145,7 +145,7 @@ global.messages['de'] = {
|
||||||
"Free Memory": "Freier Speicher",
|
"Free Memory": "Freier Speicher",
|
||||||
"Free Threads": "Freie Prozesse",
|
"Free Threads": "Freie Prozesse",
|
||||||
"Frontpage": "Hauptseite",
|
"Frontpage": "Hauptseite",
|
||||||
"Galleries": "Gallerien",
|
"Galleries": "Galerien",
|
||||||
"General": "Allgemein",
|
"General": "Allgemein",
|
||||||
"Good bye, {0}! Looking forward to seeing you again!": "Auf Wiedersehen, {0}! Schauen Sie bald wieder vorbei!",
|
"Good bye, {0}! Looking forward to seeing you again!": "Auf Wiedersehen, {0}! Schauen Sie bald wieder vorbei!",
|
||||||
"Grace Period": "Gnadenfrist",
|
"Grace Period": "Gnadenfrist",
|
||||||
|
|
|
@ -11,7 +11,7 @@ $(function() {
|
||||||
var zone = $(item);
|
var zone = $(item);
|
||||||
var parts = zone.val().split("/");
|
var parts = zone.val().split("/");
|
||||||
if (parts.length > 1) {
|
if (parts.length > 1) {
|
||||||
if (parts[0].indexOf("Etc") === 0 ||
|
if (/* parts[0].indexOf("Etc") === 0 || */
|
||||||
parts[0].indexOf("SystemV") === 0) {
|
parts[0].indexOf("SystemV") === 0) {
|
||||||
zone.remove();
|
zone.remove();
|
||||||
return;
|
return;
|
||||||
|
@ -68,22 +68,22 @@ jQuery.md5 = function (string) {
|
||||||
function FF(a,b,c,d,x,s,ac) {
|
function FF(a,b,c,d,x,s,ac) {
|
||||||
a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac));
|
a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac));
|
||||||
return AddUnsigned(RotateLeft(a, s), b);
|
return AddUnsigned(RotateLeft(a, s), b);
|
||||||
};
|
}
|
||||||
|
|
||||||
function GG(a,b,c,d,x,s,ac) {
|
function GG(a,b,c,d,x,s,ac) {
|
||||||
a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac));
|
a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac));
|
||||||
return AddUnsigned(RotateLeft(a, s), b);
|
return AddUnsigned(RotateLeft(a, s), b);
|
||||||
};
|
}
|
||||||
|
|
||||||
function HH(a,b,c,d,x,s,ac) {
|
function HH(a,b,c,d,x,s,ac) {
|
||||||
a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac));
|
a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac));
|
||||||
return AddUnsigned(RotateLeft(a, s), b);
|
return AddUnsigned(RotateLeft(a, s), b);
|
||||||
};
|
}
|
||||||
|
|
||||||
function II(a,b,c,d,x,s,ac) {
|
function II(a,b,c,d,x,s,ac) {
|
||||||
a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac));
|
a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac));
|
||||||
return AddUnsigned(RotateLeft(a, s), b);
|
return AddUnsigned(RotateLeft(a, s), b);
|
||||||
};
|
}
|
||||||
|
|
||||||
function ConvertToWordArray(string) {
|
function ConvertToWordArray(string) {
|
||||||
var lWordCount;
|
var lWordCount;
|
||||||
|
@ -106,7 +106,7 @@ jQuery.md5 = function (string) {
|
||||||
lWordArray[lNumberOfWords-2] = lMessageLength<<3;
|
lWordArray[lNumberOfWords-2] = lMessageLength<<3;
|
||||||
lWordArray[lNumberOfWords-1] = lMessageLength>>>29;
|
lWordArray[lNumberOfWords-1] = lMessageLength>>>29;
|
||||||
return lWordArray;
|
return lWordArray;
|
||||||
};
|
}
|
||||||
|
|
||||||
function WordToHex(lValue) {
|
function WordToHex(lValue) {
|
||||||
var WordToHexValue="",WordToHexValue_temp="",lByte,lCount;
|
var WordToHexValue="",WordToHexValue_temp="",lByte,lCount;
|
||||||
|
@ -116,7 +116,7 @@ jQuery.md5 = function (string) {
|
||||||
WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length-2,2);
|
WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length-2,2);
|
||||||
}
|
}
|
||||||
return WordToHexValue;
|
return WordToHexValue;
|
||||||
};
|
}
|
||||||
|
|
||||||
function Utf8Encode(string) {
|
function Utf8Encode(string) {
|
||||||
string = string.replace(/\r\n/g,"\n");
|
string = string.replace(/\r\n/g,"\n");
|
||||||
|
@ -142,7 +142,7 @@ jQuery.md5 = function (string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return utftext;
|
return utftext;
|
||||||
};
|
}
|
||||||
|
|
||||||
var x=Array();
|
var x=Array();
|
||||||
var k,AA,BB,CC,DD,a,b,c,d;
|
var k,AA,BB,CC,DD,a,b,c,d;
|
||||||
|
@ -230,7 +230,7 @@ jQuery.md5 = function (string) {
|
||||||
}
|
}
|
||||||
var temp = WordToHex(a)+WordToHex(b)+WordToHex(c)+WordToHex(d);
|
var temp = WordToHex(a)+WordToHex(b)+WordToHex(c)+WordToHex(d);
|
||||||
return temp.toLowerCase();
|
return temp.toLowerCase();
|
||||||
};
|
}
|
||||||
|
|
||||||
Antville = {};
|
Antville = {};
|
||||||
Antville.prefix = "Antville_";
|
Antville.prefix = "Antville_";
|
||||||
|
@ -243,11 +243,11 @@ Antville.encode = function(str) {
|
||||||
str = str.replace(re, "&#" + c.charCodeAt() + ";");
|
str = str.replace(re, "&#" + c.charCodeAt() + ";");
|
||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
};
|
}
|
||||||
|
|
||||||
Antville.decode = function(str) {
|
Antville.decode = function(str) {
|
||||||
return str.replace(/&/g, "&");
|
return str.replace(/&/g, "&");
|
||||||
};
|
}
|
||||||
|
|
||||||
Antville.Referrer = function(url, text, count) {
|
Antville.Referrer = function(url, text, count) {
|
||||||
this.url = url;
|
this.url = url;
|
||||||
|
@ -263,7 +263,7 @@ Antville.Referrer = function(url, text, count) {
|
||||||
return this.text;
|
return this.text;
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
};
|
}
|
||||||
|
|
||||||
Antville.Query = function(str) {
|
Antville.Query = function(str) {
|
||||||
if (str == undefined)
|
if (str == undefined)
|
||||||
|
@ -285,7 +285,7 @@ Antville.Query = function(str) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
};
|
}
|
||||||
|
|
||||||
Antville.Filter = function(def, key) {
|
Antville.Filter = function(def, key) {
|
||||||
this.key = key;
|
this.key = key;
|
||||||
|
@ -307,20 +307,4 @@ Antville.Filter = function(def, key) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
};
|
|
||||||
|
|
||||||
var app = {
|
|
||||||
clearCache: function() {
|
|
||||||
$.ajax({
|
|
||||||
async: true,
|
|
||||||
type: "POST",
|
|
||||||
url: '/helma/antville/debug',
|
|
||||||
data: "action=clearCache",
|
|
||||||
cache: false,
|
|
||||||
error: function() { /* ... */ },
|
|
||||||
success: function(str) {
|
|
||||||
console.log(str);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue