remove some unused functions and migrated some more functions to PDO database class, refs #1287

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2013-11-14 08:27:57 +01:00
parent 868b472b98
commit 12800b730d
23 changed files with 326 additions and 500 deletions

View File

@@ -20,26 +20,20 @@
*
* @return array
*/
function getPhpConfigs()
{
global $db, $theme;
$query = 'SELECT * FROM `' . TABLE_PANEL_PHPCONFIGS . '` ';
$result = $db->query($query, false, true);
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)
{
if ($result == false) {
$configs_array[1] = 'Default php.ini';
}
else
{
while($row = $db->fetch_array($result))
{
if(!isset($configs_array[$row['id']])
&& !in_array($row['id'], $configs_array))
{
} else {
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if (!isset($configs_array[$row['id']])
&& !in_array($row['id'], $configs_array)
) {
$configs_array[$row['id']] = html_entity_decode($row['description']);
}
}