Closed (fixed)
Project:
Twitter
Version:
7.x-3.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
19 Nov 2011 at 12:47 UTC
Updated:
4 Jan 2014 at 01:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
David Hernández commentedPatch attached
Comment #2
AlessMascherpa commentedTests passed ;)
Comment #3
sjovanig commentedBackported to D6
Comment #4
jjcarriontest passed
Comment #5
jonhattanComment #6
juampynr commentedThe patch given at http://drupal.org/node/1346790#comment-5266844 caused that a user was unable to add a Twitter account using OAuth. The attached patch fixes this issue.
Comment #7
juampynr commentedFixed and applied to 7.x branch.
http://drupalcode.org/project/twitter.git/commitdiff/a9f03daf0e2c17a1cf3...
Comment #8
jose reyero commentedThis introduced a bug, now TwitterOauth can't find the server because the constructor for this class is missing a call to the parent's contructor
Comment #9
sjovanig commentedI think introducing variable_set() and variable_get() inside Twitter class is not a good idea.
For abstraction questions the best solution is to use setters and getters to configure host or another class variable.
The patch I attach does:
Comment #10
juampynr commentedFinally did a mix of all suggestions. Now there is a TwitterConf class which implements the Singleton pattern. This allows us to change the host to a fake one during, for example, automated tests. Each test suite would have at the top the following code:
Commit for the Drupal 6 version.
Commit for the Drupal 7 version.
Please reopen if there is anything missing regarding the issue title.