Rename airtime_mvc/ to legacy/
This commit is contained in:
parent
f0879322c2
commit
3e18d42c8b
1316 changed files with 0 additions and 0 deletions
24
legacy/application/validate/NotDemoValidate.php
Normal file
24
legacy/application/validate/NotDemoValidate.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
class Application_Validate_NotDemoValidate extends Zend_Validate_Abstract
|
||||
{
|
||||
const NOTDEMO = 'notdemo';
|
||||
|
||||
protected $_messageTemplates = array(
|
||||
self::NOTDEMO => "Cannot be changed in demo mode"
|
||||
);
|
||||
|
||||
public function isValid($value)
|
||||
{
|
||||
$this->_setValue($value);
|
||||
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
if (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1) {
|
||||
$this->_error(self::NOTDEMO);
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue