return array();
}
$apps=array('files');
- $query = OC_DB::prepare( 'SELECT `appid` FROM `*PREFIX*appconfig`'
- .' WHERE `configkey` = \'enabled\' AND to_char(`configvalue`)=\'yes\'' );
+ $sql = 'SELECT `appid` FROM `*PREFIX*appconfig`'
+ .' WHERE `configkey` = \'enabled\' AND `configvalue`=\'yes\'';
+ if (OC_Config::getValue( 'dbtype', 'sqlite' ) === 'oci') { //FIXME oracle hack
+ $sql = 'SELECT `appid` FROM `*PREFIX*appconfig`'
+ .' WHERE `configkey` = \'enabled\' AND to_char(`configvalue`)=\'yes\'';
+ }
+ $query = OC_DB::prepare( $sql );
$result=$query->execute();
if( \OC_DB::isError($result)) {
throw new DatabaseException($result->getMessage(), $query);
break;
case 'oci':
$dsn = array(
- 'phptype' => 'oci8',
- 'username' => $user,
- 'password' => $pass,
- 'service' => $name,
- 'hostspec' => $host,
- 'charset' => 'AL32UTF8',
+ 'phptype' => 'oci8',
+ 'username' => $user,
+ 'password' => $pass,
+ 'service' => $name,
+ 'hostspec' => $host,
+ 'charset' => 'AL32UTF8',
);
break;
case 'mssql':
*/
public static function isEnabled($userid) {
$sql = 'SELECT `userid` FROM `*PREFIX*preferences`'
- .' WHERE `userid` = ? AND `appid` = ? AND `configkey` = ? AND to_char(`configvalue`) = ?';
+ .' WHERE `userid` = ? AND `appid` = ? AND `configkey` = ? AND `configvalue` = ?';
+ if (OC_Config::getValue( 'dbtype', 'sqlite' ) === 'oci') { //FIXME oracle hack
+ $sql = 'SELECT `userid` FROM `*PREFIX*preferences`'
+ .' WHERE `userid` = ? AND `appid` = ? AND `configkey` = ? AND to_char(`configvalue`) = ?';
+ }
$stmt = OC_DB::prepare($sql);
if ( ! OC_DB::isError($stmt) ) {
$result = $stmt->execute(array($userid, 'core', 'enabled', 'false'));