[MediaWiki-commits] [Gerrit] mediawiki...TorBlock[REL1_28]: Revert TorBlock to manifest_version 1

2016-11-03 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/319701

Change subject: Revert TorBlock to manifest_version 1
..

Revert TorBlock to manifest_version 1

Bug: T149759
Change-Id: Icd5e4871fb23113fbd081ee6fcf6cc426382ff63
---
M extension.json
M includes/TorBlockHooks.php
2 files changed, 25 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TorBlock 
refs/changes/01/319701/1

diff --git a/extension.json b/extension.json
index 313fb22..f4253d3 100644
--- a/extension.json
+++ b/extension.json
@@ -68,42 +68,22 @@
]
},
"config": {
-   "TorBypassPermissions": {
-   "value": [
-   "torunblocked"
-   ]
-   },
-   "TorLoadNodes": {
-   "value": true
-   },
-   "TorAllowedActions": {
-   "value": [
-   "read"
-   ]
-   },
-   "TorAutoConfirmAge": {
-   "value": 0
-   },
-   "TorAutoConfirmCount":  {
-   "value": 0
-   },
-   "TorIPs": {
-   "value": [
-   "208.80.152.2"
-   ]
-   },
-   "TorOnionooServer": {
-   "value": "https://onionoo.torproject.org";
-   },
-   "TorDisableAdminBlocks": {
-   "value": true
-   },
-   "TorTagChanges": {
-   "value": true
-   },
-   "TorBlockProxy": {
-   "value": false
-   },
+   "TorBypassPermissions":  [
+   "torunblocked"
+   ],
+   "TorLoadNodes": true,
+   "TorAllowedActions":  [
+   "read"
+   ],
+   "TorAutoConfirmAge": 0,
+   "TorAutoConfirmCount": 0,
+   "TorIPs": [
+   "208.80.152.2"
+   ],
+   "TorOnionooServer": "https://onionoo.torproject.org";,
+   "TorDisableAdminBlocks": true,
+   "TorTagChanges": false,
+   "TorBlockProxy": false,
"TorOnionooCA": {
"value": "torproject.crt",
"path": true
@@ -113,5 +93,5 @@
"path": true
}
},
-   "manifest_version": 2
+   "manifest_version": 1
 }
diff --git a/includes/TorBlockHooks.php b/includes/TorBlockHooks.php
index ee1719e..6711254 100644
--- a/includes/TorBlockHooks.php
+++ b/includes/TorBlockHooks.php
@@ -31,6 +31,14 @@
public static function registerExtension() {
// Define new autopromote condition
define( 'APCOND_TOR', 'tor' ); // Numbers won't work, we'll get 
collisions
+
+   global $wgTorOnionooCA, $wgTorProjectCA;
+   if ( $wgTorOnionooCA === null ) {
+   $wgTorOnionooCA = dirname( __DIR__ ) . 
'/torproject.crt';
+   }
+   if ( $wgTorProjectCA === null ) {
+   $wgTorProjectCA = dirname( __DIR__ ) . 
'/torproject.crt';
+   }
}
 
/**

-- 
To view, visit https://gerrit.wikimedia.org/r/319701
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd5e4871fb23113fbd081ee6fcf6cc426382ff63
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TorBlock
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...TorBlock[REL1_28]: Revert TorBlock to manifest_version 1

2016-11-10 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Revert TorBlock to manifest_version 1
..


Revert TorBlock to manifest_version 1

Bug: T149759
Change-Id: Icd5e4871fb23113fbd081ee6fcf6cc426382ff63
---
M extension.json
M includes/TorBlockHooks.php
2 files changed, 27 insertions(+), 45 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extension.json b/extension.json
index 313fb22..cead7ba 100644
--- a/extension.json
+++ b/extension.json
@@ -68,50 +68,24 @@
]
},
"config": {
-   "TorBypassPermissions": {
-   "value": [
-   "torunblocked"
-   ]
-   },
-   "TorLoadNodes": {
-   "value": true
-   },
-   "TorAllowedActions": {
-   "value": [
-   "read"
-   ]
-   },
-   "TorAutoConfirmAge": {
-   "value": 0
-   },
-   "TorAutoConfirmCount":  {
-   "value": 0
-   },
-   "TorIPs": {
-   "value": [
-   "208.80.152.2"
-   ]
-   },
-   "TorOnionooServer": {
-   "value": "https://onionoo.torproject.org";
-   },
-   "TorDisableAdminBlocks": {
-   "value": true
-   },
-   "TorTagChanges": {
-   "value": true
-   },
-   "TorBlockProxy": {
-   "value": false
-   },
-   "TorOnionooCA": {
-   "value": "torproject.crt",
-   "path": true
-   },
-   "TorProjectCA": {
-   "value": "torproject.crt",
-   "path": true
-   }
+   "TorBypassPermissions":  [
+   "torunblocked"
+   ],
+   "TorLoadNodes": true,
+   "TorAllowedActions":  [
+   "read"
+   ],
+   "TorAutoConfirmAge": 0,
+   "TorAutoConfirmCount": 0,
+   "TorIPs": [
+   "208.80.152.2"
+   ],
+   "TorOnionooServer": "https://onionoo.torproject.org";,
+   "TorDisableAdminBlocks": true,
+   "TorTagChanges": false,
+   "TorBlockProxy": false,
+   "TorOnionooCA": null,
+   "TorProjectCA": null
},
-   "manifest_version": 2
+   "manifest_version": 1
 }
diff --git a/includes/TorBlockHooks.php b/includes/TorBlockHooks.php
index ee1719e..6711254 100644
--- a/includes/TorBlockHooks.php
+++ b/includes/TorBlockHooks.php
@@ -31,6 +31,14 @@
public static function registerExtension() {
// Define new autopromote condition
define( 'APCOND_TOR', 'tor' ); // Numbers won't work, we'll get 
collisions
+
+   global $wgTorOnionooCA, $wgTorProjectCA;
+   if ( $wgTorOnionooCA === null ) {
+   $wgTorOnionooCA = dirname( __DIR__ ) . 
'/torproject.crt';
+   }
+   if ( $wgTorProjectCA === null ) {
+   $wgTorProjectCA = dirname( __DIR__ ) . 
'/torproject.crt';
+   }
}
 
/**

-- 
To view, visit https://gerrit.wikimedia.org/r/319701
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icd5e4871fb23113fbd081ee6fcf6cc426382ff63
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/TorBlock
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits