コード例 #1
0
 function check()
 {
     if (!$this->text_name) {
         $this->setError(JText::_('COM_REDEVENT_NAME_IS_REQUIRED'));
         return false;
     }
     // check tag unicity
     $exists = ELAdmin::checkTagExists($this->text_name);
     if ($exists && !($exists->section == 'library' && $exists->id == $this->id)) {
         $this->setError(JText::sprintf('COM_REDEVENT_ERROR_TAG_ALREADY_EXISTS', $exists->section));
         return false;
     }
     return true;
 }
コード例 #2
0
 /**
  * Overloaded check method to ensure data integrity
  *
  * @access public
  * @return boolean True on success
  * @since 1.0
  */
 function check()
 {
     // check that there is only alphanumerics in tag ?
     // check tag unicity
     $exists = ELAdmin::checkTagExists($this->tag);
     if ($exists && !($exists->section == 'custom' && $exists->id == $this->id)) {
         $this->setError(JText::sprintf('COM_REDEVENT_ERROR_TAG_ALREADY_EXISTS', $exists->section));
         return false;
     }
     return true;
 }