Added InvoiceJob
This commit is contained in:
@@ -32,7 +32,7 @@ class mfBaseModel {
|
||||
* Takes ID or DB row as arguments
|
||||
* @param id or table row $_
|
||||
*/
|
||||
public function __construct($_ = NULL) {
|
||||
public function __construct($_ = NULL, $new_db_connection = false) {
|
||||
$this->log = mfLoghandler::singleton();
|
||||
$this->table = get_class($this);
|
||||
$this->data = new stdClass();
|
||||
@@ -46,6 +46,9 @@ class mfBaseModel {
|
||||
|
||||
if(FRONKDB) {
|
||||
$this->db = FronkDB::singleton();
|
||||
if($new_db_connection) {
|
||||
$this->db->reconnect();
|
||||
}
|
||||
}
|
||||
|
||||
if(method_exists($this, "init")) {
|
||||
@@ -59,6 +62,10 @@ class mfBaseModel {
|
||||
}
|
||||
}
|
||||
|
||||
public function reconnectDB() {
|
||||
$this->db->reconnect();
|
||||
}
|
||||
|
||||
public function load($row) {
|
||||
if(!is_object($this->data)) {
|
||||
$this->data = new stdClass();
|
||||
|
||||
Reference in New Issue
Block a user