declared class properties

This commit is contained in:
benson
2023-04-29 21:15:52 +08:00
parent 13fd802180
commit a197f66d6d
16 changed files with 65 additions and 14 deletions

View File

@@ -19,6 +19,8 @@ class Personal implements ISettings
private $timeFactory;
/** @var IConfig */
private $config;
private $uid;
private $settings;
public function __construct(
IDBConnection $connection,
@@ -28,8 +30,8 @@ class Personal implements ISettings
$this->connection = $connection;
$this->timeFactory = $timeFactory;
$this->config = $config;
$this->UserId = \OC::$server->getUserSession()->getUser()->getUID();
$this->settings = new Settings($this->UserId);
$this->uid = \OC::$server->getUserSession()->getUser()->getUID();
$this->settings = new Settings($this->uid);
}
/**
@@ -46,7 +48,7 @@ class Personal implements ISettings
'ncd_seed_time' => $this->settings->get("ncd_seed_time"),
"path" => '/apps/ncdownloader/personal/save',
"disallow_aria2_settings" => Helper::getAdminSettings("disallow_aria2_settings"),
"is_admin" => \OC_User::isAdminUser($this->UserId),
"is_admin" => \OC_User::isAdminUser($this->uid),
]
];