Commit 0b36b303 authored by Martin Gregor's avatar Martin Gregor
Browse files

FIX - odstranenie tagov pri ukladani do db

parent 5fc033a4
......@@ -166,7 +166,7 @@ class HomepagePresenter extends BasePresenter
$word_en_id = $this->db->table('word_en')->select('id')->where(['word_en' => $word])->fetch();
if (!$word_en_id)
{
$this->db->table('word_en')->insert(['word_en' => $word]);
$this->db->table('word_en')->insert(['word_en' => strip_tags($word)]);
$word_en_id = $this->db->lastInsertId();
}
else
......@@ -283,7 +283,7 @@ class HomepagePresenter extends BasePresenter
$word_en_id = $this->db->table('word_en')->where(['word_en' => $word])->select('id')->fetch();
$word_sk_id = $this->db->table('word_sk')->where(['word_sk' => $this->words[$position],'word_lema' => $this->words_lema[$position]])->select('id')->fetch();
if (!$word_en_id)
$word_en_id = $this->db->table('word_en')->insert(['word_en' => $word]);
$word_en_id = $this->db->table('word_en')->insert(['word_en' => strip_tags($word)]);
if (!$word_sk_id)
$word_sk_id = $this->db->table('word_sk')->insert(['word_sk' => $this->words[$position], 'word_lema' => $this->words_lema[$position]]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment