Example #1
0
 function __construct($config = array())
 {
     parent::__construct($config);
     // TODO get this from config
     $this->registerDefaultTask('ical');
     //		$this->registerTask( 'show',  'showContent' );
     // Ensure authorised to do this
     $cfg = JEVConfig::getInstance();
     if ($cfg->get("disableicalexport", 0) && !$cfg->get("feimport", 0)) {
         $query = "SELECT icsf.* FROM #__jevents_icsfile as icsf where icsf.autorefresh=1";
         $db = JFactory::getDBO();
         $db->setQuery($query);
         $allICS = $db->loadObjectList();
         if (count($allICS) == 0) {
             throw new Exception(JText::_('ALERTNOTAUTH'), 403);
             return false;
         }
     }
     // Load abstract "view" class
     $theme = JEV_CommonFunctions::getJEventsViewName();
     JLoader::register('JEvents' . ucfirst($theme) . 'View', JEV_VIEWS . "/{$theme}/abstract/abstract.php");
     if (!isset($this->_basePath)) {
         $this->_basePath = $this->basePath;
         $this->_task = $this->task;
     }
 }
Example #2
0
 function __construct($config = array())
 {
     parent::__construct($config);
     // TODO get this from config
     $this->registerDefaultTask('ical');
     //		$this->registerTask( 'show',  'showContent' );
     // Ensure authorised to do this
     $cfg =& JEVConfig::getInstance();
     if ($cfg->get("disableicalexport", 0) && !$cfg->get("feimport", 0)) {
         JError::raiseError(403, JText::_('ALERTNOTAUTH'));
     }
     // Load abstract "view" class
     $theme = JEV_CommonFunctions::getJEventsViewName();
     JLoader::register('JEvents' . ucfirst($theme) . 'View', JEV_VIEWS . "/{$theme}/abstract/abstract.php");
     if (!isset($this->_basePath) && JVersion::isCompatible("1.6.0")) {
         $this->_basePath = $this->basePath;
         $this->_task = $this->task;
     }
 }