Example #1
0
 function execute()
 {
     $map = new ComponentMap_Article();
     if (!$map->isAllowed('publish')) {
         return false;
     }
     return parent::execute();
 }
Example #2
0
 function setDynamicValues()
 {
     $this->addTranslation('section', '_checkNewSection', 'get');
     $this->addTranslation('image_upload', '_manageUpload', 'get');
     $this->addTranslation('picture', '_checkUploadImage', 'get');
     $this->addTranslation('doc_upload', '_manageUpload', 'get');
     $this->addTranslation('doc', '_checkUploadFile', 'get');
     $this->addTranslation('link', '_checkToolLink', 'get');
     $this->addTranslation('link', '_checkDocLink', 'get');
     $this->addTranslation('wysiwyg_setting', '_returnBlankCheckbox', 'get');
     $this->addTranslation('wysiwyg_setting', '_checkWysiwyg', 'get');
     $this->addTranslation('wysiwyg_setting', '_evalWysiwyg', 'set');
     $this->addTranslation('date', '_makeDbDateTime', 'get');
     $this->addTranslation('date', '_makeNullDate', 'set');
     $this->addTranslation('comments_allowed_until', '_makeDbDateTime', 'get');
     $this->addTranslation('comments_allowed_until', '_makeNullDate', 'set');
     $this->addTranslation('sections_related', '_getRelatedSections', 'set');
     $this->addTranslation('sections_related', '_getMultiSelectBlanks', 'get');
     $this->addTranslation('tags', '_getTags', 'set');
     $this->addTranslation('tags', '_getMultiSelectBlanks', 'get');
     $this->addTranslation('tags', '_assembleTags', 'get');
     $this->addTranslation('transfer_mode_setting', '_returnBlankCheckbox', 'get');
     $this->addTranslation('transfer_mode_setting', '_checkTransferMode', 'get');
     $this->addTranslation('transfer_mode_setting', '_evalTransferMode', 'set');
     if (AMP_CONTENT_WORKFLOW_ENABLED && isset($this->fields['publish'])) {
         $this->fields['publish']['label'] = str_replace('PUBLISH', 'Status', $this->fields['publish']['label']);
         $this->fields['publish']['type'] = 'select';
         $this->fields['publish']['values'] = AMP_lookup('status');
         $this->addTranslation('notes', 'get_revision_notes', 'get');
         require_once 'AMP/Content/Article/ComponentMap.inc.php';
         $map = new ComponentMap_Article();
         if (!$map->isAllowed('publish')) {
             $this->addTranslation('publish', 'no_publish_allowed', 'get');
             $this->fields['publish']['values'] = AMP_lookup('status_no_publish');
         } else {
             $this->fields['status_comments_header']['type'] = 'blocktrigger';
             $this->fields['status_comments']['type'] = 'textarea';
         }
     }
     if (!AMP_CONTENT_HUMANIZE_URLS) {
         unset($this->fields['route_slug']);
         unset($this->fields['route_slug_info']);
     } else {
         #alias feature duplicates pretty urls
         unset($this->fields['alias_header']);
         unset($this->fields['new_alias_name_header']);
         unset($this->fields['new_alias_name_footer']);
         unset($this->fields['new_alias_name']);
     }
     if (!AMP_lookup('image_folders')) {
         unset($this->fields['image_folder']);
     }
 }
Example #3
0
<?php

if ($_REQUEST['sort_direction'] == "DESC") {
    $_REQUEST['sort_direction'] = " DESC";
}
require_once 'AMP/Content/Article/ComponentMap.inc.php';
$map = new ComponentMap_Article();
$controller =& $map->get_controller();
print $controller->execute();
ob_end_flush();