summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2008-09-07 02:21:18 -0400
committerZach Copley <zach@controlyourself.ca>2008-09-07 02:21:18 -0400
commit6b42c984eef502a9e6174f1c7b5122b678b8bf4b (patch)
tree3a51bcf641e00ef6f0593cf9af58338453a3ebcb /lib/util.php
parent9eca4e08745be9375048577bee2078012aa5cd21 (diff)
Twitter integration - added $config option for source attribute when posting to Twitter
darcs-hash:20080907062118-7b5ce-b4412446bbf245b1d14a78b01ecde0f71f621185.gz
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php
index 5b6b59f80..b67782af3 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1104,6 +1104,7 @@ function common_broadcast_notice($notice, $remote=false) {
}
function common_twitter_broadcast($notice, $flink) {
+ global $config;
$success = true;
$fuser = $flink->getForeignUser();
$twitter_user = $fuser->nickname;
@@ -1116,13 +1117,13 @@ function common_twitter_broadcast($notice, $flink) {
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => array(
'status' => $statustxt,
- 'source' => 'Laconica'
+ 'source' => $config['integration']['source']
),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FAILONERROR => true,
CURLOPT_HEADER => false,
CURLOPT_FOLLOWLOCATION => true,
- // CURLOPT_USERAGENT => "identi.ca",
+ CURLOPT_USERAGENT => "Laconica",
CURLOPT_CONNECTTIMEOUT => 120, // XXX: Scary!!!! How long should this be?
CURLOPT_TIMEOUT => 120
);