- 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:
@@ -181,23 +181,37 @@ class db
|
||||
* @return string RessourceId
|
||||
*/
|
||||
|
||||
function query($query_str, $unbuffered = false)
|
||||
function query($query_str, $unbuffered = false, $suppress_error = false)
|
||||
{
|
||||
global $numbqueries;
|
||||
|
||||
if(!$unbuffered)
|
||||
{
|
||||
$this->query_id = mysql_query($query_str, $this->link_id);
|
||||
if($suppress_error)
|
||||
{
|
||||
$this->query_id = @mysql_query($query_str, $this->link_id);
|
||||
} else {
|
||||
$this->query_id = mysql_query($query_str, $this->link_id);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->query_id = mysql_unbuffered_query($query_str, $this->link_id);
|
||||
if($suppress_error)
|
||||
{
|
||||
$this->query_id = @mysql_unbuffered_query($query_str, $this->link_id);
|
||||
} else {
|
||||
$this->query_id = mysql_unbuffered_query($query_str, $this->link_id);
|
||||
}
|
||||
}
|
||||
|
||||
if(!$this->query_id)
|
||||
if(!$this->query_id && !$suppress_error)
|
||||
{
|
||||
$this->showerror('Invalid SQL: ' . $query_str);
|
||||
}
|
||||
elseif(!$this->query_id && $suppress_error)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$numbqueries++;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ define('PACKAGE_ENABLED', 2);
|
||||
|
||||
// VERSION INFO
|
||||
|
||||
$version = '0.9.17';
|
||||
$version = '0.9.18-svn1';
|
||||
$dbversion = '2';
|
||||
$branding = '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user