- set correct version for svn1

- correct default-php.ini for open_basedir
- fix upgrading from SysCP (getPhpConfigs() fails cause the table is being added after it's being used in the update-process)
This commit is contained in:
Michael Kaufmann (d00p)
2011-01-26 15:01:19 +00:00
parent 1396aca657
commit a7ae6e54de
6 changed files with 38 additions and 17 deletions

View File

@@ -25,17 +25,24 @@ function getPhpConfigs()
global $db;
$query = 'SELECT * FROM `' . TABLE_PANEL_PHPCONFIGS . '` ';
$result = $db->query($query);
$result = $db->query($query, false, true);
$configs_array = array();
while($row = $db->fetch_array($result))
// if the table does not yet exist, we just use the default php.ini
if(!$result)
{
if(!isset($configs_array[$row['id']])
&& !in_array($row['id'], $configs_array))
$configs_array[1] = 'Default php.ini';
}
else
{
while($row = $db->fetch_array($result))
{
$configs_array[$row['id']] = html_entity_decode($row['description']);
if(!isset($configs_array[$row['id']])
&& !in_array($row['id'], $configs_array))
{
$configs_array[$row['id']] = html_entity_decode($row['description']);
}
}
}
return $configs_array;
}