http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73957
Revision: 73957
Author: platonides
Date: 2010-09-29 17:05:29 +0000 (Wed, 29 Sep 2010)
Log Message:
-----------
Remove $wgServerName in extensions, too (follow r73950)
Modified Paths:
--------------
trunk/extensions/ContactPage/README
trunk/extensions/ContactPage/SpecialContact.php
trunk/extensions/ContactPage/install.settings
trunk/extensions/ContactPageFundraiser/README
trunk/extensions/ContactPageFundraiser/install.settings
trunk/extensions/News/README
trunk/extensions/OAI/OAIRepo_body.php
trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php
trunk/extensions/SemanticMediaWiki/includes/SMW_SetupLight.php
trunk/extensions/SemanticTasks/SemanticTasks.classes.php
Modified: trunk/extensions/ContactPage/README
===================================================================
--- trunk/extensions/ContactPage/README 2010-09-29 16:41:45 UTC (rev 73956)
+++ trunk/extensions/ContactPage/README 2010-09-29 17:05:29 UTC (rev 73957)
@@ -28,7 +28,7 @@
require_once( "$IP/extensions/ContactPage/ContactPage.php" );
$wgContactUser = 'WikiAdmin';
- $wgContactSender = 'apache@' . $wgServerName;
+ $wgContactSender = $wgPasswordSender;
$wgContactSenderName = 'Contact Form on ' . $wgSitename;
Modified: trunk/extensions/ContactPage/SpecialContact.php
===================================================================
--- trunk/extensions/ContactPage/SpecialContact.php 2010-09-29 16:41:45 UTC
(rev 73956)
+++ trunk/extensions/ContactPage/SpecialContact.php 2010-09-29 17:05:29 UTC
(rev 73957)
@@ -321,10 +321,10 @@
function doSubmit() {
global $wgOut, $wgUser;
- global $wgEnableEmail, $wgUserEmailUseReplyTo,
$wgEmergencyContact;
+ global $wgEnableEmail, $wgUserEmailUseReplyTo,
$wgPasswordSender;
global $wgContactUser, $wgContactSender, $wgContactSenderName,
$wgContactIncludeIP;
- $csender = $wgContactSender ? $wgContactSender :
$wgEmergencyContact;
+ $csender = $wgContactSender ? $wgContactSender :
$wgPasswordSender;
$cname = $wgContactSenderName;
$senderIP = wfGetIP();
Modified: trunk/extensions/ContactPage/install.settings
===================================================================
--- trunk/extensions/ContactPage/install.settings 2010-09-29 16:41:45 UTC
(rev 73956)
+++ trunk/extensions/ContactPage/install.settings 2010-09-29 17:05:29 UTC
(rev 73957)
@@ -1,5 +1,6 @@
require_once( "{{path}}/ContactPage.php" );
$wgContactUser = 'WikiAdmin';
-$wgContactSender = 'apache@' . $wgServerName;
+$wgContactSender = $wgPasswordSender;
$wgContactSenderName = 'Contact Form on ' . $wgSitename;
+
Modified: trunk/extensions/ContactPageFundraiser/README
===================================================================
--- trunk/extensions/ContactPageFundraiser/README 2010-09-29 16:41:45 UTC
(rev 73956)
+++ trunk/extensions/ContactPageFundraiser/README 2010-09-29 17:05:29 UTC
(rev 73957)
@@ -28,7 +28,7 @@
require_once( "$IP/extensions/ContactPage/ContactPage.php" );
$wgContactUser = 'WikiAdmin';
- $wgContactSender = 'apache@' . $wgServerName;
+ $wgContactSender = $wgPasswordSender;
$wgContactSenderName = 'Contact Form on ' . $wgSitename;
Modified: trunk/extensions/ContactPageFundraiser/install.settings
===================================================================
--- trunk/extensions/ContactPageFundraiser/install.settings 2010-09-29
16:41:45 UTC (rev 73956)
+++ trunk/extensions/ContactPageFundraiser/install.settings 2010-09-29
17:05:29 UTC (rev 73957)
@@ -1,5 +1,5 @@
require_once( "{{path}}/ContactPage.php" );
$wgContactUser = 'WikiAdmin';
-$wgContactSender = 'apache@' . $wgServerName;
+$wgContactSender = $wgPasswordSender;
$wgContactSenderName = 'Contact Form on ' . $wgSitename;
Modified: trunk/extensions/News/README
===================================================================
--- trunk/extensions/News/README 2010-09-29 16:41:45 UTC (rev 73956)
+++ trunk/extensions/News/README 2010-09-29 17:05:29 UTC (rev 73957)
@@ -217,4 +217,4 @@
* $wgNewsFeedUserPattern: this defines the pattern used to generate author
names in feed items. In the pattern, $1 is replaced by the user name. To
e.g. generate email-addresses at your site as author names, use
- $wgNewsFeedUserPattern = '$1@' . $wgServerName;
+ $wgNewsFeedUserPattern = '[email protected]';
Modified: trunk/extensions/OAI/OAIRepo_body.php
===================================================================
--- trunk/extensions/OAI/OAIRepo_body.php 2010-09-29 16:41:45 UTC (rev
73956)
+++ trunk/extensions/OAI/OAIRepo_body.php 2010-09-29 17:05:29 UTC (rev
73957)
@@ -518,9 +518,19 @@
return null;
}
+ static function identifierPrefix() {
+ static $prefix = false;
+ if ( !$prefix ) {
+ global $wgServer, $wgDBname;
+ wfSuppressWarnings();
+ $prefix = "oai:" . parse_url( $wgServer, PHP_URL_HOST )
. ":$wgDBname:";
+ wfRestoreWarnings();
+ }
+ return $prefix;
+ }
+
function stripIdentifier( $identifier ) {
- global $wgServerName, $wgDBname;
- $prefix = "oai:$wgServerName:$wgDBname:";
+ $prefix = self::identifierPrefix();
if( substr( $identifier, 0, strlen( $prefix ) ) == $prefix ) {
$pageid = substr( $identifier, strlen( $prefix ) );
if( preg_match( '/^\d+$/', $pageid ) ) {
@@ -773,8 +783,7 @@
}
function getIdentifier() {
- global $wgDBname, $wgServerName;
- return "oai:$wgServerName:$wgDBname:{$this->_id}";
+ return OAIRepo::identifierPrefix() . $this->_id;
}
function getDatestamp() {
Modified: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php
===================================================================
--- trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php 2010-09-29
16:41:45 UTC (rev 73956)
+++ trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php 2010-09-29
17:05:29 UTC (rev 73957)
@@ -27,13 +27,14 @@
*/
function enableSemantics( $namespace = null, $complete = false ) {
global $wgVersion, $wgExtensionFunctions, $wgAutoloadClasses,
$wgSpecialPages, $wgSpecialPageGroups, $wgHooks, $wgExtensionMessagesFiles;
- global $smwgIP, $smwgNamespace, $wgJobClasses,
$wgExtensionAliasesFiles, $wgServerName;
+ global $smwgIP, $smwgNamespace, $wgJobClasses,
$wgExtensionAliasesFiles, $wgServer;
// The dot tells that the domain is not complete. It will be completed
// in the Export since we do not want to create a title object here when
// it is not needed in many cases.
if ( $namespace === null ) {
- $namespace = $wgServerName;
+ wfWarn( 'You should be providing the domain name to
enableSemantics()' );
+ $namespace = parse_url( $wgServer, PHP_URL_HOST );
}
if ( !$complete && ( $smwgNamespace !== '' ) ) {
$smwgNamespace = '.' . $namespace;
@@ -489,4 +490,4 @@
$smwgContLang = new $smwContLangClass();
wfProfileOut( 'smwfInitContentLanguage (SMW)' );
-}
\ No newline at end of file
+}
Modified: trunk/extensions/SemanticMediaWiki/includes/SMW_SetupLight.php
===================================================================
--- trunk/extensions/SemanticMediaWiki/includes/SMW_SetupLight.php
2010-09-29 16:41:45 UTC (rev 73956)
+++ trunk/extensions/SemanticMediaWiki/includes/SMW_SetupLight.php
2010-09-29 17:05:29 UTC (rev 73957)
@@ -33,13 +33,14 @@
* available as early on. Moreover, jobs and special pages are registered.
*/
function enableSemantics( $namespace = null, $complete = false ) {
- global $smwgIP, $wgServerName, $smwgNamespace, $wgExtensionFunctions,
$wgAutoloadClasses, $wgSpecialPages, $wgSpecialPageGroups, $wgHooks,
$wgExtensionMessagesFiles, $wgJobClasses, $wgExtensionAliasesFiles;
+ global $smwgIP, $wgServer, $smwgNamespace, $wgExtensionFunctions,
$wgAutoloadClasses, $wgSpecialPages, $wgSpecialPageGroups, $wgHooks,
$wgExtensionMessagesFiles, $wgJobClasses, $wgExtensionAliasesFiles;
// The dot tells that the domain is not complete. It will be completed
// in the Export since we do not want to create a title object here when
// it is not needed in many cases.
if ( $namespace === null ) {
- $namespace = $wgServerName;
+ wfWarn( 'You should be providing the domain name to
enableSemantics()' );
+ $namespace = parse_url( $wgServer, PHP_URL_HOST );
}
if ( !$complete && ( $smwgNamespace !== '' ) ) {
$smwgNamespace = '.' . $namespace;
Modified: trunk/extensions/SemanticTasks/SemanticTasks.classes.php
===================================================================
--- trunk/extensions/SemanticTasks/SemanticTasks.classes.php 2010-09-29
16:41:45 UTC (rev 73956)
+++ trunk/extensions/SemanticTasks/SemanticTasks.classes.php 2010-09-29
17:05:29 UTC (rev 73957)
@@ -365,7 +365,7 @@
}
function remindAssignees( $wiki_url ) {
- global $wgSitename, $wgServer;
+ global $wgSitename, $wgServer, $wgNoReplyAddress;
$user_mailer = new UserMailer();
@@ -380,7 +380,7 @@
return FALSE;
}
- $sender = new MailAddress( "no-re...@$wgservername",
"$wgSitename" );
+ $sender = new MailAddress( $wgNoReplyAddress, $wgSitename );
while ( $row = $results->getNext() ) {
$task_name = $row[0]->getNextObject()->getTitle();
@@ -436,4 +436,4 @@
}
}
}
-}
\ No newline at end of file
+}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs