コード例 #1
0
ファイル: Config.class.php プロジェクト: nahakiole/cloudrexx
 private function setNavigation()
 {
     global $objTemplate, $_ARRAYLANG;
     $componentRepo = \Env::get('cx')->getDb()->getEntityManager()->getRepository('Cx\\Core\\Core\\Model\\Entity\\SystemComponent');
     $component = $componentRepo->findOneBy(array('name' => 'multisite'));
     $multisiteNavigation = '';
     if ($component && \Cx\Core_Modules\MultiSite\Controller\JsonMultiSiteController::isWebsiteOwner() && \Cx\Core\Setting\Controller\Setting::getValue('websiteFtpUser', 'MultiSite')) {
         $multisiteNavigation = '<a href="index.php?cmd=Config&amp;act=Ftp" class="' . ($this->act == 'Ftp' ? 'active' : '') . '">' . $_ARRAYLANG['TXT_SETTINGS_FTP'] . '</a>';
     }
     \Cx\Core\Setting\Controller\Setting::init('MultiSite', 'website', 'FileSystem');
     $objTemplate->setVariable('CONTENT_NAVIGATION', '
         <a href="?cmd=Config" class="' . ($this->act == '' ? 'active' : '') . '">' . $_ARRAYLANG['TXT_SETTINGS_MENU_SYSTEM'] . '</a>' . (in_array('CacheManager', \Env::get('cx')->getLicense()->getLegalComponentsList()) ? '<a href="?cmd=Config&amp;act=cache" class="' . ($this->act == 'cache' ? 'active' : '') . '">' . $_ARRAYLANG['TXT_SETTINGS_MENU_CACHE'] . '</a>' : '') . '<a href="?cmd=Config&amp;act=smtp" class="' . ($this->act == 'smtp' ? 'active' : '') . '">' . $_ARRAYLANG['TXT_EMAIL_SERVER'] . '</a>
         <a href="index.php?cmd=Config&amp;act=image" class="' . ($this->act == 'image' ? 'active' : '') . '">' . $_ARRAYLANG['TXT_SETTINGS_IMAGE'] . '</a>' . (in_array('Wysiwyg', \Env::get('cx')->getLicense()->getLegalComponentsList()) ? '<a href="index.php?cmd=Config&amp;act=Wysiwyg" class="' . ($this->act == 'Wysiwyg' ? 'active' : '') . '">' . $_ARRAYLANG['TXT_CORE_WYSIWYG'] . '</a>' : '') . (in_array('LicenseManager', \Env::get('cx')->getLicense()->getLegalComponentsList()) ? '<a href="index.php?cmd=License">' . $_ARRAYLANG['TXT_LICENSE'] . '</a>' : '') . $multisiteNavigation);
 }
コード例 #2
0
 /**
  * Rollback the delta to make the website as old state
  */
 protected function rollBackDelta()
 {
     $deltaRepository = new \Cx\Core_Modules\Update\Model\Repository\DeltaRepository();
     $rollBackDeltas = $deltaRepository->findBy(array('rollback' => true));
     rsort($rollBackDeltas);
     foreach ($rollBackDeltas as $rollBackDelta) {
         if (!$rollBackDelta->applyNext()) {
             $websiteName = \Cx\Core\Setting\Controller\Setting::getValue('websiteName', 'MultiSite');
             $params = array('websiteName' => $websiteName, 'emailTemplateKey' => 'notification_update_error_email');
             \Cx\Core_Modules\MultiSite\Controller\JsonMultiSiteController::executeCommandOnMyServiceServer('sendUpdateNotification', $params);
             break;
         }
     }
 }