瀏覽代碼

Merge pull request #43045 from nextcloud/bugfix/noid/fix-type-info-in-appmanager

fix(apps): Fix type information of app manager
tags/v29.0.0beta1
Joas Schilling 5 月之前
父節點
當前提交
7f1b980dcf
No account linked to committer's email address
共有 2 個文件被更改,包括 6 次插入9 次删除
  1. 3
    6
      lib/private/App/AppManager.php
  2. 3
    3
      lib/public/App/IAppManager.php

+ 3
- 6
lib/private/App/AppManager.php 查看文件

* Check if an app is enabled for user * Check if an app is enabled for user
* *
* @param string $appId * @param string $appId
* @param \OCP\IUser $user (optional) if not defined, the currently logged in user will be used
* @param \OCP\IUser|null $user (optional) if not defined, the currently logged in user will be used
* @return bool * @return bool
*/ */
public function isEnabledForUser($appId, $user = null) { public function isEnabledForUser($appId, $user = null) {
/** /**
* Returns the app information from "appinfo/info.xml". * Returns the app information from "appinfo/info.xml".
* *
* @param string $appId app id
*
* @param bool $path
* @param null $lang
* @param string|null $lang
* @return array|null app info * @return array|null app info
*/ */
public function getAppInfo(string $appId, bool $path = false, $lang = null) { public function getAppInfo(string $appId, bool $path = false, $lang = null) {
/** /**
* @inheritdoc * @inheritdoc
*/ */
public function getDefaultEnabledApps():array {
public function getDefaultEnabledApps(): array {
$this->loadShippedJson(); $this->loadShippedJson();


return $this->defaultEnabled; return $this->defaultEnabled;

+ 3
- 3
lib/public/App/IAppManager.php 查看文件

/** /**
* Returns the app information from "appinfo/info.xml". * Returns the app information from "appinfo/info.xml".
* *
* @param string $appId
* @return mixed
* @param string|null $lang
* @return array|null
* @since 14.0.0 * @since 14.0.0
*/ */
public function getAppInfo(string $appId, bool $path = false, $lang = null); public function getAppInfo(string $appId, bool $path = false, $lang = null);
* Check if an app is enabled for user * Check if an app is enabled for user
* *
* @param string $appId * @param string $appId
* @param \OCP\IUser $user (optional) if not defined, the currently loggedin user will be used
* @param \OCP\IUser|null $user (optional) if not defined, the currently loggedin user will be used
* @return bool * @return bool
* @since 8.0.0 * @since 8.0.0
*/ */

Loading…
取消
儲存