Messages Inbox Outbox

This commit is contained in:
Paminger
2016-06-23 10:28:26 +02:00
parent ab4c8ac373
commit 4f14e7fa92
17 changed files with 196 additions and 26 deletions
+6 -2
View File
@@ -128,7 +128,7 @@ class DB_Model extends FHC_Model
* @param string $id ID (Primary Key) for SELECT ... WHERE
* @return array
*/
public function load($id)
public function load($id = null)
{
// Check Class-Attributes
if (is_null($this->dbTable))
@@ -150,6 +150,8 @@ class DB_Model extends FHC_Model
else
$result = $this->db->get_where($this->dbTable, $id);
}
elseif (empty($id))
$result = $this->db->get($this->dbTable);
else
$result = $this->db->get_where($this->dbTable, array($this->pk => $id));
@@ -185,6 +187,8 @@ class DB_Model extends FHC_Model
return $this->_error($this->db->error(), FHC_DB_ERROR);
}
/** ---------------------------------------------------------------
* Load single data from DB-Table
*
@@ -212,7 +216,7 @@ class DB_Model extends FHC_Model
else
return $this->_error($this->db->error(), FHC_DB_ERROR);
}
/** ---------------------------------------------------------------
* Add a table to join with
*