public function getSystemAction()
 {
     if ($this->getUser()->isAllowed("system_settings")) {
         $values = Pimcore_Config::getSystemConfig();
         if (($handle = fopen(PIMCORE_PATH . "/config/timezones.csv", "r")) !== FALSE) {
             while (($rowData = fgetcsv($handle, 10000, ",", '"')) !== false) {
                 $timezones[] = $rowData[0];
             }
             fclose($handle);
         }
         $languages = Zend_Locale::getTranslationList('language');
         asort($languages);
         $languageOptions = array();
         $validLanguages = array();
         foreach ($languages as $short => $translation) {
             if (strlen($short) == 2 or strpos($short, "_") == 2) {
                 $languageOptions[] = array("language" => $short, "display" => $translation . " ({$short})");
                 $validLanguages[] = $short;
             }
         }
         $valueArray = $values->toArray();
         $valueArray['general']['validLanguage'] = explode(",", $valueArray['general']['validLanguages']);
         //for "wrong" legacy values
         if (is_array($valueArray['general']['validLanguage'])) {
             foreach ($valueArray['general']['validLanguage'] as $existingValue) {
                 if (!in_array($existingValue, $validLanguages)) {
                     $languageOptions[] = array("language" => $existingValue, "display" => $existingValue);
                 }
             }
         }
         //debug email addresses - add as array ckogler
         if (!empty($valueArray['email']['debug']['emailaddresses'])) {
             $emailAddresses = explode(",", $valueArray['email']['debug']['emailaddresses']);
             if (is_array($emailAddresses)) {
                 foreach ($emailAddresses as $emailAddress) {
                     $valueArray['email']['debug']['emaildebugaddressesArray'][] = array("value" => $emailAddress);
                 }
             }
         } else {
             $valueArray['email']['debug']['emaildebugaddressesArray'][] = array("value" => '');
         }
         //cache exclude patterns - add as array
         if (!empty($valueArray['cache']['excludePatterns'])) {
             $patterns = explode(",", $valueArray['cache']['excludePatterns']);
             if (is_array($patterns)) {
                 foreach ($patterns as $pattern) {
                     $valueArray['cache']['excludePatternsArray'][] = array("value" => $pattern);
                 }
             }
         }
         //remove password from values sent to frontend
         $valueArray['database']["params"]['password'] = "******";
         //admin users as array
         $adminUsers = array();
         $userList = new User_List();
         $userList->setCondition("admin = 1 and email is not null and email != ''");
         $users = $userList->load();
         if (is_array($users)) {
             foreach ($users as $user) {
                 $adminUsers[] = array("id" => $user->getId(), "username" => $user->getName());
             }
         }
         $adminUsers[] = array("id" => "", "username" => "-");
         $response = array("values" => $valueArray, "adminUsers" => $adminUsers, "config" => array("timezones" => $timezones, "languages" => $languageOptions, "client_ip" => Pimcore_Tool::getClientIp(), "google_private_key_exists" => file_exists(Pimcore_Google_Api::getPrivateKeyPath()), "google_private_key_path" => Pimcore_Google_Api::getPrivateKeyPath()));
         $this->_helper->json($response);
     } else {
         if ($this->getUser() != null) {
             Logger::err("user [" . $this->getUser()->getId() . "] attempted to view system settings, but has no permission to do so.");
         } else {
             Logger::err("attempt to view system settings, but no user in session.");
         }
     }
     $this->_helper->json(false);
 }