diff options
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/lib/base.php b/lib/base.php index a6f6f6f71d7..1f3c616fb18 100644 --- a/lib/base.php +++ b/lib/base.php @@ -135,7 +135,7 @@ class OC { OC::$THIRDPARTYROOT = OC_Config::getValue('3rdpartyroot', null); OC::$THIRDPARTYWEBROOT = OC_Config::getValue('3rdpartyurl', null); - if (is_null(OC::$THIRDPARTYROOT) && is_null(OC::$THIRDPARTYWEBROOT)) { + if (empty(OC::$THIRDPARTYROOT) && empty(OC::$THIRDPARTYWEBROOT)) { if (file_exists(OC::$SERVERROOT . '/3rdparty')) { OC::$THIRDPARTYROOT = OC::$SERVERROOT; OC::$THIRDPARTYWEBROOT = OC::$WEBROOT; @@ -144,7 +144,7 @@ class OC { OC::$THIRDPARTYROOT = rtrim(dirname(OC::$SERVERROOT), '/'); } } - if (is_null(OC::$THIRDPARTYROOT) || !file_exists(OC::$THIRDPARTYROOT)) { + if (empty(OC::$THIRDPARTYROOT) || !file_exists(OC::$THIRDPARTYROOT)) { echo('3rdparty directory not found! Please put the ownCloud 3rdparty' . ' folder in the ownCloud folder or the folder above.' . ' You can also configure the location in the config.php file.'); @@ -279,7 +279,7 @@ class OC { * check if the instance needs to preform an upgrade * * @return bool - * @deprecated use \OCP\Util::needUpgrade instead + * @deprecated use \OCP\Util::needUpgrade() instead */ public static function needUpgrade() { return \OCP\Util::needUpgrade(); @@ -491,13 +491,6 @@ class OC { require_once $vendorAutoLoad; } - // set debug mode if an xdebug session is active - if (!defined('DEBUG') || !DEBUG) { - if (isset($_COOKIE['XDEBUG_SESSION'])) { - define('DEBUG', true); - } - } - if (!defined('PHPUNIT_RUN')) { OC\Log\ErrorHandler::setLogger(OC_Log::$object); if (defined('DEBUG') and DEBUG) { @@ -699,6 +692,9 @@ class OC { if (!OC_User::isLoggedIn()) { // Test it the user is already authenticated using Apaches AuthType Basic... very usable in combination with LDAP + if (!OC_Config::getValue('maintenance', false) && !self::checkUpgrade(false)) { + OC_App::loadApps(array('authentication')); + } OC::tryBasicAuthLogin(); } @@ -853,13 +849,6 @@ class OC { } // logon via web form elseif (OC::tryFormLogin()) { $error[] = 'invalidpassword'; - if ( OC_Config::getValue('log_authfailip', false) ) { - OC_Log::write('core', 'Login failed: user \''.$_POST["user"].'\' , wrong password, IP:'.$_SERVER['REMOTE_ADDR'], - OC_Log::WARN); - } else { - OC_Log::write('core', 'Login failed: user \''.$_POST["user"].'\' , wrong password, IP:set log_authfailip=true in conf', - OC_Log::WARN); - } } OC_Util::displayLoginPage(array_unique($error)); |