[geeklog-hg] geeklog: Fixed Illegal string offset 'phantom' when using Batch ...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Tue Feb 19 14:57:49 EST 2013
changeset 8958:60fbb85e22f4
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/60fbb85e22f4
user: Dirk Haun <dirk at haun-online.de>
date: Tue Feb 19 20:09:23 2013 +0100
description:
Fixed Illegal string offset 'phantom' when using Batch Admin mode (bug #0001558)
diffstat:
public_html/admin/user.php | 24 ++++++++++++++++--------
1 files changed, 16 insertions(+), 8 deletions(-)
diffs (39 lines):
diff -r c31b469e5bdd -r 60fbb85e22f4 public_html/admin/user.php
--- a/public_html/admin/user.php Tue Feb 19 20:05:20 2013 +0100
+++ b/public_html/admin/user.php Tue Feb 19 20:09:23 2013 +0100
@@ -743,19 +743,27 @@
$usr_type = '';
if (isset($_REQUEST['usr_type'])) {
$usr_type = COM_applyFilter($_REQUEST['usr_type']);
- } else {
+ }
+ if (! in_array($usr_type, array('phantom', 'sort', 'old', 'recent'))) {
$usr_type = 'phantom';
}
+
$usr_time_arr = array();
+ // default values, in months
+ $usr_time_arr['phantom'] = 2;
+ $usr_time_arr['short'] = 6;
+ $usr_time_arr['old'] = 24;
+ $usr_time_arr['recent'] = 1;
+
$usr_time = '';
if (isset($_REQUEST['usr_time'])) {
- $usr_time_arr = $_REQUEST['usr_time'];
- } else {
- // default values, in months
- $usr_time_arr['phantom'] = 2;
- $usr_time_arr['short'] = 6;
- $usr_time_arr['old'] = 24;
- $usr_time_arr['recent'] = 1;
+ // 'usr_time' is an array when clicking "Update List" but a single
+ // value when actually deleting users
+ if (is_array($_REQUEST['usr_time'])) {
+ $usr_time_arr = $_REQUEST['usr_time'];
+ } else {
+ $usr_time_arr[$usr_type] = (int) $_REQUEST['usr_time'];
+ }
}
$usr_time = $usr_time_arr[$usr_type];
More information about the geeklog-cvs
mailing list