summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-09-27 12:34:01 -0700
committerBrion Vibber <brion@pobox.com>2010-09-27 12:34:01 -0700
commit05c12c58bb99332c8117160e85a724319333d1f1 (patch)
tree8fa80035e6f61f4ccd44cf92a9c786ca1621ec65
parenteeaab2bc0072a7f836000c1d817d59c663423998 (diff)
Ok, got the AJAX clicky-throughs working for yammer auth (if app is already registered), but needs prettification. Yammer ignores callback URLs unless they're pre-registered with the app, and this apparently requires manual intervention to become a 'trusted' app, you don't get it on those you register yourself. Sigh. Also can't use an iframe since it breaks out of the frame (fair 'nuff)
-rw-r--r--plugins/YammerImport/actions/yammeradminpanel.php2
-rw-r--r--plugins/YammerImport/lib/yammerauthverifyform.php9
2 files changed, 10 insertions, 1 deletions
diff --git a/plugins/YammerImport/actions/yammeradminpanel.php b/plugins/YammerImport/actions/yammeradminpanel.php
index 71651cdf5..fdf7a084f 100644
--- a/plugins/YammerImport/actions/yammeradminpanel.php
+++ b/plugins/YammerImport/actions/yammeradminpanel.php
@@ -76,7 +76,7 @@ class YammeradminpanelAction extends AdminPanelAction
return $this->showAjaxForm($form);
} else if ($this->verify_token) {
$this->runner->saveAuthToken($this->verify_token);
- $form = new YammerAuthProgressForm();
+ $form = new YammerProgressForm($this, $this->runner);
return $this->showAjaxForm($form);
} else {
throw new ClientException('Invalid POST');
diff --git a/plugins/YammerImport/lib/yammerauthverifyform.php b/plugins/YammerImport/lib/yammerauthverifyform.php
index dc9d2ce1b..96decea10 100644
--- a/plugins/YammerImport/lib/yammerauthverifyform.php
+++ b/plugins/YammerImport/lib/yammerauthverifyform.php
@@ -65,8 +65,17 @@ class YammerAuthVerifyForm extends Form
function formData()
{
$this->out->input('verify_token', _m('Verification code:'), '', _m("Click through and paste the code it gives you below..."));
+
+ // iframe would be nice to avoid leaving -- since they don't seem to have callback url O_O
+ /*
$this->out->element('iframe', array('id' => 'yammer-oauth',
'src' => $this->runner->getAuthUrl()));
+ */
+ // yeah, it ignores the callback_url
+ $this->out->element('a',
+ array('href' => $this->runner->getAuthUrl(),
+ 'target' => '_blank'),
+ 'clicky click');
}
/**