Gentoo Archives: gentoo-commits

From: "Dean Stephens (desultory)" <desultory@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-projects commit in forums/htdocs/admin: admin_forums.php admin_ranks.php admin_smilies.php admin_statistics.php admin_styles.php admin_ug_auth.php admin_users.php admin_words.php
Date: Thu, 30 Jul 2009 06:38:55
Message-Id: E1MWPHu-0007c4-RD@stork.gentoo.org
1 desultory 09/07/30 06:38:50
2
3 Modified: admin_forums.php admin_ranks.php admin_smilies.php
4 admin_statistics.php admin_styles.php
5 admin_ug_auth.php admin_users.php admin_words.php
6 Log:
7 Upgrade to 2.0.23, add some proxy fixes, fix bug 191626 and bug 170166.
8
9 Revision Changes Path
10 1.5 forums/htdocs/admin/admin_forums.php
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_forums.php?rev=1.5&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_forums.php?rev=1.5&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_forums.php?r1=1.4&r2=1.5
15
16 Index: admin_forums.php
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-projects/forums/htdocs/admin/admin_forums.php,v
19 retrieving revision 1.4
20 retrieving revision 1.5
21 diff -u -r1.4 -r1.5
22 --- admin_forums.php 8 Jun 2006 22:08:45 -0000 1.4
23 +++ admin_forums.php 30 Jul 2009 06:38:50 -0000 1.5
24 @@ -6,7 +6,7 @@
25 * copyright : (C) 2001 The phpBB Group
26 * email : support@×××××.com
27 *
28 - * $Id: admin_forums.php,v 1.4 2006/06/08 22:08:45 tomk Exp $
29 + * $Id: admin_forums.php,v 1.5 2009/07/30 06:38:50 desultory Exp $
30 *
31 ***************************************************************************/
32
33 @@ -806,7 +806,7 @@
34 $vote_ids = '';
35 do
36 {
37 - $vote_ids = (($vote_ids != '') ? ', ' : '') . $row['vote_id'];
38 + $vote_ids .= (($vote_ids != '') ? ', ' : '') . $row['vote_id'];
39 }
40 while ($row = $db->sql_fetchrow($result));
41
42
43
44
45 1.6 forums/htdocs/admin/admin_ranks.php
46
47 file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_ranks.php?rev=1.6&view=markup
48 plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_ranks.php?rev=1.6&content-type=text/plain
49 diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_ranks.php?r1=1.5&r2=1.6
50
51 Index: admin_ranks.php
52 ===================================================================
53 RCS file: /var/cvsroot/gentoo-projects/forums/htdocs/admin/admin_ranks.php,v
54 retrieving revision 1.5
55 retrieving revision 1.6
56 diff -u -r1.5 -r1.6
57 --- admin_ranks.php 9 Jun 2006 19:14:17 -0000 1.5
58 +++ admin_ranks.php 30 Jul 2009 06:38:50 -0000 1.6
59 @@ -6,7 +6,7 @@
60 * copyright : (C) 2001 The phpBB Group
61 * email : support@×××××.com
62 *
63 - * $Id: admin_ranks.php,v 1.5 2006/06/09 19:14:17 tomk Exp $
64 + * $Id: admin_ranks.php,v 1.6 2009/07/30 06:38:50 desultory Exp $
65 *
66 ***************************************************************************/
67
68 @@ -34,7 +34,7 @@
69 $phpbb_root_path = "./../";
70 require($phpbb_root_path . 'extension.inc');
71
72 -$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? true : false;
73 +$cancel = ( isset($HTTP_POST_VARS['cancel']) || isset($_POST['cancel']) ) ? true : false;
74 $no_page_header = $cancel;
75
76 require('./pagestart.' . $phpEx);
77
78
79
80 1.5 forums/htdocs/admin/admin_smilies.php
81
82 file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_smilies.php?rev=1.5&view=markup
83 plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_smilies.php?rev=1.5&content-type=text/plain
84 diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_smilies.php?r1=1.4&r2=1.5
85
86 Index: admin_smilies.php
87 ===================================================================
88 RCS file: /var/cvsroot/gentoo-projects/forums/htdocs/admin/admin_smilies.php,v
89 retrieving revision 1.4
90 retrieving revision 1.5
91 diff -u -r1.4 -r1.5
92 --- admin_smilies.php 9 Jun 2006 19:14:17 -0000 1.4
93 +++ admin_smilies.php 30 Jul 2009 06:38:50 -0000 1.5
94 @@ -6,7 +6,7 @@
95 * copyright : (C) 2001 The phpBB Group
96 * email : support@×××××.com
97 *
98 -* $Id: admin_smilies.php,v 1.4 2006/06/09 19:14:17 tomk Exp $
99 +* $Id: admin_smilies.php,v 1.5 2009/07/30 06:38:50 desultory Exp $
100 *
101 ****************************************************************************/
102
103 @@ -36,23 +36,20 @@
104 return;
105 }
106
107 +$phpbb_root_path = "./../";
108 +require($phpbb_root_path . 'extension.inc');
109 +
110 +$cancel = ( isset($HTTP_POST_VARS['cancel']) || isset($_POST['cancel']) ) ? true : false;
111 +$no_page_header = $cancel;
112 +
113 //
114 // Load default header
115 //
116 -if( isset($HTTP_GET_VARS['export_pack']) )
117 +if ((!empty($HTTP_GET_VARS['export_pack']) && $HTTP_GET_VARS['export_pack'] == 'send') || (!empty($_GET['export_pack']) && $_GET['export_pack'] == 'send'))
118 {
119 - if ( $HTTP_GET_VARS['export_pack'] == "send" )
120 - {
121 - $no_page_header = true;
122 - }
123 + $no_page_header = true;
124 }
125
126 -$phpbb_root_path = "./../";
127 -require($phpbb_root_path . 'extension.inc');
128 -
129 -$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? true : false;
130 -$no_page_header = $cancel;
131 -
132 require('./pagestart.' . $phpEx);
133
134 if ($cancel)
135
136
137
138 1.4 forums/htdocs/admin/admin_statistics.php
139
140 file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_statistics.php?rev=1.4&view=markup
141 plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_statistics.php?rev=1.4&content-type=text/plain
142 diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_statistics.php?r1=1.3&r2=1.4
143
144 Index: admin_statistics.php
145 ===================================================================
146 RCS file: /var/cvsroot/gentoo-projects/forums/htdocs/admin/admin_statistics.php,v
147 retrieving revision 1.3
148 retrieving revision 1.4
149 diff -u -r1.3 -r1.4
150 --- admin_statistics.php 10 May 2006 13:11:05 -0000 1.3
151 +++ admin_statistics.php 30 Jul 2009 06:38:50 -0000 1.4
152 @@ -6,7 +6,7 @@
153 * copyright : (C) 2002 Meik Sievertsen
154 * email : acyd.burn@×××.de
155 *
156 -* $Id: admin_statistics.php,v 1.3 2006/05/10 13:11:05 tomk Exp $
157 +* $Id: admin_statistics.php,v 1.4 2009/07/30 06:38:50 desultory Exp $
158 *
159 *
160 ***************************************************************************/
161 @@ -879,11 +879,12 @@
162
163 $__language = $board_config['default_lang'];
164
165 - if (!@file_exists(@realpath($phpbb_root_path . $__stats_config['modules_dir'] . '/' . $__module_name . '/lang_' . $__language . '/lang.' . $phpEx)))
166 + // 2008-12 desultory -- Localization data moved from lang.php to lang_extra.php some time ago.
167 + if (!@file_exists(@realpath($phpbb_root_path . 'language/lang_' . $__language . '/lang_extra.' . $phpEx)))
168 {
169 $__language = 'english';
170 }
171 - include($phpbb_root_path . $__stats_config['modules_dir'] . '/' . $__module_name . '/lang_' . $__language . '/lang.' . $phpEx);
172 + include($phpbb_root_path . 'language/lang_' . $__language . '/lang_extra.' . $phpEx);
173
174 $statistics->result_cache_used = FALSE;
175 $statistics->db_cache_used = FALSE;
176
177
178
179 1.5 forums/htdocs/admin/admin_styles.php
180
181 file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_styles.php?rev=1.5&view=markup
182 plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_styles.php?rev=1.5&content-type=text/plain
183 diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_styles.php?r1=1.4&r2=1.5
184
185 Index: admin_styles.php
186 ===================================================================
187 RCS file: /var/cvsroot/gentoo-projects/forums/htdocs/admin/admin_styles.php,v
188 retrieving revision 1.4
189 retrieving revision 1.5
190 diff -u -r1.4 -r1.5
191 --- admin_styles.php 9 Jun 2006 19:14:17 -0000 1.4
192 +++ admin_styles.php 30 Jul 2009 06:38:50 -0000 1.5
193 @@ -6,7 +6,7 @@
194 * copyright : (C) 2001 The phpBB Group
195 * email : support@×××××.com
196 *
197 - * $Id: admin_styles.php,v 1.4 2006/06/09 19:14:17 tomk Exp $
198 + * $Id: admin_styles.php,v 1.5 2009/07/30 06:38:50 desultory Exp $
199 *
200 *
201 ***************************************************************************/
202 @@ -41,10 +41,10 @@
203 $phpbb_root_path = "./../";
204 require($phpbb_root_path . 'extension.inc');
205
206 -$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE;
207 -$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE;
208 +$confirm = (isset($HTTP_POST_VARS['confirm']) || isset($_POST['confirm'])) ? TRUE : FALSE;
209 +$cancel = (isset($HTTP_POST_VARS['cancel']) || isset($_POST['cancel'])) ? TRUE : FALSE;
210
211 -$no_page_header = (!empty($HTTP_POST_VARS['send_file']) || $cancel) ? TRUE : FALSE;
212 +$no_page_header = (!empty($HTTP_POST_VARS['send_file']) || !empty($_POST['send_file']) || $cancel) ? TRUE : FALSE;
213
214 require('./pagestart.' . $phpEx);
215
216
217
218
219 1.4 forums/htdocs/admin/admin_ug_auth.php
220
221 file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_ug_auth.php?rev=1.4&view=markup
222 plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_ug_auth.php?rev=1.4&content-type=text/plain
223 diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_ug_auth.php?r1=1.3&r2=1.4
224
225 Index: admin_ug_auth.php
226 ===================================================================
227 RCS file: /var/cvsroot/gentoo-projects/forums/htdocs/admin/admin_ug_auth.php,v
228 retrieving revision 1.3
229 retrieving revision 1.4
230 diff -u -r1.3 -r1.4
231 --- admin_ug_auth.php 29 Jan 2006 18:20:14 -0000 1.3
232 +++ admin_ug_auth.php 30 Jul 2009 06:38:50 -0000 1.4
233 @@ -6,7 +6,7 @@
234 * copyright : (C) 2001 The phpBB Group
235 * email : support@×××××.com
236 *
237 - * $Id: admin_ug_auth.php,v 1.3 2006/01/29 18:20:14 tomk Exp $
238 + * $Id: admin_ug_auth.php,v 1.4 2009/07/30 06:38:50 desultory Exp $
239 *
240 *
241 ***************************************************************************/
242 @@ -231,11 +231,47 @@
243 else
244 {
245
246 - $change_mod_list = ( isset($HTTP_POST_VARS['moderator']) ) ? $HTTP_POST_VARS['moderator'] : false;
247 + $change_mod_list = ( isset($HTTP_POST_VARS['moderator']) ) ? $HTTP_POST_VARS['moderator'] : array();
248
249 if ( empty($adv) )
250 {
251 - $change_acl_list = ( isset($HTTP_POST_VARS['private']) ) ? $HTTP_POST_VARS['private'] : false;
252 + $sql = "SELECT f.*
253 + FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c
254 + WHERE f.cat_id = c.cat_id
255 + ORDER BY c.cat_order, f.forum_order ASC";
256 + if ( !($result = $db->sql_query($sql)) )
257 + {
258 + message_die(GENERAL_ERROR, "Couldn't obtain forum information", "", __LINE__, __FILE__, $sql);
259 + }
260 +
261 + $forum_access = $forum_auth_level_fields = array();
262 + while( $row = $db->sql_fetchrow($result) )
263 + {
264 + $forum_access[] = $row;
265 + }
266 + $db->sql_freeresult($result);
267 +
268 + for($i = 0; $i < count($forum_access); $i++)
269 + {
270 + $forum_id = $forum_access[$i]['forum_id'];
271 +
272 + for($j = 0; $j < count($forum_auth_fields); $j++)
273 + {
274 + $forum_auth_level_fields[$forum_id][$forum_auth_fields[$j]] = $forum_access[$i][$forum_auth_fields[$j]] == AUTH_ACL;
275 + }
276 + }
277 +
278 + while( list($forum_id, $value) = @each($HTTP_POST_VARS['private']) )
279 + {
280 + while( list($auth_field, $exists) = @each($forum_auth_level_fields[$forum_id]) )
281 + {
282 + if ($exists)
283 + {
284 + $change_acl_list[$forum_id][$auth_field] = $value;
285 + }
286 + }
287 + }
288 +
289 }
290 else
291 {
292 @@ -289,11 +325,11 @@
293 $forum_id = $forum_access[$i]['forum_id'];
294
295 if (
296 - ( isset($auth_access[$forum_id]['auth_mod']) && $change_mod_list[$forum_id]['auth_mod'] != $auth_access[$forum_id]['auth_mod'] ) ||
297 - ( !isset($auth_access[$forum_id]['auth_mod']) && !empty($change_mod_list[$forum_id]['auth_mod']) )
298 + ( isset($auth_access[$forum_id]['auth_mod']) && $change_mod_list[$forum_id] != $auth_access[$forum_id]['auth_mod'] ) ||
299 + ( !isset($auth_access[$forum_id]['auth_mod']) && !empty($change_mod_list[$forum_id]) )
300 )
301 {
302 - $update_mod_status[$forum_id] = $change_mod_list[$forum_id]['auth_mod'];
303 + $update_mod_status[$forum_id] = $change_mod_list[$forum_id];
304
305 if ( !$update_mod_status[$forum_id] )
306 {
307
308
309
310 1.11 forums/htdocs/admin/admin_users.php
311
312 file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_users.php?rev=1.11&view=markup
313 plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_users.php?rev=1.11&content-type=text/plain
314 diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_users.php?r1=1.10&r2=1.11
315
316 Index: admin_users.php
317 ===================================================================
318 RCS file: /var/cvsroot/gentoo-projects/forums/htdocs/admin/admin_users.php,v
319 retrieving revision 1.10
320 retrieving revision 1.11
321 diff -u -r1.10 -r1.11
322 --- admin_users.php 29 Dec 2006 11:52:49 -0000 1.10
323 +++ admin_users.php 30 Jul 2009 06:38:50 -0000 1.11
324 @@ -6,7 +6,7 @@
325 * copyright : (C) 2001 The phpBB Group
326 * email : support@×××××.com
327 *
328 - * $Id: admin_users.php,v 1.10 2006/12/29 11:52:49 tomk Exp $
329 + * $Id: admin_users.php,v 1.11 2009/07/30 06:38:50 desultory Exp $
330 *
331 *
332 ***************************************************************************/
333 @@ -109,30 +109,12 @@
334 message_die(GENERAL_ERROR, 'Could not update votes for this user', '', __LINE__, __FILE__, $sql);
335 }
336
337 - $sql = "SELECT group_id
338 - FROM " . GROUPS_TABLE . "
339 + $sql = "UPDATE " . GROUPS_TABLE . "
340 + SET group_moderator = " . $userdata['user_id'] . "
341 WHERE group_moderator = $user_id";
342 - if( !($result = $db->sql_query($sql)) )
343 - {
344 - message_die(GENERAL_ERROR, 'Could not select groups where user was moderator', '', __LINE__, __FILE__, $sql);
345 - }
346 -
347 - while ( $row_group = $db->sql_fetchrow($result) )
348 - {
349 - $group_moderator[] = $row_group['group_id'];
350 - }
351 -
352 - if ( count($group_moderator) )
353 + if( !$db->sql_query($sql) )
354 {
355 - $update_moderator_id = implode(', ', $group_moderator);
356 -
357 - $sql = "UPDATE " . GROUPS_TABLE . "
358 - SET group_moderator = " . $userdata['user_id'] . "
359 - WHERE group_moderator IN ($update_moderator_id)";
360 - if( !$db->sql_query($sql) )
361 - {
362 - message_die(GENERAL_ERROR, 'Could not update group moderators', '', __LINE__, __FILE__, $sql);
363 - }
364 + message_die(GENERAL_ERROR, 'Could not update group moderators', '', __LINE__, __FILE__, $sql);
365 }
366
367 $sql = "DELETE FROM " . USERS_TABLE . "
368
369
370
371 1.5 forums/htdocs/admin/admin_words.php
372
373 file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_words.php?rev=1.5&view=markup
374 plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_words.php?rev=1.5&content-type=text/plain
375 diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/forums/htdocs/admin/admin_words.php?r1=1.4&r2=1.5
376
377 Index: admin_words.php
378 ===================================================================
379 RCS file: /var/cvsroot/gentoo-projects/forums/htdocs/admin/admin_words.php,v
380 retrieving revision 1.4
381 retrieving revision 1.5
382 diff -u -r1.4 -r1.5
383 --- admin_words.php 9 Jun 2006 19:14:17 -0000 1.4
384 +++ admin_words.php 30 Jul 2009 06:38:50 -0000 1.5
385 @@ -6,7 +6,7 @@
386 * copyright : (C) 2001 The phpBB Group
387 * email : support@×××××.com
388 *
389 - * $Id: admin_words.php,v 1.4 2006/06/09 19:14:17 tomk Exp $
390 + * $Id: admin_words.php,v 1.5 2009/07/30 06:38:50 desultory Exp $
391 *
392 *
393 ***************************************************************************/
394 @@ -35,7 +35,7 @@
395 $phpbb_root_path = "./../";
396 require($phpbb_root_path . 'extension.inc');
397
398 -$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? true : false;
399 +$cancel = (isset($HTTP_POST_VARS['cancel']) || isset($_POST['cancel'])) ? true : false;
400 $no_page_header = $cancel;
401
402 require('./pagestart.' . $phpEx);
403 @@ -107,8 +107,8 @@
404 }
405
406 $template->assign_vars(array(
407 - "WORD" => $word_info['word'],
408 - "REPLACEMENT" => $word_info['replacement'],
409 + "WORD" => htmlspecialchars($word_info['word']),
410 + "REPLACEMENT" => htmlspecialchars($word_info['replacement']),
411
412 "L_WORDS_TITLE" => $lang['Words_title'],
413 "L_WORDS_TEXT" => $lang['Words_explain'],
414 @@ -257,8 +257,8 @@
415 $template->assign_block_vars("words", array(
416 "ROW_COLOR" => "#" . $row_color,
417 "ROW_CLASS" => $row_class,
418 - "WORD" => $word,
419 - "REPLACEMENT" => $replacement,
420 + "WORD" => htmlspecialchars($word),
421 + "REPLACEMENT" => htmlspecialchars($replacement),
422
423 "U_WORD_EDIT" => append_sid("admin_words.$phpEx?mode=edit&amp;id=$word_id"),
424 "U_WORD_DELETE" => append_sid("admin_words.$phpEx?mode=delete&amp;id=$word_id"))