Hashar has uploaded a new change for review.
https://gerrit.wikimedia.org/r/244596
Change subject: Fix up tests
......................................................................
Fix up tests
Add missing @metadata section in i18n files.
Fix a few trivial PHP style issues.
Bug: T115041
Change-Id: I33d2f46446e822bdbb142669b535cad0815884b1
---
M GPGMailHooks.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 12 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GPGMail
refs/changes/96/244596/1
diff --git a/GPGMailHooks.php b/GPGMailHooks.php
index 6cd2204..681a472 100644
--- a/GPGMailHooks.php
+++ b/GPGMailHooks.php
@@ -22,7 +22,7 @@
*/
public static function registerExtension() {
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
- require_once( __DIR__ . '/vendor/autoload.php' );
+ require_once __DIR__ . '/vendor/autoload.php';
}
}
@@ -111,7 +111,9 @@
* @param Message|string $error Error message when encryption fails
* @return bool
*/
- public static function onUserMailerTransformMessage( $to, $from,
&$subject, &$headers, &$body, &$error ) {
+ public static function onUserMailerTransformMessage( $to, $from,
+ &$subject, &$headers, &$body, &$error
+ ) {
if ( count( $to ) > 1 ) {
// users who requested encryption have been split out
already by UserMailerSplitTo
return true;
@@ -177,7 +179,8 @@
if ( $user->getBoolOption( 'gpgmail-enable' ) &&
self::usePgpMime() ) {
try {
$pgpMime = new PgpMime( self::getGPGLib() );
- list( $headers, $body ) = $pgpMime->encrypt(
$headers, $body, $user->getOption( 'gpgmail-key' ) );
+ list( $headers, $body ) = $pgpMime->encrypt(
+ $headers, $body, $user->getOption(
'gpgmail-key' ) );
} catch ( GpgLibException $e ) {
return Status::newFatal( new RawMessage(
$e->getMessage() ) );
}
diff --git a/i18n/en.json b/i18n/en.json
index 69dada1..0c13988 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -1,4 +1,7 @@
{
+ "@metadata": {
+ "authors": ["Gergő Tisza"]
+ },
"gpgmail-desc": "Encrypt emails with GPG",
"gpgmail-pref-enable": "Encrypt emails with GPG",
"gpgmail-pref-key": "GPG public key",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index b6b5eea..62fd2e7 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -1,4 +1,7 @@
{
+ "@metadata": {
+ "authors": ["Gergő Tisza"]
+ },
"gpgmail-desc":
"{{desc|name=GPGMail|url=https://www.mediawiki.org/wiki/Extension:GPGMail}}",
"gpgmail-pref-enable": "Label for the checkbox in preferences which
enables encryption.",
"gpgmail-pref-key": "Label for the textarea in preferences where the
public key must be pasted.",
--
To view, visit https://gerrit.wikimedia.org/r/244596
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I33d2f46446e822bdbb142669b535cad0815884b1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GPGMail
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits