Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
41639f05
Commit
41639f05
authored
12 years ago
by
Georg Ehrke
Browse files
Options
Downloads
Patches
Plain Diff
fix fail in sql query of isDuplicate method of OC_Calendar_Import
parent
44272b98
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/calendar/lib/import.php
+4
-2
4 additions, 2 deletions
apps/calendar/lib/import.php
with
4 additions
and
2 deletions
apps/calendar/lib/import.php
+
4
−
2
View file @
41639f05
...
...
@@ -273,8 +273,10 @@ class OC_Calendar_Import{
*/
private
function
isDuplicate
(
$insertid
){
$newobject
=
OC_Calendar_Object
::
find
(
$insertid
);
$stmt
=
OCP\DB
::
prepare
(
'SELECT COUNT(*) as count FROM *PREFIX*calendar_objects WHERE objecttype=? AND startdate=? AND enddate=? AND repeating=? AND summary=? AND calendardata=?'
);
$result
=
$stmt
->
execute
(
array
(
$newobject
[
'objecttype'
],
$newobject
[
'startdate'
],
$newobject
[
'enddate'
],
$newobject
[
'repeating'
],
$newobject
[
'summary'
],
$newobject
[
'calendardata'
]));
$stmt
=
OCP\DB
::
prepare
(
'SELECT COUNT(*) as count FROM *PREFIX*calendar_objects
INNER JOIN *PREFIX*calendar_calendars ON calendarid=*PREFIX*calendar_calendars.id
WHERE objecttype=? AND startdate=? AND enddate=? AND repeating=? AND summary=? AND calendardata=? AND userid = ?'
);
$result
=
$stmt
->
execute
(
array
(
$newobject
[
'objecttype'
],
$newobject
[
'startdate'
],
$newobject
[
'enddate'
],
$newobject
[
'repeating'
],
$newobject
[
'summary'
],
$newobject
[
'calendardata'
],
$this
->
userid
));
$result
=
$result
->
fetchRow
();
if
(
$result
[
'count'
]
>=
2
){
return
true
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment