Wikinaut has uploaded a new change for review.

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


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

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

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

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenID 
refs/changes/17/54117/1

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: newchange
Gerrit-Change-Id: Ia40b9c77afe295da7801c54fa16f24bde9455223
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenID
Gerrit-Branch: master
Gerrit-Owner: 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