aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm/admin_board.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2003-07-07 23:40:01 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2003-07-07 23:40:01 +0000
commit696e83355548f3d06e38eb2c19d713bc76ba9a18 (patch)
treeb32cd8b5ce54c0e73891417f1d07b066fc386899 /phpBB/adm/admin_board.php
parent1b320bbb006a685d33032a6d1a39de44b4e858a7 (diff)
downloadforums-696e83355548f3d06e38eb2c19d713bc76ba9a18.tar
forums-696e83355548f3d06e38eb2c19d713bc76ba9a18.tar.gz
forums-696e83355548f3d06e38eb2c19d713bc76ba9a18.tar.bz2
forums-696e83355548f3d06e38eb2c19d713bc76ba9a18.tar.xz
forums-696e83355548f3d06e38eb2c19d713bc76ba9a18.zip
"Fix" ongoing issue with caching and slashes
git-svn-id: file:///svn/phpbb/trunk@4211 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/adm/admin_board.php')
-rw-r--r--phpBB/adm/admin_board.php47
1 files changed, 42 insertions, 5 deletions
diff --git a/phpBB/adm/admin_board.php b/phpBB/adm/admin_board.php
index 1d7b8a70e9..648273ad45 100644
--- a/phpBB/adm/admin_board.php
+++ b/phpBB/adm/admin_board.php
@@ -30,6 +30,7 @@ if (!empty($setmodules))
$module['GENERAL']['SERVER_SETTINGS'] = ($auth->acl_get('a_server')) ? "$file$SID&amp;mode=server" : '';
$module['GENERAL']['AUTH_SETTINGS'] = ($auth->acl_get('a_server')) ? "$file$SID&amp;mode=auth" : '';
$module['GENERAL']['LOAD_SETTINGS'] = ($auth->acl_get('a_server')) ? "$file$SID&amp;mode=load" : '';
+ $module['USER']['KARMA_SETTINGS'] = ($auth->acl_get('a_users')) ? "$file$SID&amp;mode=karma" : '';
return;
}
@@ -77,6 +78,10 @@ switch ($mode)
$l_title = 'AUTH_SETTINGS';
$which_auth = 'a_server';
break;
+ case 'karma':
+ $l_title = 'KARMA_SETTINGS';
+ $which_auth = 'a_users';
+ break;
default:
return;
}
@@ -243,7 +248,9 @@ switch ($mode)
$attachments_yes = ($new['allow_attachments']) ? 'checked="checked"' : '';
$attachments_no = (!$new['allow_attachments']) ? 'checked="checked"' : '';
- $user_char_ary = array('USERNAME_CHARS_ANY' => '.*', 'USERNAME_ALPHA_ONLY' => '[\w]+', 'USERNAME_ALPHA_SPACERS' => '[\w_\+\. \-\[\]]+');
+ // Caching screws up slashes so we fudge a solution
+ $new['allow_name_chars'] = ;
+ $user_char_ary = array('USERNAME_CHARS_ANY' => '.*', 'USERNAME_ALPHA_ONLY' => '[/w]+', 'USERNAME_ALPHA_SPACERS' => '[/w_/+/. /-/[/]]+');
$user_char_options = '';
foreach ($user_char_ary as $lang => $value)
{
@@ -313,10 +320,6 @@ switch ($mode)
<td class="row2"><input class="post" type="text" size="3" maxlength="3" name="min_pass_chars" value="<?php echo $new['min_pass_chars']; ?>" /> <?php echo $user->lang['MIN_CHARS']; ?>&nbsp;&nbsp;<input class="post" type="text" size="3" maxlength="3" name="max_pass_chars" value="<?php echo $new['max_pass_chars']; ?>" /> <?php echo $user->lang['MAX_CHARS']; ?></td>
</tr>
<tr>
- <td class="row1"><?php echo $user->lang['MIN_RATINGS']; ?>: <br /><span class="gensmall"><?php echo $user->lang['MIN_RATINGS_EXPLAIN']; ?></span</td>
- <td class="row2"><input class="post" type="text" size="3" maxlength="5" name="min_ratings" value="<?php echo $new['min_ratings']; ?>" /></td>
- </tr>
- <tr>
<td class="row1"><?php echo $user->lang['ALLOW_EMAIL_REUSE']; ?>: <br /><span class="gensmall"><?php echo $user->lang['ALLOW_EMAIL_REUSE_EXPLAIN']; ?></span></td>
<td class="row2"><input type="radio" name="allow_emailreuse" value="1" <?php echo $emailreuse_yes; ?> /> <?php echo $user->lang['YES']; ?>&nbsp;&nbsp;<input type="radio" name="allow_emailreuse" value="0" <?php echo $emailreuse_no; ?> /> <?php echo $user->lang['NO']; ?></td>
</tr>
@@ -714,6 +717,40 @@ switch ($mode)
}
break;
+
+ case 'karma':
+
+ $enable_karma_yes = ($new['enable_karma']) ? 'checked="checked"' : '';
+ $enable_karma_no = (!$new['enable_karma']) ? 'checked="checked"' : '';
+
+?>
+ <tr>
+ <td class="row1"><?php echo $user->lang['ENABLE_KARMA']; ?>: </td>
+ <td class="row2"><input type="radio" name="enable_karma" value="1"<?php echo $enable_karma_yes ?> /><?php echo $user->lang['YES'] ?>&nbsp; &nbsp;<input type="radio" name="enable_karma" value="0" <?php echo $enable_karma_no ?> /> <?php echo $user->lang['NO']; ?></td>
+ </tr>
+ <tr>
+ <td class="row1"><?php echo $user->lang['MIN_RATINGS']; ?>: <br /><span class="gensmall"><?php echo $user->lang['MIN_RATINGS_EXPLAIN']; ?></span</td>
+ <td class="row2"><input class="post" type="text" size="3" maxlength="5" name="min_ratings" value="<?php echo $new['min_ratings']; ?>" /></td>
+ </tr>
+ <tr>
+ <td class="row1"><?php echo $user->lang['KARMA_HIST_WEIGHT']; ?>: <br /><span class="gensmall"><?php echo $user->lang['KARMA_HIST_WEIGHT_EXPLAIN']; ?></span</td>
+ <td class="row2"><input class="post" type="text" size="3" maxlength="5" name="karma_hist_weight" value="<?php echo $new['karma_hist_weight']; ?>" /></td>
+ </tr>
+ <tr>
+ <td class="row1"><?php echo $user->lang['KARMA_DAY_WEIGHT']; ?>: <br /><span class="gensmall"><?php echo $user->lang['KARMA_DAY_WEIGHT_EXPLAIN']; ?></span</td>
+ <td class="row2"><input class="post" type="text" size="3" maxlength="5" name="karma_day_weight" value="<?php echo $new['karma_30_weight']; ?>" /></td>
+ </tr>
+ <tr>
+ <td class="row1"><?php echo $user->lang['KARMA_REG_WEIGHT']; ?>: <br /><span class="gensmall"><?php echo $user->lang['KARMA_REG_WEIGHT_EXPLAIN']; ?></span</td>
+ <td class="row2"><input class="post" type="text" size="3" maxlength="5" name="karma_reg_weight" value="<?php echo $new['karma_reg_weight']; ?>" /></td>
+ </tr>
+ <tr>
+ <td class="row1"><?php echo $user->lang['KARMA_POST_WEIGHT']; ?>: <br /><span class="gensmall"><?php echo $user->lang['KARMA_POST_WEIGHT_EXPLAIN']; ?></span</td>
+ <td class="row2"><input class="post" type="text" size="3" maxlength="5" name="karma_post_weight" value="<?php echo $new['karma_post_weight']; ?>" /></td>
+ </tr>
+<?php
+
+ break;
}
?>