<?php
App::uses('Model', 'Model');
class AppModel extends Model 
{

    public function beforeSave($options = array()) 
    {
        if (Configure::read('demo') === true && AppController::$demoBlockIgnore === false) {
            AppController::$demoBlocked = true;
            return false;
            exit();
        }
        return true;
    }
    
    public function beforeDelete($cascade = true) 
    {
        if (Configure::read('demo') === true && AppController::$demoBlockIgnore === false) {
            AppController::$demoBlocked = true;
            return false;
        }
        return true;
    }

}
