ashishkranjan / dabr

Automatically exported from code.google.com/p/dabr
0 stars 0 forks source link

twitter_url_shorten_callback函数的小问题 #111

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
用中文应该可以吧?

twitter_url_shorten_callback函数中有一行代码是这样的

if (!defined('BITLY_API_KEY')) return $match[0];

而事实上config.php中

define('BITLY_API_KEY', '');

是没有被注释的

所以不管有没有填写BITLY_API_KEY,twitter_url_shorten_callback都会连
接上
bit.ly,直到撞上南墙。

我想这行代码应该是这样:

if ('' == BITLY_API_KEY) return $match[0];

Original issue reported on code.google.com by zhongy...@gmail.com on 9 Jan 2010 at 7:37

GoogleCodeExporter commented 9 years ago
i just comment the line out

Original comment by ldoug...@gmail.com on 9 Jan 2010 at 9:59

GoogleCodeExporter commented 9 years ago
comment it out in config.php

Original comment by ldoug...@gmail.com on 9 Jan 2010 at 10:14

GoogleCodeExporter commented 9 years ago
Sorry, please report issues in English :-)

Translation:
May I use Chinese?

This code in function twitter_url_shorten_callback:

if (!defined('BITLY_API_KEY')) return $match[0];

But actually in config.php

define('BITLY_API_KEY', '');

this line isn't commented out

So whether BITLY_API_KEY is defined or not,twitter_url_shorten_callback will 
shorten
URLs using bit.ly

I think the code should be:

if ('' == BITLY_API_KEY) return $match[0];

Original comment by cnye...@gmail.com on 27 Feb 2010 at 9:28

GoogleCodeExporter commented 9 years ago
Fixed in r380

Original comment by terence.eden on 28 Apr 2011 at 11:05