[Mapbender-commits] r5334 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Jan 19 03:22:59 EST 2010
Author: christoph
Date: 2010-01-19 03:22:56 -0500 (Tue, 19 Jan 2010)
New Revision: 5334
Removed:
trunk/mapbender/http/plugins/mb_twitter.php~
trunk/mapbender/http/plugins/mb_twitter_signin.js~
Log:
Deleted: trunk/mapbender/http/plugins/mb_twitter.php~
===================================================================
--- trunk/mapbender/http/plugins/mb_twitter.php~ 2010-01-18 20:06:47 UTC (rev 5333)
+++ trunk/mapbender/http/plugins/mb_twitter.php~ 2010-01-19 08:22:56 UTC (rev 5334)
@@ -1,38 +0,0 @@
-<?php
-# License:
-# Copyright (c) 2009, Open Source Geospatial Foundation
-# This program is dual licensed under the GNU General Public License
-# and Simplified BSD license.
-# http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt
-
-require_once dirname(__FILE__) . "/../php/mb_validateSession.php";
-require_once '../extensions/epicode/EpiCurl.php';
-require_once '../extensions/epicode/EpiOAuth.php';
-require_once '../extensions/epicode/EpiTwitter.php';
-
-$gui_id = Mapbender::session()->get("mb_user_gui");
-
-require_once '../include/dyn_php.php';
-
-$ajaxResponse = new AjaxResponse($_POST);
-
-switch ($ajaxResponse->getMethod()) {
- case "signin" :
-
- if (!isset($consumerKey) || !isset($consumerSecret)) {
- $ajaxResponse->setSuccess(false);
- $ajaxResponse->setMessage(_mb("Element vars consumerKey and consumerSecret are not set. If you don't have them, get them from Twitter."));
- $ajaxResponse->send();
- }
- $Twitter = new EpiTwitter($consumerKey, $consumerSecret);
- $url = $Twitter->getAuthenticateUrl();
- $ajaxResponse->setResult(array("url" => $url));
- $ajaxResponse->setSuccess(true);
- break;
- default:
- $ajaxResponse->setSuccess(false);
- $ajaxResponse->setMessage(_mb("An unknown error occured."));
- break;
-}
-$ajaxResponse->send();
-?>
Deleted: trunk/mapbender/http/plugins/mb_twitter_signin.js~
===================================================================
--- trunk/mapbender/http/plugins/mb_twitter_signin.js~ 2010-01-18 20:06:47 UTC (rev 5333)
+++ trunk/mapbender/http/plugins/mb_twitter_signin.js~ 2010-01-19 08:22:56 UTC (rev 5334)
@@ -1,22 +0,0 @@
-var $this = $(this);
-Mapbender.events.init.register(function () {
- $this.click(function () {
- var req = new Mapbender.Ajax.Request({
- url: "../plugins/mb_twitter.php",
- method: "signin",
- parameters: {
- },
- callback: function (obj, result, message) {
- if (!result) {
- alert(message);
- return;
- }
- if (obj.url && typeof obj.url === "string") {
- alert(obj.url);
-// window.location.reload(obj.url);
- }
- }
- });
- req.send();
- });
-});
More information about the Mapbender_commits
mailing list