Code Duplication    Length = 11-13 lines in 2 locations

lib/private/App/AppManager.php 1 location

@@ 365-375 (lines=11) @@
362
	 *
363
	 * @internal
364
	 */
365
	public function getAppInfo($appId) {
366
		$appInfo = \OC_App::getAppInfo($appId);
367
		if ($appInfo === null) {
368
			return null;
369
		}
370
		if (!isset($appInfo['version'])) {
371
			// read version from separate file
372
			$appInfo['version'] = \OC_App::getAppVersion($appId);
373
		}
374
		return $appInfo;
375
	}
376
377
	/**
378
	 * Returns a list of apps incompatible with the given version

lib/private/legacy/util.php 1 location

@@ 1057-1069 (lines=13) @@
1054
	 *
1055
	 * @return bool
1056
	 */
1057
	public static function rememberLoginAllowed() {
1058
		$apps = OC_App::getEnabledApps();
1059
1060
		foreach ($apps as $app) {
1061
			$appInfo = OC_App::getAppInfo($app);
1062
			if (isset($appInfo['rememberlogin']) && $appInfo['rememberlogin'] === 'false') {
1063
				return false;
1064
			}
1065
		}
1066
		return true;
1067
	}
1068
1069
	/**
1070
	 * Check if the user has administration privileges, redirects to home if not
1071
	 *
1072
	 * @return null|boolean $groups where the current user is subadmin