Start of bugfixing for SAAS-349.
* Also identity verification for erry on Freenode.
This commit is contained in:
parent
52b7dbb226
commit
28a032388b
2 changed files with 27 additions and 1 deletions
24
airtime_mvc/application/validate/NotDemoValidate.php
Normal file
24
airtime_mvc/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 false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue