Index: trunk/extensions/OpenStackManager/SpecialNovaInstance.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | function __construct() { |
9 | 9 | parent::__construct( 'NovaInstance' ); |
10 | 10 | } |
11 | | - |
| 11 | + |
12 | 12 | function execute( $par ) { |
13 | 13 | global $wgRequest, $wgUser; |
14 | 14 | global $wgOpenStackManagerNovaAdminKeys; |
— | — | @@ -73,7 +73,8 @@ |
74 | 74 | |
75 | 75 | $this->setHeaders(); |
76 | 76 | $wgOut->setPagetitle("No Nova credentials found for your account"); |
77 | | - $wgOut->addHTML('<p>There were no Nova credentials found for your user account. Please ask a Nova administrator to create credentials for you.</p>'); |
| 77 | + $wgOut->addHTML('<p>There were no Nova credentials found for your user account. ' |
| 78 | + . 'Please ask a Nova administrator to create credentials for you.</p>'); |
78 | 79 | } |
79 | 80 | |
80 | 81 | function notInProject() { |
— | — | @@ -89,7 +90,7 @@ |
90 | 91 | |
91 | 92 | $this->setHeaders(); |
92 | 93 | $wgOut->setPagetitle("Create Instance"); |
93 | | - |
| 94 | + |
94 | 95 | $project = $wgRequest->getVal('project'); |
95 | 96 | |
96 | 97 | # TODO: Add project name field |
— | — | @@ -211,20 +212,34 @@ |
212 | 213 | $projectArr["$project"] .= Html::element( 'td', array(), $instance->getInstanceState() ); |
213 | 214 | $projectArr["$project"] .= Html::element( 'td', array(), $instance->getInstanceType() ); |
214 | 215 | $projectArr["$project"] .= Html::element( 'td', array(), $instance->getImageId() ); |
215 | | - $actions = $sk->link( $this->getTitle(), 'delete', array(), array( 'action' => 'delete', 'project' => $projectname, 'instanceid' => $instance->getInstanceId() ), array() ); |
| 216 | + $actions = $sk->link( $this->getTitle(), 'delete', array(), |
| 217 | + array( 'action' => 'delete', |
| 218 | + 'project' => $projectname, |
| 219 | + 'instanceid' => $instance->getInstanceId() ), |
| 220 | + array() ); |
216 | 221 | $actions .= ', '; |
217 | | - $actions .= $sk->link( $this->getTitle(), 'rename', array(), array( 'action' => 'rename', 'project' => $projectname, 'instanceid' => $instance->getInstanceId() ), array() ); |
| 222 | + $actions .= $sk->link( $this->getTitle(), 'rename', array(), |
| 223 | + array( 'action' => 'rename', |
| 224 | + 'project' => $projectname, |
| 225 | + 'instanceid' => $instance->getInstanceId() ), |
| 226 | + array() ); |
218 | 227 | $actions .= ', '; |
219 | | - $actions .= $sk->link( $this->getTitle(), 'configure', array(), array( 'action' => 'configure', 'project' => $projectname, 'instanceid' => $instance->getInstanceId() ), array() ); |
| 228 | + $actions .= $sk->link( $this->getTitle(), 'configure', array(), |
| 229 | + array( 'action' => 'configure', |
| 230 | + 'project' => $projectname, |
| 231 | + 'instanceid' => $instance->getInstanceId() ), |
| 232 | + array() ); |
220 | 233 | $projectArr["$project"] .= Html::rawElement( 'td', array(), $actions ); |
221 | 234 | } |
222 | 235 | foreach ( $userProjects as $projectname ) { |
223 | 236 | $out .= Html::element( 'h2', array(), $projectname ); |
224 | | - $out .= $sk->link( $this->getTitle(), 'Create a new instance', array(), array( 'action' => 'create', 'project' => $projectname ), array() ); |
| 237 | + $out .= $sk->link( $this->getTitle(), 'Create a new instance', array(), |
| 238 | + array( 'action' => 'create', 'project' => $projectname ), array() ); |
225 | 239 | if ( isset( $projectArr["$projectname"] ) ) { |
226 | 240 | $projectOut = $header; |
227 | 241 | $projectOut .= Html::rawElement( 'tr', array(), $projectArr["$projectname"] ); |
228 | | - $out .= Html::rawElement( 'table', array( 'id' => 'novainstancelist', 'class' => 'wikitable' ), $projectOut ); |
| 242 | + $out .= Html::rawElement( 'table', |
| 243 | + array( 'id' => 'novainstancelist', 'class' => 'wikitable' ), $projectOut ); |
229 | 244 | } |
230 | 245 | } |
231 | 246 | |
— | — | @@ -235,9 +250,11 @@ |
236 | 251 | global $wgOut; |
237 | 252 | |
238 | 253 | #$instance = $this->userNova->createInstance( $formData['instancename'], $formData['imageType'], $formData['keypair'], $formData['instanceType'], $formData['availabilityZone'] ); |
239 | | - $instance = $this->userNova->createInstance( $formData['instancename'], $formData['imageType'], '', $formData['instanceType'], $formData['availabilityZone'] ); |
| 254 | + $instance = $this->userNova->createInstance( $formData['instancename'], $formData['imageType'], |
| 255 | + '', $formData['instanceType'], $formData['availabilityZone'] ); |
240 | 256 | |
241 | | - $out = Html::element( 'p', array(), 'Created instance ' . $instance->getInstanceID() . ' with image ' . $instance->getImageId() ); |
| 257 | + $out = Html::element( 'p', array(), 'Created instance ' . $instance->getInstanceID() . |
| 258 | + ' with image ' . $instance->getImageId() ); |
242 | 259 | $out .= $sk->link( $this->getTitle(), 'Back to instance list', array(), array(), array() ); |
243 | 260 | |
244 | 261 | $wgOut->addHTML( $out ); |
Index: trunk/extensions/OpenStackManager/OpenStackNovaUser.php |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | # roles do not |
88 | 88 | $projects = array(); |
89 | 89 | $filter = "(&(projectManager=*)(member=$this->userDN))"; |
90 | | - $result = ldap_search( $wgAuth->ldapconn, $wgOpenStackManagerLDAPProjectBaseDN, $filter ); |
| 90 | + $result = ldap_search( $wgAuth->ldapconn, $wgOpenStackManagerLDAPProjectBaseDN, $filter ); |
91 | 91 | if ( $result ) { |
92 | 92 | $entries = ldap_get_entries( $wgAuth->ldapconn, $result ); |
93 | 93 | if ( $entries ) { |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | $this->connect(); |
116 | 116 | |
117 | 117 | $filter = "(&(cn=$project)(member=$this->userDN))"; |
118 | | - $result = ldap_search( $wgAuth->ldapconn, $wgOpenStackManagerLDAPProjectBaseDN, $filter ); |
| 118 | + $result = ldap_search( $wgAuth->ldapconn, $wgOpenStackManagerLDAPProjectBaseDN, $filter ); |
119 | 119 | if ( $result ) { |
120 | 120 | $entries = ldap_get_entries( $wgAuth->ldapconn, $result ); |
121 | 121 | if ( $entries ) { |
— | — | @@ -218,7 +218,7 @@ |
219 | 219 | $filter = "(objectclass=posixaccount)"; |
220 | 220 | $base = USERDN; |
221 | 221 | } |
222 | | - $result = ldap_search( $auth->ldapconn, $auth->getBaseDN( $base ), $filter ); |
| 222 | + $result = ldap_search( $auth->ldapconn, $auth->getBaseDN( $base ), $filter ); |
223 | 223 | if ( $result ) { |
224 | 224 | $entries = ldap_get_entries( $auth->ldapconn, $result ); |
225 | 225 | if ( $entries ) { |
Index: trunk/extensions/OpenStackManager/SpecialNovaProject.php |
— | — | @@ -26,7 +26,7 @@ |
27 | 27 | # #} |
28 | 28 | # return true; |
29 | 29 | # } |
30 | | - |
| 30 | + |
31 | 31 | function execute( $par ) { |
32 | 32 | global $wgRequest, $wgUser; |
33 | 33 | |
— | — | @@ -65,7 +65,8 @@ |
66 | 66 | |
67 | 67 | $this->setHeaders(); |
68 | 68 | $wgOut->setPagetitle("No Nova credentials found for your account"); |
69 | | - $wgOut->addHTML('<p>There were no Nova credentials found for your user account. Please ask a Nova administrator to create credentials for you.</p>'); |
| 69 | + $wgOut->addHTML('<p>There were no Nova credentials found for your user account.' . |
| 70 | + 'Please ask a Nova administrator to create credentials for you.</p>'); |
70 | 71 | } |
71 | 72 | |
72 | 73 | function createProject() { |
— | — | @@ -73,7 +74,7 @@ |
74 | 75 | |
75 | 76 | $this->setHeaders(); |
76 | 77 | $wgOut->setPagetitle("Create Project"); |
77 | | - |
| 78 | + |
78 | 79 | $projectInfo = Array(); |
79 | 80 | $projectInfo['projectname'] = array( |
80 | 81 | 'type' => 'text', |
— | — | @@ -101,7 +102,7 @@ |
102 | 103 | |
103 | 104 | $this->setHeaders(); |
104 | 105 | $wgOut->setPagetitle("Add projectmember"); |
105 | | - |
| 106 | + |
106 | 107 | $project = $wgRequest->getText('projectname'); |
107 | 108 | $projectInfo = Array(); |
108 | 109 | $projectInfo['member'] = array( |
— | — | @@ -137,7 +138,8 @@ |
138 | 139 | $member = $wgRequest->getText('member'); |
139 | 140 | $project = $wgRequest->getText('projectname'); |
140 | 141 | if ( ! $wgRequest->wasPosted() ) { |
141 | | - $out .= Html::element( 'p', array(), 'Are you sure you wish to remove ' . $member . ' from project ' . $project ); |
| 142 | + $out .= Html::element( 'p', array(), 'Are you sure you wish to remove ' . |
| 143 | + $member . ' from project ' . $project ); |
142 | 144 | $wgOut->addHTML( $out ); |
143 | 145 | } |
144 | 146 | $projectInfo = Array(); |
— | — | @@ -171,7 +173,8 @@ |
172 | 174 | |
173 | 175 | $project = $wgRequest->getText('projectname'); |
174 | 176 | if ( ! $wgRequest->wasPosted() ) { |
175 | | - $out .= Html::element( 'p', array(), 'Are you sure you wish to delete project "' . $project . '"? This action has reprecusions on all VMs. Do not take this action lightly!' ); |
| 177 | + $out .= Html::element( 'p', array(), 'Are you sure you wish to delete project "' . $project . |
| 178 | + '"? This action has reprecusions on all VMs. Do not take this action lightly!' ); |
176 | 179 | $wgOut->addHTML( $out ); |
177 | 180 | } |
178 | 181 | $projectInfo = Array(); |
— | — | @@ -212,15 +215,18 @@ |
213 | 216 | $projectMembers = $project->getMembers(); |
214 | 217 | $memberOut = ''; |
215 | 218 | foreach ( $projectMembers as $projectMember ) { |
216 | | - $link = $sk->link( $this->getTitle(), 'remove member', array(), array( 'action' => 'deletemember', 'projectname' => $projectName, 'member' => $projectMember ), array() ); |
| 219 | + $link = $sk->link( $this->getTitle(), 'remove member', array(), |
| 220 | + array( 'action' => 'deletemember', 'projectname' => $projectName, 'member' => $projectMember ), array() ); |
217 | 221 | $projectMemberOut = htmlentities( $projectMember) . ' (' . $link . ')'; |
218 | 222 | $memberOut .= Html::rawElement( 'li', array(), $projectMemberOut ); |
219 | 223 | } |
220 | 224 | $memberOut .= '<br />'; |
221 | | - $memberOut .= $sk->link( $this->getTitle(), 'Add a member', array(), array( 'action' => 'addmember', 'projectname' => $projectName ), array() ); |
| 225 | + $memberOut .= $sk->link( $this->getTitle(), 'Add a member', array(), |
| 226 | + array( 'action' => 'addmember', 'projectname' => $projectName ), array() ); |
222 | 227 | $membersOut = Html::rawElement( 'ul', array(), $memberOut ); |
223 | 228 | $projectOut .= Html::rawElement( 'td', array(), $membersOut ); |
224 | | - $link = $sk->link( $this->getTitle(), 'delete project', array(), array( 'action' => 'delete', 'projectname' => $projectName ), array() ); |
| 229 | + $link = $sk->link( $this->getTitle(), 'delete project', array(), |
| 230 | + array( 'action' => 'delete', 'projectname' => $projectName ), array() ); |
225 | 231 | $projectOut .= Html::rawElement( 'td', array(), $link ); |
226 | 232 | $projectsOut .= Html::rawElement( 'tr', array(), $projectOut ); |
227 | 233 | } |
— | — | @@ -269,9 +275,11 @@ |
270 | 276 | $project = new OpenStackNovaProject( $formData['projectname'] ); |
271 | 277 | $success = $project->addMember( $formData['member'] ); |
272 | 278 | if ( $success ) { |
273 | | - $out = Html::element( 'p', array(), 'Successfully added ' . $formData['member'] . ' to ' . $formData['projectname'] ); |
| 279 | + $out = Html::element( 'p', array(), 'Successfully added ' . $formData['member'] . |
| 280 | + ' to ' . $formData['projectname'] ); |
274 | 281 | } else { |
275 | | - $out = Html::element( 'p', array(), 'Failed to add ' . $formData['member'] . ' to ' . $formData['projectname'] ); |
| 282 | + $out = Html::element( 'p', array(), 'Failed to add ' . $formData['member'] . |
| 283 | + ' to ' . $formData['projectname'] ); |
276 | 284 | } |
277 | 285 | $out .= '<br />'; |
278 | 286 | $sk = $wgUser->getSkin(); |
— | — | @@ -287,9 +295,11 @@ |
288 | 296 | $project = new OpenStackNovaProject( $formData['projectname'] ); |
289 | 297 | $success = $project->deleteMember( $formData['member'] ); |
290 | 298 | if ( $success ) { |
291 | | - $out = Html::element( 'p', array(), 'Successfully removed ' . $formData['member'] . ' from ' . $formData['projectname'] ); |
| 299 | + $out = Html::element( 'p', array(), 'Successfully removed ' . $formData['member'] . |
| 300 | + ' from ' . $formData['projectname'] ); |
292 | 301 | } else { |
293 | | - $out = Html::element( 'p', array(), 'Failed to remove ' . $formData['member'] . ' from ' . $formData['projectname'] ); |
| 302 | + $out = Html::element( 'p', array(), 'Failed to remove ' . $formData['member'] . |
| 303 | + ' from ' . $formData['projectname'] ); |
294 | 304 | } |
295 | 305 | $out .= '<br />'; |
296 | 306 | $sk = $wgUser->getSkin(); |
Index: trunk/extensions/OpenStackManager/SpecialNovaDomain.php |
— | — | @@ -39,19 +39,20 @@ |
40 | 40 | } |
41 | 41 | |
42 | 42 | function notLoggedIn() { |
43 | | - global $wgOut; |
| 43 | + global $wgOut; |
44 | 44 | |
45 | | - $this->setHeaders(); |
46 | | - $wgOut->setPagetitle("Not logged in"); |
47 | | - $wgOut->addHTML('<p>You must be logged in to perform this action</p>'); |
| 45 | + $this->setHeaders(); |
| 46 | + $wgOut->setPagetitle("Not logged in"); |
| 47 | + $wgOut->addHTML('<p>You must be logged in to perform this action</p>'); |
48 | 48 | } |
49 | 49 | |
50 | 50 | function noCredentials() { |
51 | | - global $wgOut; |
| 51 | + global $wgOut; |
52 | 52 | |
53 | | - $this->setHeaders(); |
54 | | - $wgOut->setPagetitle("No Nova credentials found for your account"); |
55 | | - $wgOut->addHTML('<p>There were no Nova credentials found for your user account. Please ask a Nova administrator to create credentials for you.</p>'); |
| 53 | + $this->setHeaders(); |
| 54 | + $wgOut->setPagetitle("No Nova credentials found for your account"); |
| 55 | + $wgOut->addHTML('<p>There were no Nova credentials found for your user account. ' . |
| 56 | + 'Please ask a Nova administrator to create credentials for you.</p>'); |
56 | 57 | } |
57 | 58 | |
58 | 59 | function createDomain() { |
— | — | @@ -59,7 +60,7 @@ |
60 | 61 | |
61 | 62 | $this->setHeaders(); |
62 | 63 | $wgOut->setPagetitle("Create Domain"); |
63 | | - |
| 64 | + |
64 | 65 | $domainInfo = Array(); |
65 | 66 | $domainInfo['domainname'] = array( |
66 | 67 | 'type' => 'text', |
— | — | @@ -97,7 +98,8 @@ |
98 | 99 | |
99 | 100 | $domainname = $wgRequest->getText('domainname'); |
100 | 101 | if ( ! $wgRequest->wasPosted() ) { |
101 | | - $out = Html::element( 'p', array(), 'Are you sure you wish to delete domain "' . $domainname . '"? This action has reprecusions on all VMs. Do not take this action lightly!' ); |
| 102 | + $out = Html::element( 'p', array(), 'Are you sure you wish to delete domain "' . $domainname . |
| 103 | + '"? This action has reprecusions on all VMs. Do not take this action lightly!' ); |
102 | 104 | $wgOut->addHTML( $out ); |
103 | 105 | } |
104 | 106 | $domainInfo = Array(); |
— | — | @@ -128,16 +130,17 @@ |
129 | 131 | $out = ''; |
130 | 132 | $sk = $wgUser->getSkin(); |
131 | 133 | $out .= $sk->link( $this->getTitle(), 'Create a new domain', array(), array( 'action' => 'create' ), array() ); |
132 | | - $domainsOut = Html::element( 'th', array(), 'Domain name' ); |
133 | | - $domainsOut .= Html::element( 'th', array(), 'FQDN' ); |
134 | | - $domainsOut .= Html::element( 'th', array(), 'Action' ); |
| 134 | + $domainsOut = Html::element( 'th', array(), 'Domain name' ); |
| 135 | + $domainsOut .= Html::element( 'th', array(), 'FQDN' ); |
| 136 | + $domainsOut .= Html::element( 'th', array(), 'Action' ); |
135 | 137 | $domains = OpenStackNovaDomain::getAllDomains(); |
136 | 138 | foreach ( $domains as $domain ) { |
137 | 139 | $domainName = $domain->getDomainName(); |
138 | 140 | $fqdn = $domain->getFullyQualifiedDomainName(); |
139 | 141 | $domainOut = Html::element( 'td', array(), $domainName ); |
140 | 142 | $domainOut .= Html::element( 'td', array(), $fqdn ); |
141 | | - $link = $sk->link( $this->getTitle(), 'delete domain', array(), array( 'action' => 'delete', 'domainname' => $domainName ), array() ); |
| 143 | + $link = $sk->link( $this->getTitle(), 'delete domain', array(), |
| 144 | + array( 'action' => 'delete', 'domainname' => $domainName ), array() ); |
142 | 145 | $domainOut .= Html::rawElement( 'td', array(), $link ); |
143 | 146 | $domainsOut .= Html::rawElement( 'tr', array(), $domainOut ); |
144 | 147 | } |
Index: trunk/extensions/OpenStackManager/SpecialNovaKey.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | } |
10 | 10 | |
11 | 11 | public function isRestricted() { |
12 | | - return true; |
| 12 | + return true; |
13 | 13 | } |
14 | 14 | |
15 | 15 | function execute( $par ) { |
— | — | @@ -49,7 +49,8 @@ |
50 | 50 | |
51 | 51 | $this->setHeaders(); |
52 | 52 | $wgOut->setPagetitle("No Nova credentials found for your account"); |
53 | | - $wgOut->addHTML('<p>There were no Nova credentials found for your user account. Please ask a Nova administrator to create credentials for you.</p>'); |
| 53 | + $wgOut->addHTML('<p>There were no Nova credentials found for your user account. ' . |
| 54 | + 'Please ask a Nova administrator to create credentials for you.</p>'); |
54 | 55 | } |
55 | 56 | |
56 | 57 | function notInProject() { |
— | — | @@ -76,7 +77,7 @@ |
77 | 78 | |
78 | 79 | $this->setHeaders(); |
79 | 80 | $wgOut->setPagetitle("Import Key"); |
80 | | - |
| 81 | + |
81 | 82 | $keyInfo = Array(); |
82 | 83 | |
83 | 84 | if ( $wgOpenStackManagerNovaKeypairStorage == 'nova' ) { |
— | — | @@ -231,7 +232,8 @@ |
232 | 233 | # of this option isn't currently recommended |
233 | 234 | $keypair = $this->userNova->importKeypair( $formData['keyname'], $formData['key'] ); |
234 | 235 | |
235 | | - $out = Html::element( 'p', array(), 'Imported keypair ' . $keypair->getKeyName() . ' with fingerprint ' . $keypair->getKeyFingerprint() ); |
| 236 | + $out = Html::element( 'p', array(), 'Imported keypair ' . $keypair->getKeyName() . |
| 237 | + ' with fingerprint ' . $keypair->getKeyFingerprint() ); |
236 | 238 | } else { |
237 | 239 | $out = Html::element( 'p', array(), 'Invalid keypair location configured' ); |
238 | 240 | } |
Index: trunk/extensions/OpenStackManager/OpenStackNovaController.php |
— | — | @@ -6,13 +6,14 @@ |
7 | 7 | var $novaConnection; |
8 | 8 | var $instances, $images, $keypairs, $availabilityZones; |
9 | 9 | |
10 | | - var $instanceTypes = array( 't1.micro', 'm1.small', 'm1.large', 'm1.xlarge', 'm2.xlarge', 'm2.2xlarge', 'm2.4xlarge', 'c1.medium', 'c1.xlarge', 'cc1.4xlarge' ); |
| 10 | + var $instanceTypes = array( 't1.micro', 'm1.small', 'm1.large', 'm1.xlarge', 'm2.xlarge', 'm2.2xlarge', |
| 11 | + 'm2.4xlarge', 'c1.medium', 'c1.xlarge', 'cc1.4xlarge' ); |
11 | 12 | |
12 | 13 | # TODO: Make disable_ssl, hostname, and resource_prefix config options |
13 | 14 | function __construct( $credentials ) { |
14 | 15 | global $wgOpenStackManagerNovaDisableSSL, $wgOpenStackManagerNovaServerName, |
15 | 16 | $wgOpenStackManagerNovaPort, $wgOpenStackManagerNovaResourcePrefix; |
16 | | - wfLoadExtensionMessages('OpenStackManager'); |
| 17 | + |
17 | 18 | $this->novaConnection = new AmazonEC2( $credentials['accessKey'], $credentials['secretKey'] ); |
18 | 19 | $this->novaConnection->disable_ssl($wgOpenStackManagerNovaDisableSSL); |
19 | 20 | $this->novaConnection->set_hostname($wgOpenStackManagerNovaServerName, $wgOpenStackManagerNovaPort); |
Index: trunk/extensions/OpenStackManager/OpenStackManager.i18n.php |
— | — | @@ -16,10 +16,10 @@ |
17 | 17 | */ |
18 | 18 | $messages['en'] = array( |
19 | 19 | #for Special:Version |
20 | | - 'openstackmanager-desc' => 'Lets users manage nova and swift', |
| 20 | + 'openstackmanager-desc' => 'Lets users manage nova and swift', |
21 | 21 | |
22 | 22 | #for Special:Gadgets |
23 | | - 'openstackmanager' => 'OpenStackManager', |
24 | | - 'openstackmanageinstance' => 'Manage Instance', |
25 | | - 'openstackmanager-title' => 'OpenStackManager', |
| 23 | + 'openstackmanager' => 'OpenStackManager', |
| 24 | + 'openstackmanageinstance' => 'Manage Instance', |
| 25 | + 'openstackmanager-title' => 'OpenStackManager', |
26 | 26 | ); |
Index: trunk/extensions/OpenStackManager/OpenStackNovaProject.php |
— | — | @@ -25,7 +25,8 @@ |
26 | 26 | global $wgOpenStackManagerLDAPProjectBaseDN; |
27 | 27 | global $wgOpenStackManagerLDAPUser, $wgOpenStackManagerLDAPUserPassword; |
28 | 28 | |
29 | | - $result = @ldap_search( $wgAuth->ldapconn, $wgOpenStackManagerLDAPProjectBaseDN, '(&(cn=' . $this->projectname . ')(projectManager=*))' ); |
| 29 | + $result = @ldap_search( $wgAuth->ldapconn, $wgOpenStackManagerLDAPProjectBaseDN, |
| 30 | + '(&(cn=' . $this->projectname . ')(projectManager=*))' ); |
30 | 31 | $this->projectInfo = @ldap_get_entries( $wgAuth->ldapconn, $result ); |
31 | 32 | $this->projectDN = $this->projectInfo[0]['dn']; |
32 | 33 | } |
Index: trunk/extensions/OpenStackManager/OpenStackNovaDomain.php |
— | — | @@ -26,7 +26,8 @@ |
27 | 27 | global $wgOpenStackManagerLDAPDNSDomainBaseDN; |
28 | 28 | global $wgOpenStackManagerLDAPUser, $wgOpenStackManagerLDAPUserPassword; |
29 | 29 | |
30 | | - $result = @ldap_search( $wgAuth->ldapconn, $wgOpenStackManagerLDAPDNSDomainBaseDN, '(dc=' . $this->domainname . ')' ); |
| 30 | + $result = @ldap_search( $wgAuth->ldapconn, $wgOpenStackManagerLDAPDNSDomainBaseDN, |
| 31 | + '(dc=' . $this->domainname . ')' ); |
31 | 32 | $this->domainInfo = @ldap_get_entries( $wgAuth->ldapconn, $result ); |
32 | 33 | $this->fqdn = $this->domainInfo[0]['associateddomain'][0]; |
33 | 34 | $this->domainDN = $this->domainInfo[0]['dn']; |
— | — | @@ -157,8 +158,9 @@ |
158 | 159 | global $wgOpenStackManagerDNSSOA; |
159 | 160 | |
160 | 161 | $serial = date( 'YmdHis' ); |
161 | | - $soa = $wgOpenStackManagerDNSSOA['hostmaster'] . ' ' . $serial . ' ' . $wgOpenStackManagerDNSSOA['refresh'] . ' ' . $wgOpenStackManagerDNSSOA['retry'] . ' |
162 | | -' . $wgOpenStackManagerDNSSOA['expiry'] . ' ' . $wgOpenStackManagerDNSSOA['minimum']; |
| 162 | + $soa = $wgOpenStackManagerDNSSOA['hostmaster'] . ' ' . $serial . ' ' . |
| 163 | + $wgOpenStackManagerDNSSOA['refresh'] . ' ' . $wgOpenStackManagerDNSSOA['retry'] . ' ' . |
| 164 | + $wgOpenStackManagerDNSSOA['expiry'] . ' ' . $wgOpenStackManagerDNSSOA['minimum']; |
163 | 165 | |
164 | 166 | return $soa; |
165 | 167 | } |