X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fnewapplication.php;h=5032bb74951a8f05a8096ec9115999a33b2f8b33;hb=4d17d9533552ea620b83109c550e250a5c236291;hp=c3e6f2d2449d6fd37c386c73989adcd97be57f00;hpb=1ea876296dd32e8027d55b91805d1d51ac91b1ae;p=quix0rs-gnu-social.git diff --git a/actions/newapplication.php b/actions/newapplication.php index c3e6f2d244..5032bb7495 100644 --- a/actions/newapplication.php +++ b/actions/newapplication.php @@ -41,7 +41,7 @@ if (!defined('GNUSOCIAL')) { exit(1); } * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ -class NewApplicationAction extends FormAction +class NewApplicationAction extends SettingsAction { function title() { @@ -54,6 +54,7 @@ class NewApplicationAction extends FormAction if ($this->arg('cancel')) { common_redirect(common_local_url('oauthappssettings'), 303); } elseif ($this->arg('save')) { + //trySave will never return, just throw exception or redirect $this->trySave(); } @@ -66,13 +67,13 @@ class NewApplicationAction extends FormAction return new ApplicationEditForm($this); } - public function getInstructions() + protected function getInstructions() { // TRANS: Form instructions for registering a new application. return _('Use this form to register a new application.'); } - private function trySave() + protected function trySave() { $name = $this->trimmed('name'); $description = $this->trimmed('description'); @@ -137,7 +138,7 @@ class NewApplicationAction extends FormAction $app->query('BEGIN'); $app->name = $name; - $app->owner = $this->scoped->id; + $app->owner = $this->scoped->getID(); $app->description = $description; $app->source_url = $source_url; $app->organization = $organization;