summaryrefslogtreecommitdiffstats
path: root/apps/files/appinfo
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-12-02 03:03:48 +0100
committerRobin Appelman <icewind@owncloud.com>2012-12-02 03:03:48 +0100
commit72b6faa69d693fa0d2a21d592b6ae36023757872 (patch)
tree9e6c31b6edc5715c34849c737f6f32ff6dcedf8a /apps/files/appinfo
parent702444b2422326388e494091e815fd3d9b03cc87 (diff)
parent401c56ce7bda6b8fb782e3cea962e47546626eef (diff)
downloadnextcloud-server-72b6faa69d693fa0d2a21d592b6ae36023757872.tar.gz
nextcloud-server-72b6faa69d693fa0d2a21d592b6ae36023757872.zip
merge master into filesystem
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 fb64a80ec0d..643d8ed18a2 100644
--- a/apps/files/appinfo/app.php
+++ b/apps/files/appinfo/app.php
@@ -3,7 +3,11 @@ $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 62470077319..47884a4f15e 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;
- }
+ }
}