- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
/**
* return the current rule value
* @param String $rule
* @return Mixed
*/
public static function findRule($rule)
{
$criteria=new CDbCriteria;
$criteria->compare('rule',$rule);
$model = self::model();
$model->scenario = 'find_rule';
$result = $model->find($criteria);
if ($result !== NULL) {
if ($result->value === 'TRUE')
$result->value = true;
if ($result->value === 'FALSE')
$result->value = false;
return $result->value;
}else
return false;
}
_jokz 04.02.2012 17:22 # +1
delancer 04.02.2012 23:47 # 0
bugmenot 04.02.2012 23:56 # +5
delancer 05.02.2012 01:14 # 0
_jokz 05.02.2012 12:50 # 0
delancer 06.02.2012 13:37 # 0
eth0 06.02.2012 21:10 # +1
Как-то так.
Sc0rp10 16.02.2012 17:34 # +1
guest8 09.04.2019 12:38 # −999