aboutsummaryrefslogtreecommitdiffstats
path: root/apps/calendar/lib
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-03-26 09:48:58 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-03-26 09:48:58 +0200
commitb7a5ae38c58cc9a1973febfce40c5f076ff5d772 (patch)
tree98bd4ddcb624f57b65852b9d14adc3fa4cc16233 /apps/calendar/lib
parent19c101a660e311437bd471f0c87f0a9413351f7f (diff)
downloadnextcloud-server-b7a5ae38c58cc9a1973febfce40c5f076ff5d772.tar.gz
nextcloud-server-b7a5ae38c58cc9a1973febfce40c5f076ff5d772.zip
fix sql command in calendar's share lib
Diffstat (limited to 'apps/calendar/lib')
-rw-r--r--apps/calendar/lib/share.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/calendar/lib/share.php b/apps/calendar/lib/share.php
index a5ca0a6e738..def1026c5e1 100644
--- a/apps/calendar/lib/share.php
+++ b/apps/calendar/lib/share.php
@@ -21,7 +21,7 @@ class OC_Calendar_Share{
$group_where = self::group_sql(OC_Group::getUserGroups($userid));
$permission_where = self::permission_sql($permission);
$active_where = self::active_sql($active);
- $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*calendar_share_' . $type . ' WHERE ((share = ? AND sharetype = "user") ' . $group_where . ') AND owner <> ? ' . $permission_where . ' ' . $active_where . ')');
+ $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*calendar_share_' . $type . ' WHERE ((share = ? AND sharetype = "user") ' . $group_where . ') AND owner <> ? ' . $permission_where . ' ' . $active_where);
$result = $stmt->execute(array($userid, $userid));
$return = array();
while( $row = $result->fetchRow()){
@@ -168,8 +168,8 @@ class OC_Calendar_Share{
private static function permission_sql($permission = null){
$permission_where = '';
if(!is_null($permission)){
- $permission_where = 'AND permissions = ';
- $permission_where .= ($permission=='rw')?'1':'0';
+ $permission_where = ' AND permissions = ';
+ $permission_where .= ($permission=='rw')?'"1"':'"0"';
}
return $permission_where;
}