| Index: trunk/extensions/ContactPage/SpecialContact.php |
| — | — | @@ -321,10 +321,10 @@ |
| 322 | 322 | |
| 323 | 323 | function doSubmit() { |
| 324 | 324 | global $wgOut, $wgUser; |
| 325 | | - global $wgEnableEmail, $wgUserEmailUseReplyTo, $wgEmergencyContact; |
| | 325 | + global $wgEnableEmail, $wgUserEmailUseReplyTo, $wgPasswordSender; |
| 326 | 326 | global $wgContactUser, $wgContactSender, $wgContactSenderName, $wgContactIncludeIP; |
| 327 | 327 | |
| 328 | | - $csender = $wgContactSender ? $wgContactSender : $wgEmergencyContact; |
| | 328 | + $csender = $wgContactSender ? $wgContactSender : $wgPasswordSender; |
| 329 | 329 | $cname = $wgContactSenderName; |
| 330 | 330 | $senderIP = wfGetIP(); |
| 331 | 331 | |
| Index: trunk/extensions/ContactPage/install.settings |
| — | — | @@ -1,5 +1,6 @@ |
| 2 | 2 | require_once( "{{path}}/ContactPage.php" ); |
| 3 | 3 | |
| 4 | 4 | $wgContactUser = 'WikiAdmin'; |
| 5 | | -$wgContactSender = 'apache@' . $wgServerName; |
| | 5 | +$wgContactSender = $wgPasswordSender; |
| 6 | 6 | $wgContactSenderName = 'Contact Form on ' . $wgSitename; |
| | 7 | + |
| Index: trunk/extensions/ContactPage/README |
| — | — | @@ -28,7 +28,7 @@ |
| 29 | 29 | require_once( "$IP/extensions/ContactPage/ContactPage.php" ); |
| 30 | 30 | |
| 31 | 31 | $wgContactUser = 'WikiAdmin'; |
| 32 | | - $wgContactSender = 'apache@' . $wgServerName; |
| | 32 | + $wgContactSender = $wgPasswordSender; |
| 33 | 33 | $wgContactSenderName = 'Contact Form on ' . $wgSitename; |
| 34 | 34 | |
| 35 | 35 | |
| Index: trunk/extensions/SemanticMediaWiki/includes/SMW_SetupLight.php |
| — | — | @@ -33,13 +33,14 @@ |
| 34 | 34 | * available as early on. Moreover, jobs and special pages are registered. |
| 35 | 35 | */ |
| 36 | 36 | function enableSemantics( $namespace = null, $complete = false ) { |
| 37 | | - global $smwgIP, $wgServerName, $smwgNamespace, $wgExtensionFunctions, $wgAutoloadClasses, $wgSpecialPages, $wgSpecialPageGroups, $wgHooks, $wgExtensionMessagesFiles, $wgJobClasses, $wgExtensionAliasesFiles; |
| | 37 | + global $smwgIP, $wgServer, $smwgNamespace, $wgExtensionFunctions, $wgAutoloadClasses, $wgSpecialPages, $wgSpecialPageGroups, $wgHooks, $wgExtensionMessagesFiles, $wgJobClasses, $wgExtensionAliasesFiles; |
| 38 | 38 | |
| 39 | 39 | // The dot tells that the domain is not complete. It will be completed |
| 40 | 40 | // in the Export since we do not want to create a title object here when |
| 41 | 41 | // it is not needed in many cases. |
| 42 | 42 | if ( $namespace === null ) { |
| 43 | | - $namespace = $wgServerName; |
| | 43 | + wfWarn( 'You should be providing the domain name to enableSemantics()' ); |
| | 44 | + $namespace = parse_url( $wgServer, PHP_URL_HOST ); |
| 44 | 45 | } |
| 45 | 46 | if ( !$complete && ( $smwgNamespace !== '' ) ) { |
| 46 | 47 | $smwgNamespace = '.' . $namespace; |
| Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php |
| — | — | @@ -27,13 +27,14 @@ |
| 28 | 28 | */ |
| 29 | 29 | function enableSemantics( $namespace = null, $complete = false ) { |
| 30 | 30 | global $wgVersion, $wgExtensionFunctions, $wgAutoloadClasses, $wgSpecialPages, $wgSpecialPageGroups, $wgHooks, $wgExtensionMessagesFiles; |
| 31 | | - global $smwgIP, $smwgNamespace, $wgJobClasses, $wgExtensionAliasesFiles, $wgServerName; |
| | 31 | + global $smwgIP, $smwgNamespace, $wgJobClasses, $wgExtensionAliasesFiles, $wgServer; |
| 32 | 32 | |
| 33 | 33 | // The dot tells that the domain is not complete. It will be completed |
| 34 | 34 | // in the Export since we do not want to create a title object here when |
| 35 | 35 | // it is not needed in many cases. |
| 36 | 36 | if ( $namespace === null ) { |
| 37 | | - $namespace = $wgServerName; |
| | 37 | + wfWarn( 'You should be providing the domain name to enableSemantics()' ); |
| | 38 | + $namespace = parse_url( $wgServer, PHP_URL_HOST ); |
| 38 | 39 | } |
| 39 | 40 | if ( !$complete && ( $smwgNamespace !== '' ) ) { |
| 40 | 41 | $smwgNamespace = '.' . $namespace; |
| — | — | @@ -489,4 +490,4 @@ |
| 490 | 491 | $smwgContLang = new $smwContLangClass(); |
| 491 | 492 | |
| 492 | 493 | wfProfileOut( 'smwfInitContentLanguage (SMW)' ); |
| 493 | | -} |
| \ No newline at end of file |
| | 494 | +} |
| Index: trunk/extensions/SemanticTasks/SemanticTasks.classes.php |
| — | — | @@ -365,7 +365,7 @@ |
| 366 | 366 | } |
| 367 | 367 | |
| 368 | 368 | function remindAssignees( $wiki_url ) { |
| 369 | | - global $wgSitename, $wgServer; |
| | 369 | + global $wgSitename, $wgServer, $wgNoReplyAddress; |
| 370 | 370 | |
| 371 | 371 | $user_mailer = new UserMailer(); |
| 372 | 372 | |
| — | — | @@ -380,7 +380,7 @@ |
| 381 | 381 | return FALSE; |
| 382 | 382 | } |
| 383 | 383 | |
| 384 | | - $sender = new MailAddress( "no-reply@$wgServerName", "$wgSitename" ); |
| | 384 | + $sender = new MailAddress( $wgNoReplyAddress, $wgSitename ); |
| 385 | 385 | |
| 386 | 386 | while ( $row = $results->getNext() ) { |
| 387 | 387 | $task_name = $row[0]->getNextObject()->getTitle(); |
| — | — | @@ -436,4 +436,4 @@ |
| 437 | 437 | } |
| 438 | 438 | } |
| 439 | 439 | } |
| 440 | | -} |
| \ No newline at end of file |
| | 440 | +} |
| Index: trunk/extensions/OAI/OAIRepo_body.php |
| — | — | @@ -518,9 +518,19 @@ |
| 519 | 519 | return null; |
| 520 | 520 | } |
| 521 | 521 | |
| | 522 | + static function identifierPrefix() { |
| | 523 | + static $prefix = false; |
| | 524 | + if ( !$prefix ) { |
| | 525 | + global $wgServer, $wgDBname; |
| | 526 | + wfSuppressWarnings(); |
| | 527 | + $prefix = "oai:" . parse_url( $wgServer, PHP_URL_HOST ) . ":$wgDBname:"; |
| | 528 | + wfRestoreWarnings(); |
| | 529 | + } |
| | 530 | + return $prefix; |
| | 531 | + } |
| | 532 | + |
| 522 | 533 | function stripIdentifier( $identifier ) { |
| 523 | | - global $wgServerName, $wgDBname; |
| 524 | | - $prefix = "oai:$wgServerName:$wgDBname:"; |
| | 534 | + $prefix = self::identifierPrefix(); |
| 525 | 535 | if( substr( $identifier, 0, strlen( $prefix ) ) == $prefix ) { |
| 526 | 536 | $pageid = substr( $identifier, strlen( $prefix ) ); |
| 527 | 537 | if( preg_match( '/^\d+$/', $pageid ) ) { |
| — | — | @@ -773,8 +783,7 @@ |
| 774 | 784 | } |
| 775 | 785 | |
| 776 | 786 | function getIdentifier() { |
| 777 | | - global $wgDBname, $wgServerName; |
| 778 | | - return "oai:$wgServerName:$wgDBname:{$this->_id}"; |
| | 787 | + return OAIRepo::identifierPrefix() . $this->_id; |
| 779 | 788 | } |
| 780 | 789 | |
| 781 | 790 | function getDatestamp() { |
| Index: trunk/extensions/ContactPageFundraiser/install.settings |
| — | — | @@ -1,5 +1,5 @@ |
| 2 | 2 | require_once( "{{path}}/ContactPage.php" ); |
| 3 | 3 | |
| 4 | 4 | $wgContactUser = 'WikiAdmin'; |
| 5 | | -$wgContactSender = 'apache@' . $wgServerName; |
| | 5 | +$wgContactSender = $wgPasswordSender; |
| 6 | 6 | $wgContactSenderName = 'Contact Form on ' . $wgSitename; |
| Index: trunk/extensions/ContactPageFundraiser/README |
| — | — | @@ -28,7 +28,7 @@ |
| 29 | 29 | require_once( "$IP/extensions/ContactPage/ContactPage.php" ); |
| 30 | 30 | |
| 31 | 31 | $wgContactUser = 'WikiAdmin'; |
| 32 | | - $wgContactSender = 'apache@' . $wgServerName; |
| | 32 | + $wgContactSender = $wgPasswordSender; |
| 33 | 33 | $wgContactSenderName = 'Contact Form on ' . $wgSitename; |
| 34 | 34 | |
| 35 | 35 | |
| Index: trunk/extensions/News/README |
| — | — | @@ -217,4 +217,4 @@ |
| 218 | 218 | * $wgNewsFeedUserPattern: this defines the pattern used to generate author |
| 219 | 219 | names in feed items. In the pattern, $1 is replaced by the user name. To |
| 220 | 220 | e.g. generate email-addresses at your site as author names, use |
| 221 | | - $wgNewsFeedUserPattern = '$1@' . $wgServerName; |
| | 221 | + $wgNewsFeedUserPattern = '$1@example.com'; |