From 86ab48b06ad0755ce2e02f4e147b9738e453ecc4 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 13 Jun 2007 23:16:05 +0000 Subject: [PATCH] Adding a verify_unique() method to BSApi --- Api.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Api.php b/Api.php index 8534638..b6f9004 100644 --- a/Api.php +++ b/Api.php @@ -553,17 +553,16 @@ abstract class BSApi /** * Verify field: unique */ - /*protected function verify_unique($field) + protected function verify_unique($field) { $res = BSRegister::GetType('Db')->queryFirst("SELECT $field FROM {$this->prefix}{$this->table} WHERE $field = " . $this->_prepareFieldForSql($field) . (empty($this->condition) ? "" : " AND !({$this->condition})")); - var_dump($res); if ($res) { return sprintf(_('The "%1$s" field must contain a unique value'), $field); } return true; - }*/ + } } // ################################################################### -- 2.22.5