* @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()
{
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();
}
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');
$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;