From: Robin Appelman Date: Sun, 1 Apr 2012 15:31:44 +0000 (+0200) Subject: oc_db is not pdo X-Git-Tag: v4.0.0beta~381^2~19^2~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=39e8981bc2ef098a020476a9d94a4b0cc4d9e1c9;p=nextcloud-server.git oc_db is not pdo also pgsql does not like double quotes --- diff --git a/lib/app.php b/lib/app.php index 6c882963a02..625ef889670 100755 --- a/lib/app.php +++ b/lib/app.php @@ -103,9 +103,9 @@ class OC_App{ */ public static function getEnabledApps(){ $apps=array(); - $query = OC_DB::prepare( 'SELECT appid FROM *PREFIX*appconfig WHERE configkey = "enabled" AND configvalue="yes"' ); - $query->execute(); - while($row=$query->fetchRow()){ + $query = OC_DB::prepare( 'SELECT appid FROM *PREFIX*appconfig WHERE configkey = \'enabled\' AND configvalue=\'yes\'' ); + $result=$query->execute(); + while($row=$result->fetchRow()){ $apps[]=$row['appid']; } return $apps; @@ -452,7 +452,7 @@ class OC_App{ */ public static function getAppVersions(){ $versions=array(); - $query = OC_DB::prepare( 'SELECT appid, configvalue FROM *PREFIX*appconfig WHERE configkey = "installed_version"' ); + $query = OC_DB::prepare( 'SELECT appid, configvalue FROM *PREFIX*appconfig WHERE configkey = \'installed_version\'' ); $result = $query->execute(); while($row = $result->fetchRow()){ $versions[$row['appid']]=$row['configvalue'];