aboutsummaryrefslogtreecommitdiffstats
path: root/ws.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2007-01-29 20:38:08 +0000
committerrvelices <rv-github@modusoptimus.com>2007-01-29 20:38:08 +0000
commit2f70d58b2243454085035177e4a6ab777a3bf55c (patch)
tree3df82b9a7ddbb72c9ad8de4357b8cd48111fcd61 /ws.php
parent3b11eb39cf165558132be9b4bd5f3279410d9632 (diff)
web services: give vincent the calling partner id
git-svn-id: http://piwigo.org/svn/trunk@1768 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--ws.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/ws.php b/ws.php
index 5fb35dc61..2b5d636f4 100644
--- a/ws.php
+++ b/ws.php
@@ -29,6 +29,9 @@ define ('PHPWG_ROOT_PATH', './');
include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
include_once(PHPWG_ROOT_PATH.'include/ws_core.inc.php');
+/**
+ * event handler that registers standard methods with the web service
+ */
function ws_addDefaultMethods( $arr )
{
include_once(PHPWG_ROOT_PATH.'include/ws_functions.inc.php');
@@ -106,11 +109,19 @@ function ws_addDefaultMethods( $arr )
);
}
-add_event_handler('ws_add_methods', 'ws_addDefaultMethods' );
+add_event_handler('ws_add_methods', 'ws_addDefaultMethods');
+
+add_event_handler('ws_invoke_allowed', 'ws_isInvokeAllowed', EVENT_HANDLER_PRIORITY_NEUTRAL, 3);
+
+$calling_partner_id = '';
$requestFormat = null;
$responseFormat = null;
+if ( isset($_GET['partner']) )
+{
+ $calling_partner_id = $_GET['partner'];
+}
if ( isset($_GET['format']) )
{
$responseFormat = $_GET['format'];