summaryrefslogtreecommitdiffstats
path: root/apps/files/appinfo
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2012-08-25 01:52:27 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2012-08-25 01:52:27 +0200
commitfa3497f6ed54b6de16dc44ae94721f00b5d5fc6b (patch)
tree7b3a6c1b946273ee0f1f3f6ade1f9cd3483004dc /apps/files/appinfo
parentfd5af9aff4245127f32f3b90dbd6e52792984447 (diff)
downloadnextcloud-server-fa3497f6ed54b6de16dc44ae94721f00b5d5fc6b.tar.gz
nextcloud-server-fa3497f6ed54b6de16dc44ae94721f00b5d5fc6b.zip
add backticks to SQL, use limit parameter instead of LIMIT SQL
Diffstat (limited to 'apps/files/appinfo')
-rw-r--r--apps/files/appinfo/update.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/files/appinfo/update.php b/apps/files/appinfo/update.php
index 5514aed197f..b2480a58f5e 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 (update from OC4 to OC5)
-$installedVersion=OCP\Config::getAppValue('files', 'installed_version');
+$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 = 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"] ));
}
}