protected function onAdd($tpl = null) { /** @var AkeebaModelCpanels $model */ $model = $this->getModel(); $aeconfig = Factory::getConfiguration(); // Load the helper classes $this->loadHelper('utils'); $this->loadHelper('status'); $statusHelper = AkeebaHelperStatus::getInstance(); // Load the model if (!class_exists('AkeebaModelStatistics')) { JLoader::import('models.statistics', JPATH_COMPONENT_ADMINISTRATOR); } $statmodel = new AkeebaModelStatistics(); $this->profileid = $model->getProfileID(); // Active profile ID $this->profilelist = $model->getProfilesList(); // List of available profiles $this->statuscell = $statusHelper->getStatusCell(); // Backup status $this->detailscell = $statusHelper->getQuirksCell(); // Details (warnings) $this->statscell = $statmodel->getLatestBackupDetails(); $this->fixedpermissions = $model->fixMediaPermissions(); // Fix media/com_akeeba permissions $this->needsdlid = $model->needsDownloadID(); $this->needscoredlidwarning = $model->mustWarnAboutDownloadIDInCore(); $this->extension_id = $model->getState('extension_id', 0, 'int'); // Should I ask for permission to display desktop notifications? JLoader::import('joomla.application.component.helper'); $this->desktop_notifications = \Akeeba\Engine\Util\Comconfig::getValue('desktop_notifications', '0') ? 1 : 0; $this->statsIframe = F0FModel::getTmpInstance('Stats', 'AkeebaModel')->collectStatistics(true); return $this->onDisplay($tpl); }
function display() { $selfhealModel = JModel::getInstance('Selfheal','AkeebaModel'); $schemaok = $selfhealModel->healSchema(); $this->assign('schemaok', $schemaok); $registry =& AEFactory::getConfiguration(); // Set the toolbar title; add a help button JToolBarHelper::title(JText::_('AKEEBA').':: <small>'.JText::_('AKEEBA_CONTROLPANEL').'</small>','akeeba'); //JToolBarHelper::preferences('com_akeeba', '500', '660'); if($schemaok) { // Add submenus (those nifty text links below the toolbar!) // -- Configuration $link = JURI::base().'index.php?option='.JRequest::getCmd('option').'&view=config'; JSubMenuHelper::addEntry(JText::_('CONFIGURATION'), $link); // -- Backup Now $link = JURI::base().'index.php?option='.JRequest::getCmd('option').'&view=backup'; JSubMenuHelper::addEntry(JText::_('BACKUP'), $link); // -- Administer Backup Files $link = JURI::base().'index.php?option='.JRequest::getCmd('option').'&view=buadmin'; JSubMenuHelper::addEntry(JText::_('BUADMIN'), $link); // -- View log $link = JURI::base().'index.php?option='.JRequest::getCmd('option').'&view=log'; JSubMenuHelper::addEntry(JText::_('VIEWLOG'), $link); // Load the helper classes $this->loadHelper('utils'); $this->loadHelper('status'); $statusHelper = AkeebaHelperStatus::getInstance(); // Load the model akimport('models.statistics', true); $model =& $this->getModel(); $statmodel = new AkeebaModelStatistics(); $this->assign('icondefs', $model->getIconDefinitions()); // Icon definitions $this->assign('profileid', $model->getProfileID()); // Active profile ID $this->assign('profilelist', $model->getProfilesList()); // List of available profiles $this->assign('statuscell', $statusHelper->getStatusCell() ); // Backup status $this->assign('newscell', $statusHelper->getNewsCell() ); // News $this->assign('detailscell', $statusHelper->getQuirksCell() ); // Details (warnings) $this->assign('statscell', $statmodel->getLatestBackupDetails() ); $this->assign('fixedpermissions', $model->fixMediaPermissions() ); // Fix media/com_akeeba permissions // Add live help AkeebaHelperIncludes::addHelp(); } // Add references to CSS and JS files AkeebaHelperIncludes::includeMedia(false); parent::display(); }
protected function onAdd($tpl = null) { /** @var AkeebaModelCpanels $model */ $model = $this->getModel(); /** $selfhealModel = F0FModel::getTmpInstance('Selfheal','AkeebaModel'); $schemaok = $selfhealModel->healSchema(); /**/ $schemaok = true; $this->schemaok = $schemaok; $aeconfig = AEFactory::getConfiguration(); if ($schemaok) { // Load the helper classes $this->loadHelper('utils'); $this->loadHelper('status'); $statusHelper = AkeebaHelperStatus::getInstance(); // Load the model if (!class_exists('AkeebaModelStatistics')) { JLoader::import('models.statistics', JPATH_COMPONENT_ADMINISTRATOR); } $statmodel = new AkeebaModelStatistics(); $this->icondefs = $model->getIconDefinitions(); // Icon definitions $this->profileid = $model->getProfileID(); // Active profile ID $this->profilelist = $model->getProfilesList(); // List of available profiles $this->statuscell = $statusHelper->getStatusCell(); // Backup status $this->detailscell = $statusHelper->getQuirksCell(); // Details (warnings) $this->statscell = $statmodel->getLatestBackupDetails(); $this->fixedpermissions = $model->fixMediaPermissions(); // Fix media/com_akeeba permissions $this->update_plugin = $model->isUpdatePluginEnabled(); $this->needsdlid = $model->needsDownloadID(); $this->needscoredlidwarning = $model->mustWarnAboutDownloadIDInCore(); $this->hasPostInstallationMessages = $model->hasPostInstallMessages(); $this->extension_id = $model->getState('extension_id', 0, 'int'); // Add live help AkeebaHelperIncludes::addHelp('cpanel'); $this->statsIframe = F0FModel::getTmpInstance('Stats', 'AkeebaModel')->collectStatistics(true); } return $this->onDisplay($tpl); }
protected function onAdd($tpl = null) { // Used in FOF 1.x where the behaviour was kinda clunky $model = $this->getModel(); /** $selfhealModel = FOFModel::getTmpInstance('Selfheal','AkeebaModel'); $schemaok = $selfhealModel->healSchema(); **/ $schemaok = true; $this->schemaok = $schemaok; $aeconfig = AEFactory::getConfiguration(); if ($schemaok) { // Load the helper classes $this->loadHelper('utils'); $this->loadHelper('status'); $statusHelper = AkeebaHelperStatus::getInstance(); // Load the model if (!class_exists('AkeebaModelStatistics')) { JLoader::import('models.statistics', JPATH_COMPONENT_ADMINISTRATOR); } $statmodel = new AkeebaModelStatistics(); //$model->applyJoomlaExtensionUpdateChanges(); $this->icondefs = $model->getIconDefinitions(); // Icon definitions $this->profileid = $model->getProfileID(); // Active profile ID $this->profilelist = $model->getProfilesList(); // List of available profiles $this->statuscell = $statusHelper->getStatusCell(); // Backup status $this->detailscell = $statusHelper->getQuirksCell(); // Details (warnings) $this->statscell = $statmodel->getLatestBackupDetails(); $this->fixedpermissions = $model->fixMediaPermissions(); // Fix media/com_akeeba permissions $this->needsdlid = $model->needsDownloadID(); $this->needscoredlidwarning = $model->mustWarnAboutDownloadIDInCore(); // Add live help AkeebaHelperIncludes::addHelp('cpanel'); } return $this->onDisplay($tpl); }