update routine to fix broken file properties in db

This commit is contained in:
Bjoern Schiessle 2012-07-19 14:35:28 +02:00
parent 25e1c13ef7
commit 708c771296
2 changed files with 12 additions and 1 deletions

View File

@ -1,5 +1,16 @@
<?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
//try to remove remaining files.

View File

@ -1 +1 @@
1.1.3
1.1.4