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
a26ef878
Commit
a26ef878
authored
14 years ago
by
Robin Appelman
Browse files
Options
Downloads
Patches
Plain Diff
Fix some database errors
parent
db5ac0b4
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
inc/HTTP/WebDAV/Server/Filesystem.php
+4
-3
4 additions, 3 deletions
inc/HTTP/WebDAV/Server/Filesystem.php
inc/lib_config.php
+0
-1
0 additions, 1 deletion
inc/lib_config.php
inc/lib_log.php
+0
-1
0 additions, 1 deletion
inc/lib_log.php
with
4 additions
and
5 deletions
inc/HTTP/WebDAV/Server/Filesystem.php
+
4
−
3
View file @
a26ef878
...
...
@@ -324,6 +324,7 @@
*/
function
PUT
(
&
$options
)
{
error_log
(
"put
$fspath
"
);
$fspath
=
$options
[
"path"
];
$dir
=
dirname
(
$fspath
);
if
(
!
OC_FILESYSTEM
::
file_exists
(
$dir
)
||
!
OC_FILESYSTEM
::
is_dir
(
$dir
))
{
...
...
@@ -641,14 +642,14 @@
return
true
;
}
else
{
//check for indirect refresh
$query
=
"SELECT *
FROM locks
FROM
{
$CONFIG_DBTABLEPREFIX
}
locks
WHERE recursive = 1
"
;
$res
=
OC_DB
::
select
(
$query
);
foreach
(
$res
as
$row
){
if
(
strpos
(
$options
[
'path'
],
$row
[
'path'
])
==
0
){
//are we a child of a folder with an recursive lock
$where
=
"WHERE path = '
$row[path]
' AND token = '
$options[update]
'"
;
$query
=
"UPDATE `locks` SET `expires` = '
$options[timeout]
', `modified` = "
.
time
()
.
"
$where
"
;
$query
=
"UPDATE `
{
$CONFIG_DBTABLEPREFIX
}
locks` SET `expires` = '
$options[timeout]
', `modified` = "
.
time
()
.
"
$where
"
;
OC_DB
::
query
(
$query
);
$options
[
'owner'
]
=
$row
[
'owner'
];
$options
[
'scope'
]
=
$row
[
"exclusivelock"
]
?
"exclusive"
:
"shared"
;
...
...
@@ -727,7 +728,7 @@
}
else
{
//check for recursive locks;
$query
=
"SELECT *
FROM locks
FROM
{
$CONFIG_DBTABLEPREFIX
}
locks
WHERE recursive = 1
"
;
$res
=
OC_DB
::
select
(
$query
);
...
...
This diff is collapsed.
Click to expand it.
inc/lib_config.php
+
0
−
1
View file @
a26ef878
...
...
@@ -336,7 +336,6 @@ class OC_CONFIG{
$result
=
pg_exec
(
$connection
,
$query
);
}
}
global
$CONFIG_DBTABLEPREFIX
;
}
}
?>
...
...
This diff is collapsed.
Click to expand it.
inc/lib_log.php
+
0
−
1
View file @
a26ef878
...
...
@@ -69,7 +69,6 @@ class OC_LOG {
$user
=
$_SESSION
[
'username_clean'
];
$result
=
OC_DB
::
select
(
'select `timestamp`,`user`,`type`,`message` from '
.
$CONFIG_DBTABLEPREFIX
.
'log where user=\''
.
$user
.
'\' order by timestamp desc limit 20'
);
}
$result
=
OC_DB
::
select
(
$query
);
foreach
(
$result
as
$entry
){
echo
(
'<tr class="browserline">'
);
echo
(
'<td class="sizetext">'
.
date
(
$CONFIG_DATEFORMAT
,
$entry
[
'timestamp'
])
.
'</td>'
);
...
...
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