Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/files/ajax/download.php6
-rw-r--r--apps/files/ajax/getstoragestats.php3
-rw-r--r--apps/files/ajax/list.php6
-rw-r--r--apps/files/ajax/rawlist.php3
-rw-r--r--apps/files/appinfo/remote.php6
-rw-r--r--apps/files/command/scan.php1
-rw-r--r--apps/files_trashbin/ajax/list.php6
-rw-r--r--console.php4
-rw-r--r--core/ajax/share.php1
-rw-r--r--core/ajax/update.php1
-rw-r--r--core/command/upgrade.php3
-rw-r--r--core/command/user/report.php3
-rw-r--r--cron.php3
-rwxr-xr-xindex.php2
-rw-r--r--lib/base.php24
-rw-r--r--lib/private/user.php2
-rwxr-xr-xlib/private/util.php4
-rw-r--r--ocs/v1.php6
-rw-r--r--public.php1
-rw-r--r--remote.php1
-rw-r--r--search/ajax/search.php1
-rwxr-xr-xsettings/admin.php1
-rw-r--r--settings/apps.php1
-rw-r--r--settings/changepassword/controller.php6
-rw-r--r--settings/help.php1
-rw-r--r--settings/personal.php1
-rw-r--r--settings/settings.php1
-rw-r--r--settings/users.php1
-rw-r--r--status.php2
29 files changed, 19 insertions, 82 deletions
diff --git a/apps/files/ajax/download.php b/apps/files/ajax/download.php
index 1f7e42e0d3e..4b4a7f8948d 100644
--- a/apps/files/ajax/download.php
+++ b/apps/files/ajax/download.php
@@ -21,12 +21,6 @@
*
*/
-// only need filesystem apps
-$RUNTIME_APPTYPES=array('filesystem');
-
-// Init owncloud
-
-
// Check if we are a user
OCP\User::checkLoggedIn();
\OC::$session->close();
diff --git a/apps/files/ajax/getstoragestats.php b/apps/files/ajax/getstoragestats.php
index 17415b6933f..dd8af39bada 100644
--- a/apps/files/ajax/getstoragestats.php
+++ b/apps/files/ajax/getstoragestats.php
@@ -1,8 +1,5 @@
<?php
-// only need filesystem apps
-$RUNTIME_APPTYPES = array('filesystem');
-
$dir = '/';
if (isset($_GET['dir'])) {
diff --git a/apps/files/ajax/list.php b/apps/files/ajax/list.php
index 667209599a0..3bb35579d5f 100644
--- a/apps/files/ajax/list.php
+++ b/apps/files/ajax/list.php
@@ -1,11 +1,5 @@
<?php
-// only need filesystem apps
-$RUNTIME_APPTYPES=array('filesystem');
-
-// Init owncloud
-
-
OCP\JSON::checkLoggedIn();
\OC::$session->close();
diff --git a/apps/files/ajax/rawlist.php b/apps/files/ajax/rawlist.php
index 6c2569e2ebb..f18bbffb74a 100644
--- a/apps/files/ajax/rawlist.php
+++ b/apps/files/ajax/rawlist.php
@@ -1,8 +1,5 @@
<?php
-// only need filesystem apps
-$RUNTIME_APPTYPES = array('filesystem');
-
OCP\JSON::checkLoggedIn();
\OC::$session->close();
diff --git a/apps/files/appinfo/remote.php b/apps/files/appinfo/remote.php
index 826f72fb0e6..a8acfdb6e6e 100644
--- a/apps/files/appinfo/remote.php
+++ b/apps/files/appinfo/remote.php
@@ -22,12 +22,6 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
-// load needed apps
-$RUNTIME_APPTYPES = array('filesystem', 'authentication', 'logging');
-
-OC_App::loadApps($RUNTIME_APPTYPES);
-
-OC_Util::obEnd();
// Backends
$authBackend = new OC_Connector_Sabre_Auth();
diff --git a/apps/files/command/scan.php b/apps/files/command/scan.php
index f334f29a939..25ab70af362 100644
--- a/apps/files/command/scan.php
+++ b/apps/files/command/scan.php
@@ -58,7 +58,6 @@ class Scan extends Command {
protected function execute(InputInterface $input, OutputInterface $output) {
if ($input->getOption('all')) {
- \OC_App::loadApps('authentication');
$users = $this->userManager->search('');
} else {
$users = $input->getArgument('user_id');
diff --git a/apps/files_trashbin/ajax/list.php b/apps/files_trashbin/ajax/list.php
index 124a236bcbd..cec18c46525 100644
--- a/apps/files_trashbin/ajax/list.php
+++ b/apps/files_trashbin/ajax/list.php
@@ -1,11 +1,5 @@
<?php
-// only need filesystem apps
-$RUNTIME_APPTYPES=array('filesystem');
-
-// Init owncloud
-
-
OCP\JSON::checkLoggedIn();
// Load the files
diff --git a/console.php b/console.php
index 25b8b312539..dd2c1026e47 100644
--- a/console.php
+++ b/console.php
@@ -8,7 +8,6 @@
use Symfony\Component\Console\Application;
-$RUNTIME_NOAPPS = true;
require_once 'lib/base.php';
// Don't do anything if ownCloud has not been installed yet
@@ -22,6 +21,9 @@ if (!OC::$CLI) {
exit(0);
}
+// load all apps to get all api routes properly setup
+OC_App::loadApps();
+
$defaults = new OC_Defaults;
$application = new Application($defaults->getName(), \OC_Util::getVersionString());
require_once 'core/register_command.php';
diff --git a/core/ajax/share.php b/core/ajax/share.php
index 3f04e1e4ad1..e667d9b5faa 100644
--- a/core/ajax/share.php
+++ b/core/ajax/share.php
@@ -21,7 +21,6 @@
OC_JSON::checkLoggedIn();
OCP\JSON::callCheck();
-OC_App::loadApps();
$defaults = new \OCP\Defaults();
diff --git a/core/ajax/update.php b/core/ajax/update.php
index 2a0cbb2036d..55e8ab15ec2 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -1,6 +1,5 @@
<?php
set_time_limit(0);
-$RUNTIME_NOAPPS = true;
require_once '../../lib/base.php';
if (OC::checkUpgrade(false)) {
diff --git a/core/command/upgrade.php b/core/command/upgrade.php
index cfccfb5d2f0..ed72d136e24 100644
--- a/core/command/upgrade.php
+++ b/core/command/upgrade.php
@@ -34,9 +34,6 @@ class Upgrade extends Command {
* @param OutputInterface $output output interface
*/
protected function execute(InputInterface $input, OutputInterface $output) {
- global $RUNTIME_NOAPPS;
-
- $RUNTIME_NOAPPS = true; //no apps, yet
require_once \OC::$SERVERROOT . '/lib/base.php';
diff --git a/core/command/user/report.php b/core/command/user/report.php
index 70c5a8566b7..a5159310af1 100644
--- a/core/command/user/report.php
+++ b/core/command/user/report.php
@@ -46,7 +46,6 @@ class Report extends Command {
}
private function countUsers() {
- \OC_App::loadApps(array('authentication'));
$userManager = \OC::$server->getUserManager();
return $userManager->countUsers();
}
@@ -56,4 +55,4 @@ class Report extends Command {
$userDirectories = $dataview->getDirectoryContent('/', 'httpd/unix-directory');
return count($userDirectories);
}
-} \ No newline at end of file
+}
diff --git a/cron.php b/cron.php
index 05d47124da0..8fa72a319c0 100644
--- a/cron.php
+++ b/cron.php
@@ -48,6 +48,9 @@ try {
require_once 'lib/base.php';
+ // load all apps to get all api routes properly setup
+ OC_App::loadApps();
+
\OC::$session->close();
$logger = \OC_Log::$object;
diff --git a/index.php b/index.php
index 0a2f15f9f5e..bd94d0e908d 100755
--- a/index.php
+++ b/index.php
@@ -21,8 +21,6 @@
*
*/
-$RUNTIME_NOAPPS = true; //no apps, yet
-
try {
require_once 'lib/base.php';
diff --git a/lib/base.php b/lib/base.php
index 2515b9657cb..4f1a0f58ef2 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -549,16 +549,10 @@ class OC {
OC_User::logout();
}
- // Load Apps
- // This includes plugins for users and filesystems as well
- global $RUNTIME_NOAPPS;
- global $RUNTIME_APPTYPES;
- if (!$RUNTIME_NOAPPS && !self::checkUpgrade(false)) {
- if ($RUNTIME_APPTYPES) {
- OC_App::loadApps($RUNTIME_APPTYPES);
- } else {
- OC_App::loadApps();
- }
+ // Load minimum set of apps - which is filesystem, authentication and logging
+ if (!self::checkUpgrade(false)) {
+ OC_App::loadApps(array('authentication'));
+ OC_App::loadApps(array('filesystem', 'logging'));
}
//setup extra user backends
@@ -851,7 +845,7 @@ class OC {
) {
return false;
}
- OC_App::loadApps(array('authentication'));
+
if (defined("DEBUG") && DEBUG) {
OC_Log::write('core', 'Trying to login from cookie', OC_Log::DEBUG);
}
@@ -923,7 +917,7 @@ class OC {
) {
return false;
}
- OC_App::loadApps(array('authentication'));
+
if (OC_User::login($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"])) {
//OC_Log::write('core',"Logged in with HTTP Authentication", OC_Log::DEBUG);
OC_User::unsetMagicInCookie();
@@ -934,11 +928,6 @@ class OC {
}
-// define runtime variables - unless this already has been done
-if (!isset($RUNTIME_NOAPPS)) {
- $RUNTIME_NOAPPS = false;
-}
-
if (!function_exists('get_temp_dir')) {
function get_temp_dir() {
if ($temp = ini_get('upload_tmp_dir')) return $temp;
@@ -957,4 +946,3 @@ if (!function_exists('get_temp_dir')) {
}
OC::init();
-
diff --git a/lib/private/user.php b/lib/private/user.php
index a89b7286c10..dc4c7ec3b61 100644
--- a/lib/private/user.php
+++ b/lib/private/user.php
@@ -321,8 +321,6 @@ class OC_User {
*/
public static function isLoggedIn() {
if (\OC::$session->get('user_id') && self::$incognitoMode === false) {
- OC_App::loadApps(array('authentication'));
- self::setupBackends();
return self::userExists(\OC::$session->get('user_id'));
}
return false;
diff --git a/lib/private/util.php b/lib/private/util.php
index 87e173fa765..cd152234cc9 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -30,9 +30,7 @@ class OC_Util {
}
// load all filesystem apps before, so no setup-hook gets lost
- if(!isset($RUNTIME_NOAPPS) || !$RUNTIME_NOAPPS) {
- OC_App::loadApps(array('filesystem'));
- }
+ OC_App::loadApps(array('filesystem'));
// the filesystem will finish when $user is not empty,
// mark fs setup here to avoid doing the setup from loading
diff --git a/ocs/v1.php b/ocs/v1.php
index 5d360c530a9..62a3511e611 100644
--- a/ocs/v1.php
+++ b/ocs/v1.php
@@ -21,11 +21,15 @@
*
*/
-require_once('../lib/base.php');
+require_once '../lib/base.php';
+
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
try {
+ // load all apps to get all api routes properly setup
+ OC_App::loadApps();
+
OC::$server->getRouter()->match('/ocs'.OC_Request::getRawPathInfo());
} catch (ResourceNotFoundException $e) {
OC_API::setContentType();
diff --git a/public.php b/public.php
index 767295b98db..e072db93d29 100644
--- a/public.php
+++ b/public.php
@@ -1,5 +1,4 @@
<?php
-$RUNTIME_NOAPPS = true;
try {
diff --git a/remote.php b/remote.php
index 9e18c8f80a9..15dfa8256ff 100644
--- a/remote.php
+++ b/remote.php
@@ -1,5 +1,4 @@
<?php
-$RUNTIME_NOAPPS = true;
try {
diff --git a/search/ajax/search.php b/search/ajax/search.php
index f0ca5752b9a..0cc1f9d30cd 100644
--- a/search/ajax/search.php
+++ b/search/ajax/search.php
@@ -23,7 +23,6 @@
// Check if we are a user
OC_JSON::checkLoggedIn();
-OC_App::loadApps();
$query=(isset($_GET['query']))?$_GET['query']:'';
if($query) {
diff --git a/settings/admin.php b/settings/admin.php
index 23b3a2d5a0e..ea8aa7af5d0 100755
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -6,7 +6,6 @@
*/
OC_Util::checkAdminUser();
-OC_App::loadApps();
OC_Util::addStyle( "settings", "settings" );
OC_Util::addScript( "settings", "admin" );
diff --git a/settings/apps.php b/settings/apps.php
index 96b6d21b502..6fd2efc2018 100644
--- a/settings/apps.php
+++ b/settings/apps.php
@@ -22,7 +22,6 @@
*/
OC_Util::checkAdminUser();
-OC_App::loadApps();
// Load the files we need
OC_Util::addStyle( "settings", "settings" );
diff --git a/settings/changepassword/controller.php b/settings/changepassword/controller.php
index e8c2a1943f3..9f1e7329964 100644
--- a/settings/changepassword/controller.php
+++ b/settings/changepassword/controller.php
@@ -8,9 +8,6 @@ class Controller {
\OC_JSON::callCheck();
\OC_JSON::checkLoggedIn();
- // Manually load apps to ensure hooks work correctly (workaround for issue 1503)
- \OC_App::loadApps();
-
$username = \OC_User::getUser();
$password = isset($_POST['personal-password']) ? $_POST['personal-password'] : null;
$oldPassword = isset($_POST['oldpassword']) ? $_POST['oldpassword'] : '';
@@ -32,9 +29,6 @@ class Controller {
\OC_JSON::callCheck();
\OC_JSON::checkLoggedIn();
- // Manually load apps to ensure hooks work correctly (workaround for issue 1503)
- \OC_App::loadApps();
-
if (isset($_POST['username'])) {
$username = $_POST['username'];
} else {
diff --git a/settings/help.php b/settings/help.php
index 88693939b84..301f50592ae 100644
--- a/settings/help.php
+++ b/settings/help.php
@@ -6,7 +6,6 @@
*/
OC_Util::checkLoggedIn();
-OC_App::loadApps();
// Load the files we need
OC_Util::addStyle( "settings", "settings" );
diff --git a/settings/personal.php b/settings/personal.php
index cf1a496bdf0..be1aa6400bf 100644
--- a/settings/personal.php
+++ b/settings/personal.php
@@ -6,7 +6,6 @@
*/
OC_Util::checkLoggedIn();
-OC_App::loadApps();
$defaults = new OC_Defaults(); // initialize themable default strings and urls
diff --git a/settings/settings.php b/settings/settings.php
index 1e05452ec4d..c08732fcf66 100644
--- a/settings/settings.php
+++ b/settings/settings.php
@@ -6,7 +6,6 @@
*/
OC_Util::checkLoggedIn();
-OC_App::loadApps();
OC_Util::addStyle( 'settings', 'settings' );
OC_App::setActiveNavigationEntry( 'settings' );
diff --git a/settings/users.php b/settings/users.php
index 2f1c63a0b59..f09d0e90d3c 100644
--- a/settings/users.php
+++ b/settings/users.php
@@ -6,7 +6,6 @@
*/
OC_Util::checkSubAdminUser();
-OC_App::loadApps();
// We have some javascript foo!
OC_Util::addScript( 'settings', 'users' );
diff --git a/status.php b/status.php
index 88422100f14..861eaed9cd2 100644
--- a/status.php
+++ b/status.php
@@ -21,8 +21,6 @@
*
*/
-$RUNTIME_NOAPPS = true; //no apps, yet
-
try {
require_once 'lib/base.php';