From 99457fa341d33006c4ff8b2b81196e5de60abb6a Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 25 Aug 2011 19:59:33 +0000 Subject: Cleaned up use of config files --- weblog-controller.lua | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'weblog-controller.lua') 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 -- cgit v1.2.3