summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/rest/common.php
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2017-02-15 13:39:45 +0000
committerramon <ramongomez@us.es>2017-02-15 13:39:45 +0000
commit5ff84a599bbc924424fe277c8d5e391c77acc50e (patch)
treef1873e59691b614249ea187b13e1c051f0798084 /admin/WebConsole/rest/common.php
parent2aa86870027ed0922904ca6a40259e774391e0b3 (diff)
#708: Cambios en la salida de la ruta {{{/ous/:ouid/images/:imageid/software}}} y seguir aplicando cambios de r5190 a más rutas REST.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5195 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/rest/common.php')
-rw-r--r--admin/WebConsole/rest/common.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/admin/WebConsole/rest/common.php b/admin/WebConsole/rest/common.php
index 0bb28da3..6b5f591f 100644
--- a/admin/WebConsole/rest/common.php
+++ b/admin/WebConsole/rest/common.php
@@ -17,16 +17,17 @@
* @brief Compose JSON response.
* @param int status Status code for HTTP response.
* @param array response Response data.
+ * @param int opts Options to encode JSON data.
* @return string JSON response.
*/
-function jsonResponse($status, $response) {
+function jsonResponse($status, $response, $opts=0) {
$app = \Slim\Slim::getInstance();
// HTTP status code.
$app->status($status);
// Content-type HTTP header.
$app->contentType('application/json');
// JSON response.
- echo json_encode($response);
+ echo json_encode($response, $opts);
}
/**