Florianschmidtwelzow has uploaded a new change for review.
https://gerrit.wikimedia.org/r/142495
Change subject: Resolved tests errors and warnings
......................................................................
Resolved tests errors and warnings
Change-Id: I076af7ae204305917d66e554ebdfecfd768273c0
---
M GoogleLogin.alias.php
M GoogleLogin.hooks.php
M GoogleLoginDB.php
M SpecialGoogleLogin.php
M dev-scripts/phplint.sh
5 files changed, 23 insertions(+), 15 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleLogin
refs/changes/95/142495/1
diff --git a/GoogleLogin.alias.php b/GoogleLogin.alias.php
index de91a4d..e7dd544 100644
--- a/GoogleLogin.alias.php
+++ b/GoogleLogin.alias.php
@@ -19,4 +19,4 @@
*/
$specialPageAliases['de'] = array(
'GoogleLogin' => array( 'GoogleLogin', 'Mit Google anmelden' ),
-);
\ No newline at end of file
+);
diff --git a/GoogleLogin.hooks.php b/GoogleLogin.hooks.php
index 000eb46..b3bc794 100644
--- a/GoogleLogin.hooks.php
+++ b/GoogleLogin.hooks.php
@@ -40,7 +40,7 @@
Html::openelement( 'li', array(
'style' =>
'list-style:none;width:100%;',
) ) .
- Html::element( 'a' , array(
+ Html::element( 'a', array(
'href' => Title::makeTitle( -1,
'GoogleLogin' )->getLocalUrl(),
'class' => 'mw-ui-button
mw-ui-destructive',
'style' => 'width:100%;'
@@ -51,4 +51,4 @@
$tpl->set( 'header', $header );
}
- }
\ No newline at end of file
+ }
diff --git a/GoogleLoginDB.php b/GoogleLoginDB.php
index 1577d2f..9510f10 100644
--- a/GoogleLoginDB.php
+++ b/GoogleLoginDB.php
@@ -60,6 +60,7 @@
}
/**
+ * Copied from Extension:Facebook
* Returns the name of the shared database, if one is in use
for the Facebook
* Connect users table. Note that 'user_fbconnect' (without
respecting
* $wgSharedPrefix) is added to $wgSharedTables in
FacebookInit::init() by
@@ -77,11 +78,12 @@
}
/**
+ * Copied from Extension:Facebook
* Returns the table prefix name, either $wgDBprefix,
$wgSharedPrefix
* depending on whether a shared database is in use.
*/
private static function getPrefix() {
- global $wgDBprefix, $wgSharedPrefix;
- return self::sharedDB() ? $wgSharedPrefix : ""; // bugfix for
$wgDBprefix;
+ global $wgDBprefix, $wgSharedPrefix;
+ return self::sharedDB() ? $wgSharedPrefix : ""; //
bugfix for $wgDBprefix;
}
- }
\ No newline at end of file
+ }
diff --git a/SpecialGoogleLogin.php b/SpecialGoogleLogin.php
index 6972840..4196e58 100644
--- a/SpecialGoogleLogin.php
+++ b/SpecialGoogleLogin.php
@@ -130,8 +130,8 @@
) {
// Add location of Google api in include path
to enable includes from Google Client
set_include_path(get_include_path() .
PATH_SEPARATOR . $dir . '/');
- require_once( $dir . '/Google/Client.php' );
- require_once( $dir . '/Google/Service/Plus.php'
);
+ require_once ( $dir . '/Google/Client.php' );
+ require_once ( $dir .
'/Google/Service/Plus.php' );
// yes, we initiate Google client here ;)
$client = new Google_Client();
return $client;
@@ -186,7 +186,8 @@
$names[$userInfo['name']['givenName']] =
'wpGivenName';
}
$names[wfMessage( 'googlelogin-form-chooseown'
)->text()] = 'wpOwn';
- $defaultName = ($request->getVal( 'wpChooseName' ) !==
'' ? $request->getVal( 'wpChooseName' ) : 'wpOwn');
+ $defaultName = ($request->getVal( 'wpChooseName' ) !==
'' ?
+ $request->getVal( 'wpChooseName' ) : 'wpOwn');
$formElements = array(
'ChooseName' => array(
'section' => 'choosename',
@@ -202,7 +203,7 @@
'label' => wfMessage(
'googlelogin-form-chooseown' )->text() . ':',
'help' => wfMessage(
'googlelogin-form-choosename-help' )->text()
),
- );
+ );
$htmlForm = new HTMLForm( $formElements,
$this->getContext(), 'googlelogin-form' );
$htmlForm->addHiddenField( 'wpSecureHash',
$this->getRequestToken() );
$htmlForm->setSubmitText( wfMessage(
'googlelogin-form-create' )->text() );
@@ -243,11 +244,15 @@
/**
* Creates a standard form with only a button and hidden
securehash field for one-button-actions
- * @param string $action The action the button will link to
(note: this string is the suffix for the Message
- * key for the buttons name)
+ * @param string $action The action the button will link to
(note: this string is
+ * the suffix for the Message key for the buttons name)
*/
private function GoogleUserForm( $action ) {
- $htmlForm = new HTMLForm( array(), $this->getContext(),
'googlelogin-form' . strtolower( $action ) );
+ $htmlForm = new HTMLForm(
+ array(),
+ $this->getContext(),
+ 'googlelogin-form' . strtolower( $action )
+ );
$htmlForm->setSubmitText( wfMessage(
'googlelogin-form-' . strtolower( $action ) )->text() );
$htmlForm->addHiddenField( 'wpSecureHash',
$this->getRequestToken() );
@@ -273,7 +278,8 @@
}
/**
- * Checks, if the submitted secure token is valid (check before
do any "write" action after form submit)
+ * Checks, if the submitted secure token is valid (check before
do any
+ * "write" action after form submit)
* @return boolean
*/
private function isRequestValid() {
diff --git a/dev-scripts/phplint.sh b/dev-scripts/phplint.sh
index 583be01..0d38726 100755
--- a/dev-scripts/phplint.sh
+++ b/dev-scripts/phplint.sh
@@ -8,7 +8,7 @@
exit 1
fi
-for file in `find . -name '*.php' -not -path './admin/src/*' -not -path
'./admin/lib/*' -not -path './vendor/*'`; do
+for file in `find . -name '*.php' -not -path './Google/*' -not -path
'./vendor/*'`; do
RESULTS=`php -l $file`
if [ "$RESULTS" != "No syntax errors detected in $file" ]; then
echo $RESULTS
--
To view, visit https://gerrit.wikimedia.org/r/142495
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I076af7ae204305917d66e554ebdfecfd768273c0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GoogleLogin
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits