/**
  * Displays the detailed info about an API key and allows editing of it.  Also, if
  * a key has been banned, this will show the explanation.
  *
  * This function does not check permissions, that is left to the calling-code.
  */
 public function subpage_keyInfo($apiKeyObject)
 {
     wfProfileIn(__METHOD__);
     global $wgRequest;
     $html = "";
     // Process any updates if they were posted.
     $errorString = ApiGate_ApiKey::processPost();
     $apiKeyObject->reloadFromDb();
     // key may have been changed while processing the post... reload it from the database
     $html .= ApiGate_Dispatcher::renderTemplate("key", array("apiKeyObject" => $apiKeyObject, "errorString" => $errorString));
     wfProfileOut(__METHOD__);
     return $html;
 }
示例#2
0
 /**
  * Returns a string containing the error message inside of some standard HTML for errors in the system.
  */
 public static function getErrorHtml($errorString)
 {
     ApiGate_Dispatcher::renderTemplate("error", array('message' => $errorString));
 }