function isAllowed($action, $id = false) { if ($action == 'subscribe' && (!AMP_MODULE_BLAST || AMP_MODULE_BLAST == 'AMP')) { return false; } return parent::isAllowed($action, $id); }
function isAllowed($action, $model_id = false) { $allowed_layouts = AMP_lookup('navLayouts'); if ($model_id && !isset($allowed_layouts[$model_id])) { return false; } return parent::isAllowed($action, $model_id); }
function isAllowed($action, $model_id = false) { if ($model_id) { $allowed_articles = AMP_lookup('AllowedArticles'); $articles = AMP_lookup('articles_existing'); $model = $this->getComponent('source'); $model->readData($model_id); $article_id = $model->getArticle(); if (isset($articles[$article_id]) && !isset($allowed_articles[$article_id])) { return false; } } return parent::isAllowed($action, $model_id); }
function isAllowed($action, $model_id = false) { if ($model_id) { require_once 'AMP/Content/Article.inc.php'; $article = new Article(AMP_Registry::getDbcon(), $model_id); if (!$article->hasData()) { return false; } $section_id = $article->getParent(); $allowed_sections = AMP_lookup('sectionMap'); if ($section_id == AMP_CONTENT_MAP_ROOT_SECTION) { return true; } if (!$allowed_sections) { return false; } if (!isset($allowed_sections[$section_id])) { return false; } } return parent::isAllowed($action, $model_id); }