From 7122f9c7dfe4f7c87dd8f38c4051372d8acc2642 Mon Sep 17 00:00:00 2001 From: pzinovkin Date: Tue, 30 Mar 2010 19:35:29 +0000 Subject: [PATCH] insert() fixed, #8 git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@139 4cb57b5f-5bbd-dd11-951b-001d605cbbc5 --- i18n/I18N.php | 2 -- model/Model.php | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/i18n/I18N.php b/i18n/I18N.php index 0030840..f2623ef 100644 --- a/i18n/I18N.php +++ b/i18n/I18N.php @@ -50,7 +50,6 @@ class I18N self::setLang(self::$lang); self::$locale = self::$locales[self::$lang]; - //var_dump(self::$locale); putenv('LANG=' . self::$locale); setlocale(LC_ALL, self::$locale . '.UTF-8'); bindtextdomain(self::$domain, PATH . '/' . APP . '/src/i18n/'); @@ -97,7 +96,6 @@ class I18N return self::$lang; } - static public function setLangs($langs = array()) { self::$langs = $langs; diff --git a/model/Model.php b/model/Model.php index e255a02..85df5ee 100644 --- a/model/Model.php +++ b/model/Model.php @@ -97,9 +97,7 @@ abstract class Model implements iCacheable */ public function insert($data, $on_duplicate = array()) { - if (!$affected = $this->db->insert($this->table(false), $data, $on_duplicate)) { - return false; - } + $affected = $this->db->insert($this->table(false), $data, $on_duplicate); return ($this->getInsertId()) ? $this->getInsertId() : $affected; }