Skip to content

Commit

Permalink
Add ability to create item
Browse files Browse the repository at this point in the history
  • Loading branch information
rmccue committed Dec 30, 2009
1 parent 70c683f commit 46f4bc8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion numbat/classes/item.php
Expand Up @@ -57,7 +57,10 @@ public function get_view() {
* @param string $type Data type to save
* @throws Exception
*/
public function update($key, $value, $type) {
public function update($key, $value, $type, $id = null) {
if (!empty($id))
$this->id = $id;

if (!isset($this->data[$key]))
$result = Database::instance()->insert(
array('table' => 'numbat_items'), // Params
Expand Down

0 comments on commit 46f4bc8

Please sign in to comment.