Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
1dfa6f3d
Commit
1dfa6f3d
authored
12 years ago
by
Jakob Sack
Committed by
Jörn Friedrich Dreyer
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix OC_Connector_Sabre_Locks for SQLite
parent
78e8cbd5
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
lib/connector/sabre/locks.php
+4
-2
4 additions, 2 deletions
lib/connector/sabre/locks.php
with
4 additions
and
2 deletions
lib/connector/sabre/locks.php
+
4
−
2
View file @
1dfa6f3d
...
@@ -41,8 +41,10 @@ class OC_Connector_Sabre_Locks extends Sabre_DAV_Locks_Backend_Abstract {
...
@@ -41,8 +41,10 @@ class OC_Connector_Sabre_Locks extends Sabre_DAV_Locks_Backend_Abstract {
// NOTE: the following 10 lines or so could be easily replaced by
// NOTE: the following 10 lines or so could be easily replaced by
// pure sql. MySQL's non-standard string concatination prevents us
// pure sql. MySQL's non-standard string concatination prevents us
// from doing this though.
// from doing this though.
$query
=
'SELECT * FROM `*PREFIX*locks` WHERE `userid` = ? AND (`created` + `timeout`) > ? AND ((`uri` = ?)'
;
// Fix: sqlite does not insert time() as a number but as text, making
$params
=
array
(
OC_User
::
getUser
(),
time
(),
$uri
);
// the equation returning false all the time
$query
=
'SELECT * FROM `*PREFIX*locks` WHERE `userid` = ? AND (`created` + `timeout`) > '
.
time
()
.
' AND ((`uri` = ?)'
;
$params
=
array
(
OC_User
::
getUser
(),
$uri
);
// We need to check locks for every part in the uri.
// We need to check locks for every part in the uri.
$uriParts
=
explode
(
'/'
,
$uri
);
$uriParts
=
explode
(
'/'
,
$uri
);
...
...
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