@@ -40,7 +40,6 @@ function send_change_mail(&$event, $param) {
4040 global $ ACT ;
4141 global $ INFO ;
4242 global $ conf ;
43- $ data = pageinfo ();
4443
4544 if ($ ACT != 'save ' ) {
4645 return true ;
@@ -71,7 +70,7 @@ function send_change_mail(&$event, $param) {
7170 }
7271
7372 // get mail sender
74- $ ReplyTo = $ data ['userinfo ' ]['mail ' ];
73+ $ ReplyTo = $ INFO ['userinfo ' ]['mail ' ];
7574
7675 if ($ ReplyTo == $ receiver ) {
7776 return true ;
@@ -82,7 +81,7 @@ function send_change_mail(&$event, $param) {
8281 }
8382
8483 // get mail subject
85- $ timestamp = dformat ($ data [ ' lastmod ' ] , $ conf ['dformat ' ]);
84+ $ timestamp = dformat (filemtime ( wikiFN ( $ ID )) , $ conf ['dformat ' ]);
8685 $ subject = $ this ->getLang ('apr_mail_subject ' ) . ': ' . $ ID . ' - ' . $ timestamp ;
8786
8887 $ body = $ this ->create_mail_body ('change ' );
@@ -106,16 +105,16 @@ function send_change_mail(&$event, $param) {
106105 public function create_mail_body ($ action ) {
107106 global $ ID ;
108107 global $ conf ;
109- $ pageinfo = pageinfo () ;
108+ global $ INFO ;
110109
111110 // get mail text
112- $ rev = $ pageinfo [ ' lastmod ' ] ;
111+ $ rev = filemtime ( wikiFN ( $ ID )) ;
113112
114113 if ($ action === 'change ' ) {
115114 $ body = io_readFile ($ this ->localFN ('mailchangetext ' ));
116115
117116 //If there is no approved revision show the diff to the revision before. Otherwise show the diff to the last approved revision.
118- if ($ this ->hlp ->hasApprovals ($ pageinfo ['meta ' ])) {
117+ if ($ this ->hlp ->hasApprovals ($ INFO ['meta ' ])) {
119118 $ aprpre = 'Aproved ' ;
120119 $ oldrev = $ this ->hlp ->getLatestApprovedRevision ($ ID );
121120 $ difflink = $ this ->hlp ->getDifflink ($ ID , $ oldrev , $ rev );
@@ -128,7 +127,7 @@ public function create_mail_body($action) {
128127
129128 $ body = str_replace ('@DIFF@ ' , $ difflink , $ body );
130129 $ body = str_replace ('@APRPRE@ ' , $ aprpre , $ body );
131- $ summary = $ pageinfo ['meta ' ]['last_change ' ]['sum ' ];
130+ $ summary = $ INFO ['meta ' ]['last_change ' ]['sum ' ];
132131 $ body = str_replace ('@SUMMARY@ ' , $ summary , $ body );
133132 if ($ oldrev === false ) {
134133 $ oldlink = '--- ' ;
0 commit comments