Index: trunk/extensions/Survey/Survey.settings.php |
— | — | @@ -20,6 +20,11 @@ |
21 | 21 | |
22 | 22 | protected static function getDefaultSettings() { |
23 | 23 | return array( |
| 24 | + 'defaultEnabled' => false, |
| 25 | + 'defaultUserType' => Survey::$USER_ALL, |
| 26 | + 'defaultNamespaces' => array(), |
| 27 | + 'defaultRatio' => 100, |
| 28 | + 'defaultExpiry' => 60 * 60 * 24 * 30 |
24 | 29 | ); |
25 | 30 | } |
26 | 31 | |
Index: trunk/extensions/Survey/includes/Survey.class.php |
— | — | @@ -62,14 +62,14 @@ |
63 | 63 | return array( |
64 | 64 | 'name' => '', |
65 | 65 | 'title' => '', |
66 | | - 'enabled' => '0', |
| 66 | + 'enabled' => SurveySettings::get( 'defaultEnabled' ) ? '1' : '0', |
67 | 67 | 'header' => 'Thank you for taking this short survey. Please fill out the following questions:', |
68 | 68 | 'footer' => '', |
69 | 69 | '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' ), |
74 | 74 | ); |
75 | 75 | } |
76 | 76 | |