Skip to content

Commit

Permalink
MDL-20693 fixed debug output problems of WS protocol servers
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Nov 1, 2009
1 parent 3086dd5 commit ad3abe2
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 18 deletions.
4 changes: 3 additions & 1 deletion webservice/amf/server.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

// disable moodle specific debug messages and any errors in output
define('NO_DEBUG_DISPLAY', true);
define('NO_MOODLE_COOKIES', true);

require('../../config.php');
Expand All @@ -32,7 +34,7 @@
die;
}

$server = new webservice_amf_server(true);
$server = new webservice_amf_server(false);
$server->run();
die;

2 changes: 2 additions & 0 deletions webservice/amf/simpleserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

// disable moodle specific debug messages and any errors in output
define('NO_DEBUG_DISPLAY', true);
define('NO_MOODLE_COOKIES', true);

require('../../config.php');
Expand Down
2 changes: 2 additions & 0 deletions webservice/rest/server.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

// disable moodle specific debug messages and any errors in output
define('NO_DEBUG_DISPLAY', true);
define('NO_MOODLE_COOKIES', true);

require('../../config.php');
Expand Down
2 changes: 2 additions & 0 deletions webservice/rest/simpleserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

// disable moodle specific debug messages and any errors in output
define('NO_DEBUG_DISPLAY', true);
define('NO_MOODLE_COOKIES', true);

require('../../config.php');
Expand Down
4 changes: 3 additions & 1 deletion webservice/soap/server.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

// disable moodle specific debug messages and any errors in output
define('NO_DEBUG_DISPLAY', true);
define('NO_MOODLE_COOKIES', true);

require('../../config.php');
Expand All @@ -32,7 +34,7 @@
die;
}

$server = new webservice_soap_server(true);
$server = new webservice_soap_server(false);
$server->run();
die;

10 changes: 2 additions & 8 deletions webservice/soap/simpleserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,13 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

// disable moodle specific debug messages and any errors in output
define('NO_DEBUG_DISPLAY', true);
define('NO_MOODLE_COOKIES', true);

require('../../config.php');
require_once("$CFG->dirroot/webservice/soap/locallib.php");

//ob_start();

//TODO: for now disable all mess in xml
/*
ini_set('display_errors', '0');
ini_set('log_errors', '1');
$CFG->debugdisplay = false;
*/
if (!webservice_protocol_is_enabled('soap')) {
die;
}
Expand Down
4 changes: 3 additions & 1 deletion webservice/xmlrpc/server.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

// disable moodle specific debug messages and any errors in output
define('NO_DEBUG_DISPLAY', true);
define('NO_MOODLE_COOKIES', true);

require('../../config.php');
Expand All @@ -32,7 +34,7 @@
die;
}

$server = new webservice_xmlrpc_server(true);
$server = new webservice_xmlrpc_server(false);
$server->run();
die;

9 changes: 2 additions & 7 deletions webservice/xmlrpc/simpleserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,13 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

// disable moodle specific debug messages and any errors in output
define('NO_DEBUG_DISPLAY', true);
define('NO_MOODLE_COOKIES', true);

require('../../config.php');
require_once("$CFG->dirroot/webservice/xmlrpc/locallib.php");

//ob_start();

//TODO: for now disable all mess in xml
ini_set('display_errors', '0');
ini_set('log_errors', '1');
$CFG->debugdisplay = false;

if (!webservice_protocol_is_enabled('xmlrpc')) {
die;
}
Expand Down

0 comments on commit ad3abe2

Please sign in to comment.