10 defined(
'JPATH_PLATFORM') or die;
30 parent::__construct(
'#__languages',
'lang_id', $db);
40 public function check()
42 if (trim($this->title) ==
'')
44 $this->setError(
JText::_(
'JLIB_DATABASE_ERROR_LANGUAGE_NO_TITLE'));
61 public function store($updateNulls =
false)
66 if ($table->load(array(
'sef' => $this->sef)) && ($table->lang_id != $this->lang_id || $this->lang_id == 0))
68 $this->setError(
JText::_(
'JLIB_DATABASE_ERROR_LANGUAGE_UNIQUE_SEF'));
74 if ($table->load(array(
'image' => $this->image)) && ($table->lang_id != $this->lang_id || $this->lang_id == 0))
76 $this->setError(
JText::_(
'JLIB_DATABASE_ERROR_LANGUAGE_UNIQUE_IMAGE'));
82 if ($table->load(array(
'lang_code' => $this->lang_code)) && ($table->lang_id != $this->lang_id || $this->lang_id == 0))
84 $this->setError(
JText::_(
'JLIB_DATABASE_ERROR_LANGUAGE_UNIQUE_LANG_CODE'));
89 return parent::store($updateNulls);