Index: trunk/extensions/OpenStackManager/special/SpecialNovaInstance.php |
— | — | @@ -262,7 +262,7 @@ |
263 | 263 | if ( $wgOpenStackManagerPuppetOptions['enabled'] ) { |
264 | 264 | $host = OpenStackNovaHost::getHostByInstanceId( $instanceid ); |
265 | 265 | if ( ! $host ) { |
266 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistenthost' ) ); |
| 266 | + $wgOut->addWikiMsg( 'openstackmanager-nonexistenthost' ); |
267 | 267 | return false; |
268 | 268 | } |
269 | 269 | $puppetinfo = $host->getPuppetConfiguration(); |
— | — | @@ -331,7 +331,7 @@ |
332 | 332 | } |
333 | 333 | $instanceid = $wgRequest->getText( 'instanceid' ); |
334 | 334 | if ( ! $wgRequest->wasPosted() ) { |
335 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deleteinstancequestion', $instanceid ) ); |
| 335 | + $wgOut->addWikiMsg( 'openstackmanager-deleteinstancequestion', $instanceid ); |
336 | 336 | } |
337 | 337 | $instanceInfo = array(); |
338 | 338 | $instanceInfo['instanceid'] = array( |
— | — | @@ -373,7 +373,7 @@ |
374 | 374 | $instanceid = $wgRequest->getText( 'instanceid' ); |
375 | 375 | $consoleOutput = $this->userNova->getConsoleOutput( $instanceid ); |
376 | 376 | $sk = $wgUser->getSkin(); |
377 | | - $out = $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backinstancelist' ), array(), array(), array() ); |
| 377 | + $out = $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backinstancelist' ) ); |
378 | 378 | $out .= Html::element( 'pre', array(), $consoleOutput ); |
379 | 379 | $wgOut->addHTML( $out ); |
380 | 380 | } |
— | — | @@ -411,7 +411,7 @@ |
412 | 412 | $instanceName = $instance->getInstanceName(); |
413 | 413 | $instanceName = htmlentities( $instanceName ); |
414 | 414 | $title = Title::newFromText( $instanceName, NS_VM ); |
415 | | - $instanceNameLink = $sk->link( $title, $instanceName, array(), array(), array() ); |
| 415 | + $instanceNameLink = $sk->link( $title, $instanceName ); |
416 | 416 | $instanceOut = Html::rawElement( 'td', array(), $instanceNameLink ); |
417 | 417 | $instanceOut .= Html::element( 'td', array(), $instance->getInstanceId() ); |
418 | 418 | $instanceOut .= Html::element( 'td', array(), $instance->getInstanceState() ); |
— | — | @@ -433,32 +433,28 @@ |
434 | 434 | $instanceOut .= Html::element( 'td', array(), $instance->getAvailabilityZone() ); |
435 | 435 | $instanceOut .= Html::element( 'td', array(), $instance->getImageId() ); |
436 | 436 | $instanceOut .= Html::element( 'td', array(), $instance->getLaunchTime() ); |
437 | | - $msg = wfMsg( 'openstackmanager-delete' ); |
| 437 | + $msg = wfMsgHtml( 'openstackmanager-delete' ); |
438 | 438 | $link = $sk->link( $this->getTitle(), $msg, array(), |
439 | 439 | array( 'action' => 'delete', |
440 | 440 | 'project' => $project, |
441 | | - 'instanceid' => $instance->getInstanceId() ), |
442 | | - array() ); |
| 441 | + 'instanceid' => $instance->getInstanceId() ) ); |
443 | 442 | $actions = Html::rawElement( 'li', array(), $link ); |
444 | | - #$msg = wfMsg( 'openstackmanager-rename' ); |
| 443 | + #$msg = wfMsgHtml( 'openstackmanager-rename' ); |
445 | 444 | #$actions .= $sk->link( $this->getTitle(), $msg, array(), |
446 | 445 | # array( 'action' => 'rename', |
447 | 446 | # 'project' => $project, |
448 | | - # 'instanceid' => $instance->getInstanceId() ), |
449 | | - # array() ); |
450 | | - $msg = wfMsg( 'openstackmanager-configure' ); |
| 447 | + # 'instanceid' => $instance->getInstanceId() ) ); |
| 448 | + $msg = wfMsgHtml( 'openstackmanager-configure' ); |
451 | 449 | $link = $sk->link( $this->getTitle(), $msg, array(), |
452 | 450 | array( 'action' => 'configure', |
453 | 451 | 'project' => $project, |
454 | | - 'instanceid' => $instance->getInstanceId() ), |
455 | | - array() ); |
| 452 | + 'instanceid' => $instance->getInstanceId() ) ); |
456 | 453 | $actions .= Html::rawElement( 'li', array(), $link ); |
457 | | - $msg = wfMsg( 'openstackmanager-getconsoleoutput' ); |
| 454 | + $msg = wfMsgHtml( 'openstackmanager-getconsoleoutput' ); |
458 | 455 | $link = $sk->link( $this->getTitle(), $msg, array(), |
459 | 456 | array( 'action' => 'consoleoutput', |
460 | 457 | 'project' => $project, |
461 | | - 'instanceid' => $instance->getInstanceId() ), |
462 | | - array() ); |
| 458 | + 'instanceid' => $instance->getInstanceId() ) ); |
463 | 459 | $actions .= Html::rawElement( 'li', array(), $link ); |
464 | 460 | $actions = Html::rawElement( 'ul', array(), $actions ); |
465 | 461 | $instanceOut .= Html::rawElement( 'td', array(), $actions ); |
— | — | @@ -470,8 +466,8 @@ |
471 | 467 | } |
472 | 468 | foreach ( $userProjects as $project ) { |
473 | 469 | $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 ) ); |
476 | 472 | if ( isset( $projectArr["$project"] ) ) { |
477 | 473 | $projectOut = $header; |
478 | 474 | $projectOut .= $projectArr["$project"]; |
— | — | @@ -494,7 +490,7 @@ |
495 | 491 | |
496 | 492 | $domain = OpenStackNovaDomain::getDomainByName( $formData['domain'] ); |
497 | 493 | if ( !$domain ) { |
498 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invaliddomain' ) ); |
| 494 | + $wgOut->addWikiMsg( 'openstackmanager-invaliddomain' ); |
499 | 495 | return true; |
500 | 496 | } |
501 | 497 | $instance = $this->userNova->createInstance( $formData['instancename'], $formData['imageType'], '', $formData['instanceType'], $formData['availabilityZone'], $formData['groups'] ); |
— | — | @@ -518,18 +514,18 @@ |
519 | 515 | $title = Title::newFromText( $wgOut->getPageTitle() ); |
520 | 516 | $job = new OpenStackNovaHostJob( $title, array( 'instanceid' => $instance->getInstanceId() ) ); |
521 | 517 | $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() ); |
523 | 519 | } else { |
524 | 520 | $this->userNova->terminateInstance( $instance->getInstanceId() ); |
525 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createfailedldap' ) ); |
| 521 | + $wgOut->addWikiMsg( 'openstackmanager-createfailedldap' ); |
526 | 522 | } |
527 | 523 | # TODO: also add puppet |
528 | 524 | } else { |
529 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createeinstancefailed' ) ); |
| 525 | + $wgOut->addWikiMsg( 'openstackmanager-createeinstancefailed' ); |
530 | 526 | } |
531 | 527 | $sk = $wgUser->getSkin(); |
532 | 528 | $out = '<br />'; |
533 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backinstancelist' ), array(), array(), array() ); |
| 529 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backinstancelist' ) ); |
534 | 530 | |
535 | 531 | $wgOut->addHTML( $out ); |
536 | 532 | return true; |
— | — | @@ -545,7 +541,7 @@ |
546 | 542 | |
547 | 543 | $instance = $this->adminNova->getInstance( $formData['instanceid'] ); |
548 | 544 | if ( ! $instance ) { |
549 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistanthost' ) ); |
| 545 | + $wgOut->addWikiMsg( 'openstackmanager-nonexistanthost' ); |
550 | 546 | return true; |
551 | 547 | } |
552 | 548 | $instancename = $instance->getInstanceName(); |
— | — | @@ -554,16 +550,16 @@ |
555 | 551 | if ( $success ) { |
556 | 552 | $success = OpenStackNovaHost::deleteHostByInstanceId( $instanceid ); |
557 | 553 | if ( $success ) { |
558 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedinstance', $instanceid ) ); |
| 554 | + $wgOut->addWikiMsg( 'openstackmanager-deletedinstance', $instanceid ); |
559 | 555 | } else { |
560 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedinstance-faileddns', $instancename, $instanceid ) ); |
| 556 | + $wgOut->addWikiMsg( 'openstackmanager-deletedinstance-faileddns', $instancename, $instanceid ); |
561 | 557 | } |
562 | 558 | } else { |
563 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deleteinstancefailed' ) ); |
| 559 | + $wgOut->addWikiMsg( 'openstackmanager-deleteinstancefailed' ); |
564 | 560 | } |
565 | 561 | $sk = $wgUser->getSkin(); |
566 | 562 | $out = '<br />'; |
567 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backinstancelist' ), array(), array(), array() ); |
| 563 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backinstancelist' ) ); |
568 | 564 | |
569 | 565 | $wgOut->addHTML( $out ); |
570 | 566 | return true; |
— | — | @@ -595,16 +591,16 @@ |
596 | 592 | } |
597 | 593 | $success = $host->modifyPuppetConfiguration( $puppetinfo ); |
598 | 594 | if ( $success ) { |
599 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-modifiedinstance' ) ); |
| 595 | + $wgOut->addWikiMsg( 'openstackmanager-modifiedinstance' ); |
600 | 596 | } else { |
601 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-modifyinstancefailed' ) ); |
| 597 | + $wgOut->addWikiMsg( 'openstackmanager-modifyinstancefailed' ); |
602 | 598 | } |
603 | 599 | } else { |
604 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistanthost' ) ); |
| 600 | + $wgOut->addWikiMsg( 'openstackmanager-nonexistanthost' ); |
605 | 601 | } |
606 | 602 | $sk = $wgUser->getSkin(); |
607 | 603 | $out = '<br /'; |
608 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backinstancelist' ), array(), array(), array() ); |
| 604 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backinstancelist' ) ); |
609 | 605 | |
610 | 606 | $wgOut->addHTML( $out ); |
611 | 607 | return true; |
Index: trunk/extensions/OpenStackManager/special/SpecialNovaSecurityGroup.php |
— | — | @@ -152,7 +152,7 @@ |
153 | 153 | } |
154 | 154 | $securitygroupname = $wgRequest->getText( 'groupname' ); |
155 | 155 | if ( ! $wgRequest->wasPosted() ) { |
156 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletesecuritygroup-confirm', $securitygroupname ) ); |
| 156 | + $wgOut->addWikiMsg( 'openstackmanager-deletesecuritygroup-confirm', $securitygroupname ); |
157 | 157 | } |
158 | 158 | $securityGroupInfo = array(); |
159 | 159 | $securityGroupInfo['groupname'] = array( |
— | — | @@ -244,7 +244,7 @@ |
245 | 245 | } else { |
246 | 246 | $ruleOut .= Html::rawElement( 'td', array(), '' ); |
247 | 247 | } |
248 | | - $msg = wfMsg( 'openstackmanager-removerule-action' ); |
| 248 | + $msg = wfMsgHtml( 'openstackmanager-removerule-action' ); |
249 | 249 | $args = array( 'action' => 'removerule', |
250 | 250 | 'project' => $project, |
251 | 251 | 'groupname' => $groupname, |
— | — | @@ -253,7 +253,7 @@ |
254 | 254 | 'protocol' => $ipprotocol, |
255 | 255 | 'ranges' => implode( ',', $ranges ), |
256 | 256 | 'groups' => implode( ',', $groupinfo ) ); |
257 | | - $link = $sk->link( $this->getTitle(), $msg, array(), $args, array() ); |
| 257 | + $link = $sk->link( $this->getTitle(), $msg, array(), $args ); |
258 | 258 | $actions = Html::rawElement( 'li', array(), $link ); |
259 | 259 | $actions = Html::rawElement( 'ul', array(), $actions ); |
260 | 260 | $ruleOut .= Html::rawElement( 'td', array(), $actions ); |
— | — | @@ -264,26 +264,23 @@ |
265 | 265 | } else { |
266 | 266 | $groupOut .= Html::rawElement( 'td', array(), '' ); |
267 | 267 | } |
268 | | - $msg = wfMsg( 'openstackmanager-delete' ); |
| 268 | + $msg = wfMsgHtml( 'openstackmanager-delete' ); |
269 | 269 | $link = $sk->link( $this->getTitle(), $msg, array(), |
270 | 270 | array( 'action' => 'delete', |
271 | 271 | 'project' => $project, |
272 | | - 'groupname' => $group->getGroupName() ), |
273 | | - array() ); |
| 272 | + 'groupname' => $group->getGroupName() ) ); |
274 | 273 | $actions = Html::rawElement( 'li', array(), $link ); |
275 | | - #$msg = wfMsg( 'openstackmanager-configure' ); |
| 274 | + #$msg = wfMsgHtml( 'openstackmanager-configure' ); |
276 | 275 | #$link = $sk->link( $this->getTitle(), $msg, array(), |
277 | 276 | # array( 'action' => 'configure', |
278 | 277 | # 'project' => $project, |
279 | | - # 'groupname' => $group->getGroupName() ), |
280 | | - # array() ); |
| 278 | + # 'groupname' => $group->getGroupName() ) ); |
281 | 279 | #$actions .= Html::rawElement( 'li', array(), $link ); |
282 | | - $msg = wfMsg( 'openstackmanager-addrule-action' ); |
| 280 | + $msg = wfMsgHtml( 'openstackmanager-addrule-action' ); |
283 | 281 | $link = $sk->link( $this->getTitle(), $msg, array(), |
284 | 282 | array( 'action' => 'addrule', |
285 | 283 | 'project' => $project, |
286 | | - 'groupname' => $group->getGroupName() ), |
287 | | - array() ); |
| 284 | + 'groupname' => $group->getGroupName() ) ); |
288 | 285 | $actions .= Html::rawElement( 'li', array(), $link ); |
289 | 286 | $actions = Html::rawElement( 'ul', array(), $actions ); |
290 | 287 | $groupOut .= Html::rawElement( 'td', array(), $actions ); |
— | — | @@ -295,8 +292,8 @@ |
296 | 293 | } |
297 | 294 | foreach ( $userProjects as $project ) { |
298 | 295 | $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 ) ); |
301 | 298 | if ( isset( $projectArr["$project"] ) ) { |
302 | 299 | $projectOut = $groupheader; |
303 | 300 | $projectOut .= $projectArr["$project"]; |
— | — | @@ -396,7 +393,7 @@ |
397 | 394 | } |
398 | 395 | $securitygroupname = $wgRequest->getText( 'groupname' ); |
399 | 396 | if ( ! $wgRequest->wasPosted() ) { |
400 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removerule-confirm', $securitygroupname ) ); |
| 397 | + $wgOut->addWikiMsg( 'openstackmanager-removerule-confirm', $securitygroupname ); |
401 | 398 | } |
402 | 399 | $securityGroupInfo = array(); |
403 | 400 | $securityGroupInfo['groupname'] = array( |
— | — | @@ -459,13 +456,13 @@ |
460 | 457 | $this->userNova = new OpenStackNovaController( $userCredentials ); |
461 | 458 | $securitygroup = $this->userNova->createSecurityGroup( $groupname, $description ); |
462 | 459 | if ( $securitygroup ) { |
463 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createdsecuritygroup' ) ); |
| 460 | + $wgOut->addWikiMsg( 'openstackmanager-createdsecuritygroup' ); |
464 | 461 | } else { |
465 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createsecuritygroupfailed' ) ); |
| 462 | + $wgOut->addWikiMsg( 'openstackmanager-createsecuritygroupfailed' ); |
466 | 463 | } |
467 | 464 | $sk = $wgUser->getSkin(); |
468 | 465 | $out = '<br />'; |
469 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backsecuritygrouplist' ), array(), array(), array() ); |
| 466 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backsecuritygrouplist' ) ); |
470 | 467 | |
471 | 468 | $wgOut->addHTML( $out ); |
472 | 469 | return true; |
— | — | @@ -484,20 +481,20 @@ |
485 | 482 | $this->userNova = new OpenStackNovaController( $userCredentials ); |
486 | 483 | $securitygroup = $this->adminNova->getSecurityGroup( $formData['groupname'] ); |
487 | 484 | if ( ! $securitygroup ) { |
488 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistantsecuritygroup' ) ); |
| 485 | + $wgOut->addWikiMsg( 'openstackmanager-nonexistantsecuritygroup' ); |
489 | 486 | return true; |
490 | 487 | } |
491 | 488 | $groupname = $securitygroup->getGroupName(); |
492 | 489 | $success = $this->userNova->deleteSecurityGroup( $groupname ); |
493 | 490 | if ( $success ) { |
494 | 491 | # TODO: Ensure group isn't being used |
495 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedsecuritygroup' ) ); |
| 492 | + $wgOut->addWikiMsg( 'openstackmanager-deletedsecuritygroup' ); |
496 | 493 | } else { |
497 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletesecuritygroupfailed' ) ); |
| 494 | + $wgOut->addWikiMsg( 'openstackmanager-deletesecuritygroupfailed' ); |
498 | 495 | } |
499 | 496 | $sk = $wgUser->getSkin(); |
500 | 497 | $out = '<br />'; |
501 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backsecuritygrouplist' ), array(), array(), array() ); |
| 498 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backsecuritygrouplist' ) ); |
502 | 499 | |
503 | 500 | $wgOut->addHTML( $out ); |
504 | 501 | return true; |
— | — | @@ -519,16 +516,16 @@ |
520 | 517 | # This isn't a supported function in the API for now. Leave this action out for now |
521 | 518 | $success = $this->userNova->modifySecurityGroup( $groupname, array( 'description' => $description ) ); |
522 | 519 | if ( $success ) { |
523 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-modifiedgroup' ) ); |
| 520 | + $wgOut->addWikiMsg( 'openstackmanager-modifiedgroup' ); |
524 | 521 | } else { |
525 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-modifygroupfailed' ) ); |
| 522 | + $wgOut->addWikiMsg( 'openstackmanager-modifygroupfailed' ); |
526 | 523 | } |
527 | 524 | } else { |
528 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistantgroup' ) ); |
| 525 | + $wgOut->addWikiMsg( 'openstackmanager-nonexistantgroup' ); |
529 | 526 | } |
530 | 527 | $sk = $wgUser->getSkin(); |
531 | 528 | $out = '<br />'; |
532 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backsecuritygrouplist' ), array(), array(), array() ); |
| 529 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backsecuritygrouplist' ) ); |
533 | 530 | |
534 | 531 | $wgOut->addHTML( $out ); |
535 | 532 | return true; |
— | — | @@ -560,20 +557,20 @@ |
561 | 558 | $this->userNova = new OpenStackNovaController( $userCredentials ); |
562 | 559 | $securitygroup = $this->adminNova->getSecurityGroup( $formData['groupname'] ); |
563 | 560 | if ( ! $securitygroup ) { |
564 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistantsecuritygroup' ) ); |
| 561 | + $wgOut->addWikiMsg( 'openstackmanager-nonexistantsecuritygroup' ); |
565 | 562 | return false; |
566 | 563 | } |
567 | 564 | $groupname = $securitygroup->getGroupName(); |
568 | 565 | $success = $this->userNova->addSecurityGroupRule( $groupname, $fromport, $toport, $protocol, $ranges, $groups ); |
569 | 566 | if ( $success ) { |
570 | 567 | # TODO: Ensure group isn't being used |
571 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addedrule' ) ); |
| 568 | + $wgOut->addWikiMsg( 'openstackmanager-addedrule' ); |
572 | 569 | } else { |
573 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addrulefailed' ) ); |
| 570 | + $wgOut->addWikiMsg( 'openstackmanager-addrulefailed' ); |
574 | 571 | } |
575 | 572 | $sk = $wgUser->getSkin(); |
576 | 573 | $out = '<br />'; |
577 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backsecuritygrouplist' ), array(), array(), array() ); |
| 574 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backsecuritygrouplist' ) ); |
578 | 575 | |
579 | 576 | $wgOut->addHTML( $out ); |
580 | 577 | return true; |
— | — | @@ -608,20 +605,20 @@ |
609 | 606 | $this->userNova = new OpenStackNovaController( $userCredentials ); |
610 | 607 | $securitygroup = $this->adminNova->getSecurityGroup( $formData['groupname'] ); |
611 | 608 | if ( ! $securitygroup ) { |
612 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistantsecuritygroup' ) ); |
| 609 | + $wgOut->addWikiMsg( 'openstackmanager-nonexistantsecuritygroup' ); |
613 | 610 | return false; |
614 | 611 | } |
615 | 612 | $groupname = $securitygroup->getGroupName(); |
616 | 613 | $success = $this->userNova->removeSecurityGroupRule( $groupname, $fromport, $toport, $protocol, $ranges, $groups ); |
617 | 614 | if ( $success ) { |
618 | 615 | # TODO: Ensure group isn't being used |
619 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removedrule' ) ); |
| 616 | + $wgOut->addWikiMsg( 'openstackmanager-removedrule' ); |
620 | 617 | } else { |
621 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removerulefailed' ) ); |
| 618 | + $wgOut->addWikiMsg( 'openstackmanager-removerulefailed' ); |
622 | 619 | } |
623 | 620 | $sk = $wgUser->getSkin(); |
624 | 621 | $out = '<br />'; |
625 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backsecuritygrouplist' ), array(), array(), array() ); |
| 622 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backsecuritygrouplist' ) ); |
626 | 623 | |
627 | 624 | $wgOut->addHTML( $out ); |
628 | 625 | return true; |
Index: trunk/extensions/OpenStackManager/special/SpecialNovaAddress.php |
— | — | @@ -61,7 +61,7 @@ |
62 | 62 | $userCredentials = $this->userLDAP->getCredentials( $project ); |
63 | 63 | $this->userNova = new OpenStackNovaController( $userCredentials ); |
64 | 64 | if ( ! $wgRequest->wasPosted() ) { |
65 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-allocateaddress-confirm', $project ) ); |
| 65 | + $wgOut->addWikiMsg( 'openstackmanager-allocateaddress-confirm', $project ); |
66 | 66 | } |
67 | 67 | $addressInfo = array(); |
68 | 68 | $addressInfo['project'] = array( |
— | — | @@ -100,7 +100,7 @@ |
101 | 101 | $this->userNova = new OpenStackNovaController( $userCredentials ); |
102 | 102 | $ip = $wgRequest->getText( 'ip' ); |
103 | 103 | if ( ! $wgRequest->wasPosted() ) { |
104 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-releaseaddress-confirm', $ip ) ); |
| 104 | + $wgOut->addWikiMsg( 'openstackmanager-releaseaddress-confirm', $ip ); |
105 | 105 | } |
106 | 106 | $addressInfo = array(); |
107 | 107 | $addressInfo['project'] = array( |
— | — | @@ -196,7 +196,7 @@ |
197 | 197 | $this->userNova = new OpenStackNovaController( $userCredentials ); |
198 | 198 | $ip = $wgRequest->getText( 'ip' ); |
199 | 199 | if ( ! $wgRequest->wasPosted() ) { |
200 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-disassociateaddress-confirm', $ip ) ); |
| 200 | + $wgOut->addWikiMsg( 'openstackmanager-disassociateaddress-confirm', $ip ); |
201 | 201 | } |
202 | 202 | $addressInfo = array(); |
203 | 203 | $addressInfo['project'] = array( |
— | — | @@ -295,7 +295,7 @@ |
296 | 296 | $domain = $wgRequest->getText( 'domain' ); |
297 | 297 | $hostname = $wgRequest->getText( 'hostname' ); |
298 | 298 | if ( ! $wgRequest->wasPosted() ) { |
299 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removehost-confirm', $hostname, $ip ) ); |
| 299 | + $wgOut->addWikiMsg( 'openstackmanager-removehost-confirm', $hostname, $ip ); |
300 | 300 | } |
301 | 301 | $addressInfo = array(); |
302 | 302 | $addressInfo['project'] = array( |
— | — | @@ -364,7 +364,7 @@ |
365 | 365 | $hosts = OpenStackNovaHost::getHostsByIP( $ip ); |
366 | 366 | if ( $hosts ) { |
367 | 367 | $hostsOut = ''; |
368 | | - $msg = wfMsg( 'openstackmanager-removehost-action' ); |
| 368 | + $msg = wfMsgHtml( 'openstackmanager-removehost-action' ); |
369 | 369 | foreach ( $hosts as $host ) { |
370 | 370 | $domain = $host->getDomain(); |
371 | 371 | $fqdns = $host->getAssociatedDomains(); |
— | — | @@ -372,7 +372,7 @@ |
373 | 373 | $hostname = explode( '.', $fqdn ); |
374 | 374 | $hostname = $hostname[0]; |
375 | 375 | $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 ) ); |
377 | 377 | $hostOut = htmlentities( $fqdn ) . ' ' . $link; |
378 | 378 | $hostsOut .= Html::rawElement( 'li', array(), $hostOut ); |
379 | 379 | } |
— | — | @@ -384,26 +384,26 @@ |
385 | 385 | } |
386 | 386 | $actions = ''; |
387 | 387 | if ( $instanceid ) { |
388 | | - $msg = wfMsg( 'openstackmanager-reassociateaddress' ); |
| 388 | + $msg = wfMsgHtml( 'openstackmanager-reassociateaddress' ); |
389 | 389 | } else { |
390 | | - $msg = wfMsg( 'openstackmanager-releaseaddress' ); |
| 390 | + $msg = wfMsgHtml( 'openstackmanager-releaseaddress' ); |
391 | 391 | $link = $sk->link( $this->getTitle(), $msg, array(), |
392 | | - array( 'action' => 'release', 'ip' => $ip, 'project' => $project ), array() ); |
| 392 | + array( 'action' => 'release', 'ip' => $ip, 'project' => $project ) ); |
393 | 393 | $actions = Html::rawElement( 'li', array(), $link ); |
394 | | - $msg = wfMsg( 'openstackmanager-associateaddress' ); |
| 394 | + $msg = wfMsgHtml( 'openstackmanager-associateaddress' ); |
395 | 395 | } |
396 | 396 | $link = $sk->link( $this->getTitle(), $msg, array(), |
397 | | - array( 'action' => 'associate', 'ip' => $ip, 'project' => $project ), array() ); |
| 397 | + array( 'action' => 'associate', 'ip' => $ip, 'project' => $project ) ); |
398 | 398 | $actions .= Html::rawElement( 'li', array(), $link ); |
399 | 399 | if ( $instanceid ) { |
400 | | - $msg = wfMsg( 'openstackmanager-disassociateaddress' ); |
| 400 | + $msg = wfMsgHtml( 'openstackmanager-disassociateaddress' ); |
401 | 401 | $link = $sk->link( $this->getTitle(), $msg, array(), |
402 | | - array( 'action' => 'disassociate', 'ip' => $ip, 'project' => $project ), array() ); |
| 402 | + array( 'action' => 'disassociate', 'ip' => $ip, 'project' => $project ) ); |
403 | 403 | $actions .= Html::rawElement( 'li', array(), $link ); |
404 | 404 | } |
405 | | - $msg = wfMsg( 'openstackmanager-addhost' ); |
| 405 | + $msg = wfMsgHtml( 'openstackmanager-addhost' ); |
406 | 406 | $link = $sk->link( $this->getTitle(), $msg, array(), |
407 | | - array( 'action' => 'addhost', 'ip' => $ip, 'project' => $project ), array() ); |
| 407 | + array( 'action' => 'addhost', 'ip' => $ip, 'project' => $project ) ); |
408 | 408 | $actions .= Html::rawElement( 'li', array(), $link ); |
409 | 409 | $actions = Html::rawElement( 'ul', array(), $actions ); |
410 | 410 | $addressOut .= Html::rawElement( 'td', array(), $actions ); |
— | — | @@ -411,7 +411,7 @@ |
412 | 412 | } |
413 | 413 | foreach ( $userProjects as $project ) { |
414 | 414 | $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 ) ); |
416 | 416 | if ( isset( $projectArr["$project"] ) ) { |
417 | 417 | $projectOut = $header; |
418 | 418 | $projectOut .= $projectArr["$project"]; |
— | — | @@ -434,14 +434,14 @@ |
435 | 435 | |
436 | 436 | $address = $this->userNova->allocateAddress(); |
437 | 437 | if ( ! $address ) { |
438 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-allocateaddressfailed' ) ); |
| 438 | + $wgOut->addWikiMsg( 'openstackmanager-allocateaddressfailed' ); |
439 | 439 | return true; |
440 | 440 | } |
441 | 441 | $ip = $address->getPublicIP(); |
442 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-allocatedaddress', $ip ) ); |
| 442 | + $wgOut->addWikiMsg( 'openstackmanager-allocatedaddress', $ip ); |
443 | 443 | $sk = $wgUser->getSkin(); |
444 | 444 | $out = '<br />'; |
445 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backaddresslist' ), array(), array(), array() ); |
| 445 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backaddresslist' ) ); |
446 | 446 | $wgOut->addHTML( $out ); |
447 | 447 | |
448 | 448 | return true; |
— | — | @@ -461,23 +461,23 @@ |
462 | 462 | # then release the address |
463 | 463 | $hosts = OpenStackNovaHost::getHostsByIP( $ip ); |
464 | 464 | if ( $hosts ) { |
465 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-cannotreleaseaddress', $ip ) ); |
| 465 | + $wgOut->addWikiMsg( 'openstackmanager-cannotreleaseaddress', $ip ); |
466 | 466 | return true; |
467 | 467 | } |
468 | 468 | $address = $this->adminNova->getAddress( $ip ); |
469 | 469 | if ( $address->getInstanceId() ) { |
470 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-cannotreleaseaddress', $ip ) ); |
| 470 | + $wgOut->addWikiMsg( 'openstackmanager-cannotreleaseaddress', $ip ); |
471 | 471 | return true; |
472 | 472 | } |
473 | 473 | $success = $this->userNova->releaseAddress( $ip ); |
474 | 474 | if ( $success ) { |
475 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-releasedaddress', $ip ) ); |
| 475 | + $wgOut->addWikiMsg( 'openstackmanager-releasedaddress', $ip ); |
476 | 476 | } else { |
477 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-releasedaddressfailed', $ip ) ); |
| 477 | + $wgOut->addWikiMsg( 'openstackmanager-releasedaddressfailed', $ip ); |
478 | 478 | } |
479 | 479 | $sk = $wgUser->getSkin(); |
480 | 480 | $out = '<br />'; |
481 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backaddresslist' ), array(), array(), array() ); |
| 481 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backaddresslist' ) ); |
482 | 482 | $wgOut->addHTML( $out ); |
483 | 483 | |
484 | 484 | return true; |
— | — | @@ -495,13 +495,13 @@ |
496 | 496 | $ip = $formData['ip']; |
497 | 497 | $address = $this->userNova->associateAddress( $instanceid, $ip ); |
498 | 498 | if ( $address ) { |
499 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-associatedaddress', $ip, $instanceid ) ); |
| 499 | + $wgOut->addWikiMsg( 'openstackmanager-associatedaddress', $ip, $instanceid ); |
500 | 500 | } else { |
501 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-associatedaddressfailed', $ip, $instanceid ) ); |
| 501 | + $wgOut->addWikiMsg( 'openstackmanager-associatedaddressfailed', $ip, $instanceid ); |
502 | 502 | } |
503 | 503 | $sk = $wgUser->getSkin(); |
504 | 504 | $out = '<br />'; |
505 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backaddresslist' ), array(), array(), array() ); |
| 505 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backaddresslist' ) ); |
506 | 506 | $wgOut->addHTML( $out ); |
507 | 507 | |
508 | 508 | return true; |
— | — | @@ -518,13 +518,13 @@ |
519 | 519 | $ip = $formData['ip']; |
520 | 520 | $address = $this->userNova->disassociateAddress( $ip ); |
521 | 521 | if ( $address ) { |
522 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-disassociatedaddress', $ip ) ); |
| 522 | + $wgOut->addWikiMsg( 'openstackmanager-disassociatedaddress', $ip ); |
523 | 523 | } else { |
524 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-disassociatedaddressfailed', $ip ) ); |
| 524 | + $wgOut->addWikiMsg( 'openstackmanager-disassociatedaddressfailed', $ip ); |
525 | 525 | } |
526 | 526 | $sk = $wgUser->getSkin(); |
527 | 527 | $out = '<br />'; |
528 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backaddresslist' ), array(), array(), array() ); |
| 528 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backaddresslist' ) ); |
529 | 529 | $wgOut->addHTML( $out ); |
530 | 530 | |
531 | 531 | return true; |
— | — | @@ -542,11 +542,11 @@ |
543 | 543 | $project = $formData['project']; |
544 | 544 | $address = $this->adminNova->getAddress( $ip ); |
545 | 545 | if ( ! $address ) { |
546 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invalidaddress', $ip ) ); |
| 546 | + $wgOut->addWikiMsg( 'openstackmanager-invalidaddress', $ip ); |
547 | 547 | return true; |
548 | 548 | } |
549 | 549 | if ( $address->getProject() != $project ) { |
550 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invalidaddressforproject', $ip ) ); |
| 550 | + $wgOut->addWikiMsg( 'openstackmanager-invalidaddressforproject', $ip ); |
551 | 551 | return true; |
552 | 552 | } |
553 | 553 | $hostname = $formData['hostname']; |
— | — | @@ -559,30 +559,30 @@ |
560 | 560 | # We need to add an arecord, if the arecord doesn't already exist |
561 | 561 | $success = $hostbyname->addARecord( $ip ); |
562 | 562 | if ( $success ) { |
563 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addedhost', $hostname, $ip ) ); |
| 563 | + $wgOut->addWikiMsg( 'openstackmanager-addedhost', $hostname, $ip ); |
564 | 564 | } else { |
565 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addhostfailed', $ip, $hostname ) ); |
| 565 | + $wgOut->addWikiMsg( 'openstackmanager-addhostfailed', $ip, $hostname ); |
566 | 566 | } |
567 | 567 | } else if ( $hostbyip ) { |
568 | 568 | # We need to add an associateddomain, if the associateddomain doesn't already exist |
569 | 569 | $success = $hostbyip->addAssociatedDomain( $hostname . '.' . $domain->getFullyQualifiedDomainName() ); |
570 | 570 | if ( $success ) { |
571 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addedhost', $hostname, $ip ) ); |
| 571 | + $wgOut->addWikiMsg( 'openstackmanager-addedhost', $hostname, $ip ); |
572 | 572 | } else { |
573 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addhostfailed', $ip, $hostname ) ); |
| 573 | + $wgOut->addWikiMsg( 'openstackmanager-addhostfailed', $ip, $hostname ); |
574 | 574 | } |
575 | 575 | } else { |
576 | 576 | # This is a new host entry |
577 | 577 | $host = OpenStackNovaHost::addPublicHost( $hostname, $ip, $domain ); |
578 | 578 | if ( $host ) { |
579 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addedhost', $hostname, $ip ) ); |
| 579 | + $wgOut->addWikiMsg( 'openstackmanager-addedhost', $hostname, $ip ); |
580 | 580 | } else { |
581 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addhostfailed', $ip, $hostname ) ); |
| 581 | + $wgOut->addWikiMsg( 'openstackmanager-addhostfailed', $ip, $hostname ); |
582 | 582 | } |
583 | 583 | } |
584 | 584 | $sk = $wgUser->getSkin(); |
585 | 585 | $out = '<br />'; |
586 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backaddresslist' ), array(), array(), array() ); |
| 586 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backaddresslist' ) ); |
587 | 587 | $wgOut->addHTML( $out ); |
588 | 588 | return true; |
589 | 589 | } |
— | — | @@ -599,11 +599,11 @@ |
600 | 600 | $project = $formData['project']; |
601 | 601 | $address = $this->adminNova->getAddress( $ip ); |
602 | 602 | if ( ! $address ) { |
603 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invalidaddress', $ip ) ); |
| 603 | + $wgOut->addWikiMsg( 'openstackmanager-invalidaddress', $ip ); |
604 | 604 | return true; |
605 | 605 | } |
606 | 606 | if ( $address->getProject() != $project ) { |
607 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invalidaddressforproject', $ip ) ); |
| 607 | + $wgOut->addWikiMsg( 'openstackmanager-invalidaddressforproject', $ip ); |
608 | 608 | return true; |
609 | 609 | } |
610 | 610 | $hostname = $formData['hostname']; |
— | — | @@ -617,25 +617,25 @@ |
618 | 618 | # We need to keep the host, but remove the fqdn |
619 | 619 | $success = $host->deleteAssociatedDomain( $fqdn ); |
620 | 620 | if ( $success ) { |
621 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removedhost', $hostname, $ip ) ); |
| 621 | + $wgOut->addWikiMsg( 'openstackmanager-removedhost', $hostname, $ip ); |
622 | 622 | } else { |
623 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removehostfailed', $ip, $hostname ) ); |
| 623 | + $wgOut->addWikiMsg( 'openstackmanager-removehostfailed', $ip, $hostname ); |
624 | 624 | } |
625 | 625 | } else { |
626 | 626 | # We need to remove the host entry |
627 | 627 | $success = OpenStackNovaHost::deleteHost( $hostname, $domain ); |
628 | 628 | if ( $success ) { |
629 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removedhost', $hostname, $ip ) ); |
| 629 | + $wgOut->addWikiMsg( 'openstackmanager-removedhost', $hostname, $ip ); |
630 | 630 | } else { |
631 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removehostfailed', $ip, $hostname ) ); |
| 631 | + $wgOut->addWikiMsg( 'openstackmanager-removehostfailed', $ip, $hostname ); |
632 | 632 | } |
633 | 633 | } |
634 | 634 | } else { |
635 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistenthost' ) ); |
| 635 | + $wgOut->addWikiMsg( 'openstackmanager-nonexistenthost' ); |
636 | 636 | } |
637 | 637 | $out = '<br />'; |
638 | 638 | $sk = $wgUser->getSkin(); |
639 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backaddresslist' ), array(), array(), array() ); |
| 639 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backaddresslist' ) ); |
640 | 640 | $wgOut->addHTML( $out ); |
641 | 641 | return true; |
642 | 642 | } |
Index: trunk/extensions/OpenStackManager/special/SpecialNovaProject.php |
— | — | @@ -175,7 +175,7 @@ |
176 | 176 | |
177 | 177 | $project = $wgRequest->getText( 'projectname' ); |
178 | 178 | if ( ! $wgRequest->wasPosted() ) { |
179 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removeprojectconfirm', $project ) ); |
| 179 | + $wgOut->addWikiMsg( 'openstackmanager-removeprojectconfirm', $project ); |
180 | 180 | } |
181 | 181 | $projectInfo = array(); |
182 | 182 | $projectInfo['projectname'] = array( |
— | — | @@ -206,7 +206,7 @@ |
207 | 207 | |
208 | 208 | $out = ''; |
209 | 209 | $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' ) ); |
211 | 211 | $projectsOut = Html::element( 'th', array(), wfMsg( 'openstackmanager-projectname' ) ); |
212 | 212 | $projectsOut .= Html::element( 'th', array(), wfMsg( 'openstackmanager-members' ) ); |
213 | 213 | $projectsOut .= Html::element( 'th', array(), wfMsg( 'openstackmanager-roles' ) ); |
— | — | @@ -239,11 +239,11 @@ |
240 | 240 | } |
241 | 241 | $roleMembers = Html::rawElement( 'ul', array(), $roleMembers ); |
242 | 242 | $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' ) ); |
245 | 245 | $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' ) ); |
248 | 248 | $actions .= Html::rawElement( 'li', array(), $link ); |
249 | 249 | $actions = Html::rawElement( 'ul', array(), $actions ); |
250 | 250 | $roleOut .= Html::rawElement( 'td', array(), $actions ); |
— | — | @@ -251,14 +251,14 @@ |
252 | 252 | } |
253 | 253 | $rolesOut = Html::rawElement( 'table', array( 'class' => 'wikitable' ), $rolesOut ); |
254 | 254 | $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 ) ); |
257 | 257 | $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 ) ); |
260 | 260 | $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 ) ); |
263 | 263 | $actions .= Html::rawElement( 'li', array(), $link ); |
264 | 264 | $actions = Html::rawElement( 'ul', array(), $actions ); |
265 | 265 | $projectOut .= Html::rawElement( 'td', array(), $actions ); |
— | — | @@ -281,13 +281,13 @@ |
282 | 282 | |
283 | 283 | $success = OpenStackNovaProject::createProject( $formData['projectname'] ); |
284 | 284 | if ( ! $success ) { |
285 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createprojectfailed' ) ); |
| 285 | + $wgOut->addWikiMsg( 'openstackmanager-createprojectfailed' ); |
286 | 286 | return true; |
287 | 287 | } |
288 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createdproject' ) ); |
| 288 | + $wgOut->addWikiMsg( 'openstackmanager-createdproject' ); |
289 | 289 | $sk = $wgUser->getSkin(); |
290 | 290 | $out = '<br />'; |
291 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backprojectlist' ), array(), array(), array() ); |
| 291 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backprojectlist' ) ); |
292 | 292 | $wgOut->addHTML( $out ); |
293 | 293 | |
294 | 294 | return true; |
— | — | @@ -303,13 +303,13 @@ |
304 | 304 | |
305 | 305 | $success = OpenStackNovaProject::deleteProject( $formData['projectname'] ); |
306 | 306 | if ( $success ) { |
307 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedproject' ) ); |
| 307 | + $wgOut->addWikiMsg( 'openstackmanager-deletedproject' ); |
308 | 308 | } else { |
309 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deleteprojectfailed' ) ); |
| 309 | + $wgOut->addWikiMsg( 'openstackmanager-deleteprojectfailed' ); |
310 | 310 | } |
311 | 311 | $sk = $wgUser->getSkin(); |
312 | 312 | $out = '<br />'; |
313 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backprojectlist' ), array(), array(), array() ); |
| 313 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backprojectlist' ) ); |
314 | 314 | $wgOut->addHTML( $out ); |
315 | 315 | |
316 | 316 | return true; |
— | — | @@ -326,13 +326,13 @@ |
327 | 327 | $project = new OpenStackNovaProject( $formData['projectname'] ); |
328 | 328 | $success = $project->addMember( $formData['member'] ); |
329 | 329 | if ( $success ) { |
330 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addedto', $formData['member'], $formData['projectname'] ) ); |
| 330 | + $wgOut->addWikiMsg( 'openstackmanager-addedto', $formData['member'], $formData['projectname'] ); |
331 | 331 | } else { |
332 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-failedtoadd', $formData['member'], $formData['projectname'] ) ); |
| 332 | + $wgOut->addWikiMsg( 'openstackmanager-failedtoadd', $formData['member'], $formData['projectname'] ); |
333 | 333 | } |
334 | 334 | $sk = $wgUser->getSkin(); |
335 | 335 | $out = '<br />'; |
336 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backprojectlist' ), array(), array(), array() ); |
| 336 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backprojectlist' ) ); |
337 | 337 | $wgOut->addHTML( $out ); |
338 | 338 | |
339 | 339 | return true; |
— | — | @@ -348,20 +348,20 @@ |
349 | 349 | |
350 | 350 | $project = OpenStackNovaProject::getProjectByName( $formData['projectname'] ); |
351 | 351 | if ( ! $project ) { |
352 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistentproject' ) ); |
| 352 | + $wgOut->addWikiMsg( 'openstackmanager-nonexistentproject' ); |
353 | 353 | return true; |
354 | 354 | } |
355 | 355 | foreach ( $formData['members'] as $member ) { |
356 | 356 | $success = $project->deleteMember( $member ); |
357 | 357 | if ( $success ) { |
358 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removedfrom', $member, $formData['projectname'] ) ); |
| 358 | + $wgOut->addWikiMsg( 'openstackmanager-removedfrom', $member, $formData['projectname'] ); |
359 | 359 | } else { |
360 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-failedtoremove', $member, $formData['projectname'] ) ); |
| 360 | + $wgOut->addWikiMsg( 'openstackmanager-failedtoremove', $member, $formData['projectname'] ); |
361 | 361 | } |
362 | 362 | } |
363 | 363 | $out = '<br />'; |
364 | 364 | $sk = $wgUser->getSkin(); |
365 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backprojectlist' ), array(), array(), array() ); |
| 365 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backprojectlist' ) ); |
366 | 366 | $wgOut->addHTML( $out ); |
367 | 367 | |
368 | 368 | return true; |
Index: trunk/extensions/OpenStackManager/special/SpecialNovaDomain.php |
— | — | @@ -106,7 +106,7 @@ |
107 | 107 | |
108 | 108 | $domainname = $wgRequest->getText( 'domainname' ); |
109 | 109 | if ( ! $wgRequest->wasPosted() ) { |
110 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedomain-confirm', $domainname ) ); |
| 110 | + $wgOut->addWikiMsg( 'openstackmanager-deletedomain-confirm', $domainname ); |
111 | 111 | } |
112 | 112 | $domainInfo = array(); |
113 | 113 | $domainInfo['domainname'] = array( |
— | — | @@ -137,7 +137,7 @@ |
138 | 138 | |
139 | 139 | $out = ''; |
140 | 140 | $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' ) ); |
142 | 142 | $domainsOut = Html::element( 'th', array(), wfMsg( 'openstackmanager-domainname' ) ); |
143 | 143 | $domainsOut .= Html::element( 'th', array(), wfMsg( 'openstackmanager-fqdn' ) ); |
144 | 144 | $domainsOut .= Html::element( 'th', array(), wfMsg( 'openstackmanager-location' ) ); |
— | — | @@ -150,9 +150,9 @@ |
151 | 151 | $domainOut = Html::element( 'td', array(), $domainName ); |
152 | 152 | $domainOut .= Html::element( 'td', array(), $fqdn ); |
153 | 153 | $domainOut .= Html::element( 'td', array(), $location ); |
154 | | - $msg = wfMsg( 'openstackmanager-delete' ); |
| 154 | + $msg = wfMsgHtml( 'openstackmanager-delete' ); |
155 | 155 | $link = $sk->link( $this->getTitle(), $msg, array(), |
156 | | - array( 'action' => 'delete', 'domainname' => $domainName ), array() ); |
| 156 | + array( 'action' => 'delete', 'domainname' => $domainName ) ); |
157 | 157 | $domainOut .= Html::rawElement( 'td', array(), $link ); |
158 | 158 | $domainsOut .= Html::rawElement( 'tr', array(), $domainOut ); |
159 | 159 | } |
— | — | @@ -173,13 +173,13 @@ |
174 | 174 | |
175 | 175 | $success = OpenStackNovaDomain::createDomain( $formData['domainname'], $formData['fqdn'], $formData['location'] ); |
176 | 176 | if ( ! $success ) { |
177 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createdomainfailed' ) ); |
| 177 | + $wgOut->addWikiMsg( 'openstackmanager-createdomainfailed' ); |
178 | 178 | return true; |
179 | 179 | } |
180 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createddomain' ) ); |
| 180 | + $wgOut->addWikiMsg( 'openstackmanager-createddomain' ); |
181 | 181 | $sk = $wgUser->getSkin(); |
182 | 182 | $out = '<br />'; |
183 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backdomainlist' ), array(), array(), array() ); |
| 183 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backdomainlist' ) ); |
184 | 184 | $wgOut->addHTML( $out ); |
185 | 185 | |
186 | 186 | return true; |
— | — | @@ -195,13 +195,13 @@ |
196 | 196 | |
197 | 197 | $success = OpenStackNovaDomain::deleteDomain( $formData['domainname'] ); |
198 | 198 | if ( $success ) { |
199 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deleteddomain' ) ); |
| 199 | + $wgOut->addWikiMsg( 'openstackmanager-deleteddomain' ); |
200 | 200 | } else { |
201 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-failedeleteddomain' ) ); |
| 201 | + $wgOut->addWikiMsg( 'openstackmanager-failedeleteddomain' ); |
202 | 202 | } |
203 | 203 | $sk = $wgUser->getSkin(); |
204 | 204 | $out = '<br />'; |
205 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backdomainlist' ), array(), array(), array() ); |
| 205 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backdomainlist' ) ); |
206 | 206 | $wgOut->addHTML( $out ); |
207 | 207 | |
208 | 208 | return true; |
Index: trunk/extensions/OpenStackManager/special/SpecialNovaKey.php |
— | — | @@ -121,7 +121,7 @@ |
122 | 122 | $keypairs = $this->userLDAP->getKeypairs(); |
123 | 123 | if ( ! $wgRequest->wasPosted() ) { |
124 | 124 | $wgOut->addHTML( Html::element( 'pre', array(), $keypairs[$hash] ) ); |
125 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletekeyconfirm' ) ); |
| 125 | + $wgOut->addWikiMsg( 'openstackmanager-deletekeyconfirm' ); |
126 | 126 | } |
127 | 127 | $keyInfo['hash'] = array( |
128 | 128 | 'type' => 'hidden', |
— | — | @@ -157,7 +157,7 @@ |
158 | 158 | $out = ''; |
159 | 159 | $sk = $wgUser->getSkin(); |
160 | 160 | 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' ) ); |
162 | 162 | $projects = $this->userLDAP->getProjects(); |
163 | 163 | foreach ( $projects as $project ) { |
164 | 164 | $userCredentials = $this->userLDAP->getCredentials( $project ); |
— | — | @@ -177,19 +177,19 @@ |
178 | 178 | $out .= Html::rawElement( 'table', array( 'id' => 'novakeylist', 'class' => 'wikitable' ), $projectOut ); |
179 | 179 | } |
180 | 180 | } 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' ) ); |
182 | 182 | $keypairs = $this->userLDAP->getKeypairs(); |
183 | 183 | $keysOut = ''; |
184 | 184 | foreach ( $keypairs as $hash => $key ) { |
185 | 185 | $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 ) ); |
188 | 188 | $keyOut .= Html::rawElement( 'td', array(), $link ); |
189 | 189 | $keysOut .= Html::rawElement( 'tr', array(), $keyOut ); |
190 | 190 | } |
191 | 191 | $out .= Html::rawElement( 'table', array(), $keysOut ); |
192 | 192 | } else { |
193 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invalidkeypair' ) ); |
| 193 | + $wgOut->addWikiMsg( 'openstackmanager-invalidkeypair' ); |
194 | 194 | } |
195 | 195 | |
196 | 196 | $wgOut->addHTML( $out ); |
— | — | @@ -207,23 +207,23 @@ |
208 | 208 | if ( $wgOpenStackManagerNovaKeypairStorage == 'ldap' ) { |
209 | 209 | $success = $this->userLDAP->importKeypair( $formData['key'] ); |
210 | 210 | if ( ! $success ) { |
211 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-keypairimportfailed' ) ); |
| 211 | + $wgOut->addWikiMsg( 'openstackmanager-keypairimportfailed' ); |
212 | 212 | return true; |
213 | 213 | } |
214 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-keypairimported' ) ); |
| 214 | + $wgOut->addWikiMsg( 'openstackmanager-keypairimported' ); |
215 | 215 | } else if ( $wgOpenStackManagerNovaKeypairStorage == 'nova' ) { |
216 | 216 | # wgOpenStackManagerNovaKeypairStorage == 'nova' |
217 | 217 | # OpenStack's EC2 API doesn't yet support importing keys, use |
218 | 218 | # of this option isn't currently recommended |
219 | 219 | $keypair = $this->userNova->importKeypair( $formData['keyname'], $formData['key'] ); |
220 | 220 | |
221 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-keypairimportedfingerprint', $keypair->getKeyName(), $keypair->getKeyFingerprint() ) ); |
| 221 | + $wgOut->addWikiMsg( 'openstackmanager-keypairimportedfingerprint', $keypair->getKeyName(), $keypair->getKeyFingerprint() ); |
222 | 222 | } else { |
223 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invalidkeypair' ) ); |
| 223 | + $wgOut->addWikiMsg( 'openstackmanager-invalidkeypair' ); |
224 | 224 | } |
225 | 225 | $out = '<br />'; |
226 | 226 | $sk = $wgUser->getSkin(); |
227 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backkeylist' ), array(), array(), array() ); |
| 227 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backkeylist' ) ); |
228 | 228 | $wgOut->addHTML( $out ); |
229 | 229 | return true; |
230 | 230 | } |
— | — | @@ -239,13 +239,13 @@ |
240 | 240 | |
241 | 241 | $success = $this->userLDAP->deleteKeypair( $formData['key'] ); |
242 | 242 | if ( $success ) { |
243 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedkey' ) ); |
| 243 | + $wgOut->addWikiMsg( 'openstackmanager-deletedkey' ); |
244 | 244 | } else { |
245 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedkeyfailed' ) ); |
| 245 | + $wgOut->addWikiMsg( 'openstackmanager-deletedkeyfailed' ); |
246 | 246 | } |
247 | 247 | $out = '<br />'; |
248 | 248 | $sk = $wgUser->getSkin(); |
249 | | - $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backkeylist' ), array(), array(), array() ); |
| 249 | + $out .= $sk->link( $this->getTitle(), wfMsgHtml( 'openstackmanager-backkeylist' ) ); |
250 | 250 | $wgOut->addHTML( $out ); |
251 | 251 | return true; |
252 | 252 | } |
Index: trunk/extensions/OpenStackManager/special/SpecialNova.php |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | |
12 | 12 | $this->setHeaders(); |
13 | 13 | $wgOut->setPagetitle( wfMsg( 'openstackmanager-notloggedin' ) ); |
14 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-mustbeloggedin' ) ); |
| 14 | + $wgOut->addWikiMsg( 'openstackmanager-mustbeloggedin' ); |
15 | 15 | } |
16 | 16 | |
17 | 17 | /** |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | |
23 | 23 | $this->setHeaders(); |
24 | 24 | $wgOut->setPagetitle( wfMsg( 'openstackmanager-nonovacred' ) ); |
25 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonovacred-admincreate' ) ); |
| 25 | + $wgOut->addWikiMsg( 'openstackmanager-nonovacred-admincreate' ); |
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
— | — | @@ -32,7 +32,7 @@ |
33 | 33 | |
34 | 34 | $this->setHeaders(); |
35 | 35 | $wgOut->setPagetitle( wfMsg( 'openstackmanager-noaccount' ) ); |
36 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-noaccount2' ) ); |
| 36 | + $wgOut->addWikiMsg( 'openstackmanager-noaccount2' ); |
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
— | — | @@ -45,13 +45,13 @@ |
46 | 46 | $this->setHeaders(); |
47 | 47 | if ( $role == 'sysadmin' ) { |
48 | 48 | $wgOut->setPagetitle( wfMsg( 'openstackmanager-needsysadminrole' ) ); |
49 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-needsysadminrole2' ) ); |
| 49 | + $wgOut->addWikiMsg( 'openstackmanager-needsysadminrole2' ); |
50 | 50 | } else if ( $role == 'netadmin' ) { |
51 | 51 | $wgOut->setPagetitle( wfMsg( 'openstackmanager-neednetadminrole' ) ); |
52 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-neednetadminrole2' ) ); |
| 52 | + $wgOut->addWikiMsg( 'openstackmanager-neednetadminrole2' ); |
53 | 53 | } else if ( $role == 'cloudadmin' ) { |
54 | 54 | $wgOut->setPagetitle( wfMsg( 'openstackmanager-needcloudadminrole' ) ); |
55 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-needcloudadminrole2' ) ); |
| 55 | + $wgOut->addWikiMsg( 'openstackmanager-needcloudadminrole2' ); |
56 | 56 | } |
57 | 57 | } |
58 | 58 | } |
Index: trunk/extensions/OpenStackManager/special/SpecialNovaRole.php |
— | — | @@ -61,7 +61,7 @@ |
62 | 62 | } |
63 | 63 | } |
64 | 64 | if ( ! $member_keys ) { |
65 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nomemberstoadd' ) ); |
| 65 | + $wgOut->addWikiMsg( 'openstackmanager-nomemberstoadd' ); |
66 | 66 | return true; |
67 | 67 | } |
68 | 68 | $roleInfo['members'] = array( |
— | — | @@ -148,7 +148,7 @@ |
149 | 149 | } |
150 | 150 | } |
151 | 151 | if ( ! $member_keys ) { |
152 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nomemberstoremove' ) ); |
| 152 | + $wgOut->addWikiMsg( 'openstackmanager-nomemberstoremove' ); |
153 | 153 | return true; |
154 | 154 | } |
155 | 155 | $roleInfo = array(); |
— | — | @@ -214,9 +214,9 @@ |
215 | 215 | $memberOut = Html::rawElement( 'ul', array(), $memberOut ); |
216 | 216 | } |
217 | 217 | $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' ) ); |
219 | 219 | $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' ) ); |
221 | 221 | $actions .= Html::rawElement( 'li', array(), $link ); |
222 | 222 | $actions = Html::rawElement( 'ul', array(), $actions ); |
223 | 223 | $roleOut .= Html::rawElement( 'td', array(), $actions ); |
— | — | @@ -241,7 +241,7 @@ |
242 | 242 | if ( $projectname ) { |
243 | 243 | $project = OpenStackNovaProject::getProjectByName( $projectname ); |
244 | 244 | if ( ! $project ) { |
245 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistentproject' ) ); |
| 245 | + $wgOut->addWikiMsg( 'openstackmanager-nonexistentproject' ); |
246 | 246 | return true; |
247 | 247 | } |
248 | 248 | $role = OpenStackNovaRole::getProjectRoleByName( $formData['rolename'], $project ); |
— | — | @@ -251,21 +251,21 @@ |
252 | 252 | $members = array( $formData['members'] ); |
253 | 253 | } |
254 | 254 | if ( ! $role ) { |
255 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistentrole' ) ); |
| 255 | + $wgOut->addWikiMsg( 'openstackmanager-nonexistentrole' ); |
256 | 256 | return true; |
257 | 257 | } |
258 | 258 | foreach ( $members as $member ) { |
259 | 259 | $success = $role->addMember( $member ); |
260 | 260 | if ( $success ) { |
261 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addedto', $member, $formData['rolename'] ) ); |
| 261 | + $wgOut->addWikiMsg( 'openstackmanager-addedto', $member, $formData['rolename'] ); |
262 | 262 | } else { |
263 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-failedtoadd', $member, $formData['rolename'] ) ); |
| 263 | + $wgOut->addWikiMsg( 'openstackmanager-failedtoadd', $member, $formData['rolename'] ); |
264 | 264 | } |
265 | 265 | } |
266 | 266 | $sk = $wgUser->getSkin(); |
267 | 267 | $out = '<br />'; |
268 | 268 | $returnto = Title::newFromText( $formData['returnto'] ); |
269 | | - $out .= $sk->link( $returnto, wfMsg( 'openstackmanager-backprojectlist' ), array(), array(), array() ); |
| 269 | + $out .= $sk->link( $returnto, wfMsgHtml( 'openstackmanager-backprojectlist' ) ); |
270 | 270 | $wgOut->addHTML( $out ); |
271 | 271 | |
272 | 272 | return true; |
— | — | @@ -283,7 +283,7 @@ |
284 | 284 | if ( $projectname ) { |
285 | 285 | $project = OpenStackNovaProject::getProjectByName( $projectname ); |
286 | 286 | if ( ! $project ) { |
287 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistentproject' ) ); |
| 287 | + $wgOut->addWikiMsg( 'openstackmanager-nonexistentproject' ); |
288 | 288 | return true; |
289 | 289 | } |
290 | 290 | $role = OpenStackNovaRole::getProjectRoleByName( $formData['rolename'], $project ); |
— | — | @@ -291,21 +291,21 @@ |
292 | 292 | $role = OpenStackNovaRole::getGlobalRoleByName( $formData['rolename'] ); |
293 | 293 | } |
294 | 294 | if ( ! $role ) { |
295 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistentrole' ) ); |
| 295 | + $wgOut->addWikiMsg( 'openstackmanager-nonexistentrole' ); |
296 | 296 | return true; |
297 | 297 | } |
298 | 298 | foreach ( $formData['members'] as $member ) { |
299 | 299 | $success = $role->deleteMember( $member ); |
300 | 300 | if ( $success ) { |
301 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removedfrom', $member, $formData['rolename'] ) ); |
| 301 | + $wgOut->addWikiMsg( 'openstackmanager-removedfrom', $member, $formData['rolename'] ); |
302 | 302 | } else { |
303 | | - $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-failedtoremove', $member, $formData['rolename'] ) ); |
| 303 | + $wgOut->addWikiMsg( 'openstackmanager-failedtoremove', $member, $formData['rolename'] ); |
304 | 304 | } |
305 | 305 | } |
306 | 306 | $sk = $wgUser->getSkin(); |
307 | 307 | $out = '<br />'; |
308 | 308 | $returnto = Title::newFromText( $formData['returnto'] ); |
309 | | - $out .= $sk->link( $returnto, wfMsg( 'openstackmanager-backprojectlist' ), array(), array(), array() ); |
| 309 | + $out .= $sk->link( $returnto, wfMsgHtml( 'openstackmanager-backprojectlist' ) ); |
310 | 310 | $wgOut->addHTML( $out ); |
311 | 311 | |
312 | 312 | return true; |