Merge pull request #11460 from owncloud/fix-10880

implement case-insensitive search for groups in sharing dialog
This commit is contained in:
Morris Jobke 2014-10-08 14:08:06 +02:00
commit 789437633f
1 changed files with 1 additions and 1 deletions

View File

@ -168,7 +168,7 @@ class OC_Group_Database extends OC_Group_Backend {
* Returns a list with all groups
*/
public function getGroups($search = '', $limit = null, $offset = null) {
$stmt = OC_DB::prepare('SELECT `gid` FROM `*PREFIX*groups` WHERE `gid` LIKE ? ORDER BY `gid` ASC', $limit, $offset);
$stmt = OC_DB::prepare('SELECT `gid` FROM `*PREFIX*groups` WHERE LOWER(`gid`) LIKE LOWER(?) ORDER BY `gid` ASC', $limit, $offset);
$result = $stmt->execute(array('%' . $search . '%'));
$groups = array();
while ($row = $result->fetchRow()) {