Code Duplication    Length = 11-13 lines in 2 locations

lib/private/App/AppManager.php 1 location

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

lib/private/legacy/util.php 1 location

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