/** * Renders the post-installation message */ protected function renderPostInstallation($parent) { $this->warnAboutJSNPowerAdmin(); ?> <h1>Akeeba Release System</h1> <img src="../media/com_ars/icons/ars_logo_48.png" width="48" height="48" alt="Akeeba Release System" align="right"/> <h2>Welcome to Akeeba Release System!</h2> <div style="margin: 1em; font-size: 14pt; background-color: #fffff9; color: black"> You can download translation files <a href="http://cdn.akeebabackup.com/language/ars/index.html">directly from our CDN page</a>. </div> <?php $container = FOF30\Container\Container::getInstance('com_ars'); /** @var \Akeeba\ReleaseSystem\Admin\Model\Statistics $model */ $model = $container->factory->model('Statistics'); if (method_exists($model, 'collectStatistics')) { $iframe = $model->collectStatistics(true); if ($iframe) { echo $iframe; } } }
<?php if (!defined('FOF30_INCLUDED') && !@(include_once JPATH_LIBRARIES . '/fof30/include.php')) { throw new RuntimeException('FOF 3.0 is not installed', 500); } FOF30\Container\Container::getInstance('com_contactpro')->dispatcher->dispatch();
public function onAfterInitialise() { // Make sure Akeeba Backup is installed if (!file_exists(JPATH_ADMINISTRATOR . '/components/com_akeeba')) { return; } // Make sure Akeeba Backup is enabled JLoader::import('joomla.application.component.helper'); if (!JComponentHelper::isEnabled('com_akeeba')) { return; } // Do we have to run (at most once per 3 hours)? JLoader::import('joomla.html.parameter'); JLoader::import('joomla.application.component.helper'); $db = JFactory::getDbo(); $query = $db->getQuery(true)->select($db->qn('lastupdate'))->from($db->qn('#__ak_storage'))->where($db->qn('tag') . ' = ' . $db->q('akeebaupdatecheck_lastrun')); $last = $db->setQuery($query)->loadResult(); if (intval($last)) { $last = new JDate($last); $last = $last->toUnix(); } else { $last = 0; } $now = time(); if (!defined('AKEEBAUPDATECHECK_DEBUG') && abs($now - $last) < 86400) { return; } // Use a 20% chance of running; this allows multiple concurrent page // requests to not cause double update emails being sent out. $random = rand(1, 5); if (!defined('AKEEBAUPDATECHECK_DEBUG') && $random != 3) { return; } $now = new JDate($now); // Update last run status // If I have the time of the last run, I can update, otherwise insert if ($last) { $query = $db->getQuery(true)->update($db->qn('#__ak_storage'))->set($db->qn('lastupdate') . ' = ' . $db->q($now->toSql()))->where($db->qn('tag') . ' = ' . $db->q('akeebaupdatecheck_lastrun')); } else { $query = $db->getQuery(true)->insert($db->qn('#__ak_storage'))->columns(array($db->qn('tag'), $db->qn('lastupdate')))->values($db->q('akeebaupdatecheck_lastrun') . ', ' . $db->q($now->toSql())); } try { $result = $db->setQuery($query)->execute(); } catch (Exception $exc) { $result = false; } if (!$result) { return; } // Load FOF if (!defined('FOF30_INCLUDED') && !@(include_once JPATH_LIBRARIES . '/fof30/include.php')) { throw new RuntimeException('FOF 3.0 is not installed', 500); } // Load the container $container = FOF30\Container\Container::getInstance('com_akeeba'); /** @var \Akeeba\Backup\Admin\Model\Updates $model */ $model = $container->factory->model('Updates')->tmpInstance(); $updateInfo = $model->getUpdates(); if (!$updateInfo['hasUpdate']) { return; } $superAdmins = array(); $superAdminEmail = $this->params->get('email', ''); if (!empty($superAdminEmail)) { $superAdmins = $this->getSuperUsers($superAdminEmail); } if (empty($superAdmins)) { $superAdmins = $this->getSuperUsers(); } if (empty($superAdmins)) { return; } foreach ($superAdmins as $sa) { $model->sendNotificationEmail($updateInfo['version'], $sa->email); } }
<?php /** * @package AkeebaBackup * @copyright Copyright (c)2006-2016 Nicholas K. Dionysopoulos * @license GNU General Public License version 3, or later */ // Protect from unauthorized access defined('_JEXEC') or die; JDEBUG ? define('AKEEBADEBUG', 1) : null; if (version_compare(PHP_VERSION, '5.4.0', 'lt')) { (include_once __DIR__ . '/View/wrongphp.php') or die('Your PHP version is too old for this component.'); return; } // Why, oh why, are you people using eAccelerator? Seriously, what's wrong with you, people?! if (function_exists('eaccelerator_info')) { $isBrokenCachingEnabled = true; if (function_exists('ini_get') && !ini_get('eaccelerator.enable')) { $isBrokenCachingEnabled = false; } if ($isBrokenCachingEnabled) { (include_once __DIR__ . '/View/eaccelerator.php') or die('eAccelerator is broken and abandoned since 2012. Ask your host to disable it before using this component.'); return; } } if (!defined('FOF30_INCLUDED') && !@(include_once JPATH_LIBRARIES . '/fof30/include.php')) { throw new RuntimeException('FOF 3.0 is not installed', 500); } FOF30\Container\Container::getInstance('com_akeeba')->dispatcher->dispatch();