aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2011-03-29 10:54:15 +0000
committerplegall <plg@piwigo.org>2011-03-29 10:54:15 +0000
commitf0550e906c0d58e9e52a4da21cb5a6b8efef2497 (patch)
tree51d9d784e5f92f0c9894dda48126fd851c9ae0b0
parent805aeeb5ccc6c025dea8f16660f8ddbd78aab20a (diff)
merge r9742 from trunk to branch 2.1
ws_getVersion -> add test for admin , sendResponse -> add a trigger for debug ws git-svn-id: http://piwigo.org/svn/branches/2.1@9914 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--include/ws_core.inc.php3
-rw-r--r--include/ws_functions.inc.php2
2 files changed, 3 insertions, 2 deletions
diff --git a/include/ws_core.inc.php b/include/ws_core.inc.php
index 28f834a76..5f10c0ece 100644
--- a/include/ws_core.inc.php
+++ b/include/ws_core.inc.php
@@ -371,6 +371,7 @@ Request format: ".@$this->_requestFormat." Response format: ".@$this->_responseF
@header('Content-Type: '.$contentType.'; charset='.get_pwg_charset());
print_r($encodedResponse);
+ trigger_action('sendResponse', $encodedResponse );
}
/**
@@ -576,4 +577,4 @@ Request format: ".@$this->_requestFormat." Response format: ".@$this->_responseF
return $res;
}
}
-?>
+?> \ No newline at end of file
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php
index 1e414b9ce..67c510462 100644
--- a/include/ws_functions.inc.php
+++ b/include/ws_functions.inc.php
@@ -175,7 +175,7 @@ function ws_std_get_image_xml_attributes()
function ws_getVersion($params, &$service)
{
global $conf;
- if ($conf['show_version'])
+ if ($conf['show_version'] or is_admin() )
return PHPWG_VERSION;
else
return new PwgError(403, 'Forbidden');