Skip to content

Commit

Permalink
Fixed #22
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmaack committed Sep 18, 2016
1 parent 23731b1 commit edb2f92
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Backend/TagUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,14 @@ public function createTag($data)
$data['sh5_pid'] = $data['id'];
$data['sorting'] = $data['sorting'] + 1;
}

$data['tstamp'] = time();
unset($data['id']);

//remove fields which are not present in the db table (See #22)
$tableFields = array_flip(\Database::getInstance()->getFieldNames($this->table));
$data = array_intersect_key($data, $tableFields);

// Insert the tag
$result = \Database::getInstance()
->prepare("INSERT INTO " . $this->table . " %s")
Expand Down

0 comments on commit edb2f92

Please sign in to comment.