- /**
- * Prepare to run
- */
-
- function prepare($args)
- {
- parent::prepare($args);
-
- if (!common_logged_in()) {
- $this->clientError(_('You must be logged in to register an application.'));
- return false;
- }
-
- return true;
- }
-
- /**
- * Handle the request
- *
- * On GET, show the form. On POST, try to save the app.
- *
- * @param array $args unused
- *
- * @return void
- */
-
- function handle($args)
- {
- parent::handle($args);
-
- if ($_SERVER['REQUEST_METHOD'] == 'POST') {
- $this->handlePost($args);
- } else {
- $this->showForm();
- }
- }
-
- function handlePost($args)