WordPress.org

Ready to get started?Download WordPress

Forums

Nextend Twitter Connect
[resolved] Bugfix: redirect-parameter set wrong in link-button-href (2 posts)

  1. renet
    Member
    Posted 1 year ago #

    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 to http://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!

    http://wordpress.org/extend/plugins/nextend-twitter-connect/

  2. nextendweb
    Member
    Plugin Author

    Posted 1 year ago #

    Thank you! I have added it in version 1.4.41

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.