summaryrefslogtreecommitdiffstats
path: root/squid-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-11-22 15:00:05 +0000
committerTed Trask <ttrask01@yahoo.com>2008-11-22 15:00:05 +0000
commitd41ac890afab7ceea8e89907b1d8b5b0fa825498 (patch)
tree0e045fd874d807326c15ddcc9cf8bfab592ccee2 /squid-controller.lua
parentb29f2da408e9654c90d2a183b11025c4f1fa53eb (diff)
downloadacf-squid-d41ac890afab7ceea8e89907b1d8b5b0fa825498.tar.bz2
acf-squid-d41ac890afab7ceea8e89907b1d8b5b0fa825498.tar.xz
Enhanced squid to view and edit files within /etc/squid.
git-svn-id: svn://svn.alpinelinux.org/acf/squid/trunk@1609 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'squid-controller.lua')
-rw-r--r--squid-controller.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/squid-controller.lua b/squid-controller.lua
index cda4b7f..1cd1280 100644
--- a/squid-controller.lua
+++ b/squid-controller.lua
@@ -61,3 +61,19 @@ deleteacl = function( self )
return self:redirect_to_referrer(self.model.delete_acl(self.clientdata.linenum))
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 Squid File", "Squid 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 Squid File", "Squid File Saved" )
+end
+
+function deletefile(self)
+ return self:redirect_to_referrer(self.model.deletefile(self.clientdata.filename))
+end