r94859 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94858‎ | r94859 | r94860 >
Date:03:28, 18 August 2011
Author:nagelp
Status:ok
Tags:
Comment:
Followup to r89637 - replaced function getDiffCss() with a call to file_get_contents()
Modified paths:
  • /trunk/extensions/Notificator/Notificator.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Notificator/Notificator.body.php
@@ -77,16 +77,6 @@
7878 return $res;
7979 }
8080
81 -private function getDiffCss() {
82 - $ret = '';
83 - $file = fopen( dirname( __FILE__ ) . '/diff-in-mail.css', 'r' );
84 - while ( !feof( $file ) ) {
85 - $ret = $ret . fgets( $file, 4096 );
86 - }
87 - fclose ( $file );
88 - return $ret;
89 -}
90 -
9181 public static function receiverIsValid( $receiver ) {
9282 // Returns true if the parameter is a valid e-mail address, false if not
9383 $receiverIsValid = true;
@@ -169,7 +159,7 @@
170160 $differenceEngineObj = new DifferenceEngine( $titleObj, $oldRevId, $revId );
171161
172162 $notificationDiffHtml = '<style media="screen" type="text/css">' .
173 - Notificator::getDiffCss() . '</style><table class="diff">
 163+ file_get_contents( dirname( __FILE__ ) . '/diff-in-mail.css' ) . '</style><table class="diff">
174164 <col class="diff-marker" />
175165 <col class="diff-content" />
176166 <col class="diff-marker" />

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89637Initial commit of new extension Notificatornagelp09:20, 7 June 2011

Status & tagging log