[Mapbender-commits] r8703 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Sep 20 03:53:34 PDT 2013
Author: armin11
Date: 2013-09-20 03:53:33 -0700 (Fri, 20 Sep 2013)
New Revision: 8703
Modified:
trunk/mapbender/http/classes/class_twitter.php
trunk/mapbender/http/classes/class_wms.php
Log:
Other update for twitter messages
Modified: trunk/mapbender/http/classes/class_twitter.php
===================================================================
--- trunk/mapbender/http/classes/class_twitter.php 2013-09-20 10:44:48 UTC (rev 8702)
+++ trunk/mapbender/http/classes/class_twitter.php 2013-09-20 10:53:33 UTC (rev 8703)
@@ -25,9 +25,10 @@
'curl_proxy' => CONNECTION_PROXY.":".CONNECTION_PORT
));
$connection->request('POST',
- $connection->url('1/statuses/update'),
+ $connection->url('1.1/statuses/update'),
array('status' => $tweetText)
);
+ $e = new mb_notice("class_twitter.php: ".$connection->response['error']);
return $connection->response['code'];
} else {
return false;
Modified: trunk/mapbender/http/classes/class_wms.php
===================================================================
--- trunk/mapbender/http/classes/class_wms.php 2013-09-20 10:44:48 UTC (rev 8702)
+++ trunk/mapbender/http/classes/class_wms.php 2013-09-20 10:53:33 UTC (rev 8703)
@@ -1771,6 +1771,9 @@
$tweetText = substr($tweetText, 0, 136);
//push to twitter
$result = $twitter_wms->postTweet($tweetText);
+ if ($result != '200') {
+ $e = new mb_exception("class_wms.php: Twitter API give back error code: ".$result);
+ }
}
//Changes JW
@@ -1861,6 +1864,9 @@
$tweetText = substr($tweetText, 0, 136);
//push to twitter
$result = $twitter_layer->postTweet($tweetText);
+ if ($result != '200') {
+ $e = new mb_exception("class_wms.php: Twitter API give back error code: ".$result);
+ }
}
}
}
@@ -2863,6 +2869,9 @@
$tweetText = substr($tweetText, 0, 136);
//push to twitter
$result = $twitter_wms->postTweet($tweetText);
+ if ($result != '200') {
+ $e = new mb_exception("class_wms.php: Twitter API give back error code: ".$result);
+ }
//for each layer which was deleted
foreach ($oldLayerNameArray as $oldLayer) {
@@ -2872,6 +2881,9 @@
//reduce to 140 chars
$tweetText = substr($tweetText, 0, 136);
$result = $twitter_layer->postTweet($tweetText);
+ if ($result != '200') {
+ $e = new mb_exception("class_wms.php: Twitter API give back error code: ".$result);
+ }
}
}
More information about the Mapbender_commits
mailing list