コード例 #1
0
ファイル: Template.php プロジェクト: hettema/Stages
 /**
  * Check whether or not the module output is enabled
  *
  * @param string $moduleName Full module name
  * @return boolean
  */
 public function isOutputEnabled($moduleName = null)
 {
     if ($moduleName === null) {
         $moduleName = $this->getModuleName();
     }
     return !App_Main::getConfig('advanced-modules-disable-output-' . $moduleName);
 }
コード例 #2
0
ファイル: Edit.php プロジェクト: hettema/Stages
 protected function getConfig()
 {
     if (!$this->_config) {
         $this->_config = App_Main::getConfig();
     }
     return $this->_config;
 }
コード例 #3
0
ファイル: ConfigController.php プロジェクト: hettema/Stages
 /**
  * Save the config options values
  */
 public function submitAction()
 {
     $request = $this->getRequest();
     $scope = $request->getParam('scope') ? $request->getParam('scope') : 'default';
     $scopeId = $request->getParam('scope_id') ? $request->getParam('scope_id') : 0;
     $configData = $request->getParam('config_data');
     //checkboxes should be checked for unchecked ones
     if (!isset($configData['web-secure-backend'])) {
         $configData['web-secure-backend'] = 0;
     }
     App_Main::getConfig()->saveConfigData($configData, $scope, $scopeId);
     $websiteCode = $this->getRequest()->getParam('config-website');
     $this->_redirect('backend/config/index', array('website' => $websiteCode));
 }
コード例 #4
0
ファイル: Website.php プロジェクト: hettema/Stages
 /**
  * Get the config model for the website or default config model if not found
  * 
  * @param type $path
  * @return Core_Model_Config | string value 
  */
 public function getConfig($path = null)
 {
     if (!$this->_config) {
         $this->_config = App_Main::getConfig()->loadWebsiteConfig($this->getId());
     }
     if (!empty($path)) {
         return $this->_config->getConfigData($path);
     }
     return $this->_config;
 }
コード例 #5
0
ファイル: Standard.php プロジェクト: hettema/Stages
 protected function _shouldBeSecure($path)
 {
     return substr(App_Main::getConfig('web/unsecure/base_url'), 0, 5) === 'https' || App_Main::getConfig('web/secure/use_in_frontend') && substr(App_Main::getConfig('web/secure/base_url'), 0, 5) == 'https' && App_Main::getConfig()->shouldUrlBeSecure($path);
 }
コード例 #6
0
ファイル: Admin.php プロジェクト: hettema/Stages
 protected function _shouldBeSecure($path)
 {
     return App_Main::getConfig('web-secure-backend');
 }
コード例 #7
0
ファイル: Url.php プロジェクト: hettema/Stages
 public function getUseSession()
 {
     if (is_null($this->_useSession)) {
         $this->_useSession = App_Main::getConfig('session-sessionkey-url');
     }
     return $this->_useSession;
 }
コード例 #8
0
ファイル: Url.php プロジェクト: hettema/Stages
 /**
  * Get the secure mode for backend
  *
  * @return bool
  */
 public function getSecure()
 {
     return App_Main::getConfig('web-secure-backend');
 }