summaryrefslogtreecommitdiffstats
path: root/weblog-controller.lua
diff options
context:
space:
mode:
Diffstat (limited to 'weblog-controller.lua')
-rw-r--r--weblog-controller.lua11
1 files changed, 2 insertions, 9 deletions
diff --git a/weblog-controller.lua b/weblog-controller.lua
index 2ae0504..11d8109 100644
--- a/weblog-controller.lua
+++ b/weblog-controller.lua
@@ -162,14 +162,7 @@ end
function listfiles(self)
return self.model.listfiles(self)
end
-function createfile(self)
- return controllerfunctions.handle_form(self, self.model.getnewfile, self.model.createfile, self.clientdata, "Create", "Create New Weblog File", "Weblog File Created")
-end
-
+
function editfile(self)
- return controllerfunctions.handle_form(self, function() return self.model.readfile(self.clientdata.filename) end, self.model.updatefile, self.clientdata, "Save", "Edit Weblog File", "Weblog File Saved" )
-end
-
-function deletefile(self)
- return self:redirect_to_referrer(self.model.deletefile(self.clientdata.filename))
+ return controllerfunctions.handle_form(self, function() return self.model.readfile(self.clientdata.filename) end, self.model.updatefile, self.clientdata, "Save", "Edit Weblog File", "Weblog File Saved" )
end