r81852 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81851‎ | r81852 | r81853 >
Date:22:22, 9 February 2011
Author:laner
Status:deferred
Tags:
Comment:
* Code cleanup on link calls
* Escape all messages used as link messages
* Change all wrapWikiMsg calls to addWikiMsg, since the calls were doing essentially the same thing
Modified paths:
  • /trunk/extensions/OpenStackManager/special/SpecialNova.php (modified) (history)
  • /trunk/extensions/OpenStackManager/special/SpecialNovaAddress.php (modified) (history)
  • /trunk/extensions/OpenStackManager/special/SpecialNovaDomain.php (modified) (history)
  • /trunk/extensions/OpenStackManager/special/SpecialNovaInstance.php (modified) (history)
  • /trunk/extensions/OpenStackManager/special/SpecialNovaKey.php (modified) (history)
  • /trunk/extensions/OpenStackManager/special/SpecialNovaProject.php (modified) (history)
  • /trunk/extensions/OpenStackManager/special/SpecialNovaRole.php (modified) (history)
  • /trunk/extensions/OpenStackManager/special/SpecialNovaSecurityGroup.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OpenStackManager/special/SpecialNovaInstance.php
@@ -262,7 +262,7 @@
263263 if ( $wgOpenStackManagerPuppetOptions['enabled'] ) {
264264 $host = OpenStackNovaHost::getHostByInstanceId( $instanceid );
265265 if ( ! $host ) {
266 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistenthost' ) );
 266+ $wgOut->addWikiMsg( 'openstackmanager-nonexistenthost' );
267267 return false;
268268 }
269269 $puppetinfo = $host->getPuppetConfiguration();
@@ -331,7 +331,7 @@
332332 }
333333 $instanceid = $wgRequest->getText( 'instanceid' );
334334 if ( ! $wgRequest->wasPosted() ) {
335 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deleteinstancequestion', $instanceid ) );
 335+ $wgOut->addWikiMsg( 'openstackmanager-deleteinstancequestion', $instanceid );
336336 }
337337 $instanceInfo = array();
338338 $instanceInfo['instanceid'] = array(
@@ -373,7 +373,7 @@
374374 $instanceid = $wgRequest->getText( 'instanceid' );
375375 $consoleOutput = $this->userNova->getConsoleOutput( $instanceid );
376376 $sk = $wgUser->getSkin();
377 - $out = $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backinstancelist' ), array(), array(), array() );
 377+ $out = $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backinstancelist' ) );
378378 $out .= Html::element( 'pre', array(), $consoleOutput );
379379 $wgOut->addHTML( $out );
380380 }
@@ -411,7 +411,7 @@
412412 $instanceName = $instance->getInstanceName();
413413 $instanceName = htmlentities( $instanceName );
414414 $title = Title::newFromText( $instanceName, NS_VM );
415 - $instanceNameLink = $sk->link( $title, $instanceName, array(), array(), array() );
 415+ $instanceNameLink = $sk->link( $title, $instanceName );
416416 $instanceOut = Html::rawElement( 'td', array(), $instanceNameLink );
417417 $instanceOut .= Html::element( 'td', array(), $instance->getInstanceId() );
418418 $instanceOut .= Html::element( 'td', array(), $instance->getInstanceState() );
@@ -433,32 +433,28 @@
434434 $instanceOut .= Html::element( 'td', array(), $instance->getAvailabilityZone() );
435435 $instanceOut .= Html::element( 'td', array(), $instance->getImageId() );
436436 $instanceOut .= Html::element( 'td', array(), $instance->getLaunchTime() );
437 - $msg = wfMsg( 'openstackmanager-delete' );
 437+ $msg = wfMsgHtml( 'openstackmanager-delete' );
438438 $link = $sk->link( $this->getTitle(), $msg, array(),
439439 array( 'action' => 'delete',
440440 'project' => $project,
441 - 'instanceid' => $instance->getInstanceId() ),
442 - array() );
 441+ 'instanceid' => $instance->getInstanceId() ) );
443442 $actions = Html::rawElement( 'li', array(), $link );
444 - #$msg = wfMsg( 'openstackmanager-rename' );
 443+ #$msg = wfMsgHtml( 'openstackmanager-rename' );
445444 #$actions .= $sk->link( $this->getTitle(), $msg, array(),
446445 # array( 'action' => 'rename',
447446 # 'project' => $project,
448 - # 'instanceid' => $instance->getInstanceId() ),
449 - # array() );
450 - $msg = wfMsg( 'openstackmanager-configure' );
 447+ # 'instanceid' => $instance->getInstanceId() ) );
 448+ $msg = wfMsgHtml( 'openstackmanager-configure' );
451449 $link = $sk->link( $this->getTitle(), $msg, array(),
452450 array( 'action' => 'configure',
453451 'project' => $project,
454 - 'instanceid' => $instance->getInstanceId() ),
455 - array() );
 452+ 'instanceid' => $instance->getInstanceId() ) );
456453 $actions .= Html::rawElement( 'li', array(), $link );
457 - $msg = wfMsg( 'openstackmanager-getconsoleoutput' );
 454+ $msg = wfMsgHtml( 'openstackmanager-getconsoleoutput' );
458455 $link = $sk->link( $this->getTitle(), $msg, array(),
459456 array( 'action' => 'consoleoutput',
460457 'project' => $project,
461 - 'instanceid' => $instance->getInstanceId() ),
462 - array() );
 458+ 'instanceid' => $instance->getInstanceId() ) );
463459 $actions .= Html::rawElement( 'li', array(), $link );
464460 $actions = Html::rawElement( 'ul', array(), $actions );
465461 $instanceOut .= Html::rawElement( 'td', array(), $actions );
@@ -470,8 +466,8 @@
471467 }
472468 foreach ( $userProjects as $project ) {
473469 $out .= Html::element( 'h2', array(), $project );
474 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-createinstance' ), array(),
475 - array( 'action' => 'create', 'project' => $project ), array() );
 470+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-createinstance' ), array(),
 471+ array( 'action' => 'create', 'project' => $project ) );
476472 if ( isset( $projectArr["$project"] ) ) {
477473 $projectOut = $header;
478474 $projectOut .= $projectArr["$project"];
@@ -494,7 +490,7 @@
495491
496492 $domain = OpenStackNovaDomain::getDomainByName( $formData['domain'] );
497493 if ( !$domain ) {
498 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invaliddomain' ) );
 494+ $wgOut->addWikiMsg( 'openstackmanager-invaliddomain' );
499495 return true;
500496 }
501497 $instance = $this->userNova->createInstance( $formData['instancename'], $formData['imageType'], '', $formData['instanceType'], $formData['availabilityZone'], $formData['groups'] );
@@ -518,18 +514,18 @@
519515 $title = Title::newFromText( $wgOut->getPageTitle() );
520516 $job = new OpenStackNovaHostJob( $title, array( 'instanceid' => $instance->getInstanceId() ) );
521517 $job->insert();
522 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createdinstance', $instance->getInstanceID(), $instance->getImageId(), $host->getFullyQualifiedHostName() ) );
 518+ $wgOut->addWikiMsg( 'openstackmanager-createdinstance', $instance->getInstanceID(), $instance->getImageId(), $host->getFullyQualifiedHostName() );
523519 } else {
524520 $this->userNova->terminateInstance( $instance->getInstanceId() );
525 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createfailedldap' ) );
 521+ $wgOut->addWikiMsg( 'openstackmanager-createfailedldap' );
526522 }
527523 # TODO: also add puppet
528524 } else {
529 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createeinstancefailed' ) );
 525+ $wgOut->addWikiMsg( 'openstackmanager-createeinstancefailed' );
530526 }
531527 $sk = $wgUser->getSkin();
532528 $out = '<br />';
533 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backinstancelist' ), array(), array(), array() );
 529+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backinstancelist' ) );
534530
535531 $wgOut->addHTML( $out );
536532 return true;
@@ -545,7 +541,7 @@
546542
547543 $instance = $this->adminNova->getInstance( $formData['instanceid'] );
548544 if ( ! $instance ) {
549 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistanthost' ) );
 545+ $wgOut->addWikiMsg( 'openstackmanager-nonexistanthost' );
550546 return true;
551547 }
552548 $instancename = $instance->getInstanceName();
@@ -554,16 +550,16 @@
555551 if ( $success ) {
556552 $success = OpenStackNovaHost::deleteHostByInstanceId( $instanceid );
557553 if ( $success ) {
558 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedinstance', $instanceid ) );
 554+ $wgOut->addWikiMsg( 'openstackmanager-deletedinstance', $instanceid );
559555 } else {
560 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedinstance-faileddns', $instancename, $instanceid ) );
 556+ $wgOut->addWikiMsg( 'openstackmanager-deletedinstance-faileddns', $instancename, $instanceid );
561557 }
562558 } else {
563 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deleteinstancefailed' ) );
 559+ $wgOut->addWikiMsg( 'openstackmanager-deleteinstancefailed' );
564560 }
565561 $sk = $wgUser->getSkin();
566562 $out = '<br />';
567 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backinstancelist' ), array(), array(), array() );
 563+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backinstancelist' ) );
568564
569565 $wgOut->addHTML( $out );
570566 return true;
@@ -595,16 +591,16 @@
596592 }
597593 $success = $host->modifyPuppetConfiguration( $puppetinfo );
598594 if ( $success ) {
599 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-modifiedinstance' ) );
 595+ $wgOut->addWikiMsg( 'openstackmanager-modifiedinstance' );
600596 } else {
601 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-modifyinstancefailed' ) );
 597+ $wgOut->addWikiMsg( 'openstackmanager-modifyinstancefailed' );
602598 }
603599 } else {
604 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistanthost' ) );
 600+ $wgOut->addWikiMsg( 'openstackmanager-nonexistanthost' );
605601 }
606602 $sk = $wgUser->getSkin();
607603 $out = '<br /';
608 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backinstancelist' ), array(), array(), array() );
 604+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backinstancelist' ) );
609605
610606 $wgOut->addHTML( $out );
611607 return true;
Index: trunk/extensions/OpenStackManager/special/SpecialNovaSecurityGroup.php
@@ -152,7 +152,7 @@
153153 }
154154 $securitygroupname = $wgRequest->getText( 'groupname' );
155155 if ( ! $wgRequest->wasPosted() ) {
156 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletesecuritygroup-confirm', $securitygroupname ) );
 156+ $wgOut->addWikiMsg( 'openstackmanager-deletesecuritygroup-confirm', $securitygroupname );
157157 }
158158 $securityGroupInfo = array();
159159 $securityGroupInfo['groupname'] = array(
@@ -244,7 +244,7 @@
245245 } else {
246246 $ruleOut .= Html::rawElement( 'td', array(), '' );
247247 }
248 - $msg = wfMsg( 'openstackmanager-removerule-action' );
 248+ $msg = wfMsgHtml( 'openstackmanager-removerule-action' );
249249 $args = array( 'action' => 'removerule',
250250 'project' => $project,
251251 'groupname' => $groupname,
@@ -253,7 +253,7 @@
254254 'protocol' => $ipprotocol,
255255 'ranges' => implode( ',', $ranges ),
256256 'groups' => implode( ',', $groupinfo ) );
257 - $link = $sk->link( $this->getTitle(), $msg, array(), $args, array() );
 257+ $link = $sk->link( $this->getTitle(), $msg, array(), $args );
258258 $actions = Html::rawElement( 'li', array(), $link );
259259 $actions = Html::rawElement( 'ul', array(), $actions );
260260 $ruleOut .= Html::rawElement( 'td', array(), $actions );
@@ -264,26 +264,23 @@
265265 } else {
266266 $groupOut .= Html::rawElement( 'td', array(), '' );
267267 }
268 - $msg = wfMsg( 'openstackmanager-delete' );
 268+ $msg = wfMsgHtml( 'openstackmanager-delete' );
269269 $link = $sk->link( $this->getTitle(), $msg, array(),
270270 array( 'action' => 'delete',
271271 'project' => $project,
272 - 'groupname' => $group->getGroupName() ),
273 - array() );
 272+ 'groupname' => $group->getGroupName() ) );
274273 $actions = Html::rawElement( 'li', array(), $link );
275 - #$msg = wfMsg( 'openstackmanager-configure' );
 274+ #$msg = wfMsgHtml( 'openstackmanager-configure' );
276275 #$link = $sk->link( $this->getTitle(), $msg, array(),
277276 # array( 'action' => 'configure',
278277 # 'project' => $project,
279 - # 'groupname' => $group->getGroupName() ),
280 - # array() );
 278+ # 'groupname' => $group->getGroupName() ) );
281279 #$actions .= Html::rawElement( 'li', array(), $link );
282 - $msg = wfMsg( 'openstackmanager-addrule-action' );
 280+ $msg = wfMsgHtml( 'openstackmanager-addrule-action' );
283281 $link = $sk->link( $this->getTitle(), $msg, array(),
284282 array( 'action' => 'addrule',
285283 'project' => $project,
286 - 'groupname' => $group->getGroupName() ),
287 - array() );
 284+ 'groupname' => $group->getGroupName() ) );
288285 $actions .= Html::rawElement( 'li', array(), $link );
289286 $actions = Html::rawElement( 'ul', array(), $actions );
290287 $groupOut .= Html::rawElement( 'td', array(), $actions );
@@ -295,8 +292,8 @@
296293 }
297294 foreach ( $userProjects as $project ) {
298295 $out .= Html::element( 'h2', array(), $project );
299 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-createnewsecuritygroup' ), array(),
300 - array( 'action' => 'create', 'project' => $project ), array() );
 296+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-createnewsecuritygroup' ), array(),
 297+ array( 'action' => 'create', 'project' => $project ) );
301298 if ( isset( $projectArr["$project"] ) ) {
302299 $projectOut = $groupheader;
303300 $projectOut .= $projectArr["$project"];
@@ -396,7 +393,7 @@
397394 }
398395 $securitygroupname = $wgRequest->getText( 'groupname' );
399396 if ( ! $wgRequest->wasPosted() ) {
400 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removerule-confirm', $securitygroupname ) );
 397+ $wgOut->addWikiMsg( 'openstackmanager-removerule-confirm', $securitygroupname );
401398 }
402399 $securityGroupInfo = array();
403400 $securityGroupInfo['groupname'] = array(
@@ -459,13 +456,13 @@
460457 $this->userNova = new OpenStackNovaController( $userCredentials );
461458 $securitygroup = $this->userNova->createSecurityGroup( $groupname, $description );
462459 if ( $securitygroup ) {
463 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createdsecuritygroup' ) );
 460+ $wgOut->addWikiMsg( 'openstackmanager-createdsecuritygroup' );
464461 } else {
465 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createsecuritygroupfailed' ) );
 462+ $wgOut->addWikiMsg( 'openstackmanager-createsecuritygroupfailed' );
466463 }
467464 $sk = $wgUser->getSkin();
468465 $out = '<br />';
469 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backsecuritygrouplist' ), array(), array(), array() );
 466+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backsecuritygrouplist' ) );
470467
471468 $wgOut->addHTML( $out );
472469 return true;
@@ -484,20 +481,20 @@
485482 $this->userNova = new OpenStackNovaController( $userCredentials );
486483 $securitygroup = $this->adminNova->getSecurityGroup( $formData['groupname'] );
487484 if ( ! $securitygroup ) {
488 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistantsecuritygroup' ) );
 485+ $wgOut->addWikiMsg( 'openstackmanager-nonexistantsecuritygroup' );
489486 return true;
490487 }
491488 $groupname = $securitygroup->getGroupName();
492489 $success = $this->userNova->deleteSecurityGroup( $groupname );
493490 if ( $success ) {
494491 # TODO: Ensure group isn't being used
495 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedsecuritygroup' ) );
 492+ $wgOut->addWikiMsg( 'openstackmanager-deletedsecuritygroup' );
496493 } else {
497 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletesecuritygroupfailed' ) );
 494+ $wgOut->addWikiMsg( 'openstackmanager-deletesecuritygroupfailed' );
498495 }
499496 $sk = $wgUser->getSkin();
500497 $out = '<br />';
501 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backsecuritygrouplist' ), array(), array(), array() );
 498+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backsecuritygrouplist' ) );
502499
503500 $wgOut->addHTML( $out );
504501 return true;
@@ -519,16 +516,16 @@
520517 # This isn't a supported function in the API for now. Leave this action out for now
521518 $success = $this->userNova->modifySecurityGroup( $groupname, array( 'description' => $description ) );
522519 if ( $success ) {
523 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-modifiedgroup' ) );
 520+ $wgOut->addWikiMsg( 'openstackmanager-modifiedgroup' );
524521 } else {
525 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-modifygroupfailed' ) );
 522+ $wgOut->addWikiMsg( 'openstackmanager-modifygroupfailed' );
526523 }
527524 } else {
528 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistantgroup' ) );
 525+ $wgOut->addWikiMsg( 'openstackmanager-nonexistantgroup' );
529526 }
530527 $sk = $wgUser->getSkin();
531528 $out = '<br />';
532 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backsecuritygrouplist' ), array(), array(), array() );
 529+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backsecuritygrouplist' ) );
533530
534531 $wgOut->addHTML( $out );
535532 return true;
@@ -560,20 +557,20 @@
561558 $this->userNova = new OpenStackNovaController( $userCredentials );
562559 $securitygroup = $this->adminNova->getSecurityGroup( $formData['groupname'] );
563560 if ( ! $securitygroup ) {
564 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistantsecuritygroup' ) );
 561+ $wgOut->addWikiMsg( 'openstackmanager-nonexistantsecuritygroup' );
565562 return false;
566563 }
567564 $groupname = $securitygroup->getGroupName();
568565 $success = $this->userNova->addSecurityGroupRule( $groupname, $fromport, $toport, $protocol, $ranges, $groups );
569566 if ( $success ) {
570567 # TODO: Ensure group isn't being used
571 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addedrule' ) );
 568+ $wgOut->addWikiMsg( 'openstackmanager-addedrule' );
572569 } else {
573 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addrulefailed' ) );
 570+ $wgOut->addWikiMsg( 'openstackmanager-addrulefailed' );
574571 }
575572 $sk = $wgUser->getSkin();
576573 $out = '<br />';
577 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backsecuritygrouplist' ), array(), array(), array() );
 574+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backsecuritygrouplist' ) );
578575
579576 $wgOut->addHTML( $out );
580577 return true;
@@ -608,20 +605,20 @@
609606 $this->userNova = new OpenStackNovaController( $userCredentials );
610607 $securitygroup = $this->adminNova->getSecurityGroup( $formData['groupname'] );
611608 if ( ! $securitygroup ) {
612 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistantsecuritygroup' ) );
 609+ $wgOut->addWikiMsg( 'openstackmanager-nonexistantsecuritygroup' );
613610 return false;
614611 }
615612 $groupname = $securitygroup->getGroupName();
616613 $success = $this->userNova->removeSecurityGroupRule( $groupname, $fromport, $toport, $protocol, $ranges, $groups );
617614 if ( $success ) {
618615 # TODO: Ensure group isn't being used
619 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removedrule' ) );
 616+ $wgOut->addWikiMsg( 'openstackmanager-removedrule' );
620617 } else {
621 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removerulefailed' ) );
 618+ $wgOut->addWikiMsg( 'openstackmanager-removerulefailed' );
622619 }
623620 $sk = $wgUser->getSkin();
624621 $out = '<br />';
625 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backsecuritygrouplist' ), array(), array(), array() );
 622+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backsecuritygrouplist' ) );
626623
627624 $wgOut->addHTML( $out );
628625 return true;
Index: trunk/extensions/OpenStackManager/special/SpecialNovaAddress.php
@@ -61,7 +61,7 @@
6262 $userCredentials = $this->userLDAP->getCredentials( $project );
6363 $this->userNova = new OpenStackNovaController( $userCredentials );
6464 if ( ! $wgRequest->wasPosted() ) {
65 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-allocateaddress-confirm', $project ) );
 65+ $wgOut->addWikiMsg( 'openstackmanager-allocateaddress-confirm', $project );
6666 }
6767 $addressInfo = array();
6868 $addressInfo['project'] = array(
@@ -100,7 +100,7 @@
101101 $this->userNova = new OpenStackNovaController( $userCredentials );
102102 $ip = $wgRequest->getText( 'ip' );
103103 if ( ! $wgRequest->wasPosted() ) {
104 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-releaseaddress-confirm', $ip ) );
 104+ $wgOut->addWikiMsg( 'openstackmanager-releaseaddress-confirm', $ip );
105105 }
106106 $addressInfo = array();
107107 $addressInfo['project'] = array(
@@ -196,7 +196,7 @@
197197 $this->userNova = new OpenStackNovaController( $userCredentials );
198198 $ip = $wgRequest->getText( 'ip' );
199199 if ( ! $wgRequest->wasPosted() ) {
200 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-disassociateaddress-confirm', $ip ) );
 200+ $wgOut->addWikiMsg( 'openstackmanager-disassociateaddress-confirm', $ip );
201201 }
202202 $addressInfo = array();
203203 $addressInfo['project'] = array(
@@ -295,7 +295,7 @@
296296 $domain = $wgRequest->getText( 'domain' );
297297 $hostname = $wgRequest->getText( 'hostname' );
298298 if ( ! $wgRequest->wasPosted() ) {
299 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removehost-confirm', $hostname, $ip ) );
 299+ $wgOut->addWikiMsg( 'openstackmanager-removehost-confirm', $hostname, $ip );
300300 }
301301 $addressInfo = array();
302302 $addressInfo['project'] = array(
@@ -364,7 +364,7 @@
365365 $hosts = OpenStackNovaHost::getHostsByIP( $ip );
366366 if ( $hosts ) {
367367 $hostsOut = '';
368 - $msg = wfMsg( 'openstackmanager-removehost-action' );
 368+ $msg = wfMsgHtml( 'openstackmanager-removehost-action' );
369369 foreach ( $hosts as $host ) {
370370 $domain = $host->getDomain();
371371 $fqdns = $host->getAssociatedDomains();
@@ -372,7 +372,7 @@
373373 $hostname = explode( '.', $fqdn );
374374 $hostname = $hostname[0];
375375 $link = $sk->link( $this->getTitle(), $msg, array(),
376 - array( 'action' => 'removehost', 'ip' => $ip, 'project' => $project, 'domain' => $domain->getDomainName(), 'hostname' => $hostname ), array() );
 376+ array( 'action' => 'removehost', 'ip' => $ip, 'project' => $project, 'domain' => $domain->getDomainName(), 'hostname' => $hostname ) );
377377 $hostOut = htmlentities( $fqdn ) . ' ' . $link;
378378 $hostsOut .= Html::rawElement( 'li', array(), $hostOut );
379379 }
@@ -384,26 +384,26 @@
385385 }
386386 $actions = '';
387387 if ( $instanceid ) {
388 - $msg = wfMsg( 'openstackmanager-reassociateaddress' );
 388+ $msg = wfMsgHtml( 'openstackmanager-reassociateaddress' );
389389 } else {
390 - $msg = wfMsg( 'openstackmanager-releaseaddress' );
 390+ $msg = wfMsgHtml( 'openstackmanager-releaseaddress' );
391391 $link = $sk->link( $this->getTitle(), $msg, array(),
392 - array( 'action' => 'release', 'ip' => $ip, 'project' => $project ), array() );
 392+ array( 'action' => 'release', 'ip' => $ip, 'project' => $project ) );
393393 $actions = Html::rawElement( 'li', array(), $link );
394 - $msg = wfMsg( 'openstackmanager-associateaddress' );
 394+ $msg = wfMsgHtml( 'openstackmanager-associateaddress' );
395395 }
396396 $link = $sk->link( $this->getTitle(), $msg, array(),
397 - array( 'action' => 'associate', 'ip' => $ip, 'project' => $project ), array() );
 397+ array( 'action' => 'associate', 'ip' => $ip, 'project' => $project ) );
398398 $actions .= Html::rawElement( 'li', array(), $link );
399399 if ( $instanceid ) {
400 - $msg = wfMsg( 'openstackmanager-disassociateaddress' );
 400+ $msg = wfMsgHtml( 'openstackmanager-disassociateaddress' );
401401 $link = $sk->link( $this->getTitle(), $msg, array(),
402 - array( 'action' => 'disassociate', 'ip' => $ip, 'project' => $project ), array() );
 402+ array( 'action' => 'disassociate', 'ip' => $ip, 'project' => $project ) );
403403 $actions .= Html::rawElement( 'li', array(), $link );
404404 }
405 - $msg = wfMsg( 'openstackmanager-addhost' );
 405+ $msg = wfMsgHtml( 'openstackmanager-addhost' );
406406 $link = $sk->link( $this->getTitle(), $msg, array(),
407 - array( 'action' => 'addhost', 'ip' => $ip, 'project' => $project ), array() );
 407+ array( 'action' => 'addhost', 'ip' => $ip, 'project' => $project ) );
408408 $actions .= Html::rawElement( 'li', array(), $link );
409409 $actions = Html::rawElement( 'ul', array(), $actions );
410410 $addressOut .= Html::rawElement( 'td', array(), $actions );
@@ -411,7 +411,7 @@
412412 }
413413 foreach ( $userProjects as $project ) {
414414 $out .= Html::element( 'h2', array(), $project );
415 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-allocateaddress' ), array(), array( 'action' => 'allocate', 'project' => $project ), array() );
 415+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-allocateaddress' ), array(), array( 'action' => 'allocate', 'project' => $project ) );
416416 if ( isset( $projectArr["$project"] ) ) {
417417 $projectOut = $header;
418418 $projectOut .= $projectArr["$project"];
@@ -434,14 +434,14 @@
435435
436436 $address = $this->userNova->allocateAddress();
437437 if ( ! $address ) {
438 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-allocateaddressfailed' ) );
 438+ $wgOut->addWikiMsg( 'openstackmanager-allocateaddressfailed' );
439439 return true;
440440 }
441441 $ip = $address->getPublicIP();
442 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-allocatedaddress', $ip ) );
 442+ $wgOut->addWikiMsg( 'openstackmanager-allocatedaddress', $ip );
443443 $sk = $wgUser->getSkin();
444444 $out = '<br />';
445 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backaddresslist' ), array(), array(), array() );
 445+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backaddresslist' ) );
446446 $wgOut->addHTML( $out );
447447
448448 return true;
@@ -461,23 +461,23 @@
462462 # then release the address
463463 $hosts = OpenStackNovaHost::getHostsByIP( $ip );
464464 if ( $hosts ) {
465 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-cannotreleaseaddress', $ip ) );
 465+ $wgOut->addWikiMsg( 'openstackmanager-cannotreleaseaddress', $ip );
466466 return true;
467467 }
468468 $address = $this->adminNova->getAddress( $ip );
469469 if ( $address->getInstanceId() ) {
470 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-cannotreleaseaddress', $ip ) );
 470+ $wgOut->addWikiMsg( 'openstackmanager-cannotreleaseaddress', $ip );
471471 return true;
472472 }
473473 $success = $this->userNova->releaseAddress( $ip );
474474 if ( $success ) {
475 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-releasedaddress', $ip ) );
 475+ $wgOut->addWikiMsg( 'openstackmanager-releasedaddress', $ip );
476476 } else {
477 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-releasedaddressfailed', $ip ) );
 477+ $wgOut->addWikiMsg( 'openstackmanager-releasedaddressfailed', $ip );
478478 }
479479 $sk = $wgUser->getSkin();
480480 $out = '<br />';
481 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backaddresslist' ), array(), array(), array() );
 481+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backaddresslist' ) );
482482 $wgOut->addHTML( $out );
483483
484484 return true;
@@ -495,13 +495,13 @@
496496 $ip = $formData['ip'];
497497 $address = $this->userNova->associateAddress( $instanceid, $ip );
498498 if ( $address ) {
499 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-associatedaddress', $ip, $instanceid ) );
 499+ $wgOut->addWikiMsg( 'openstackmanager-associatedaddress', $ip, $instanceid );
500500 } else {
501 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-associatedaddressfailed', $ip, $instanceid ) );
 501+ $wgOut->addWikiMsg( 'openstackmanager-associatedaddressfailed', $ip, $instanceid );
502502 }
503503 $sk = $wgUser->getSkin();
504504 $out = '<br />';
505 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backaddresslist' ), array(), array(), array() );
 505+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backaddresslist' ) );
506506 $wgOut->addHTML( $out );
507507
508508 return true;
@@ -518,13 +518,13 @@
519519 $ip = $formData['ip'];
520520 $address = $this->userNova->disassociateAddress( $ip );
521521 if ( $address ) {
522 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-disassociatedaddress', $ip ) );
 522+ $wgOut->addWikiMsg( 'openstackmanager-disassociatedaddress', $ip );
523523 } else {
524 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-disassociatedaddressfailed', $ip ) );
 524+ $wgOut->addWikiMsg( 'openstackmanager-disassociatedaddressfailed', $ip );
525525 }
526526 $sk = $wgUser->getSkin();
527527 $out = '<br />';
528 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backaddresslist' ), array(), array(), array() );
 528+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backaddresslist' ) );
529529 $wgOut->addHTML( $out );
530530
531531 return true;
@@ -542,11 +542,11 @@
543543 $project = $formData['project'];
544544 $address = $this->adminNova->getAddress( $ip );
545545 if ( ! $address ) {
546 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invalidaddress', $ip ) );
 546+ $wgOut->addWikiMsg( 'openstackmanager-invalidaddress', $ip );
547547 return true;
548548 }
549549 if ( $address->getProject() != $project ) {
550 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invalidaddressforproject', $ip ) );
 550+ $wgOut->addWikiMsg( 'openstackmanager-invalidaddressforproject', $ip );
551551 return true;
552552 }
553553 $hostname = $formData['hostname'];
@@ -559,30 +559,30 @@
560560 # We need to add an arecord, if the arecord doesn't already exist
561561 $success = $hostbyname->addARecord( $ip );
562562 if ( $success ) {
563 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addedhost', $hostname, $ip ) );
 563+ $wgOut->addWikiMsg( 'openstackmanager-addedhost', $hostname, $ip );
564564 } else {
565 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addhostfailed', $ip, $hostname ) );
 565+ $wgOut->addWikiMsg( 'openstackmanager-addhostfailed', $ip, $hostname );
566566 }
567567 } else if ( $hostbyip ) {
568568 # We need to add an associateddomain, if the associateddomain doesn't already exist
569569 $success = $hostbyip->addAssociatedDomain( $hostname . '.' . $domain->getFullyQualifiedDomainName() );
570570 if ( $success ) {
571 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addedhost', $hostname, $ip ) );
 571+ $wgOut->addWikiMsg( 'openstackmanager-addedhost', $hostname, $ip );
572572 } else {
573 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addhostfailed', $ip, $hostname ) );
 573+ $wgOut->addWikiMsg( 'openstackmanager-addhostfailed', $ip, $hostname );
574574 }
575575 } else {
576576 # This is a new host entry
577577 $host = OpenStackNovaHost::addPublicHost( $hostname, $ip, $domain );
578578 if ( $host ) {
579 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addedhost', $hostname, $ip ) );
 579+ $wgOut->addWikiMsg( 'openstackmanager-addedhost', $hostname, $ip );
580580 } else {
581 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addhostfailed', $ip, $hostname ) );
 581+ $wgOut->addWikiMsg( 'openstackmanager-addhostfailed', $ip, $hostname );
582582 }
583583 }
584584 $sk = $wgUser->getSkin();
585585 $out = '<br />';
586 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backaddresslist' ), array(), array(), array() );
 586+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backaddresslist' ) );
587587 $wgOut->addHTML( $out );
588588 return true;
589589 }
@@ -599,11 +599,11 @@
600600 $project = $formData['project'];
601601 $address = $this->adminNova->getAddress( $ip );
602602 if ( ! $address ) {
603 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invalidaddress', $ip ) );
 603+ $wgOut->addWikiMsg( 'openstackmanager-invalidaddress', $ip );
604604 return true;
605605 }
606606 if ( $address->getProject() != $project ) {
607 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invalidaddressforproject', $ip ) );
 607+ $wgOut->addWikiMsg( 'openstackmanager-invalidaddressforproject', $ip );
608608 return true;
609609 }
610610 $hostname = $formData['hostname'];
@@ -617,25 +617,25 @@
618618 # We need to keep the host, but remove the fqdn
619619 $success = $host->deleteAssociatedDomain( $fqdn );
620620 if ( $success ) {
621 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removedhost', $hostname, $ip ) );
 621+ $wgOut->addWikiMsg( 'openstackmanager-removedhost', $hostname, $ip );
622622 } else {
623 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removehostfailed', $ip, $hostname ) );
 623+ $wgOut->addWikiMsg( 'openstackmanager-removehostfailed', $ip, $hostname );
624624 }
625625 } else {
626626 # We need to remove the host entry
627627 $success = OpenStackNovaHost::deleteHost( $hostname, $domain );
628628 if ( $success ) {
629 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removedhost', $hostname, $ip ) );
 629+ $wgOut->addWikiMsg( 'openstackmanager-removedhost', $hostname, $ip );
630630 } else {
631 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removehostfailed', $ip, $hostname ) );
 631+ $wgOut->addWikiMsg( 'openstackmanager-removehostfailed', $ip, $hostname );
632632 }
633633 }
634634 } else {
635 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistenthost' ) );
 635+ $wgOut->addWikiMsg( 'openstackmanager-nonexistenthost' );
636636 }
637637 $out = '<br />';
638638 $sk = $wgUser->getSkin();
639 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backaddresslist' ), array(), array(), array() );
 639+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backaddresslist' ) );
640640 $wgOut->addHTML( $out );
641641 return true;
642642 }
Index: trunk/extensions/OpenStackManager/special/SpecialNovaProject.php
@@ -175,7 +175,7 @@
176176
177177 $project = $wgRequest->getText( 'projectname' );
178178 if ( ! $wgRequest->wasPosted() ) {
179 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removeprojectconfirm', $project ) );
 179+ $wgOut->addWikiMsg( 'openstackmanager-removeprojectconfirm', $project );
180180 }
181181 $projectInfo = array();
182182 $projectInfo['projectname'] = array(
@@ -206,7 +206,7 @@
207207
208208 $out = '';
209209 $sk = $wgUser->getSkin();
210 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-createproject' ), array(), array( 'action' => 'create' ), array() );
 210+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-createproject' ), array(), array( 'action' => 'create' ) );
211211 $projectsOut = Html::element( 'th', array(), wfMsg( 'openstackmanager-projectname' ) );
212212 $projectsOut .= Html::element( 'th', array(), wfMsg( 'openstackmanager-members' ) );
213213 $projectsOut .= Html::element( 'th', array(), wfMsg( 'openstackmanager-roles' ) );
@@ -239,11 +239,11 @@
240240 }
241241 $roleMembers = Html::rawElement( 'ul', array(), $roleMembers );
242242 $roleOut .= Html::rawElement( 'td', array(), $roleMembers );
243 - $link = $sk->link( $specialRoleTitle, wfMsg( 'openstackmanager-addrolemember' ), array(),
244 - array( 'action' => 'addmember', 'projectname' => $projectName, 'rolename' => $role->getRoleName(), 'returnto' => 'Special:NovaProject' ), array() );
 243+ $link = $sk->link( $specialRoleTitle, wfMsgHtml( 'openstackmanager-addrolemember' ), array(),
 244+ array( 'action' => 'addmember', 'projectname' => $projectName, 'rolename' => $role->getRoleName(), 'returnto' => 'Special:NovaProject' ) );
245245 $actions = Html::rawElement( 'li', array(), $link );
246 - $link = $sk->link( $specialRoleTitle, wfMsg( 'openstackmanager-removerolemember' ), array(),
247 - array( 'action' => 'deletemember', 'projectname' => $projectName, 'rolename' => $role->getRoleName(), 'returnto' => 'Special:NovaProject' ), array() );
 246+ $link = $sk->link( $specialRoleTitle, wfMsgHtml( 'openstackmanager-removerolemember' ), array(),
 247+ array( 'action' => 'deletemember', 'projectname' => $projectName, 'rolename' => $role->getRoleName(), 'returnto' => 'Special:NovaProject' ) );
248248 $actions .= Html::rawElement( 'li', array(), $link );
249249 $actions = Html::rawElement( 'ul', array(), $actions );
250250 $roleOut .= Html::rawElement( 'td', array(), $actions );
@@ -251,14 +251,14 @@
252252 }
253253 $rolesOut = Html::rawElement( 'table', array( 'class' => 'wikitable' ), $rolesOut );
254254 $projectOut .= Html::rawElement( 'td', array(), $rolesOut );
255 - $link = $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-deleteproject' ), array(),
256 - array( 'action' => 'delete', 'projectname' => $projectName ), array() );
 255+ $link = $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-deleteproject' ), array(),
 256+ array( 'action' => 'delete', 'projectname' => $projectName ) );
257257 $actions = Html::rawElement( 'li', array(), $link );
258 - $link = $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-addmember' ), array(),
259 - array( 'action' => 'addmember', 'projectname' => $projectName ), array() );
 258+ $link = $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-addmember' ), array(),
 259+ array( 'action' => 'addmember', 'projectname' => $projectName ) );
260260 $actions .= Html::rawElement( 'li', array(), $link );
261 - $link = $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-removemember' ), array(),
262 - array( 'action' => 'deletemember', 'projectname' => $projectName ), array() );
 261+ $link = $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-removemember' ), array(),
 262+ array( 'action' => 'deletemember', 'projectname' => $projectName ) );
263263 $actions .= Html::rawElement( 'li', array(), $link );
264264 $actions = Html::rawElement( 'ul', array(), $actions );
265265 $projectOut .= Html::rawElement( 'td', array(), $actions );
@@ -281,13 +281,13 @@
282282
283283 $success = OpenStackNovaProject::createProject( $formData['projectname'] );
284284 if ( ! $success ) {
285 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createprojectfailed' ) );
 285+ $wgOut->addWikiMsg( 'openstackmanager-createprojectfailed' );
286286 return true;
287287 }
288 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createdproject' ) );
 288+ $wgOut->addWikiMsg( 'openstackmanager-createdproject' );
289289 $sk = $wgUser->getSkin();
290290 $out = '<br />';
291 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backprojectlist' ), array(), array(), array() );
 291+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backprojectlist' ) );
292292 $wgOut->addHTML( $out );
293293
294294 return true;
@@ -303,13 +303,13 @@
304304
305305 $success = OpenStackNovaProject::deleteProject( $formData['projectname'] );
306306 if ( $success ) {
307 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedproject' ) );
 307+ $wgOut->addWikiMsg( 'openstackmanager-deletedproject' );
308308 } else {
309 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deleteprojectfailed' ) );
 309+ $wgOut->addWikiMsg( 'openstackmanager-deleteprojectfailed' );
310310 }
311311 $sk = $wgUser->getSkin();
312312 $out = '<br />';
313 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backprojectlist' ), array(), array(), array() );
 313+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backprojectlist' ) );
314314 $wgOut->addHTML( $out );
315315
316316 return true;
@@ -326,13 +326,13 @@
327327 $project = new OpenStackNovaProject( $formData['projectname'] );
328328 $success = $project->addMember( $formData['member'] );
329329 if ( $success ) {
330 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addedto', $formData['member'], $formData['projectname'] ) );
 330+ $wgOut->addWikiMsg( 'openstackmanager-addedto', $formData['member'], $formData['projectname'] );
331331 } else {
332 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-failedtoadd', $formData['member'], $formData['projectname'] ) );
 332+ $wgOut->addWikiMsg( 'openstackmanager-failedtoadd', $formData['member'], $formData['projectname'] );
333333 }
334334 $sk = $wgUser->getSkin();
335335 $out = '<br />';
336 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backprojectlist' ), array(), array(), array() );
 336+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backprojectlist' ) );
337337 $wgOut->addHTML( $out );
338338
339339 return true;
@@ -348,20 +348,20 @@
349349
350350 $project = OpenStackNovaProject::getProjectByName( $formData['projectname'] );
351351 if ( ! $project ) {
352 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistentproject' ) );
 352+ $wgOut->addWikiMsg( 'openstackmanager-nonexistentproject' );
353353 return true;
354354 }
355355 foreach ( $formData['members'] as $member ) {
356356 $success = $project->deleteMember( $member );
357357 if ( $success ) {
358 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removedfrom', $member, $formData['projectname'] ) );
 358+ $wgOut->addWikiMsg( 'openstackmanager-removedfrom', $member, $formData['projectname'] );
359359 } else {
360 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-failedtoremove', $member, $formData['projectname'] ) );
 360+ $wgOut->addWikiMsg( 'openstackmanager-failedtoremove', $member, $formData['projectname'] );
361361 }
362362 }
363363 $out = '<br />';
364364 $sk = $wgUser->getSkin();
365 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backprojectlist' ), array(), array(), array() );
 365+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backprojectlist' ) );
366366 $wgOut->addHTML( $out );
367367
368368 return true;
Index: trunk/extensions/OpenStackManager/special/SpecialNovaDomain.php
@@ -106,7 +106,7 @@
107107
108108 $domainname = $wgRequest->getText( 'domainname' );
109109 if ( ! $wgRequest->wasPosted() ) {
110 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedomain-confirm', $domainname ) );
 110+ $wgOut->addWikiMsg( 'openstackmanager-deletedomain-confirm', $domainname );
111111 }
112112 $domainInfo = array();
113113 $domainInfo['domainname'] = array(
@@ -137,7 +137,7 @@
138138
139139 $out = '';
140140 $sk = $wgUser->getSkin();
141 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-createdomain' ), array(), array( 'action' => 'create' ), array() );
 141+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-createdomain' ), array(), array( 'action' => 'create' ) );
142142 $domainsOut = Html::element( 'th', array(), wfMsg( 'openstackmanager-domainname' ) );
143143 $domainsOut .= Html::element( 'th', array(), wfMsg( 'openstackmanager-fqdn' ) );
144144 $domainsOut .= Html::element( 'th', array(), wfMsg( 'openstackmanager-location' ) );
@@ -150,9 +150,9 @@
151151 $domainOut = Html::element( 'td', array(), $domainName );
152152 $domainOut .= Html::element( 'td', array(), $fqdn );
153153 $domainOut .= Html::element( 'td', array(), $location );
154 - $msg = wfMsg( 'openstackmanager-delete' );
 154+ $msg = wfMsgHtml( 'openstackmanager-delete' );
155155 $link = $sk->link( $this->getTitle(), $msg, array(),
156 - array( 'action' => 'delete', 'domainname' => $domainName ), array() );
 156+ array( 'action' => 'delete', 'domainname' => $domainName ) );
157157 $domainOut .= Html::rawElement( 'td', array(), $link );
158158 $domainsOut .= Html::rawElement( 'tr', array(), $domainOut );
159159 }
@@ -173,13 +173,13 @@
174174
175175 $success = OpenStackNovaDomain::createDomain( $formData['domainname'], $formData['fqdn'], $formData['location'] );
176176 if ( ! $success ) {
177 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createdomainfailed' ) );
 177+ $wgOut->addWikiMsg( 'openstackmanager-createdomainfailed' );
178178 return true;
179179 }
180 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createddomain' ) );
 180+ $wgOut->addWikiMsg( 'openstackmanager-createddomain' );
181181 $sk = $wgUser->getSkin();
182182 $out = '<br />';
183 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backdomainlist' ), array(), array(), array() );
 183+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backdomainlist' ) );
184184 $wgOut->addHTML( $out );
185185
186186 return true;
@@ -195,13 +195,13 @@
196196
197197 $success = OpenStackNovaDomain::deleteDomain( $formData['domainname'] );
198198 if ( $success ) {
199 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deleteddomain' ) );
 199+ $wgOut->addWikiMsg( 'openstackmanager-deleteddomain' );
200200 } else {
201 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-failedeleteddomain' ) );
 201+ $wgOut->addWikiMsg( 'openstackmanager-failedeleteddomain' );
202202 }
203203 $sk = $wgUser->getSkin();
204204 $out = '<br />';
205 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backdomainlist' ), array(), array(), array() );
 205+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backdomainlist' ) );
206206 $wgOut->addHTML( $out );
207207
208208 return true;
Index: trunk/extensions/OpenStackManager/special/SpecialNovaKey.php
@@ -121,7 +121,7 @@
122122 $keypairs = $this->userLDAP->getKeypairs();
123123 if ( ! $wgRequest->wasPosted() ) {
124124 $wgOut->addHTML( Html::element( 'pre', array(), $keypairs[$hash] ) );
125 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletekeyconfirm' ) );
 125+ $wgOut->addWikiMsg( 'openstackmanager-deletekeyconfirm' );
126126 }
127127 $keyInfo['hash'] = array(
128128 'type' => 'hidden',
@@ -157,7 +157,7 @@
158158 $out = '';
159159 $sk = $wgUser->getSkin();
160160 if ( $wgOpenStackManagerNovaKeypairStorage == 'nova' ) {
161 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-importkey' ), array(), array( 'action' => 'import' ), array() );
 161+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-importkey' ), array(), array( 'action' => 'import' ) );
162162 $projects = $this->userLDAP->getProjects();
163163 foreach ( $projects as $project ) {
164164 $userCredentials = $this->userLDAP->getCredentials( $project );
@@ -177,19 +177,19 @@
178178 $out .= Html::rawElement( 'table', array( 'id' => 'novakeylist', 'class' => 'wikitable' ), $projectOut );
179179 }
180180 } else if ( $wgOpenStackManagerNovaKeypairStorage == 'ldap' ) {
181 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-importkey' ), array(), array( 'action' => 'import' ), array() );
 181+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-importkey' ), array(), array( 'action' => 'import' ) );
182182 $keypairs = $this->userLDAP->getKeypairs();
183183 $keysOut = '';
184184 foreach ( $keypairs as $hash => $key ) {
185185 $keyOut = Html::element( 'td', array(), $key );
186 - $msg = wfMsg( 'openstackmanager-delete' );
187 - $link = $sk->link( $this->getTitle(), $msg, array(), array( 'action' => 'delete', 'hash' => $hash ), array() );
 186+ $msg = wfMsgHtml( 'openstackmanager-delete' );
 187+ $link = $sk->link( $this->getTitle(), $msg, array(), array( 'action' => 'delete', 'hash' => $hash ) );
188188 $keyOut .= Html::rawElement( 'td', array(), $link );
189189 $keysOut .= Html::rawElement( 'tr', array(), $keyOut );
190190 }
191191 $out .= Html::rawElement( 'table', array(), $keysOut );
192192 } else {
193 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invalidkeypair' ) );
 193+ $wgOut->addWikiMsg( 'openstackmanager-invalidkeypair' );
194194 }
195195
196196 $wgOut->addHTML( $out );
@@ -207,23 +207,23 @@
208208 if ( $wgOpenStackManagerNovaKeypairStorage == 'ldap' ) {
209209 $success = $this->userLDAP->importKeypair( $formData['key'] );
210210 if ( ! $success ) {
211 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-keypairimportfailed' ) );
 211+ $wgOut->addWikiMsg( 'openstackmanager-keypairimportfailed' );
212212 return true;
213213 }
214 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-keypairimported' ) );
 214+ $wgOut->addWikiMsg( 'openstackmanager-keypairimported' );
215215 } else if ( $wgOpenStackManagerNovaKeypairStorage == 'nova' ) {
216216 # wgOpenStackManagerNovaKeypairStorage == 'nova'
217217 # OpenStack's EC2 API doesn't yet support importing keys, use
218218 # of this option isn't currently recommended
219219 $keypair = $this->userNova->importKeypair( $formData['keyname'], $formData['key'] );
220220
221 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-keypairimportedfingerprint', $keypair->getKeyName(), $keypair->getKeyFingerprint() ) );
 221+ $wgOut->addWikiMsg( 'openstackmanager-keypairimportedfingerprint', $keypair->getKeyName(), $keypair->getKeyFingerprint() );
222222 } else {
223 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invalidkeypair' ) );
 223+ $wgOut->addWikiMsg( 'openstackmanager-invalidkeypair' );
224224 }
225225 $out = '<br />';
226226 $sk = $wgUser->getSkin();
227 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backkeylist' ), array(), array(), array() );
 227+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backkeylist' ) );
228228 $wgOut->addHTML( $out );
229229 return true;
230230 }
@@ -239,13 +239,13 @@
240240
241241 $success = $this->userLDAP->deleteKeypair( $formData['key'] );
242242 if ( $success ) {
243 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedkey' ) );
 243+ $wgOut->addWikiMsg( 'openstackmanager-deletedkey' );
244244 } else {
245 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedkeyfailed' ) );
 245+ $wgOut->addWikiMsg( 'openstackmanager-deletedkeyfailed' );
246246 }
247247 $out = '<br />';
248248 $sk = $wgUser->getSkin();
249 - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backkeylist' ), array(), array(), array() );
 249+ $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backkeylist' ) );
250250 $wgOut->addHTML( $out );
251251 return true;
252252 }
Index: trunk/extensions/OpenStackManager/special/SpecialNova.php
@@ -10,7 +10,7 @@
1111
1212 $this->setHeaders();
1313 $wgOut->setPagetitle( wfMsg( 'openstackmanager-notloggedin' ) );
14 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-mustbeloggedin' ) );
 14+ $wgOut->addWikiMsg( 'openstackmanager-mustbeloggedin' );
1515 }
1616
1717 /**
@@ -21,7 +21,7 @@
2222
2323 $this->setHeaders();
2424 $wgOut->setPagetitle( wfMsg( 'openstackmanager-nonovacred' ) );
25 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonovacred-admincreate' ) );
 25+ $wgOut->addWikiMsg( 'openstackmanager-nonovacred-admincreate' );
2626 }
2727
2828 /**
@@ -32,7 +32,7 @@
3333
3434 $this->setHeaders();
3535 $wgOut->setPagetitle( wfMsg( 'openstackmanager-noaccount' ) );
36 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-noaccount2' ) );
 36+ $wgOut->addWikiMsg( 'openstackmanager-noaccount2' );
3737 }
3838
3939 /**
@@ -45,13 +45,13 @@
4646 $this->setHeaders();
4747 if ( $role == 'sysadmin' ) {
4848 $wgOut->setPagetitle( wfMsg( 'openstackmanager-needsysadminrole' ) );
49 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-needsysadminrole2' ) );
 49+ $wgOut->addWikiMsg( 'openstackmanager-needsysadminrole2' );
5050 } else if ( $role == 'netadmin' ) {
5151 $wgOut->setPagetitle( wfMsg( 'openstackmanager-neednetadminrole' ) );
52 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-neednetadminrole2' ) );
 52+ $wgOut->addWikiMsg( 'openstackmanager-neednetadminrole2' );
5353 } else if ( $role == 'cloudadmin' ) {
5454 $wgOut->setPagetitle( wfMsg( 'openstackmanager-needcloudadminrole' ) );
55 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-needcloudadminrole2' ) );
 55+ $wgOut->addWikiMsg( 'openstackmanager-needcloudadminrole2' );
5656 }
5757 }
5858 }
Index: trunk/extensions/OpenStackManager/special/SpecialNovaRole.php
@@ -61,7 +61,7 @@
6262 }
6363 }
6464 if ( ! $member_keys ) {
65 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nomemberstoadd' ) );
 65+ $wgOut->addWikiMsg( 'openstackmanager-nomemberstoadd' );
6666 return true;
6767 }
6868 $roleInfo['members'] = array(
@@ -148,7 +148,7 @@
149149 }
150150 }
151151 if ( ! $member_keys ) {
152 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nomemberstoremove' ) );
 152+ $wgOut->addWikiMsg( 'openstackmanager-nomemberstoremove' );
153153 return true;
154154 }
155155 $roleInfo = array();
@@ -214,9 +214,9 @@
215215 $memberOut = Html::rawElement( 'ul', array(), $memberOut );
216216 }
217217 $roleOut .= Html::rawElement( 'td', array(), $memberOut );
218 - $link = $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-addrolemember' ), array(), array( 'action' => 'addmember', 'rolename' => $roleName, 'returnto' => 'Special:NovaRole' ), array() );
 218+ $link = $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-addrolemember' ), array(), array( 'action' => 'addmember', 'rolename' => $roleName, 'returnto' => 'Special:NovaRole' ) );
219219 $actions = Html::rawElement( 'li', array(), $link );
220 - $link = $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-removerolemember' ), array(), array( 'action' => 'deletemember', 'rolename' => $roleName, 'returnto' => 'Special:NovaRole' ), array() );
 220+ $link = $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-removerolemember' ), array(), array( 'action' => 'deletemember', 'rolename' => $roleName, 'returnto' => 'Special:NovaRole' ) );
221221 $actions .= Html::rawElement( 'li', array(), $link );
222222 $actions = Html::rawElement( 'ul', array(), $actions );
223223 $roleOut .= Html::rawElement( 'td', array(), $actions );
@@ -241,7 +241,7 @@
242242 if ( $projectname ) {
243243 $project = OpenStackNovaProject::getProjectByName( $projectname );
244244 if ( ! $project ) {
245 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistentproject' ) );
 245+ $wgOut->addWikiMsg( 'openstackmanager-nonexistentproject' );
246246 return true;
247247 }
248248 $role = OpenStackNovaRole::getProjectRoleByName( $formData['rolename'], $project );
@@ -251,21 +251,21 @@
252252 $members = array( $formData['members'] );
253253 }
254254 if ( ! $role ) {
255 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistentrole' ) );
 255+ $wgOut->addWikiMsg( 'openstackmanager-nonexistentrole' );
256256 return true;
257257 }
258258 foreach ( $members as $member ) {
259259 $success = $role->addMember( $member );
260260 if ( $success ) {
261 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addedto', $member, $formData['rolename'] ) );
 261+ $wgOut->addWikiMsg( 'openstackmanager-addedto', $member, $formData['rolename'] );
262262 } else {
263 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-failedtoadd', $member, $formData['rolename'] ) );
 263+ $wgOut->addWikiMsg( 'openstackmanager-failedtoadd', $member, $formData['rolename'] );
264264 }
265265 }
266266 $sk = $wgUser->getSkin();
267267 $out = '<br />';
268268 $returnto = Title::newFromText( $formData['returnto'] );
269 - $out .= $sk->link( $returnto, wfMsg( 'openstackmanager-backprojectlist' ), array(), array(), array() );
 269+ $out .= $sk->link( $returnto, wfMsgHtml( 'openstackmanager-backprojectlist' ) );
270270 $wgOut->addHTML( $out );
271271
272272 return true;
@@ -283,7 +283,7 @@
284284 if ( $projectname ) {
285285 $project = OpenStackNovaProject::getProjectByName( $projectname );
286286 if ( ! $project ) {
287 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistentproject' ) );
 287+ $wgOut->addWikiMsg( 'openstackmanager-nonexistentproject' );
288288 return true;
289289 }
290290 $role = OpenStackNovaRole::getProjectRoleByName( $formData['rolename'], $project );
@@ -291,21 +291,21 @@
292292 $role = OpenStackNovaRole::getGlobalRoleByName( $formData['rolename'] );
293293 }
294294 if ( ! $role ) {
295 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistentrole' ) );
 295+ $wgOut->addWikiMsg( 'openstackmanager-nonexistentrole' );
296296 return true;
297297 }
298298 foreach ( $formData['members'] as $member ) {
299299 $success = $role->deleteMember( $member );
300300 if ( $success ) {
301 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removedfrom', $member, $formData['rolename'] ) );
 301+ $wgOut->addWikiMsg( 'openstackmanager-removedfrom', $member, $formData['rolename'] );
302302 } else {
303 - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-failedtoremove', $member, $formData['rolename'] ) );
 303+ $wgOut->addWikiMsg( 'openstackmanager-failedtoremove', $member, $formData['rolename'] );
304304 }
305305 }
306306 $sk = $wgUser->getSkin();
307307 $out = '<br />';
308308 $returnto = Title::newFromText( $formData['returnto'] );
309 - $out .= $sk->link( $returnto, wfMsg( 'openstackmanager-backprojectlist' ), array(), array(), array() );
 309+ $out .= $sk->link( $returnto, wfMsgHtml( 'openstackmanager-backprojectlist' ) );
310310 $wgOut->addHTML( $out );
311311
312312 return true;

Status & tagging log