summaryrefslogtreecommitdiffstats
path: root/apps/files/appinfo
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <hey@jancborchardt.net>2012-12-18 15:41:58 +0100
committerJan-Christoph Borchardt <hey@jancborchardt.net>2012-12-18 15:41:58 +0100
commit586cc9a83b27f54647c3425403cfcfa0cd9210c2 (patch)
tree61305f81a41e0380b65da0fcb20b738ef813d8f6 /apps/files/appinfo
parentb05666219e43e59cfeab13a53b992cf71ad8bfad (diff)
parentdd5e39ca71d80c97e1b62427642ba1a08f75624d (diff)
downloadnextcloud-server-586cc9a83b27f54647c3425403cfcfa0cd9210c2.tar.gz
nextcloud-server-586cc9a83b27f54647c3425403cfcfa0cd9210c2.zip
merge master into navigation
Diffstat (limited to 'apps/files/appinfo')
-rw-r--r--apps/files/appinfo/app.php6
-rw-r--r--apps/files/appinfo/filesync.php24
-rw-r--r--apps/files/appinfo/remote.php4
-rw-r--r--apps/files/appinfo/routes.php3
-rw-r--r--apps/files/appinfo/update.php22
5 files changed, 34 insertions, 25 deletions
diff --git a/apps/files/appinfo/app.php b/apps/files/appinfo/app.php
index 3f437679e05..dfab94b15ea 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/files.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/files.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 47fc6fb4de6..cbed56a6de5 100644
--- a/apps/files/appinfo/filesync.php
+++ b/apps/files/appinfo/filesync.php
@@ -21,22 +21,22 @@
*/
// load needed apps
-$RUNTIME_APPTYPES=array('filesystem','authentication','logging');
+$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);
+list($type, $file) = explode('/', substr($path_info, 1+strlen($service)+1), 2);
if ($type != 'oc_chunked') {
OC_Response::setStatus(OC_Response::STATUS_NOT_FOUND);
diff --git a/apps/files/appinfo/remote.php b/apps/files/appinfo/remote.php
index f12430f24dd..1713bcc22ce 100644
--- a/apps/files/appinfo/remote.php
+++ b/apps/files/appinfo/remote.php
@@ -23,10 +23,12 @@
*
*/
// load needed apps
-$RUNTIME_APPTYPES=array('filesystem','authentication','logging');
+$RUNTIME_APPTYPES=array('filesystem', 'authentication', 'logging');
OC_App::loadApps($RUNTIME_APPTYPES);
+OC_Util::obEnd();
+
// Backends
$authBackend = new OC_Connector_Sabre_Auth();
$lockBackend = new OC_Connector_Sabre_Locks();
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 bcbbc6035fa..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();
- while( $row = $result->fetchRow()){
- 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"] ));
+ $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']));
}
}
}
@@ -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;
- }
+ }
}