summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/legacy')
-rw-r--r--lib/private/legacy/app.php44
-rw-r--r--lib/private/legacy/db.php1
-rw-r--r--lib/private/legacy/db/statementwrapper.php3
-rw-r--r--lib/private/legacy/defaults.php4
-rw-r--r--lib/private/legacy/files.php4
-rw-r--r--lib/private/legacy/helper.php3
-rw-r--r--lib/private/legacy/image.php9
-rw-r--r--lib/private/legacy/json.php6
-rw-r--r--lib/private/legacy/response.php2
-rw-r--r--lib/private/legacy/template.php9
-rw-r--r--lib/private/legacy/template/functions.php5
-rw-r--r--lib/private/legacy/user.php5
-rw-r--r--lib/private/legacy/util.php10
13 files changed, 64 insertions, 41 deletions
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php
index a33c9be20fc..d2b0f96d593 100644
--- a/lib/private/legacy/app.php
+++ b/lib/private/legacy/app.php
@@ -12,10 +12,11 @@
* @author Christopher Schäpers <kondou@ts.unde.re>
* @author Felix Moeller <mail@felixmoeller.de>
* @author Frank Karlitschek <frank@karlitschek.de>
- * @author Georg Ehrke <georg@owncloud.com>
+ * @author Georg Ehrke <oc.list@georgehrke.com>
* @author Jakob Sack <mail@jakobsack.de>
- * @author Jan-Christoph Borchardt <hey@jancborchardt.net>
* @author Joas Schilling <coding@schilljs.com>
+ * @author Julius Haertl <jus@bitgrid.net>
+ * @author Julius Härtl <jus@bitgrid.net>
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
* @author Kamil Domanski <kdomanski@kdemail.net>
* @author Klaas Freitag <freitag@owncloud.com>
@@ -27,6 +28,7 @@
* @author Robin McCorkell <robin@mccorkell.me.uk>
* @author Roeland Jago Douma <roeland@famdouma.nl>
* @author Sam Tuke <mail@samtuke.com>
+ * @author Sebastian Wessalowski <sebastian@wessalowski.org>
* @author Thomas Müller <thomas.mueller@tmit.eu>
* @author Thomas Tanghus <thomas@tanghus.net>
* @author Tom Needham <tom@owncloud.com>
@@ -185,6 +187,8 @@ class OC_App {
'class' => $plugin['@value'],
];
\OC::$server->getCollaboratorSearch()->registerPlugin($pluginInfo);
+ } else if ($plugin['@attributes']['type'] === 'autocomplete-sort') {
+ \OC::$server->getAutoCompleteManager()->registerSorter($plugin['@value']);
}
}
}
@@ -200,17 +204,25 @@ class OC_App {
if(isset(self::$alreadyRegistered[$key])) {
return;
}
+
self::$alreadyRegistered[$key] = true;
+
// Register on PSR-4 composer autoloader
$appNamespace = \OC\AppFramework\App::buildAppNamespace($app);
\OC::$server->registerNamespace($app, $appNamespace);
- \OC::$composerAutoloader->addPsr4($appNamespace . '\\', $path . '/lib/', true);
+
+ if (file_exists($path . '/composer/autoload.php')) {
+ require_once $path . '/composer/autoload.php';
+ } else {
+ \OC::$composerAutoloader->addPsr4($appNamespace . '\\', $path . '/lib/', true);
+ // Register on legacy autoloader
+ \OC::$loader->addValidRoot($path);
+ }
+
+ // Register Test namespace only when testing
if (defined('PHPUNIT_RUN') || defined('CLI_TEST_RUN')) {
\OC::$composerAutoloader->addPsr4($appNamespace . '\\Tests\\', $path . '/tests/', true);
}
-
- // Register on legacy autoloader
- \OC::$loader->addValidRoot($path);
}
/**
@@ -340,6 +352,7 @@ class OC_App {
*
* @param string $app app
* @return bool
+ * @deprecated 13.0.0 use \OC::$server->getAppManager()->isEnabledForUser($appId)
*
* This function checks whether or not an app is enabled.
*/
@@ -768,6 +781,8 @@ class OC_App {
}
}
+ $apps = array_unique($apps);
+
return $apps;
}
@@ -857,21 +872,6 @@ class OC_App {
return $appList;
}
- /**
- * Returns the internal app ID or false
- * @param string $ocsID
- * @return string|false
- */
- public static function getInternalAppIdByOcs($ocsID) {
- if(is_numeric($ocsID)) {
- $idArray = \OC::$server->getAppConfig()->getValues(false, 'ocsid');
- if(array_search($ocsID, $idArray)) {
- return array_search($ocsID, $idArray);
- }
- }
- return false;
- }
-
public static function shouldUpgrade($app) {
$versions = self::getAppVersions();
$currentVersion = OC_App::getAppVersion($app);
@@ -1149,7 +1149,7 @@ class OC_App {
* @return \OC\Files\View|false
*/
public static function getStorage($appId) {
- if (OC_App::isEnabled($appId)) { //sanity check
+ if (\OC::$server->getAppManager()->isEnabledForUser($appId)) { //sanity check
if (\OC::$server->getUserSession()->isLoggedIn()) {
$view = new \OC\Files\View('/' . OC_User::getUser());
if (!$view->file_exists($appId)) {
diff --git a/lib/private/legacy/db.php b/lib/private/legacy/db.php
index 843970d7d53..da21729f123 100644
--- a/lib/private/legacy/db.php
+++ b/lib/private/legacy/db.php
@@ -6,6 +6,7 @@
* @author Bart Visscher <bartv@thisnet.nl>
* @author Joas Schilling <coding@schilljs.com>
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
+ * @author Lukas Reschke <lukas@statuscode.ch>
* @author Morris Jobke <hey@morrisjobke.de>
* @author Robin Appelman <robin@icewind.nl>
* @author Thomas Müller <thomas.mueller@tmit.eu>
diff --git a/lib/private/legacy/db/statementwrapper.php b/lib/private/legacy/db/statementwrapper.php
index cac4598e650..7c3c4776aa7 100644
--- a/lib/private/legacy/db/statementwrapper.php
+++ b/lib/private/legacy/db/statementwrapper.php
@@ -5,9 +5,10 @@
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Bart Visscher <bartv@thisnet.nl>
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
+ * @author Lukas Reschke <lukas@statuscode.ch>
* @author Morris Jobke <hey@morrisjobke.de>
+ * @author Piotr Mrówczyński <mrow4a@yahoo.com>
* @author Robin Appelman <robin@icewind.nl>
- * @author Robin McCorkell <robin@mccorkell.me.uk>
* @author Thomas Müller <thomas.mueller@tmit.eu>
*
* @license AGPL-3.0
diff --git a/lib/private/legacy/defaults.php b/lib/private/legacy/defaults.php
index d2f639959cf..8b5cef3643e 100644
--- a/lib/private/legacy/defaults.php
+++ b/lib/private/legacy/defaults.php
@@ -3,13 +3,17 @@
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Björn Schießle <bjoern@schiessle.org>
+ * @author Felix A. Epp <work@felixepp.de>
* @author Jan-Christoph Borchardt <hey@jancborchardt.net>
+ * @author Julius Haertl <jus@bitgrid.net>
+ * @author Julius Härtl <jus@bitgrid.net>
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
* @author Lukas Reschke <lukas@statuscode.ch>
* @author Morris Jobke <hey@morrisjobke.de>
* @author Pascal de Bruijn <pmjdebruijn@pcode.nl>
* @author Robin Appelman <robin@icewind.nl>
* @author Robin McCorkell <robin@mccorkell.me.uk>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
* @author scolebrook <scolebrook@mac.com>
* @author Thomas Müller <thomas.mueller@tmit.eu>
* @author Volkan Gezer <volkangezer@gmail.com>
diff --git a/lib/private/legacy/files.php b/lib/private/legacy/files.php
index 017691805c9..ba635d57627 100644
--- a/lib/private/legacy/files.php
+++ b/lib/private/legacy/files.php
@@ -10,9 +10,11 @@
* @author Jakob Sack <mail@jakobsack.de>
* @author Joas Schilling <coding@schilljs.com>
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
+ * @author Ko- <k.stoffelen@cs.ru.nl>
* @author Lukas Reschke <lukas@statuscode.ch>
* @author Michael Gapczynski <GapczynskiM@gmail.com>
* @author Nicolai Ehemann <en@enlightened.de>
+ * @author noveens <noveen.sachdeva@research.iiit.ac.in>
* @author Piotr Filiciak <piotr@filiciak.pl>
* @author Robin Appelman <robin@icewind.nl>
* @author Robin McCorkell <robin@mccorkell.me.uk>
@@ -338,7 +340,7 @@ class OC_Files {
*
* @param int $size file size in bytes
* @param array $files override '.htaccess' and '.user.ini' locations
- * @return bool false on failure, size on success
+ * @return bool|int false on failure, size on success
*/
public static function setUploadLimit($size, $files = []) {
//don't allow user to break his config
diff --git a/lib/private/legacy/helper.php b/lib/private/legacy/helper.php
index dd4f13f7d77..e611b4d0732 100644
--- a/lib/private/legacy/helper.php
+++ b/lib/private/legacy/helper.php
@@ -2,6 +2,7 @@
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
+ * @author Ardinis <Ardinis@users.noreply.github.com>
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Bart Visscher <bartv@thisnet.nl>
* @author Björn Schießle <bjoern@schiessle.org>
@@ -9,7 +10,6 @@
* @author Clark Tomlinson <fallen013@gmail.com>
* @author Fabian Henze <flyser42@gmx.de>
* @author Felix Moeller <mail@felixmoeller.de>
- * @author Georg Ehrke <georg@owncloud.com>
* @author Jakob Sack <mail@jakobsack.de>
* @author Jan-Christoph Borchardt <hey@jancborchardt.net>
* @author Joas Schilling <coding@schilljs.com>
@@ -19,6 +19,7 @@
* @author Morris Jobke <hey@morrisjobke.de>
* @author Olivier Paroz <github@oparoz.com>
* @author Pellaeon Lin <nfsmwlin@gmail.com>
+ * @author RealRancor <fisch.666@gmx.de>
* @author Robin Appelman <robin@icewind.nl>
* @author Robin McCorkell <robin@mccorkell.me.uk>
* @author Roeland Jago Douma <roeland@famdouma.nl>
diff --git a/lib/private/legacy/image.php b/lib/private/legacy/image.php
index 120b19d1cff..fe9f054f5d4 100644
--- a/lib/private/legacy/image.php
+++ b/lib/private/legacy/image.php
@@ -3,22 +3,25 @@
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Andreas Fischer <bantu@owncloud.com>
- * @author Bartek Przybylski <bart.p.pl@gmail.com>
* @author Bart Visscher <bartv@thisnet.nl>
+ * @author Bartek Przybylski <bart.p.pl@gmail.com>
* @author Björn Schießle <bjoern@schiessle.org>
* @author Byron Marohn <combustible@live.com>
* @author Christopher Schäpers <kondou@ts.unde.re>
- * @author Georg Ehrke <georg@owncloud.com>
+ * @author Georg Ehrke <oc.list@georgehrke.com>
* @author j-ed <juergen@eisfair.org>
* @author Joas Schilling <coding@schilljs.com>
* @author Johannes Willnecker <johannes@willnecker.com>
+ * @author Julius Härtl <jus@bitgrid.net>
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
* @author Lukas Reschke <lukas@statuscode.ch>
* @author Morris Jobke <hey@morrisjobke.de>
* @author Olivier Paroz <github@oparoz.com>
* @author Robin Appelman <robin@icewind.nl>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
* @author Thomas Müller <thomas.mueller@tmit.eu>
* @author Thomas Tanghus <thomas@tanghus.net>
+ * @author Victor Dubiniuk <dubiniuk@owncloud.com>
*
* @license AGPL-3.0
*
@@ -431,7 +434,7 @@ class OC_Image implements \OCP\IImage {
* (I'm open for suggestions on better method name ;)
* Fixes orientation based on EXIF data.
*
- * @return bool.
+ * @return bool
*/
public function fixOrientation() {
$o = $this->getOrientation();
diff --git a/lib/private/legacy/json.php b/lib/private/legacy/json.php
index 180dd7c448d..7b3a1b6d9cd 100644
--- a/lib/private/legacy/json.php
+++ b/lib/private/legacy/json.php
@@ -6,10 +6,12 @@
* @author Bernhard Posselt <dev@bernhard-posselt.com>
* @author Christoph Wurst <christoph@owncloud.com>
* @author Felix Moeller <mail@felixmoeller.de>
- * @author Georg Ehrke <georg@owncloud.com>
+ * @author Georg Ehrke <oc.list@georgehrke.com>
* @author Lukas Reschke <lukas@statuscode.ch>
* @author Morris Jobke <hey@morrisjobke.de>
* @author Robin Appelman <robin@icewind.nl>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ * @author Sebastian Wessalowski <sebastian@wessalowski.org>
* @author Thomas Müller <thomas.mueller@tmit.eu>
* @author Thomas Tanghus <thomas@tanghus.net>
* @author Vincent Petry <pvince81@owncloud.com>
@@ -55,7 +57,7 @@ class OC_JSON{
* @suppress PhanDeprecatedFunction
*/
public static function checkAppEnabled($app) {
- if( !OC_App::isEnabled($app)) {
+ if( !\OC::$server->getAppManager()->isEnabledForUser($app)) {
$l = \OC::$server->getL10N('lib');
self::error(array( 'data' => array( 'message' => $l->t('Application is not enabled'), 'error' => 'application_not_enabled' )));
exit();
diff --git a/lib/private/legacy/response.php b/lib/private/legacy/response.php
index e45fe616e49..975ff570485 100644
--- a/lib/private/legacy/response.php
+++ b/lib/private/legacy/response.php
@@ -4,10 +4,12 @@
*
* @author Andreas Fischer <bantu@owncloud.com>
* @author Bart Visscher <bartv@thisnet.nl>
+ * @author Joas Schilling <coding@schilljs.com>
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
* @author Lukas Reschke <lukas@statuscode.ch>
* @author Morris Jobke <hey@morrisjobke.de>
* @author Robin McCorkell <robin@mccorkell.me.uk>
+ * @author Sergio Bertolín <sbertolin@solidgear.es>
* @author Stefan Weil <sw@weilnetz.de>
* @author Thomas Müller <thomas.mueller@tmit.eu>
* @author Vincent Petry <pvince81@owncloud.com>
diff --git a/lib/private/legacy/template.php b/lib/private/legacy/template.php
index 8c6185cd556..e3365ca455f 100644
--- a/lib/private/legacy/template.php
+++ b/lib/private/legacy/template.php
@@ -4,17 +4,18 @@
*
* @author Bart Visscher <bartv@thisnet.nl>
* @author Brice Maron <brice@bmaron.net>
+ * @author Christoph Wurst <christoph@owncloud.com>
* @author Frank Karlitschek <frank@karlitschek.de>
- * @author Hendrik Leppelsack <hendrik@leppelsack.de>
* @author Individual IT Services <info@individual-it.net>
* @author Jakob Sack <mail@jakobsack.de>
* @author Jan-Christoph Borchardt <hey@jancborchardt.net>
* @author Joas Schilling <coding@schilljs.com>
+ * @author John Molakvoæ <skjnldsv@users.noreply.github.com>
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
* @author Lukas Reschke <lukas@statuscode.ch>
- * @author Michael Letzgus <develope@michael-letzgus.de>
+ * @author Marin Treselj <marin@pixelipo.com>
+ * @author Michael Letzgus <www@chronos.michael-letzgus.de>
* @author Morris Jobke <hey@morrisjobke.de>
- * @author Raghu Nayyar <hey@raghunayyar.com>
* @author Robin Appelman <robin@icewind.nl>
* @author Roeland Jago Douma <roeland@famdouma.nl>
* @author Thomas Müller <thomas.mueller@tmit.eu>
@@ -297,7 +298,7 @@ class OC_Template extends \OC\Template\Base {
* @suppress PhanAccessMethodInternal
*/
public static function printErrorPage( $error_msg, $hint = '' ) {
- if (\OC_App::isEnabled('theming') && !\OC_App::isAppLoaded('theming')) {
+ if (\OC::$server->getAppManager()->isEnabledForUser('theming') && !\OC_App::isAppLoaded('theming')) {
\OC_App::loadApp('theming');
}
diff --git a/lib/private/legacy/template/functions.php b/lib/private/legacy/template/functions.php
index bca16b48c1a..2cd439e9e6e 100644
--- a/lib/private/legacy/template/functions.php
+++ b/lib/private/legacy/template/functions.php
@@ -5,9 +5,10 @@
* @author Bart Visscher <bartv@thisnet.nl>
* @author Bernhard Posselt <dev@bernhard-posselt.com>
* @author Joas Schilling <coding@schilljs.com>
+ * @author Julius Härtl <jus@bitgrid.net>
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
* @author Lukas Reschke <lukas@statuscode.ch>
- * @author Michael Letzgus <develope@michael-letzgus.de>
+ * @author Michael Letzgus <www@chronos.michael-letzgus.de>
* @author Morris Jobke <hey@morrisjobke.de>
* @author Robin McCorkell <robin@mccorkell.me.uk>
* @author Roeland Jago Douma <roeland@famdouma.nl>
@@ -278,7 +279,7 @@ function human_file_size( $bytes ) {
/**
* Strips the timestamp of its time value
* @param int $timestamp UNIX timestamp to strip
- * @return $timestamp without time value
+ * @return int timestamp without time value
*/
function strip_time($timestamp){
$date = new \DateTime("@{$timestamp}");
diff --git a/lib/private/legacy/user.php b/lib/private/legacy/user.php
index 9e0ca4b9fee..52ed1369c47 100644
--- a/lib/private/legacy/user.php
+++ b/lib/private/legacy/user.php
@@ -5,11 +5,11 @@
* @author Aldo "xoen" Giambelluca <xoen@xoen.org>
* @author Andreas Fischer <bantu@owncloud.com>
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
- * @author Bartek Przybylski <bart.p.pl@gmail.com>
* @author Bart Visscher <bartv@thisnet.nl>
+ * @author Bartek Przybylski <bart.p.pl@gmail.com>
* @author Björn Schießle <bjoern@schiessle.org>
* @author Christoph Wurst <christoph@owncloud.com>
- * @author Georg Ehrke <georg@owncloud.com>
+ * @author Georg Ehrke <oc.list@georgehrke.com>
* @author Jakob Sack <mail@jakobsack.de>
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
* @author Lukas Reschke <lukas@statuscode.ch>
@@ -20,6 +20,7 @@
* @author shkdee <louis.traynard@m4x.org>
* @author Thomas Müller <thomas.mueller@tmit.eu>
* @author Tom Needham <tom@owncloud.com>
+ * @author Vincent Petry <pvince81@owncloud.com>
*
* @license AGPL-3.0
*
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php
index f0fef027ec2..2610ec3a7b6 100644
--- a/lib/private/legacy/util.php
+++ b/lib/private/legacy/util.php
@@ -10,28 +10,32 @@
* @author Birk Borkason <daniel.niccoli@gmail.com>
* @author Björn Schießle <bjoern@schiessle.org>
* @author Brice Maron <brice@bmaron.net>
- * @author Christopher Schäpers <kondou@ts.unde.re>
* @author Christoph Wurst <christoph@owncloud.com>
+ * @author Christopher Schäpers <kondou@ts.unde.re>
* @author Clark Tomlinson <fallen013@gmail.com>
* @author cmeh <cmeh@users.noreply.github.com>
- * @author Felix Anand Epp <work@felixepp.de>
+ * @author Felix Epp <work@felixepp.de>
* @author Florin Peter <github@florin-peter.de>
* @author Frank Karlitschek <frank@karlitschek.de>
- * @author Georg Ehrke <georg@owncloud.com>
+ * @author Georg Ehrke <oc.list@georgehrke.com>
* @author helix84 <helix84@centrum.sk>
+ * @author Ilja Neumann <ineumann@owncloud.com>
* @author Individual IT Services <info@individual-it.net>
* @author Jakob Sack <mail@jakobsack.de>
* @author Joas Schilling <coding@schilljs.com>
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
+ * @author Kawohl <john@owncloud.com>
* @author Lukas Reschke <lukas@statuscode.ch>
* @author Markus Goetz <markus@woboq.com>
* @author Martin Mattel <martin.mattel@diemattels.at>
* @author Marvin Thomas Rabe <mrabe@marvinrabe.de>
* @author Michael Gapczynski <GapczynskiM@gmail.com>
* @author Morris Jobke <hey@morrisjobke.de>
+ * @author rakekniven <mark.ziegler@rakekniven.de>
* @author Robin Appelman <robin@icewind.nl>
* @author Robin McCorkell <robin@mccorkell.me.uk>
* @author Roeland Jago Douma <roeland@famdouma.nl>
+ * @author Sebastian Wessalowski <sebastian@wessalowski.org>
* @author Stefan Rado <owncloud@sradonia.net>
* @author Stefan Weil <sw@weilnetz.de>
* @author Thomas Müller <thomas.mueller@tmit.eu>