r107209 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107208‎ | r107209 | r107210 >
Date:16:15, 24 December 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Fix spaces to tabs


Remove some unused variables
Modified paths:
  • /trunk/extensions/OpenStackManager/OpenStackNovaArticle.php (modified) (history)
  • /trunk/extensions/OpenStackManager/OpenStackNovaController.php (modified) (history)
  • /trunk/extensions/OpenStackManager/OpenStackNovaLdapConnection.php (modified) (history)
  • /trunk/extensions/OpenStackManager/OpenStackNovaSecurityGroup.php (modified) (history)
  • /trunk/extensions/OpenStackManager/OpenStackNovaSudoer.php (modified) (history)
  • /trunk/extensions/OpenStackManager/OpenStackNovaUser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OpenStackManager/OpenStackNovaLdapConnection.php
@@ -4,8 +4,6 @@
55
66 /**
77 * Connect to LDAP as the open stack manager account using wgAuth
8 - *
9 - * @return void
108 */
119 static function connect() {
1210 global $wgAuth;
Index: trunk/extensions/OpenStackManager/OpenStackNovaSudoer.php
@@ -159,9 +159,7 @@
160160 * @return array of OpenStackNovaSudoer
161161 */
162162 static function getAllSudoers() {
163 - global $wgAuth;
164 - global $wgOpenStackManagerLDAPUser, $wgOpenStackManagerLDAPUserPassword;
165 - global $wgOpenStackManagerLDAPSudoerBaseDN, $wgOpenStackManagerLDAPDomain;
 163+ global $wgAuth, $wgOpenStackManagerLDAPSudoerBaseDN;
166164
167165 OpenStackNovaLdapConnection::connect();
168166
@@ -215,10 +213,7 @@
216214 * @return null|OpenStackNovaSudoer
217215 */
218216 static function createSudoer( $sudoername, $users, $hosts, $commands, $options ) {
219 - global $wgAuth;
220 - global $wgOpenStackManagerLDAPUser, $wgOpenStackManagerLDAPUserPassword;
221 - global $wgOpenStackManagerLDAPSudoerBaseDN;
222 - global $wgOpenStackManagerLDAPDomain;
 217+ global $wgAuth, $wgOpenStackManagerLDAPSudoerBaseDN;
223218
224219 OpenStackNovaLdapConnection::connect();
225220
@@ -260,8 +255,6 @@
261256 */
262257 static function deleteSudoer( $sudoername ) {
263258 global $wgAuth;
264 - global $wgOpenStackManagerLDAPUser, $wgOpenStackManagerLDAPUserPassword;
265 - global $wgOpenStackManagerLDAPDomain;
266259
267260 OpenStackNovaLdapConnection::connect();
268261
Index: trunk/extensions/OpenStackManager/OpenStackNovaUser.php
@@ -515,7 +515,7 @@
516516
517517 /**
518518 * @static
519 - * @param $template
 519+ * @param $template
520520 * @return bool
521521 */
522522 static function LDAPModifyUITemplate( &$template ) {
Index: trunk/extensions/OpenStackManager/OpenStackNovaController.php
@@ -95,7 +95,7 @@
9696 }
9797
9898 /**
99 - * @return array
 99+ * @return OpenStackNovaInstanceType
100100 */
101101 function getInstanceType( $instanceType ) {
102102 $this->getInstanceTypes( false );
Index: trunk/extensions/OpenStackManager/OpenStackNovaArticle.php
@@ -3,13 +3,9 @@
44 class OpenStackNovaArticle {
55
66 public static function canCreatePages() {
7 - global $wgOpenStackManagerCreateResourcePages;
 7+ global $wgOpenStackManagerCreateResourcePages;
88
9 - if ( $wgOpenStackManagerCreateResourcePages ) {
10 - return true;
11 - } else {
12 - return false;
13 - }
 9+ return $wgOpenStackManagerCreateResourcePages;
1410 }
1511
1612 public static function editArticle( $titletext, $text ) {
@@ -22,9 +18,9 @@
2319 if ( ! OpenStackNovaArticle::canCreatePages() ) {
2420 return;
2521 }
26 - $title = Title::newFromText( $titletext, NS_NOVA_RESOURCE );
27 - $article = new Article( $title, 0 );
28 - $article->doDeleteArticle( '' );
 22+ $title = Title::newFromText( $titletext, NS_NOVA_RESOURCE );
 23+ $article = new Article( $title, 0 );
 24+ $article->doDeleteArticle( '' );
2925 }
3026
3127 }
Index: trunk/extensions/OpenStackManager/OpenStackNovaSecurityGroup.php
@@ -7,7 +7,7 @@
88 var $rules;
99
1010 /**
11 - * @param $apiInstanceResponse
 11+ * @param $apiInstanceResponse
1212 */
1313 function __construct( $apiInstanceResponse ) {
1414 $this->group = $apiInstanceResponse;
@@ -18,21 +18,21 @@
1919 }
2020
2121 /**
22 - * @return
 22+ * @return string
2323 */
2424 function getGroupName() {
2525 return (string)$this->group->groupName;
2626 }
2727
2828 /**
29 - * @return
 29+ * @return string
3030 */
3131 function getGroupDescription() {
3232 return (string)$this->group->groupDescription;
3333 }
3434
3535 /**
36 - * @return
 36+ * @return string
3737 */
3838 function getOwner() {
3939 return (string)$this->group->ownerId;

Comments

#Comment by Jeroen De Dauw (talk | contribs)   16:34, 24 December 2011

False selection o_O

Status & tagging log