diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2012-11-29 18:30:02 +0100 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2012-11-29 18:33:15 +0100 |
commit | 3b83fe153062508d4a4d70958ad1a5281eaab81e (patch) | |
tree | 30f12d25c179e9c40425c6a37686412ff1854c05 /apps/files/appinfo/update.php | |
parent | c38a75e03f9db02b82e71472d2f719079eb44829 (diff) | |
download | nextcloud-server-3b83fe153062508d4a4d70958ad1a5281eaab81e.tar.gz nextcloud-server-3b83fe153062508d4a4d70958ad1a5281eaab81e.zip |
fix checkstyle for files app
Diffstat (limited to 'apps/files/appinfo/update.php')
-rw-r--r-- | apps/files/appinfo/update.php | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/apps/files/appinfo/update.php b/apps/files/appinfo/update.php index 29782ec643e..3503678e7c7 100644 --- a/apps/files/appinfo/update.php +++ b/apps/files/appinfo/update.php @@ -3,12 +3,15 @@ // 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`" ); + $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` = ?'); + $updateQuery = OC_DB::prepare('UPDATE `*PREFIX*properties`' + .' SET `propertyname` = ?' + .' WHERE `userid` = ?' + .' AND `propertypath` = ?'); while( $row = $result->fetchRow()) { - if ( $row["propertyname"][0] != '{' ) { - $updateQuery->execute(array('{DAV:}' + $row["propertyname"], $row["userid"], $row["propertypath"])); + if ( $row['propertyname'][0] != '{' ) { + $updateQuery->execute(array('{DAV:}' + $row['propertyname'], $row['userid'], $row['propertypath'])); } } } @@ -36,10 +39,11 @@ foreach($filesToRemove as $file) { if(!file_exists($filepath)) { continue; } - $success = OCP\Files::rmdirr($filepath); - if($success === false) { + $success = OCP\Files::rmdirr($filepath); + if($success === false) { //probably not sufficient privileges, give up and give a message. - OCP\Util::writeLog('files', 'Could not clean /files/ directory. Please remove everything except webdav.php from ' . OC::$SERVERROOT . '/files/', OCP\Util::ERROR); + OCP\Util::writeLog('files', 'Could not clean /files/ directory.' + .' Please remove everything except webdav.php from ' . OC::$SERVERROOT . '/files/', OCP\Util::ERROR); break; - } + } } |