Index: trunk/extensions/TweetANew/TweetANew.body.php |
— | — | @@ -62,7 +62,6 @@ |
63 | 63 | } |
64 | 64 | |
65 | 65 | # Make connection to Twitter |
66 | | - require_once( 'lib/tmhOAuth.php' ); // include connection |
67 | 66 | $connection = new tmhOAuth( array( |
68 | 67 | 'consumer_key' => $wgTweetANewTwitter['ConsumerKey'], |
69 | 68 | 'consumer_secret' => $wgTweetANewTwitter['ConsumerSecret'], |
— | — | @@ -160,7 +159,7 @@ |
161 | 160 | $dbr = wfGetDB( DB_SLAVE ); |
162 | 161 | $res = $dbr->select( 'revision', |
163 | 162 | array( 'rev_timestamp' ), |
164 | | - array( 'rev_page' => $article->getID() ), |
| 163 | + array( 'rev_page' => $article->getId() ), |
165 | 164 | __METHOD__, |
166 | 165 | array( 'ORDER BY' => 'rev_id DESC', 'LIMIT' => '2' ) |
167 | 166 | ); |
— | — | @@ -191,8 +190,6 @@ |
192 | 191 | } |
193 | 192 | |
194 | 193 | # Make connection to Twitter |
195 | | - # TODO: Can this be autoloaded? |
196 | | - require_once( 'lib/tmhOAuth.php' ); // include connection |
197 | 194 | $connection = new tmhOAuth( array( |
198 | 195 | 'consumer_key' => $wgTweetANewTwitter['ConsumerKey'], |
199 | 196 | 'consumer_secret' => $wgTweetANewTwitter['ConsumerSecret'], |
Index: trunk/extensions/TweetANew/TweetANew.php |
— | — | @@ -151,7 +151,11 @@ |
152 | 152 | */ |
153 | 153 | |
154 | 154 | $dir = dirname(__FILE__) . '/'; |
| 155 | + |
155 | 156 | $wgAutoloadClasses['TweetANew'] = $dir . 'TweetANew.body.php'; |
| 157 | +$wgAutoloadClasses['tmhOAuth'] = $dir . 'lib/tmhOAuth.php'; |
| 158 | +$wgAutoloadClasses['tmhUtilities'] = $dir . 'lib/tmhUtilities.php'; |
| 159 | + |
156 | 160 | $wgExtensionMessagesFiles['TweetANew'] = $dir . 'TweetANew.i18n.php'; |
157 | 161 | |
158 | 162 | /** |