Change callback url to path only in case oauth parameters are still in url

This commit is contained in:
Michael Gapczynski 2012-12-24 13:48:18 -05:00
parent 0dbf1d0260
commit 3c08d2ba23
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ $(document).ready(function() {
var configured = $(this).parent().find('[data-parameter="configured"]'); var configured = $(this).parent().find('[data-parameter="configured"]');
var token = $(this).parent().find('[data-parameter="token"]'); var token = $(this).parent().find('[data-parameter="token"]');
var token_secret = $(this).parent().find('[data-parameter="token_secret"]'); var token_secret = $(this).parent().find('[data-parameter="token_secret"]');
$.post(OC.filePath('files_external', 'ajax', 'google.php'), { step: 1, callback: window.location.href }, function(result) { $.post(OC.filePath('files_external', 'ajax', 'google.php'), { step: 1, callback: location.protocol + '//' + location.host + location.pathname }, function(result) {
if (result && result.status == 'success') { if (result && result.status == 'success') {
$(configured).val('false'); $(configured).val('false');
$(token).val(result.data.request_token); $(token).val(result.data.request_token);