From: Tim Starling Date: Sat, 14 May 2005 17:55:04 +0000 (+0000) Subject: Attempting to get enotif into working order. Many aesthetic changes, a fair number... X-Git-Tag: 1.5.0alpha2~195 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/fiche.php?a=commitdiff_plain;h=554bbccf31b5802c2ac0ec7ccd994cadc748dec8;p=lhc%2Fweb%2Fwiklou.git Attempting to get enotif into working order. Many aesthetic changes, a fair number of bug fixes too. There's also a couple of non-enotif bug fixes in this commit somewhere. --- diff --git a/config/index.php b/config/index.php index 4bd27d3971..3053d8d604 100644 --- a/config/index.php +++ b/config/index.php @@ -1098,8 +1098,8 @@ if ( \$wgCommandLineMode ) { ## There are many more options for fine tuning available see ## /includes/DefaultSettings.php ## UPO means: this is also a user preference option -\$wgEmailNotificationForUserTalkPages = $enotifusertalk; # UPO -\$wgEmailNotificationForWatchlistPages = $enotifwatchlist; # UPO +\$wgEnotifUserTalk = $enotifusertalk; # UPO +\$wgEnotifWatchlist = $enotifwatchlist; # UPO \$wgEmailAuthentication = $eauthent; \$wgDBserver = \"{$slconf['DBserver']}\"; diff --git a/includes/Article.php b/includes/Article.php index 35b1ed525f..cdbcf1ee23 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1223,7 +1223,7 @@ class Article { include_once( "UserMailer.php" ); $wgEnotif = new EmailNotification (); - $wgEnotif->NotifyOnPageChange( $wgUser->getID(), $this->mTitle->getDBkey(), $this->mTitle->getNamespace(),$now, $summary, $me2, $oldid ); + $wgEnotif->notifyOnPageChange( $this->mTitle, $now, $summary, $me2, $oldid ); } /** @@ -1926,7 +1926,8 @@ class Article { global $wgUser; if ($this->mTitle->getNamespace() == NS_USER_TALK && - $this->mTitle->getText() == $wgUser->getName()) { + $this->mTitle->getText() == $wgUser->getName()) + { require_once( 'UserTalkUpdate.php' ); $u = new UserTalkUpdate( 0, $this->mTitle->getNamespace(), $this->mTitle->getDBkey(), false, false, false ); } else { diff --git a/includes/ChangesList.php b/includes/ChangesList.php index baa731f62e..6524d087e9 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -83,10 +83,6 @@ class ChangesList { if ( $rcObj->watched ) $link = ''.$link.'' ; $r .= $link ; - if ($rcObj->notificationtimestamp) { - $r .= wfMsg( 'updatedmarker' ); - } - # Diff $r .= ' (' ; $r .= $rcObj->difflink ; @@ -174,10 +170,6 @@ class ChangesList { if ( $block[0]->watched ) $link = ''.$link.'' ; $r .= $link ; - if ($block[0]->notificationtimestamp) { - $r .= wfMsg( 'updatedmarker' ); - } - $curIdEq = 'curid=' . $block[0]->mAttribs['rc_cur_id']; if ( $block[0]->mAttribs['rc_type'] != RC_LOG ) { # Changes @@ -356,10 +348,6 @@ class ChangesList { $articleLink = ''.$articleLink.''; } - if ($rc->notificationtimestamp) { - $articleLink .= wfMsg( 'updatedmarker' ); - } - $s .= ' '.$articleLink; wfProfileOut("$fname-page"); } @@ -476,7 +464,6 @@ class ChangesList { $rc->watched = $watched ; $rc->link = $clink ; $rc->timestamp = $time; - $rc->notificationtimestamp = $baseRC->notificationtimestamp; $rc->numberofWatchingusers = $baseRC->numberofWatchingusers; # Make "cur" and "diff" links diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index bfdd8c521b..378494dd8a 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -629,30 +629,22 @@ $wgUseGzip = false; # Email notification settings # -/** - * Program to run when the email is actually sent out. You might want to make - * your server beep for example. Usermailer.php will make a system() call with - * exactly that string as parameter. - */ -# $wgEmailNotificationSystembeep = '/usr/bin/beep -f 4000 -l 20 &'; -$wgEmailNotificationSystembeep = ''; - /** For email notification on page changes */ $wgPasswordSender = $wgEmergencyContact; -# true: from PageEditor if s/he opted-in +# true: from page editor if s/he opted-in # false: Enotif mails appear to come from $wgEmergencyContact -$wgEmailNotificationMailsSentFromPageEditor = false; +$wgEnotifFromEditor = false; // TODO move UPO to preferences probably ? # If set to true, users get a corresponding option in their preferences and can choose to enable or disable at their discretion # If set to false, the corresponding input form on the user preference page is suppressed # It call this to be a "user-preferences-option (UPO)" $wgEmailAuthentication = true; # UPO (if this is set to false, texts referring to authentication are suppressed) -$wgEmailNotificationForWatchlistPages = false; # UPO -$wgEmailNotificationForUserTalkPages = false; # UPO -$wgEmailNotificationRevealPageEditorAddress = false; # UPO; reply-to address may be filled with page editor's address (if user allowed this in the preferences) -$wgEmailNotificationForMinorEdits = true; # UPO; false: "minor edits" on pages do not trigger notification mails. +$wgEnotifWatchlist = false; # UPO +$wgEnotifUserTalk = false; # UPO +$wgEnotifRevealEditorAddress = false; # UPO; reply-to address may be filled with page editor's address (if user allowed this in the preferences) +$wgEnotifMinorEdits = true; # UPO; false: "minor edits" on pages do not trigger notification mails. # # Attention: _every_ change on a user_talk page trigger a notification mail (if the user is not yet notified) diff --git a/includes/EditPage.php b/includes/EditPage.php index 1961489af8..b168152823 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -696,11 +696,11 @@ END if ( $isConflict ) { require_once( "DifferenceEngine.php" ); - $wgOut->WikiText( '==' . wfMsg( "yourdiff" ) . '==' ); + $wgOut->addWikiText( '==' . wfMsg( "yourdiff" ) . '==' ); DifferenceEngine::showDiff( $this->textbox2, $this->textbox1, wfMsg( "yourtext" ), wfMsg( "storedversion" ) ); - $wgOut->WikiText( '==' . wfMsg( "yourtext" ) . '==' ); + $wgOut->addWikiText( '==' . wfMsg( "yourtext" ) . '==' ); $wgOut->addHTML( "