diff options
| author | ccwn <tzur@ccwn.org> | 2012-04-24 18:49:57 +0200 |
|---|---|---|
| committer | ccwn <tzur@ccwn.org> | 2012-04-24 18:49:57 +0200 |
| commit | c98745edd2c7b2f48bc3493c4dd9a061376c4720 (patch) | |
| tree | ca1b559f220ec28c3f263d02a8b832613493471f /protected/models/Standort.php | |
| parent | 314328f527e8cae759d496f528a1472d7970c137 (diff) | |
- Database setup
- Database schema
- Database dev data
- config for new database setup
- Update in AngebotVerein
- Update in Speis&Trank
- Update in Verein
- Update in Kategorie
Diffstat (limited to 'protected/models/Standort.php')
| -rw-r--r-- | protected/models/Standort.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/protected/models/Standort.php b/protected/models/Standort.php index 48493f6..b7eddcf 100644 --- a/protected/models/Standort.php +++ b/protected/models/Standort.php @@ -5,6 +5,7 @@ * * The followings are the available columns in table 'standort': * @property integer $id + * @property string $type * @property string $name * @property double $pos_lat * @property double $pos_long @@ -43,13 +44,14 @@ class Standort extends CActiveRecord // NOTE: you should only define rules for those attributes that // will receive user inputs. return array( - array('name, pos_lat, pos_long', 'required'), + array('name, pos_lat, pos_long, type', 'required'), array('published', 'numerical', 'integerOnly'=>true), array('pos_lat, pos_long', 'numerical'), + array('type', 'length', 'max'=>6), array('name', 'length', 'max'=>80), // The following rule is used by search(). // Please remove those attributes that should not be searched. - array('id, name, pos_lat, pos_long, published', 'safe', 'on'=>'search'), + array('id, type, name, pos_lat, pos_long, published', 'safe', 'on'=>'search'), ); } @@ -71,6 +73,7 @@ class Standort extends CActiveRecord { return array( 'id' => 'ID', + 'type' => 'Type', 'name' => 'Name', 'pos_lat' => 'Pos Lat', 'pos_long' => 'Pos Long', @@ -90,6 +93,7 @@ class Standort extends CActiveRecord $criteria=new CDbCriteria; $criteria->compare('id',$this->id); + $criteria->compare('type',$this->type,true); $criteria->compare('name',$this->name,true); $criteria->compare('pos_lat',$this->pos_lat); $criteria->compare('pos_long',$this->pos_long); |
