Skip to content

Commit

Permalink
fixed coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Oct 8, 2010
1 parent b4dcb6d commit 252708c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions webservice/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public function user_reset_token_confirmation($token) {
* @return string html code
*/
public function user_webservice_tokens_box($tokens, $userid, $documentation = false) {
global $CFG;
global $CFG, $DB;

// display strings
$stroperation = get_string('operation', 'webservice');
Expand Down Expand Up @@ -305,9 +305,7 @@ public function user_webservice_tokens_box($tokens, $userid, $documentation = fa
$creator = $token->firstname . " " . $token->lastname;
} else {
//retrieve administrator name
require_once($CFG->dirroot . '/user/lib.php');
$creators = user_get_users_by_id(array($token->creatorid));
$admincreator = $creators[$token->creatorid];
$admincreator = $DB->get_record('user', array('id'=>$token->creatorid));
$creator = $admincreator->firstname . " " . $admincreator->lastname;
$reset = '';
}
Expand All @@ -325,13 +323,13 @@ public function user_webservice_tokens_box($tokens, $userid, $documentation = fa
$row = array($token->token, $token->name, $validuntil, $creatoratag, $reset);

if ($documentation) {
$doclink = new moodle_url('/webservice/wsdoc.php',
$doclink = new moodle_url('/webservice/wsdoc.php',
array('id' => $token->id, 'sesskey' => sesskey()));
$row[] = html_writer::tag('a', get_string('doc', 'webservice'),
array('href' => $doclink));
}

$table->data[] = $row;
$table->data[] = $row;
}
$return .= html_writer::table($table);
} else {
Expand Down

0 comments on commit 252708c

Please sign in to comment.