예제 #1
0
 /**
  * Checks the settings and optionally returns an array with warnings
  *
  * @return array
  */
 public static function checkSettings()
 {
     $warnings = array();
     // check if debug-mode is active
     if (SPOON_DEBUG) {
         $warnings[] = array('message' => BL::err('DebugModeIsActive'));
     }
     // check if this action is allowed
     if (BackendAuthentication::isAllowedAction('index', 'settings')) {
         // check if the fork API keys are available
         if (self::getModuleSetting('core', 'fork_api_private_key') == '' || self::getModuleSetting('core', 'fork_api_public_key') == '') {
             $warnings[] = array('message' => sprintf(BL::err('ForkAPIKeys'), BackendModel::createURLForAction('index', 'settings')));
         }
     }
     // check for extensions warnings
     $warnings = array_merge($warnings, BackendExtensionsModel::checkSettings());
     return $warnings;
 }