. * * @category Settings * @package StatusNet * @author Zach Copley * @copyright 2010 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ if (!defined('STATUSNET')) { exit(1); } class YammerauthAction extends AdminPanelAction { /** * Show the Yammer admin panel form * * @return void */ function prepare(array $args=array()) { parent::prepare($args); $this->verify_token = $this->trim('verify_token'); } /** * Handle request * * Does the subscription and returns results. * * @param Array $args unused. * * @return void */ function handle(array $args=array()) { if ($this->verify_token) { $runner->saveAuthToken($this->verify_token); $form = new YammerAuthProgressForm(); } else { $url = $runner->requestAuth(); $form = new YammerAuthVerifyForm($this, $url); } $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); // TRANS: Page title for Yammer administration panel. $this->element('title', null, _m('Connect to Yammer')); $this->elementEnd('head'); $this->elementStart('body'); $form->show(); $this->elementEnd('body'); $this->endHTML(); } }