r94857 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94856‎ | r94857 | r94858 >
Date:03:02, 18 August 2011
Author:nagelp
Status:ok
Tags:
Comment:
Followup to r94727 - no space after ! in if conditions
Modified paths:
  • /trunk/extensions/Notificator/Notificator.body.php (modified) (history)
  • /trunk/extensions/Notificator/SpecialNotificator.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Notificator/Notificator.body.php
@@ -11,12 +11,12 @@
1212
1313 global $wgScript, $wgTitle;
1414
15 - if ( ! $receiverLabel ) {
 15+ if ( !$receiverLabel ) {
1616 $receiverLabel = $receiver;
1717 }
1818
1919 // Check that the database table is in place
20 - if ( ! Notificator::checkDatabaseTableExists() ) {
 20+ if ( !Notificator::checkDatabaseTableExists() ) {
2121 $output = '<span class="error">' .
2222 htmlspecialchars( wfMsg( 'notificator-db-table-does-not-exist' ) ) . '</span>';
2323 return array( $output, 'noparse' => true, 'isHTML' => true );
@@ -107,13 +107,13 @@
108108 // User::isValidEmailAddr() has been moved to Sanitizer::validateEmail as of
109109 // MediaWiki version 1.18 (I think).
110110 foreach ( $receiverArray as $singleEmailAddress ) {
111 - if ( ! Sanitizer::validateEmail( $singleEmailAddress ) ) {
 111+ if ( !Sanitizer::validateEmail( $singleEmailAddress ) ) {
112112 $receiverIsValid = false;
113113 }
114114 }
115115 } else {
116116 foreach ( $receiverArray as $singleEmailAddress ) {
117 - if ( ! User::isValidEmailAddr( $singleEmailAddress ) ) {
 117+ if ( !User::isValidEmailAddr( $singleEmailAddress ) ) {
118118 $receiverIsValid = false;
119119 }
120120 }
@@ -127,7 +127,7 @@
128128 // (= notified already)
129129 // Returns revId from the database - if there is no record, return 0
130130
131 - if ( ! $pageId || ! $revId || ! $receiver ) {
 131+ if ( !$pageId || !$revId || !$receiver ) {
132132 return -1;
133133 }
134134
@@ -146,7 +146,7 @@
147147
148148 $oldRevId = $row['rev_id'];
149149
150 - if ( ! $oldRevId ) {
 150+ if ( !$oldRevId ) {
151151 $oldRevId = 0;
152152 } elseif ( $oldRevId == $revId ) {
153153 $oldRevId = -2;
Index: trunk/extensions/Notificator/SpecialNotificator.php
@@ -21,7 +21,7 @@
2222 $revId = $wgRequest->getText( 'revId' );
2323 $receiver = $wgRequest->getText( 'receiver' );
2424
25 - if ( ! $pageId || ! $revId || ! $receiver ) {
 25+ if ( !$pageId || !$revId || !$receiver ) {
2626 $output = '<span class="error">' . htmlspecialchars(
2727 wfMsg( 'notificator-special-page-accessed-directly' ) ) . '</span>';
2828 } else {
@@ -29,7 +29,7 @@
3030 $pageTitle = $titleObj->getFullText();
3131 $linkToPage = $titleObj->getFullURL();
3232
33 - if ( ! Notificator::receiverIsValid( $receiver ) ) {
 33+ if ( !Notificator::receiverIsValid( $receiver ) ) {
3434 $output = '<span class="error">' . htmlspecialchars(
3535 wfMsg( 'notificator-e-mail-address-invalid' ) . ' ' .
3636 wfMsg( 'notificator-notification-not-sent' ) ) . '</span>';

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r94727Added support for specifying multiple (up to 10) addressesnagelp03:49, 17 August 2011

Status & tagging log