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

@@ -15,13 +15,15 @@ class SettingsController extends Controller
//@config OC\AppConfig
private $config;
public function __construct($AppName, IRequest $Request, $UserId) //, IL10N $L10N)
private $uid;
private $settings;
public function __construct($AppName, IRequest $Request, $uid) //, IL10N $L10N)
{
parent::__construct($AppName, $Request);
$this->UserId = $UserId;
$this->uid = $uid;
//$this->L10N = $L10N;
$this->settings = new Settings($UserId);
$this->settings = new Settings($uid);
//$this->config = \OC::$server->getAppConfig();
}
@@ -94,7 +96,7 @@ class SettingsController extends Controller
public function saveCustomAria2()
{
$noAria2Settings = (bool) Helper::getAdminSettings("disallow_aria2_settings");
if ($noAria2Settings && !\OC_User::isAdminUser($this->UserId)) {
if ($noAria2Settings && !\OC_User::isAdminUser($this->uid)) {
$resp = ["error" => "forbidden", "status" => false];
return new JSONResponse($resp);
}