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
708c7712
Commit
708c7712
authored
12 years ago
by
Björn Schießle
Browse files
Options
Downloads
Patches
Plain Diff
update routine to fix broken file properties in db
parent
25e1c13e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/files/appinfo/update.php
+11
-0
11 additions, 0 deletions
apps/files/appinfo/update.php
apps/files/appinfo/version
+1
-1
1 addition, 1 deletion
apps/files/appinfo/version
with
12 additions
and
1 deletion
apps/files/appinfo/update.php
+
11
−
0
View file @
708c7712
<?php
<?php
// fix webdav properties, remove namespace information between curly bracket
$installedVersion
=
OCP\Config
::
getAppValue
(
'files'
,
'installed_version'
);
if
(
version_compare
(
$installedVersion
,
'1.1.4'
,
'<'
))
{
$query
=
OC_DB
::
prepare
(
"SELECT propertyname, propertypath, userid FROM `*PREFIX*properties`"
);
$result
=
$query
->
execute
();
while
(
$row
=
$result
->
fetchRow
()){
$query
=
OC_DB
::
prepare
(
'UPDATE *PREFIX*properties SET propertyname = ? WHERE userid = ? AND propertypath = ?'
);
$query
->
execute
(
array
(
preg_replace
(
"/
{
.*
}
/"
,
""
,
$row
[
"propertyname"
]),
$row
[
"userid"
],
$row
[
"propertypath"
]
));
}
}
//update from OC 3
//update from OC 3
//try to remove remaining files.
//try to remove remaining files.
...
...
This diff is collapsed.
Click to expand it.
apps/files/appinfo/version
+
1
−
1
View file @
708c7712
1.1.3
1.1.4
\ No newline at end of file
\ No newline at end of file
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