Browse Source

Add feature flag for donations

spaghetti 7 years ago
parent
commit
8c533ee1bf
3 changed files with 13 additions and 5 deletions
  1. 6
    5
      classes/config.template
  2. 2
    0
      design/privateheader.php
  3. 5
    0
      sections/donate/index.php

+ 6
- 5
classes/config.template View File

@@ -76,11 +76,12 @@ define('BLOCK_OPERA_MINI',  false); //Set to true to block Opera Mini proxy
76 76
 define('DONOR_INVITES',     2);
77 77
 
78 78
 // Features
79
-define('FEATURE_EMAIL_REENABLE',     true);
80
-define('FEATURE_SEND_EMAIL',         true);  //Attempt to send email from the site
81
-define('FEATURE_IRC',                true);  //Attempt to send messages to IRC
82
-define('FEATURE_ENFORCE_LOCATIONS',  true);  //Require users to verify login from unknown locations
83
-define('FEATURE_SET_ENC_KEY_PUBLIC', false); //Allow the site encryption key to be set without an account (Should only be used for initial setup)
79
+define('FEATURE_DONATE',             false); // Enable donation page
80
+define('FEATURE_EMAIL_REENABLE',     true);  // Send re-enable requests to user's email
81
+define('FEATURE_ENFORCE_LOCATIONS',  true);  // Require users to verify login from unknown locations
82
+define('FEATURE_IRC',                true);  // Attempt to send messages to IRC
83
+define('FEATURE_SEND_EMAIL',         true);  // Attempt to send email from the site
84
+define('FEATURE_SET_ENC_KEY_PUBLIC', false); // Allow the site encryption key to be set without an account (Should only be used for initial setup)
84 85
 
85 86
 // User class IDs needed for automatic promotions. Found in the 'permissions' table
86 87
 // Name of class  Class ID (NOT level)

+ 2
- 0
design/privateheader.php View File

@@ -284,9 +284,11 @@ if (check_perms('site_send_unlimited_invites')) {
284 284
           <li id="nav_invite" class="brackets<?=Format::add_class($PageID, array('user','invite'), 'active', false)?>">
285 285
             <a href="user.php?action=invite">Invite<?=$Invites?></a>
286 286
           </li>
287
+<? if (FEATURE_DONATE) { ?>
287 288
           <li id="nav_donate" class="brackets<?=Format::add_class($PageID, array('donate'), 'active', false)?>">
288 289
             <a href="donate.php">Donate</a>
289 290
           </li>
291
+<? } ?>
290 292
           <li id="nav_staff" class="brackets<?=Format::add_class($PageID, array('staff'), 'active', false)?>">
291 293
             <a href="staff.php">Staff</a>
292 294
           </li>

+ 5
- 0
sections/donate/index.php View File

@@ -1,4 +1,9 @@
1 1
 <?
2
+if (!FEATURE_DONATE) {
3
+  header('Location: index.php');
4
+  die();
5
+}
6
+
2 7
 //Module mini-config
3 8
 include(SERVER_ROOT.'/sections/donate/config.php');
4 9
 

Loading…
Cancel
Save