r110136 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110135‎ | r110136 | r110137 >
Date:16:05, 27 January 2012
Author:rsterbin
Status:resolved (Comments)
Tags:aft 
Comment:
Added temporary config variable wgArticleFeedbackv5SelectedCTA so that Roan can switch off the survey CTA without backing out any changes
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php
@@ -152,6 +152,16 @@
153153 );
154154
155155 /**
 156+ * Temporary hack: for now, only one CTA is allowed, so set it here.
 157+ *
 158+ * Allowed values: '0' (just a confirm message), '1' (call to edit), '2' (learn
 159+ * more), or '3' (survey)
 160+ *
 161+ * @var int
 162+ */
 163+$wgArticleFeedbackv5SelectedCTA = '3';
 164+
 165+/**
156166 * Turn on abuse filtering
157167 *
158168 * If this is set to true, comments will be run through:
Index: trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5.php
@@ -693,7 +693,8 @@
694694 * @return int the cta id
695695 */
696696 public function getCTAId( $answers, $bucket ) {
697 - return 3; # Hard-code this for now.
 697+ global $wgArticleFeedbackv5SelectedCTA;
 698+ return $wgArticleFeedbackv5SelectedCTA;
698699 }
699700
700701 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r110173Fix for r110136 -- should be an int, not a stringrsterbin21:41, 27 January 2012

Comments

#Comment by Reedy (talk | contribs)   17:15, 27 January 2012

You changed it from an integer to a string

#Comment by Rsterbin (talk | contribs)   21:42, 27 January 2012
#Comment by Reedy (talk | contribs)   21:59, 27 January 2012

Thanks

Status & tagging log