Code Duplication    Length = 11-13 lines in 2 locations

lib/private/legacy/util.php 1 location

@@ 1039-1051 (lines=13) @@
1036
	 *
1037
	 * @return bool
1038
	 */
1039
	public static function rememberLoginAllowed() {
1040
		$apps = OC_App::getEnabledApps();
1041
1042
		foreach ($apps as $app) {
1043
			$appInfo = OC_App::getAppInfo($app);
1044
			if (isset($appInfo['rememberlogin']) && $appInfo['rememberlogin'] === 'false') {
1045
				return false;
1046
			}
1047
		}
1048
		return true;
1049
	}
1050
1051
	/**
1052
	 * Check if the user has administration privileges, redirects to home if not
1053
	 *
1054
	 * @return null|boolean $groups where the current user is subadmin

lib/private/App/AppManager.php 1 location

@@ 374-384 (lines=11) @@
371
	 *
372
	 * @internal
373
	 */
374
	public function getAppInfo($appId) {
375
		$appInfo = \OC_App::getAppInfo($appId);
376
		if ($appInfo === null) {
377
			return null;
378
		}
379
		if (!isset($appInfo['version'])) {
380
			// read version from separate file
381
			$appInfo['version'] = \OC_App::getAppVersion($appId);
382
		}
383
		return $appInfo;
384
	}
385
386
	/**
387
	 * Returns a list of apps incompatible with the given version