Skip to content
Snippets Groups Projects
Commit 708c7712 authored by Björn Schießle's avatar Björn Schießle
Browse files

update routine to fix broken file properties in db

parent 25e1c13e
No related branches found
No related tags found
No related merge requests found
<?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.
......
1.1.3 1.1.4
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment