Rello
August 6, 2017, 8:57pm
1
Hello Masters,
I did a pre-test of Audio Player with NC13alpha and get a lot of errors for
Call to undefined method OCA\\\\audioplayer\\\\Controller\\\\SettingController::params()
I am using this to read URL-parameters - and this suddenly stops working. any suggestions?
$type = $this->params('type');
ITagManager $tagManager,
IRootFolder $rootFolder
) {
parent::__construct($appName, $request);
$this->appName = $appName;
$this->userId = $userId;
$this->configManager = $configManager;
$this->db = $db;
$this->tagManager = $tagManager;
$this->tagger = null;
$this->rootFolder = $rootFolder;
}
/**
* @NoAdminRequired
*/
public function setValue($type, $value) {
//\OCP\Util::writeLog('audioplayer', 'settings save: '.$type.$value, \OCP\Util::DEBUG);
$this->configManager->setUserValue($this->userId, $this->appName, $type, $value);
return new JSONResponse(array('success' => 'true'));
}
use $type in your controller method, e.g.
public function params($type)
Rello
August 24, 2017, 10:55am
3
Hallo @BernhardPosselt ,
could you help with some more details on what I would need to do and where?
I don´t understand the answer.
thank you,
Marcel
@Rello would you mind discussing this on IRC? irc.freenode.net #nextcloud-dev
Post your nick here and ping me (I use the same nick on IRC)
Rello
August 24, 2017, 1:41pm
5
Thank you @BernhardPosselt for helping out on this.
for everyone else:
the $this->$params
has been deprecated and is now removed in NC13.
there is only a slight change required
old:
public function setValue() {
$type = $this->params('type');
$value = $this->params('value');
new:
public function setValue($type, $value) {