Enabled viewing of skin sources of root site (other sites will probably follow)
This commit is contained in:
parent
5b37a53eab
commit
b3ffe1acb6
2 changed files with 7 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue