aboutsummaryrefslogtreecommitdiffstats
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_trashbin/ajax/list.php6
-rw-r--r--console.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.php23
-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--status.php2
19 files changed, 15 insertions, 67 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_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..fc6957062be 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
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 a0447f97f19..31bc68b08bb 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 cc710fc7207..d02d9e1d261 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -547,16 +547,9 @@ 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('filesystem', 'authentication', 'logging'));
}
//setup extra user backends
@@ -849,7 +842,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);
}
@@ -921,7 +914,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();
@@ -932,11 +925,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;
@@ -955,4 +943,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 70dadb1befd..dea5f2cafcf 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/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';