declared class properties
This commit is contained in:
@@ -25,6 +25,16 @@ class MainController extends Controller
|
||||
private $config;
|
||||
private $aria2Opts;
|
||||
private $l10n;
|
||||
private $urlGenerator;
|
||||
private $uid;
|
||||
private $isAdmin;
|
||||
private $hideError;
|
||||
private $disable_bt_nonadmin;
|
||||
private $aria2;
|
||||
private $dbconn;
|
||||
private $counters;
|
||||
private $ytdl;
|
||||
private $accessDenied;
|
||||
|
||||
public function __construct($appName, IRequest $request, $UserId, IL10N $IL10N, Aria2 $aria2, Ytdl $ytdl)
|
||||
{
|
||||
@@ -55,7 +65,7 @@ class MainController extends Controller
|
||||
//$config = \OC::$server->getAppConfig();
|
||||
OC_Util::addScript($this->appName, 'app');
|
||||
OC_Util::addStyle($this->appName, 'app');
|
||||
|
||||
|
||||
$params = $this->buildParams();
|
||||
$response = new TemplateResponse($this->appName, 'Index', $params);
|
||||
|
||||
|
||||
@@ -10,10 +10,13 @@ use OCA\NCDownloader\Tools\Helper;
|
||||
|
||||
class SearchController extends Controller
|
||||
{
|
||||
private $userId;
|
||||
private $uid;
|
||||
private $settings = null;
|
||||
//@config OC\AppConfig
|
||||
private $l10n;
|
||||
private $urlGenerator;
|
||||
private $search;
|
||||
|
||||
|
||||
public function __construct($appName, IRequest $request, $UserId)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,15 @@ class YtdlController extends Controller
|
||||
//@config OC\AppConfig
|
||||
private $l10n;
|
||||
private $audio_extensions = array("mp3", "m4a", "vorbis");
|
||||
private $video_extensions = array("mp4", "webm", "mkv");
|
||||
private $uid;
|
||||
private $downloadDir;
|
||||
private $dbconn;
|
||||
private $ytdl;
|
||||
private $aria2;
|
||||
private $urlGenerator;
|
||||
private $tablename;
|
||||
private $dataDir;
|
||||
|
||||
public function __construct($appName, IRequest $request, $UserId, IL10N $IL10N, Aria2 $aria2, Ytdl $ytdl)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user