Bugfix: redirect-parameter set wrong in link-button-href
-
Hey there,
I think I found a bug in your plugin: If my blog can be reached under
http://example.com/wordpress, the redirect-parameter of your link-button href-attribute points tohttp://example.com/wordpress/wordpress...The line 465 in nextend-twitter-connect.php contains the bug:
return '<a href="'.new_twitter_login_url().'&redirect='.site_url().$GLOBALS['HTTP_SERVER_VARS']['REQUEST_URI'].'">'.$new_twitter_settings['twitter_link_button'].'</a>';I added the following function:
function curPageURL() { $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } return $pageURL; }and replaced the line 465 with this one:
return '<a href="'.new_twitter_login_url().'&redirect='.curPageURL().'">'.$new_twitter_settings['twitter_link_button'].'</a>';Now everything works fine. 🙂 Can you please fix this in your plugin? Thanks!
The topic ‘Bugfix: redirect-parameter set wrong in link-button-href’ is closed to new replies.