summaryrefslogtreecommitdiffstats
path: root/apps/files/appinfo/update.php
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2012-10-02 14:10:44 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2012-10-02 14:11:25 +0200
commit39735721ec880e6fbf29c9773f0003c5aaa37454 (patch)
tree33482357e6af261da11469dcf42925478f0c7192 /apps/files/appinfo/update.php
parent3e3038cafc727649293d5eaf55ec21d84391ff24 (diff)
downloadnextcloud-server-39735721ec880e6fbf29c9773f0003c5aaa37454.tar.gz
nextcloud-server-39735721ec880e6fbf29c9773f0003c5aaa37454.zip
escape identifiers in queries
Diffstat (limited to 'apps/files/appinfo/update.php')
-rw-r--r--apps/files/appinfo/update.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/files/appinfo/update.php b/apps/files/appinfo/update.php
index d963b754772..bcbbc6035fa 100644
--- a/apps/files/appinfo/update.php
+++ b/apps/files/appinfo/update.php
@@ -1,16 +1,16 @@
<?php
-// fix webdav properties,add namespace in front of the property, update for OC4.5
-$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();
+// fix webdav properties,add namespace in front of the property, update for OC4.5
+$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();
while( $row = $result->fetchRow()){
- if ( $row["propertyname"][0] != '{' ) {
- $query = OC_DB::prepare( 'UPDATE *PREFIX*properties SET propertyname = ? WHERE userid = ? AND propertypath = ?' );
+ 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"] ));
- }
- }
+ }
+ }
}
//update from OC 3