Commit 8d0ef60c authored by Martin Gregor's avatar Martin Gregor
Browse files

povolenie alertu ak veta nemoze byt vlozena do db

parent 82175d8b
......@@ -76,7 +76,7 @@ class AdminPresenter extends BasePresenter
if ($word_count > 5 && !$exists)
{
$result = $this->db->table('sentences')->insert(['sentence' => $sentence,'word_count' => $word_count]);
if ($result)
if (!$result)
{
$this->flashMessage("Veta '$sentence' nebola spracovaná", 'alert alert-danger');
return FALSE;
......@@ -84,7 +84,7 @@ class AdminPresenter extends BasePresenter
}
else
{
// $this->flashMessage("Veta '$sentence' obsahuje nedostatočný počet slov alebo v systéme už existuje.",'alert alert-danger');
$this->flashMessage("Veta '$sentence' obsahuje nedostatočný počet slov alebo v systéme už existuje.",'alert alert-danger');
return FALSE;
}
......
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