r111074 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111073‎ | r111074 | r111075 >
Date:19:30, 9 February 2012
Author:bsitu
Status:ok
Tags:nodeploy 
Comment:
remove rudundant empty spaces and add some comment
Modified paths:
  • /trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.hooks.php (modified) (history)
  • /trunk/extensions/ArticleCreationWorkflow/includes/ArticleCreationTemplates.php (modified) (history)
  • /trunk/extensions/ArticleCreationWorkflow/includes/ArticleCreationUtil.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleCreationWorkflow/includes/ArticleCreationUtil.php
@@ -4,22 +4,24 @@
55 * Utility class for Article Creation
66 */
77 class ArticleCreationUtil {
8 -
 8+
99 /**
10 - * Check if tracking is enabled
 10+ * Check if tracking is enabled, in this case - ClickTracking
 11+ * @return bool
1112 */
1213 public static function trackingEnabled() {
1314 return class_exists( 'ApiClickTracking' );
1415 }
15 -
 16+
1617 /**
17 - * Generate tracking code prefix
 18+ * Generate tracking code prefix for this campaign
 19+ * @return string - the prefix text for clickTracking
1820 */
1921 public static function trackingCodePrefix() {
2022 global $wgExtensionCredits;
21 - return 'ext.articlecreationworkflow@' . $wgExtensionCredits['other'][0]['version'] . '-';
 23+ return 'ext.articlecreationworkflow@' . $wgExtensionCredits['other'][0]['version'] . '-';
2224 }
23 -
 25+
2426 /**
2527 * Track the page stats to the special article creation landing page
2628 * @param $request Object
@@ -31,27 +33,27 @@
3234 $event = 'landingpage-anonymous';
3335 } else {
3436 $event = 'landingpage-loggedin';
35 -
 37+
3638 if ( $request->getBool( 'fromlogin' ) ) {
3739 $event .= '-fromlogin';
3840 } elseif ( $request->getBool( 'fromsignup' ) ) {
39 - $event .= '-fromsignup';
 41+ $event .= '-fromsignup';
4042 }
4143 }
42 -
 44+
4345 self::clickTracking( $event, SpecialPage::getTitleFor( 'ArticleCreationLanding' ), $par );
4446 }
4547
4648 /**
47 - * Tracking code that calls ClickTracking
 49+ * Tracking code that calls ClickTracking
4850 * @param $event string the event name
4951 * @param $title Object
5052 * @param $info string - additional info for click tracking
5153 */
52 - private static function clickTracking( $event, $title, $info = '' ) {
 54+ private static function clickTracking( $event, $title, $info = '' ) {
5355 // check if ClickTracking API is enabled
5456 if ( !self::trackingEnabled() ) {
55 - return;
 57+ return;
5658 }
5759
5860 $params = new FauxRequest( array(
@@ -64,6 +66,5 @@
6567 $api = new ApiMain( $params, true );
6668 $api->execute();
6769 }
68 -
 70+
6971 }
70 -
Index: trunk/extensions/ArticleCreationWorkflow/includes/ArticleCreationTemplates.php
@@ -190,7 +190,7 @@
191191 </div>
192192 HTML;
193193 }
194 -
 194+
195195 /**
196196 * Stub for a replacement Missing Page.
197197 * @param $article Article object for the page that was requested.
@@ -206,8 +206,5 @@
207207 </div>
208208 HTML;
209209 }
210 -
211 -}
212210
213 -
214 -
 211+}
Index: trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.hooks.php
@@ -4,6 +4,8 @@
55
66 /**
77 * Redirect users to a page specified by returnto upon successful account creation
 8+ * @param $welcome_creation_msg - string
 9+ * @param $injected_html - html string
810 */
911 public static function BeforeWelcomeCreation( &$welcome_creation_msg, &$injected_html ) {
1012 global $wgRequest, $wgOut;
@@ -24,6 +26,7 @@
2527
2628 /**
2729 * If the edit page is coming from red link, redirect users to article-non-existing page
 30+ * @param $editPage - Object
2831 */
2932 public static function AlternateEdit( $editPage ) {
3033 global $wgRequest, $wgOut;

Status & tagging log