/** * Check to see if the given DB value is equivalent to this value. * @param mixed $db_value Either a DB Value or an I2CE_FormField * @return boolean */ public function isSameValue($db_value) { return parent::isSameValue($db_value) && $this->compare($db_value) == 0; }
/** * Checks to see if the value of the form field is the same as in the db * @param I2CE_FormField $form_field * @param boolean $do_check * @return boolean * */ protected function FF_isSameValue($form_field, $do_check) { if ($do_check) { if (!$this->prepareCheckStatement($form_field->getTypeString())) { return false; } $res = self::$prepared['check'][$form_field->getTypeString()]->execute(array($form_field->getContainer()->getId(), $form_field->getAttribute("DBEntry_form_field_id"))); if (isset($res) && !I2CE::pearError($res, "Error checking duplicate value:") && ($check = $res->fetchRow())) { if ($form_field->isSameValue($check->value)) { return true; } } } return false; }