update lng-files (thx oschn0r) and fixed dropdown of default-php-config in fcgid/fpm settings (thx Sephi)

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2013-12-01 18:37:17 +01:00
parent 073c5824bb
commit f50268c806
3 changed files with 14 additions and 11 deletions

View File

@@ -16,23 +16,26 @@
*/
/**
* returns an array for the settings-array
*
* returns an array of existing php-configurations
* in our database for the settings-array
*
* @return array
*/
function getPhpConfigs() {
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
$result = Database::pexecute_first($result_stmt, null, false);
$configs_array = array();
// if the table does not yet exist, we just use the default php.ini
if ($result == false) {
// check if table exists because this is used in a preconfig
// where the tables possibly does not exist yet
$results = Database::query("SHOW TABLES LIKE '".TABLE_PANEL_PHPCONFIGS."'");
if (!$results) {
$configs_array[1] = 'Default php.ini';
} else {
// get all configs
$result_stmt = Database::query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if (!isset($configs_array[$row['id']])
&& !in_array($row['id'], $configs_array)
&& !in_array($row['id'], $configs_array)
) {
$configs_array[$row['id']] = html_entity_decode($row['description']);
}