Start of bugfixing for SAAS-349.

* Also identity verification for erry on Freenode.
This commit is contained in:
Albert Santoni 2013-09-26 15:18:41 -04:00
parent 52b7dbb226
commit 28a032388b
2 changed files with 27 additions and 1 deletions

View 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;
}
}
}