diff options
Diffstat (limited to 'apps/files/appinfo/update.php')
-rw-r--r-- | apps/files/appinfo/update.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/appinfo/update.php b/apps/files/appinfo/update.php index 88db08e7e23..5514aed197f 100644 --- a/apps/files/appinfo/update.php +++ b/apps/files/appinfo/update.php @@ -1,13 +1,13 @@ <?php -// fix webdav properties, remove namespace information between curly bracket +// fix webdav properties, remove namespace information between curly bracket (update from OC4 to OC5) $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"] ));
+ $query->execute( array( preg_replace("/^{.*}/", "", $row["propertyname"]),$row["userid"], $row["propertypath"] ));
} } |