aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-08-12 14:43:18 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-08-12 14:43:35 -0400
commit4003e077c170e2c9aebbf582cb08249d80d37a3d (patch)
tree5976801053eb456db4ac49b168cddee00a1fdc0d /phpBB
parente04844c95f52c6da295d20bccc9530ee7e4b63f7 (diff)
downloadforums-4003e077c170e2c9aebbf582cb08249d80d37a3d.tar
forums-4003e077c170e2c9aebbf582cb08249d80d37a3d.tar.gz
forums-4003e077c170e2c9aebbf582cb08249d80d37a3d.tar.bz2
forums-4003e077c170e2c9aebbf582cb08249d80d37a3d.tar.xz
forums-4003e077c170e2c9aebbf582cb08249d80d37a3d.zip
[feature/oauth] Get the OAuth template in place for ucp_auth_link
PHPBB3-11673
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/ucp/ucp_auth_link.php13
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php6
-rw-r--r--phpBB/styles/prosilver/template/ucp_auth_link.html8
-rw-r--r--phpBB/styles/prosilver/template/ucp_auth_link_oauth.html31
4 files changed, 49 insertions, 9 deletions
diff --git a/phpBB/includes/ucp/ucp_auth_link.php b/phpBB/includes/ucp/ucp_auth_link.php
index cf92b5d58d..05896f93b0 100644
--- a/phpBB/includes/ucp/ucp_auth_link.php
+++ b/phpBB/includes/ucp/ucp_auth_link.php
@@ -52,6 +52,19 @@ class ucp_auth_link
}
}
+ if (isset($provider_data['VARS']))
+ {
+ $template->assign_vars($provider_data['VARS']);
+ }
+
+ if (isset($provider_data['BLOCK_VAR_NAME']))
+ {
+ foreach ($provider_data['BLOCK_VARS'] as $block_vars)
+ {
+ $template->assign_block_vars($provider_data['BLOCK_VAR_NAME'], $block_vars);
+ }
+ }
+
$s_hidden_fields = build_hidden_fields($s_hidden_fields);
$template->assign_vars(array(
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index d0b5583d77..1b0674a13b 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -452,7 +452,7 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
// Get all external accounts tied to the current user
$data = array(
- 'user_id' => $user->data['user_id'],
+ 'user_id' => $this->user->data['user_id'],
);
$sql = 'SELECT oauth_provider_id, provider FROM ' . $this->auth_provider_oauth_token_account_assoc . '
WHERE ' . $this->db->sql_build_array('SELECT', $data);
@@ -462,9 +462,9 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
$oauth_user_ids = array();
- if ($row !== false && !empty($rows))
+ if ($rows !== false && !empty($rows))
{
- foreach ($row as $row)
+ foreach ($rows as $row)
{
$oauth_user_ids[$row['provider']] = $row['oauth_provider_id'];
}
diff --git a/phpBB/styles/prosilver/template/ucp_auth_link.html b/phpBB/styles/prosilver/template/ucp_auth_link.html
index 8ba16c55c8..3c56415db0 100644
--- a/phpBB/styles/prosilver/template/ucp_auth_link.html
+++ b/phpBB/styles/prosilver/template/ucp_auth_link.html
@@ -2,8 +2,12 @@
<h2>{L_UCP_AUTH_LINK_TITLE}</h2>
-<!-- IF ERROR --><dl><dd class="error">{ERROR}</dd></dl><!-- ENDIF -->
+<div class="panel">
+ <div class="inner">
+ <!-- IF ERROR --><dl><dd class="error">{ERROR}</dd></dl><!-- ENDIF -->
-<!-- INCLUDE {PROVIDER_TEMPLATE_FILE} -->
+ <!-- INCLUDE {PROVIDER_TEMPLATE_FILE} -->
+ </div>
+</div>
<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_auth_link_oauth.html b/phpBB/styles/prosilver/template/ucp_auth_link_oauth.html
index ca13ff0ab6..5950535c80 100644
--- a/phpBB/styles/prosilver/template/ucp_auth_link_oauth.html
+++ b/phpBB/styles/prosilver/template/ucp_auth_link_oauth.html
@@ -1,5 +1,28 @@
-<form id="ucp" method="post" action="{S_UCP_ACTION}">
+<!-- BEGIN oauth -->
+ <form id="ucp" method="post" action="{S_UCP_ACTION}">
+ <h3>{oauth.SERVICE_NAME}</h3>
-{S_HIDDEN_FIELDS}
-{S_FORM_TOKEN}
-</form> \ No newline at end of file
+ <fieldset class="fields2">
+ <!-- IF oauth.UNIQUE_ID -->
+ <dl>
+ <dt>{L_UCP_AUTH_LINK_ID}{L_COLON}</dt>
+ <dd>{oauth.UNIQUE_ID}</dd>
+ </dl>
+ <dl>
+ <dt>&nbsp;</dt>
+ <dd>{S_HIDDEN_FIELDS}<input type="submit" name="unlink" tabindex="6" value="{L_UNLINK}" class="button1" /></dd>
+ </dl>
+ <!-- ELSE -->
+ <dl>
+ <dd>{L_UCP_AUTH_LINK_ASK}</dd>
+ </dl>
+ <dl>
+ <dt>&nbsp;</dt>
+ <dd>{S_HIDDEN_FIELDS}<input type="submit" name="link" tabindex="6" value="{L_LINK}" class="button1" /></dd>
+ </dl>
+ <!-- ENDIF-->
+ </fieldset>
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ </form>
+<!-- END oauth -->