Index: trunk/extensions/OpenStackManager/special/SpecialNovaAddress.php |
— | — | @@ -578,7 +578,7 @@ |
579 | 579 | $domain = $formData['domain']; |
580 | 580 | $domain = OpenStackNovaDomain::getDomainByName( $domain ); |
581 | 581 | $hostbyname = OpenStackNovaHost::getHostByName( $hostname, $domain ); |
582 | | - $hostbyip = OpenStackNovaHost::getHostByIP( $ip, $domain ); |
| 582 | + $hostbyip = OpenStackNovaHost::getHostByIP( $ip ); |
583 | 583 | |
584 | 584 | if ( $hostbyname ) { |
585 | 585 | # We need to add an arecord, if the arecord doesn't already exist |
Index: trunk/extensions/OpenStackManager/special/SpecialNovaProject.php |
— | — | @@ -376,19 +376,6 @@ |
377 | 377 | return true; |
378 | 378 | } |
379 | 379 | |
380 | | - /** |
381 | | - * @param $projectname |
382 | | - * @param $alldata |
383 | | - * @return bool|string |
384 | | - */ |
385 | | - function validateProjectName( $projectname, $alldata ) { |
386 | | - if ( !preg_match( "/^[a-z][a-z0-9\-_]*$/", $projectname ) ) { |
387 | | - return Xml::element( 'span', array( 'class' => 'error' ), wfMsg( 'openstackmanager-badprojectname' ) ); |
388 | | - } else { |
389 | | - return true; |
390 | | - } |
391 | | - } |
392 | | - |
393 | 380 | } |
394 | 381 | |
395 | 382 | class SpecialNovaProjectForm extends HTMLForm { |
Index: trunk/extensions/OpenStackManager/special/SpecialNovaVolume.php |
— | — | @@ -518,20 +518,6 @@ |
519 | 519 | |
520 | 520 | return $drives; |
521 | 521 | } |
522 | | - |
523 | | - /** |
524 | | - * @param $volumename |
525 | | - * @param $alldata |
526 | | - * @return bool|string |
527 | | - */ |
528 | | - function validateVolumeName( $volumename, $alldata ) { |
529 | | - if ( ! preg_match( "/^[a-z][a-z0-9\-]*$/", $volumename ) ) { |
530 | | - return Xml::element( 'span', array( 'class' => 'error' ), wfMsg( 'openstackmanager-badvolumename' ) ); |
531 | | - } else { |
532 | | - return true; |
533 | | - } |
534 | | - } |
535 | | - |
536 | 522 | } |
537 | 523 | |
538 | 524 | class SpecialNovaVolumeForm extends HTMLForm { |
Index: trunk/extensions/OpenStackManager/special/SpecialNova.php |
— | — | @@ -57,14 +57,14 @@ |
58 | 58 | |
59 | 59 | /** |
60 | 60 | * @param $hostname |
61 | | - * @param $alldata |
62 | 61 | * @return bool|string |
63 | 62 | */ |
64 | | - function validateHostName( $hostname, $alldata ) { |
| 63 | + function validateText( $hostname, $error ) { |
65 | 64 | if ( ! preg_match( "/^[a-z][a-z0-9\-]*$/", $hostname ) ) { |
66 | | - return Xml::element( 'span', array( 'class' => 'error' ), wfMsg( 'openstackmanager-badinstancename' ) ); |
| 65 | + return Xml::element( 'span', array( 'class' => 'error' ), wfMsg( $error ) ); |
67 | 66 | } else { |
68 | 67 | return true; |
69 | 68 | } |
70 | 69 | } |
| 70 | + |
71 | 71 | } |
Index: trunk/extensions/OpenStackManager/OpenStackNovaHost.php |
— | — | @@ -420,10 +420,9 @@ |
421 | 421 | * |
422 | 422 | * @static |
423 | 423 | * @param $ip |
424 | | - * @param $domain OpenStackNovaDomain |
425 | 424 | * @return null|OpenStackNovaHost |
426 | 425 | */ |
427 | | - static function getHostByIP( $ip, $domain ) { |
| 426 | + static function getHostByIP( $ip ) { |
428 | 427 | global $wgAuth; |
429 | 428 | global $wgOpenStackManagerLDAPInstanceBaseDN; |
430 | 429 | |