aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/appinfo/update.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2012-11-05 20:47:26 +0100
committerArthur Schiwon <blizzz@owncloud.com>2012-11-05 20:47:26 +0100
commit85d6a08ae9803d7b19482b45664200f5980bd356 (patch)
treead04a33a20ea147d49968e8cebb3cfe0b32765c6 /apps/files/appinfo/update.php
parent972243d5640c40b1f161e50f31404c71d7c290c0 (diff)
downloadnextcloud-server-85d6a08ae9803d7b19482b45664200f5980bd356.tar.gz
nextcloud-server-85d6a08ae9803d7b19482b45664200f5980bd356.zip
prepare SQL query only once, that's what prepared statements are for. Should improve upgrade time with larger setups
Diffstat (limited to 'apps/files/appinfo/update.php')
-rw-r--r--apps/files/appinfo/update.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/appinfo/update.php b/apps/files/appinfo/update.php
index 738864d7cff..29782ec643e 100644
--- a/apps/files/appinfo/update.php
+++ b/apps/files/appinfo/update.php
@@ -5,10 +5,10 @@ $installedVersion=OCP\Config::getAppValue('files', 'installed_version');
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"]));
}
}
}