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

@@ 1052-1064 (lines=13) @@
1049
	 *
1050
	 * @return bool
1051
	 */
1052
	public static function rememberLoginAllowed() {
1053
1054
		$apps = OC_App::getEnabledApps();
1055
1056
		foreach ($apps as $app) {
1057
			$appInfo = OC_App::getAppInfo($app);
1058
			if (isset($appInfo['rememberlogin']) && $appInfo['rememberlogin'] === 'false') {
1059
				return false;
1060
			}
1061
1062
		}
1063
		return true;
1064
	}
1065
1066
	/**
1067
	 * Check if the user is a subadmin, redirects to home if not