summaryrefslogtreecommitdiffstats
path: root/apps/files/appinfo
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-11-30 04:10:31 -0800
committerBart Visscher <bartv@thisnet.nl>2012-11-30 04:10:31 -0800
commit8aba5874db5049a69ade3c740b05f7462a589ef9 (patch)
tree1f3e01ae8831e04cf3ac514b9c9afbcd94423854 /apps/files/appinfo
parentf820596825883828d4f45a10a9f3a9317af3de1d (diff)
parent3b83fe153062508d4a4d70958ad1a5281eaab81e (diff)
downloadnextcloud-server-8aba5874db5049a69ade3c740b05f7462a589ef9.tar.gz
nextcloud-server-8aba5874db5049a69ade3c740b05f7462a589ef9.zip
Merge pull request #644 from butonic/checkstyle_fixes
fix checkstyle for files app
Diffstat (limited to 'apps/files/appinfo')
-rw-r--r--apps/files/appinfo/app.php6
-rw-r--r--apps/files/appinfo/filesync.php20
-rw-r--r--apps/files/appinfo/routes.php3
-rw-r--r--apps/files/appinfo/update.php20
4 files changed, 28 insertions, 21 deletions
diff --git a/apps/files/appinfo/app.php b/apps/files/appinfo/app.php
index b431ddfec02..108f02930e2 100644
--- a/apps/files/appinfo/app.php
+++ b/apps/files/appinfo/app.php
@@ -3,6 +3,10 @@ $l=OC_L10N::get('files');
OCP\App::registerAdmin('files', 'admin');
-OCP\App::addNavigationEntry( array( "id" => "files_index", "order" => 0, "href" => OCP\Util::linkTo( "files", "index.php" ), "icon" => OCP\Util::imagePath( "core", "places/home.svg" ), "name" => $l->t("Files") ));
+OCP\App::addNavigationEntry( array( "id" => "files_index",
+ "order" => 0,
+ "href" => OCP\Util::linkTo( "files", "index.php" ),
+ "icon" => OCP\Util::imagePath( "core", "places/home.svg" ),
+ "name" => $l->t("Files") ));
OC_Search::registerProvider('OC_Search_Provider_File');
diff --git a/apps/files/appinfo/filesync.php b/apps/files/appinfo/filesync.php
index 0e368cb0f42..cbed56a6de5 100644
--- a/apps/files/appinfo/filesync.php
+++ b/apps/files/appinfo/filesync.php
@@ -24,16 +24,16 @@
$RUNTIME_APPTYPES=array('filesystem', 'authentication', 'logging');
OC_App::loadApps($RUNTIME_APPTYPES);
if(!OC_User::isLoggedIn()) {
- if(!isset($_SERVER['PHP_AUTH_USER'])) {
- header('WWW-Authenticate: Basic realm="ownCloud Server"');
- header('HTTP/1.0 401 Unauthorized');
- echo 'Valid credentials must be supplied';
- exit();
- } else {
- if(!OC_User::login($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"])) {
- exit();
- }
- }
+ if(!isset($_SERVER['PHP_AUTH_USER'])) {
+ header('WWW-Authenticate: Basic realm="ownCloud Server"');
+ header('HTTP/1.0 401 Unauthorized');
+ echo 'Valid credentials must be supplied';
+ exit();
+ } else {
+ if(!OC_User::login($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"])) {
+ exit();
+ }
+ }
}
list($type, $file) = explode('/', substr($path_info, 1+strlen($service)+1), 2);
diff --git a/apps/files/appinfo/routes.php b/apps/files/appinfo/routes.php
index e1ab560803d..043782a9c04 100644
--- a/apps/files/appinfo/routes.php
+++ b/apps/files/appinfo/routes.php
@@ -8,5 +8,4 @@
$this->create('download', 'download{file}')
->requirements(array('file' => '.*'))
- ->actionInclude('files/download.php');
-
+ ->actionInclude('files/download.php'); \ No newline at end of file
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;
- }
+ }
}