summaryrefslogtreecommitdiffstats
path: root/apps/files/appinfo
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2012-11-29 18:30:02 +0100
committerJörn Friedrich Dreyer <jfd@butonic.de>2012-11-29 18:33:15 +0100
commit3b83fe153062508d4a4d70958ad1a5281eaab81e (patch)
tree30f12d25c179e9c40425c6a37686412ff1854c05 /apps/files/appinfo
parentc38a75e03f9db02b82e71472d2f719079eb44829 (diff)
downloadnextcloud-server-3b83fe153062508d4a4d70958ad1a5281eaab81e.tar.gz
nextcloud-server-3b83fe153062508d4a4d70958ad1a5281eaab81e.zip
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/remote.php2
-rw-r--r--apps/files/appinfo/routes.php3
-rw-r--r--apps/files/appinfo/update.php20
5 files changed, 29 insertions, 22 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/remote.php b/apps/files/appinfo/remote.php
index 0ab7e7674c6..1760654fa3e 100644
--- a/apps/files/appinfo/remote.php
+++ b/apps/files/appinfo/remote.php
@@ -47,4 +47,4 @@ $server->addPlugin(new Sabre_DAV_Browser_Plugin(false)); // Show something in th
$server->addPlugin(new OC_Connector_Sabre_QuotaPlugin());
// And off we go!
-$server->exec();
+$server->exec(); \ No newline at end of file
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;
- }
+ }
}