summaryrefslogtreecommitdiffstats
path: root/app/model/common.mod.php
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2016-05-22 00:24:57 -0400
committerMalf Furious <m@lfurio.us>2016-05-22 00:24:57 -0400
commitf8f8cd372ca2bb6498d96318c159405db13a9fab (patch)
tree612b01656f49418c1825421027ca8911bef547a7 /app/model/common.mod.php
parent685c64e3ac98bcf5fc2b17fade4f00726e95b8b0 (diff)
downloadscrott-f8f8cd372ca2bb6498d96318c159405db13a9fab.tar.gz
scrott-f8f8cd372ca2bb6498d96318c159405db13a9fab.zip
Add class constructor to Common model
There are two functions that need called in the common model whenever a page is rendered. Rather than requiring all of the base MVC controllers to call them, I am placing them in a constructor for this model class. This constructor should fire automatically (since base mvc models inherit this class), unless base classes define their own constructors. I don't antisipate this happening, however in that case, they would just need to call parent::__construct().
Diffstat (limited to '')
-rw-r--r--app/model/common.mod.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/model/common.mod.php b/app/model/common.mod.php
index 7630dfa..03ed54f 100644
--- a/app/model/common.mod.php
+++ b/app/model/common.mod.php
@@ -14,6 +14,16 @@ class CommonModel extends MasterModel
);
/*
+ * Constructor
+ */
+ function __construct()
+ {
+ parent::__construct();
+ $this->common_handleFormSubmissions($_REQUEST['input'], $_FILES['attachment']);
+ $this->common_deflt();
+ }
+
+ /*
* Default action
*/
function common_deflt()