r96817 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96816‎ | r96817 | r96818 >
Date:22:46, 11 September 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added some settings
Modified paths:
  • /trunk/extensions/Survey/Survey.settings.php (modified) (history)
  • /trunk/extensions/Survey/includes/Survey.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Survey/Survey.settings.php
@@ -20,6 +20,11 @@
2121
2222 protected static function getDefaultSettings() {
2323 return array(
 24+ 'defaultEnabled' => false,
 25+ 'defaultUserType' => Survey::$USER_ALL,
 26+ 'defaultNamespaces' => array(),
 27+ 'defaultRatio' => 100,
 28+ 'defaultExpiry' => 60 * 60 * 24 * 30
2429 );
2530 }
2631
Index: trunk/extensions/Survey/includes/Survey.class.php
@@ -62,14 +62,14 @@
6363 return array(
6464 'name' => '',
6565 'title' => '',
66 - 'enabled' => '0',
 66+ 'enabled' => SurveySettings::get( 'defaultEnabled' ) ? '1' : '0',
6767 'header' => 'Thank you for taking this short survey. Please fill out the following questions:',
6868 'footer' => '',
6969 'thanks' => 'Thank you for your responses.',
70 - 'user_type' => self::$USER_ALL,
71 - 'namespaces' => array(),
72 - 'ratio' => 100,
73 - 'expiry' => 60 * 60 * 24 * 30
 70+ 'user_type' => SurveySettings::get( 'defaultUserType' ),
 71+ 'namespaces' => SurveySettings::get( 'defaultNamespaces' ),
 72+ 'ratio' => SurveySettings::get( 'defaultRatio' ),
 73+ 'expiry' => SurveySettings::get( 'defaultExpiry' ),
7474 );
7575 }
7676

Status & tagging log