jenkins-bot has submitted this change and it was merged.

Change subject: (bug 46052) make storage methods obeying and using 
$wgTmpDirectory
......................................................................


(bug 46052) make storage methods obeying and using $wgTmpDirectory

$wgOpenIDConsumerStorePath and $wgOpenIDServerStorePath (if set to false)
are now using the OS system-defined temp directory.

Change-Id: Ia40b9c77afe295da7801c54fa16f24bde9455223
---
M CHANGES
M OpenID.php
M SpecialOpenID.body.php
M SpecialOpenIDServer.body.php
4 files changed, 18 insertions(+), 6 deletions(-)

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



diff --git a/CHANGES b/CHANGES
index 7b1c388..b778e25 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
 CHANGES
 =======
 
+3.07  20130316  (bug 46052) make storage methods obeying and using 
$wgTmpDirectory
 3.06  20130312  fix bug46006 correct use of $wgExtensionAssetsPath after setup
                 changed $wgOpenIDLoginLogoUrl to $wgOpenIDSmallLogoUrl
 3.05  20130311  show OpenID icons also in the table of associated OpenIDs in 
OpenID preferences
diff --git a/OpenID.php b/OpenID.php
index d8fb7ed..a4ef06b 100644
--- a/OpenID.php
+++ b/OpenID.php
@@ -29,7 +29,7 @@
        exit( 1 );
 }
 
-define( 'MEDIAWIKI_OPENID_VERSION', '3.06 20130312' );
+define( 'MEDIAWIKI_OPENID_VERSION', '3.07 20130316' );
 
 $path = dirname( __FILE__ );
 set_include_path( implode( PATH_SEPARATOR, array( $path ) ) . PATH_SEPARATOR . 
get_include_path() );
@@ -77,8 +77,10 @@
 /**
  * If the store type is set to 'file', this is is the name of a directory to
  * store the data in.
+ *
+ * false defaults to "$wgTmpDirectory/$wgDBname/openid-server-store"
  */
-$wgOpenIDServerStorePath = "/tmp/$wgDBname/openidserver/";
+$wgOpenIDServerStorePath = false;
 
 /**
  * Defines the trust root for this server
@@ -174,8 +176,10 @@
 /**
  * If the store type is set to 'file', this is is the name of a
  * directory to store the data in.
+ *
+ * false defaults to "$wgTmpDirectory/$wgDBname/openid-consumer-store"
  */
-$wgOpenIDConsumerStorePath = "/tmp/$wgDBname/openidconsumer/";
+$wgOpenIDConsumerStorePath = false;
 
 /**
  * Expiration time for the OpenID cookie. Lets the user re-authenticate
diff --git a/SpecialOpenID.body.php b/SpecialOpenID.body.php
index 1878dd2..f3727ef 100644
--- a/SpecialOpenID.body.php
+++ b/SpecialOpenID.body.php
@@ -181,7 +181,11 @@
         * @return Auth_OpenID_Consumer
         */
        function getConsumer() {
-               global $wgOpenIDConsumerStoreType, $wgOpenIDConsumerStorePath;
+               global $wgOpenIDConsumerStoreType, $wgOpenIDConsumerStorePath, 
$wgTmpDirectory, $wgDBname;
+
+               if ( !$wgOpenIDConsumerStorePath ) {
+                       $wgOpenIDConsumerStorePath = $wgTmpDirectory . 
DIRECTORY_SEPARATOR . $wgDBname . DIRECTORY_SEPARATOR . 
"openid-consumer-store/";
+               }
 
                $store = $this->getOpenIDStore(
                        $wgOpenIDConsumerStoreType,
diff --git a/SpecialOpenIDServer.body.php b/SpecialOpenIDServer.body.php
index 1e9cec4..9f7ef77 100644
--- a/SpecialOpenIDServer.body.php
+++ b/SpecialOpenIDServer.body.php
@@ -231,8 +231,11 @@
         * @return Auth_OpenID_Server
         */
        function getServer() {
-               global $wgOpenIDServerStorePath,
-                 $wgOpenIDServerStoreType;
+               global $wgOpenIDServerStorePath, $wgOpenIDServerStoreType, 
$wgTmpDirectory, $wgDBname;
+
+               if ( !$wgOpenIDServerStorePath ) {
+                       $wgOpenIDServerStorePath = $wgTmpDirectory . 
DIRECTORY_SEPARATOR . $wgDBname . DIRECTORY_SEPARATOR . "openid-server-store/";
+               }
 
                $store = $this->getOpenIDStore(
                        $wgOpenIDServerStoreType,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia40b9c77afe295da7801c54fa16f24bde9455223
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/OpenID
Gerrit-Branch: master
Gerrit-Owner: Wikinaut <m...@tgries.de>
Gerrit-Reviewer: Wikinaut <m...@tgries.de>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to