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
 define('DONOR_INVITES',     2);
76
 define('DONOR_INVITES',     2);
77
 
77
 
78
 // Features
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
 // User class IDs needed for automatic promotions. Found in the 'permissions' table
86
 // User class IDs needed for automatic promotions. Found in the 'permissions' table
86
 // Name of class  Class ID (NOT level)
87
 // Name of class  Class ID (NOT level)

+ 2
- 0
design/privateheader.php View File

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

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

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

Loading…
Cancel
Save