Example #1
0
 /**
  * Display page with migration setting.
  *
  * @param $tpl used template
  * @return void
  */
 function display($tpl = null)
 {
     JToolBarHelper::title(JText::_('JOOMDOC_MIGRATION'), 'migration');
     JoomDOCHelper::setSubmenu(JOOMDOC_MIGRATION);
     // use the same dialog as during installation
     require_once JPATH_COMPONENT_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'install.php';
     com_joomdocInstallerScript::install(false, false);
 }
Example #2
0
 public function display($tpl = null)
 {
     if (!JFactory::getUser()->authorise('core.managafields', 'com_joomdoc')) {
         return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
     }
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     JoomDOCHelper::setSubmenu(JOOMDOC_FIELDS);
     $this->addToolbar();
     parent::display($tpl);
 }
Example #3
0
 /**
  * Display page with licenses browse table.
  *
  * @param $tpl used template
  * @return void
  */
 public function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     /* @var $mainframe JAdministrator */
     $this->getModel()->setState(JOOMDOC_FILTER_KEYWORDS, $mainframe->getUserStateFromRequest('joomdoc_licenses_filter', 'filter', '', 'string'));
     $this->licenses = $this->get('items');
     $this->state = $this->get('state');
     $this->filter = $this->state->get('filter');
     $this->pagination = new JPagination($this->get('total'), $this->state->get(JOOMDOC_FILTER_START), $this->state->get(JOOMDOC_FILTER_LIMIT));
     $this->addToolbar();
     JoomDOCHelper::setSubmenu(JOOMDOC_LICENSES);
     parent::display($tpl);
 }
Example #4
0
 /**
  * Display page with upgrade setting.
  * 
  * @param $tpl used template
  * @return void
  */
 function display($tpl = null)
 {
     JToolBarHelper::title(JText::_('Online Upgrade'), 'upgrade');
     if ($this->getLayout() == 'message') {
         $url = sprintf('index.php?option=%s&view=upgrade', ARTIO_UPGRADE_OPTION);
         $redir = JRequest::getVar('redirto', null, 'post');
         if (!is_null($redir)) {
             $url = sprintf('index.php?option=%s&%s', ARTIO_UPGRADE_OPTION, $redir);
         }
         JToolBarHelper::back('Continue', $url);
         $this->assign('url', $url);
     }
     $language = JFactory::getLanguage();
     /* @var $language JLanguage */
     $language->load(sprintf('%s.upgrade', ARTIO_UPGRADE_OPTION), JPATH_ADMINISTRATOR);
     JoomDOCHelper::setSubmenu(JOOMDOC_UPGRADE);
     parent::display($tpl);
 }
Example #5
0
 /**
  * Display page with component cpanel.
  * 
  * @param $tpl used template
  * @return void
  */
 public function display($tpl = null)
 {
     $this->addToolbar();
     JoomDOCHelper::setSubmenu(JOOMDOC_JOOMDOC);
     parent::display($tpl);
 }
Example #6
0
 /**
  * Display page with folder content.
  *
  * @param $tpl used template
  * @return void
  */
 public function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     /* @var $mainframe JAdministrator */
     $config = JoomDOCConfig::getInstance();
     /* @var $config JoomDOCConfig */
     $model = $this->getModel();
     /* @var $model JoomDOCModelDocuments */
     $document = JFactory::getDocument();
     /* @var $document JDocumentHTML */
     if ($this->getLayout() != 'modal') {
         //$mainframe->enqueueMessage(JText::_('JOOMDOC_KEEP_FLAT'));
     }
     // relative path from request or user session
     $path = JoomDOCRequest::getPath();
     if ($path == JText::_('JOOMDOC_ROOT')) {
         $path = '';
     }
     // convert to absolute path
     $path = JoomDOCFileSystem::getFullPath($path);
     //if folder not exists (e.g. was renamed), fallback to root
     if (!JFolder::exists($path)) {
         $path = JoomDOCFileSystem::getFullPath('');
     }
     $this->filter = $mainframe->getUserStateFromRequest(JoomDOCRequest::getSessionPrefix() . 'filter', 'filter', '', 'string');
     $this->root = JoomDOCFileSystem::getFolderContent($path, '');
     // control if select folder is subfolder of docroot
     if ((!JoomDOCFileSystem::isSubFolder($path, $config->docroot) || $this->root === false) && $config->docroot !== false) {
         JError::raiseError(403, JText::_('JOOMDOC_UNABLE_ACCESS_FOLDER'));
     }
     // search filter setting
     $this->search = new JObject();
     $this->search->keywords = $this->filter;
     // search areas (search everywhere - don't use frontend detail setting)
     $this->search->areaTitle = $this->search->areaText = $this->search->areaFull = true;
     $this->search->areaMeta = false;
     // looking for any word
     $this->search->type = JOOMDOC_SEARCH_ANYKEY;
     $model->setState(JoomDOCView::getStateName(JOOMDOC_FILTER_PATHS), $this->root->getPaths());
     $model->setState(JoomDOCView::getStateName(JOOMDOC_FILTER_SEARCH), $this->search);
     $model->setState(JOOMDOC_FILTER_STATE, $mainframe->getUserStateFromRequest(JoomDOCRequest::getSessionPrefix() . 'state', 'state', JOOMDOC_STATE_PUBLISHED, 'int'));
     $this->documents = $model->getItems();
     $this->state = $model->getState();
     $this->pagination = new JPagination($model->getTotal(), $this->state->get(JOOMDOC_FILTER_START), $this->state->get(JOOMDOC_FILTER_LIMIT));
     $this->access = new JoomDOCAccessHelper($this->root);
     $this->root->setDocuments($this->documents);
     $this->root->reorder($this->state->get(JOOMDOC_FILTER_ORDERING), $this->state->get(JOOMDOC_FILTER_ORDERING), $this->state->get(JOOMDOC_FILTER_DIRECTION), $this->pagination->limitstart, $this->pagination->limit, $this->pagination->total, $config->foldersFirstAdmin);
     // control permissions to access folder
     if (!$this->access->canEnterFolder) {
         $mainframe->setUserState('joomdoc_documents_path', null);
         JError::raiseError(403, JText::_('JOOMDOC_UNABLE_ACCESS_FOLDER'));
     }
     $this->addToolbar();
     JoomDOCHelper::setSubmenu(JOOMDOC_DOCUMENTS, true);
     JoomDOCHelper::clipboardInfo();
     JoomDOCHelper::folderInfo($this->access->absolutePath);
     parent::display($tpl);
 }