Enabled viewing of skin sources of root site (other sites will probably follow)

This commit is contained in:
Tobi Schäfer 2008-05-13 12:06:28 +00:00
parent 5b37a53eab
commit b3ffe1acb6
2 changed files with 7 additions and 2 deletions

View file

@ -220,7 +220,6 @@ HopObject.prototype.removeTag = function(tag) {
return;
}
// FIXME: This looks a little bit dangerous...
HopObject.prototype.skin_macro = function(param, name) {
if (!name) {
return;

View file

@ -80,7 +80,13 @@ Skin.prototype.href = function(action) {
}
Skin.prototype.main_action = function() {
return res.redirect(this.href("edit"));
if (res.handlers.site === root) {
res.contentType = "text/plain";
res.write(this.getSource());
return;
}
res.redirect(this.href("edit"));
return;
}
Skin.prototype.edit_action = function() {