diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-04-16 10:12:53 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-04-16 10:12:53 +0200 |
commit | 232654cb606af856d24c4b01353f18ac4a48e9bc (patch) | |
tree | 6b75128d02cc082e8a8bbcc26cfd921391562e17 /lib/Group | |
parent | 3d89b2caa41bc99f48b8377c87e9c653f467631d (diff) | |
download | nextcloud-server-232654cb606af856d24c4b01353f18ac4a48e9bc.tar.gz nextcloud-server-232654cb606af856d24c4b01353f18ac4a48e9bc.zip |
get rid of the oc_require and friends
Diffstat (limited to 'lib/Group')
-rw-r--r-- | lib/Group/database.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Group/database.php b/lib/Group/database.php index c10f6db80e0..bdf5bbc5c55 100644 --- a/lib/Group/database.php +++ b/lib/Group/database.php @@ -37,7 +37,7 @@ * */ -oc_require_once( 'Group/backend.php' ); +require_once( 'Group/backend.php' ); /** * Class for group management in a SQL Database (e.g. MySQL, SQLite) @@ -75,7 +75,12 @@ class OC_GROUP_DATABASE extends OC_GROUP_BACKEND { public static function inGroup( $username, $groupName ){ $query = OC_DB::prepare( "SELECT * FROM `*PREFIX*group_user` WHERE `gid` = ? AND `uid` = ?" ); $result = $query->execute( array( $groupName, $username )); - + if( PEAR::isError($result)) { + $entry = 'DB Error: "'.$result->getMessage().'"<br />'; + $entry .= 'Offending command was: '.$result->getDebugInfo().'<br />'; + error_log( $entry ); + die( $entry ); + } return $result->numRows() > 0 ? true : false; } |