plugin_twitter: fixed static / nostatic function access

This commit is contained in:
Grischa Brockhaus 2012-10-22 23:32:22 +02:00
parent 43587f7d89
commit fe9308fc2a
2 changed files with 3 additions and 2 deletions

View file

@ -204,7 +204,7 @@ class Twitter {
"short_url_length":20
}
*/
static function get_twitter_config() {
function get_twitter_config() {
require_once S9Y_PEAR_PATH . 'HTTP/Request.php';
$config_url = "https://api.twitter.com/1/help/configuration.json";

View file

@ -1435,7 +1435,8 @@ a.twitter_update_time {
$now = time();
$daybefore = $now - (24 * 60 * 60); // One day in seconds
if (empty($last_config_check) || $last_config_check<$daybefore) {
$config = Twitter::get_twitter_config();
$api = new Twitter();
$config = $api->get_twitter_config();
if (!empty($config)) {
$max_http = $config->short_url_length;
$max_https = $config->short_url_length_https;