---- dokuwiki-2013-05-10/inc/common.php~ 2013-05-28 22:43:32.565530521 +0300
-+++ dokuwiki-2013-05-10/inc/common.php 2013-05-28 22:47:27.455072897 +0300
-@@ -902,6 +902,34 @@
- return $date;
+--- dokuwiki-2022-07-31a/inc/common.php~ 2023-03-30 18:04:18.000000000 +0300
++++ dokuwiki-2022-07-31a/inc/common.php 2023-03-30 18:05:59.000277451 +0300
+@@ -897,6 +897,34 @@ function gethostsbyaddrs($ips) {
+ }
}
+
+}
+
/**
- * Sends a notify mail on page change
+ * Checks if a given page is currently locked.
*
-@@ -1162,10 +1162,10 @@
+@@ -1346,10 +1346,10 @@
// decide if there is something to do, eg. whom to mail
- if($who == 'admin') {
-- if(empty($conf['notify'])) return false; //notify enabled?
- if($conf['useacl'] && $_SERVER['REMOTE_USER'] && $minor) return; //skip minors
+ if ($who == 'admin') {
+- if (empty($conf['notify'])) return false; //notify enabled?
+ if ($conf['useacl'] && $INPUT->server->str('REMOTE_USER') && $minor) return false; //skip minors
$tpl = 'mailtext';
- $to = $conf['notify'];
+ $to = notifyNS($id, $conf['notify']);
-+ if(empty($to)) return; //notify enabled?
- } elseif($who == 'subscribers') {
- if(!actionOK('subscribe')) return false; //subscribers enabled?
- if($conf['useacl'] && $_SERVER['REMOTE_USER'] && $minor) return false; //skip minors
---- dokuwiki-2014-05-06/inc/media.php~ 2014-05-06 15:09:52.000000000 +0300
-+++ dokuwiki-2014-05-06/inc/media.php 2014-05-08 11:24:16.977561680 +0300
-@@ -573,10 +573,11 @@
++ if (empty($to)) return false; //notify enabled?
+ } elseif ($who == 'subscribers') {
+ if (!actionOK('subscribe')) return false; //subscribers enabled?
+ if ($conf['useacl'] && $INPUT->server->str('REMOTE_USER') && $minor) return false; //skip minors
+--- dokuwiki-2022-07-31a/inc/media.php~ 2022-09-03 20:15:22.000000000 +0300
++++ dokuwiki-2022-07-31a/inc/media.php 2023-03-30 18:08:07.797735926 +0300
+@@ -668,10 +668,11 @@
*/
- function media_notify($id,$file,$mime,$old_rev=false){
+ function media_notify($id,$file,$mime,$old_rev=false,$current_rev=false){
global $conf;
-- if(empty($conf['notify'])) return false; //notify enabled?
+- if(empty($conf['notify'])) return; //notify enabled?
+ $to = notifyNS($id, $conf['notify']);
-+ if(empty($to)) return false; //notify enabled?
++ if (empty($to)) return; //notify enabled?
- $subscription = new Subscription();
-- return $subscription->send_media_diff($conf['notify'], 'uploadmail', $id, $old_rev);
-+ return $subscription->send_media_diff($to, 'uploadmail', $id, $old_rev);
+ $subscription = new MediaSubscriptionSender();
+- $subscription->sendMediaDiff($conf['notify'], 'uploadmail', $id, $old_rev, $current_rev);
++ $subscription->sendMediaDiff($to, 'uploadmail', $id, $old_rev, $current_rev);
}
/**
---- dokuwiki-2013-05-10/inc/subscription.php~ 2013-05-10 15:45:54.000000000 +0300
-+++ dokuwiki-2013-05-10/inc/subscription.php 2013-05-28 22:50:30.872112776 +0300
-@@ -484,7 +484,8 @@
- */
- public function send_register($login, $fullname, $email) {
+--- dokuwiki-2020-07-29a/inc/Subscriptions/RegistrationSubscriptionSender.php~ 2022-09-03 19:58:24.000000000 +0300
++++ dokuwiki-2020-07-29a/inc/Subscriptions/RegistrationSubscriptionSender.php 2023-03-27 11:37:39.640069460 +0300
+@@ -19,7 +19,8 @@
+ public function sendRegister($login, $fullname, $email)
+ {
global $conf;
-- if(empty($conf['registernotify'])) return false;
-+ $to = notifyNS($id, $conf['registernotify']);
-+ if(empty($to)) return false;
+- if (empty($conf['registernotify'])) {
++ $to = notifyNS($id, $conf['registernotify']); // XXX $id undefined
++ if (empty($to)) {
+ return false;
+ }
- $trep = array(
- 'NEWUSER' => $login,
-@@ -493,7 +494,7 @@
- );
+@@ -30,7 +31,7 @@
+ ];
return $this->send(
- $conf['registernotify'],
'new_user',
$login,
'registermail',
-@@ -672,7 +672,8 @@
+--- dokuwiki-2020-07-29a/./inc/Subscriptions/SubscriberManager.php~ 2022-09-03 19:58:24.000000000 +0300
++++ dokuwiki-2020-07-29a/./inc/Subscriptions/SubscriberManager.php 2023-03-27 11:38:57.900505224 +0300
+@@ -257,7 +257,8 @@
$level = auth_aclcheck($id, $user, $userinfo['grps']);
- if($level >= AUTH_READ) {
-- if(strcasecmp($userinfo['mail'], $conf['notify']) != 0) { //skip user who get notified elsewhere
+ if ($level >= AUTH_READ) {
+- if (strcasecmp($userinfo['mail'], $conf['notify']) != 0) { //skip user who get notified elsewhere
+ $to = notifyNS($id, $conf['notify']);
-+ if(strcasecmp($userinfo['mail'], $to) != 0) { //skip user who get notified elsewhere
++ if (strcasecmp($userinfo['mail'], $to) != 0) { //skip user who get notified elsewhere
$result[$user] = $userinfo['mail'];
}
}