Code Duplication    Length = 11-13 lines in 2 locations

lib/private/App/AppManager.php 1 location

@@ 317-327 (lines=11) @@
314
	 *
315
	 * @internal
316
	 */
317
	public function getAppInfo($appId) {
318
		$appInfo = \OC_App::getAppInfo($appId);
319
		if ($appInfo === null) {
320
			return null;
321
		}
322
		if (!isset($appInfo['version'])) {
323
			// read version from separate file
324
			$appInfo['version'] = \OC_App::getAppVersion($appId);
325
		}
326
		return $appInfo;
327
	}
328
329
	/**
330
	 * Returns a list of apps incompatible with the given version

lib/private/legacy/util.php 1 location

@@ 1044-1056 (lines=13) @@
1041
	 *
1042
	 * @return bool
1043
	 */
1044
	public static function rememberLoginAllowed() {
1045
1046
		$apps = OC_App::getEnabledApps();
1047
1048
		foreach ($apps as $app) {
1049
			$appInfo = OC_App::getAppInfo($app);
1050
			if (isset($appInfo['rememberlogin']) && $appInfo['rememberlogin'] === 'false') {
1051
				return false;
1052
			}
1053
1054
		}
1055
		return true;
1056
	}
1057
1058
	/**
1059
	 * Check if the user is a subadmin, redirects to home if not