Skip to content

Commit

Permalink
Merge pull request #267 from owncloud/improve_files_update
Browse files Browse the repository at this point in the history
Improve performance of files update (on larger setups)
  • Loading branch information
DeepDiver1975 committed Nov 5, 2012
2 parents f2d5450 + 85d6a08 commit b7e9d8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/files/appinfo/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
if (version_compare($installedVersion, '1.1.6', '<')) {
$query = OC_DB::prepare( "SELECT `propertyname`, `propertypath`, `userid` FROM `*PREFIX*properties`" );
$result = $query->execute();
$updateQuery = OC_DB::prepare('UPDATE `*PREFIX*properties` SET `propertyname` = ? WHERE `userid` = ? AND `propertypath` = ?');
while( $row = $result->fetchRow()) {
if ( $row["propertyname"][0] != '{' ) {
$query = OC_DB::prepare( 'UPDATE `*PREFIX*properties` SET `propertyname` = ? WHERE `userid` = ? AND `propertypath` = ?' );
$query->execute( array( '{DAV:}' + $row["propertyname"], $row["userid"], $row["propertypath"] ));
$updateQuery->execute(array('{DAV:}' + $row["propertyname"], $row["userid"], $row["propertypath"]));
}
}
}
Expand Down

0 comments on commit b7e9d8d

Please sign in to comment.