Index: trunk/extensions/OpenStackManager/special/SpecialNovaInstance.php |
— | — | @@ -700,20 +700,6 @@ |
701 | 701 | $wgOut->addHTML( $out ); |
702 | 702 | return true; |
703 | 703 | } |
704 | | - |
705 | | - /** |
706 | | - * @param $instancename |
707 | | - * @param $alldata |
708 | | - * @return bool|string |
709 | | - */ |
710 | | - function validateInstanceName( $instancename, $alldata ) { |
711 | | - if ( ! preg_match( "/^[a-z][a-z0-9\-]*$/", $instancename ) ) { |
712 | | - return Xml::element( 'span', array( 'class' => 'error' ), wfMsg( 'openstackmanager-badinstancename' ) ); |
713 | | - } else { |
714 | | - return true; |
715 | | - } |
716 | | - } |
717 | | - |
718 | 704 | } |
719 | 705 | |
720 | 706 | class SpecialNovaInstanceForm extends HTMLForm { |
Index: trunk/extensions/OpenStackManager/special/SpecialNovaAddress.php |
— | — | @@ -664,19 +664,6 @@ |
665 | 665 | $wgOut->addHTML( $out ); |
666 | 666 | return true; |
667 | 667 | } |
668 | | - |
669 | | - /** |
670 | | - * @param $hostname |
671 | | - * @param $alldata |
672 | | - * @return bool|string |
673 | | - */ |
674 | | - function validateHostName( $hostname, $alldata ) { |
675 | | - if ( ! preg_match( "/^[a-z][a-z0-9\-]*$/", $hostname ) ) { |
676 | | - return Xml::element( 'span', array( 'class' => 'error' ), wfMsg( 'openstackmanager-badinstancename' ) ); |
677 | | - } else { |
678 | | - return true; |
679 | | - } |
680 | | - } |
681 | 668 | } |
682 | 669 | |
683 | 670 | class SpecialNovaAddressForm extends HTMLForm { |
Index: trunk/extensions/OpenStackManager/special/SpecialNova.php |
— | — | @@ -54,4 +54,17 @@ |
55 | 55 | $wgOut->addWikiMsg( 'openstackmanager-needcloudadminrole2' ); |
56 | 56 | } |
57 | 57 | } |
| 58 | + |
| 59 | + /** |
| 60 | + * @param $hostname |
| 61 | + * @param $alldata |
| 62 | + * @return bool|string |
| 63 | + */ |
| 64 | + function validateHostName( $hostname, $alldata ) { |
| 65 | + if ( ! preg_match( "/^[a-z][a-z0-9\-]*$/", $hostname ) ) { |
| 66 | + return Xml::element( 'span', array( 'class' => 'error' ), wfMsg( 'openstackmanager-badinstancename' ) ); |
| 67 | + } else { |
| 68 | + return true; |
| 69 | + } |
| 70 | + } |
58 | 71 | } |