Skip to content

Commit

Permalink
MDL-22001 fixed hidden bug triggerred by recent fixes in format_strin…
Browse files Browse the repository at this point in the history
…g() - credit goes to Myles Carrick , thanks! + fixing sloppy trailing whitespace :-(
  • Loading branch information
skodak committed Aug 1, 2010
1 parent cbc5d13 commit 8725605
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions webservice/wsdoc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ protected function authenticate_user() {
$DB->set_field('external_tokens', 'lastaccess', time(), array('id'=>$token->id));
}



}

Expand All @@ -251,6 +251,7 @@ protected function authenticate_user() {
protected function display_documentation_html() {
global $PAGE, $OUTPUT, $SITE, $CFG;

$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
$PAGE->set_url('/webservice/wsdoc');
$PAGE->set_docs_path('');
$PAGE->set_title($SITE->fullname." ".get_string('wsdocumentation', 'webservice'));
Expand Down Expand Up @@ -278,9 +279,9 @@ protected function display_documentation_html() {
$authparams['wsusername'] = $this->webserviceuser->username;
$authparams['token'] = $this->token;
}

echo $renderer->documentation_html($this->functions, $printableformat, $activatedprotocol, $authparams);

/// trigger browser print operation
if (!empty($printableformat)) {
$PAGE->requires->js_function_call('window.print', array());
Expand All @@ -301,6 +302,7 @@ protected function display_documentation_html() {
protected function display_login_page_html($errormessage) {
global $PAGE, $OUTPUT, $SITE, $CFG;

$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
$PAGE->set_url('/webservice/wsdoc');
$PAGE->set_docs_path('');
$PAGE->set_title($SITE->fullname." ".get_string('wsdocumentation', 'webservice'));
Expand All @@ -312,7 +314,7 @@ protected function display_login_page_html($errormessage) {

$renderer = $PAGE->get_renderer('core', 'webservice');
echo $renderer->login_page_html($errormessage);

echo $OUTPUT->footer();

}
Expand Down

0 comments on commit 8725605

Please sign in to comment.