Browse Source

insert() fixed, #8

git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@139 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
master
pzinovkin 15 years ago
parent
commit
7122f9c7df
  1. 2
      i18n/I18N.php
  2. 4
      model/Model.php

2
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;

4
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;
}

Loading…
Cancel
Save