|
From: Meik S. <acy...@us...> - 2007-09-22 18:29:39
|
Update of /cvsroot/phpbb/phpBB2/includes/acp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9449/acp Modified Files: acp_ban.php acp_board.php acp_email.php acp_forums.php acp_groups.php acp_icons.php acp_modules.php acp_permissions.php acp_prune.php acp_search.php acp_styles.php acp_users.php auth.php Log Message: #i62 - #i65 gone through every javascript invocation and making sure we adhere to our coding guidelines. Index: auth.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/acp/auth.php,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** auth.php 27 Jul 2007 17:32:45 -0000 1.52 --- auth.php 22 Sep 2007 18:29:38 -0000 1.53 *************** *** 383,387 **** } ! $s_role_js_array[$row['role_id']] .= 'role_options[' . $row['role_id'] . '][\'' . $row['auth_option'] . '\'] = ' . $row['auth_setting'] . '; '; } $db->sql_freeresult($result); --- 383,387 ---- } ! $s_role_js_array[$row['role_id']] .= 'role_options[' . $row['role_id'] . '][\'' . addslashes($row['auth_option']) . '\'] = ' . $row['auth_setting'] . '; '; } $db->sql_freeresult($result); Index: acp_icons.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/acp/acp_icons.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** acp_icons.php 6 Aug 2007 23:17:40 -0000 1.36 --- acp_icons.php 22 Sep 2007 18:29:38 -0000 1.37 *************** *** 242,245 **** --- 242,246 ---- $template->assign_block_vars('items', array( 'IMG' => $img, + 'A_IMG' => addslashes($img), 'IMG_SRC' => $phpbb_root_path . $img_path . '/' . $img, Index: acp_users.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/acp/acp_users.php,v retrieving revision 1.133 retrieving revision 1.134 diff -C2 -d -r1.133 -r1.134 *** acp_users.php 21 Sep 2007 15:05:04 -0000 1.133 --- acp_users.php 22 Sep 2007 18:29:38 -0000 1.134 *************** *** 69,75 **** 'S_SELECT_USER' => true, 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=select_user&field=username&select_single=true'), ! 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=select_user&field=username&select_single=true', false), ! ) ! ); return; --- 69,73 ---- 'S_SELECT_USER' => true, 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=select_user&field=username&select_single=true'), ! )); return; Index: acp_modules.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/acp/acp_modules.php,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** acp_modules.php 24 Jul 2007 15:18:42 -0000 1.49 --- acp_modules.php 22 Sep 2007 18:29:38 -0000 1.50 *************** *** 311,315 **** $s_name_options .= '<option value="' . $option . '"' . (($option == $module_data['module_basename']) ? ' selected="selected"' : '') . '>' . $this->lang_name($values['title']) . ' [' . $this->module_class . '_' . $option . ']</option>'; ! $template->assign_block_vars('m_names', array('NAME' => $option)); // Build module modes --- 311,315 ---- $s_name_options .= '<option value="' . $option . '"' . (($option == $module_data['module_basename']) ? ' selected="selected"' : '') . '>' . $this->lang_name($values['title']) . ' [' . $this->module_class . '_' . $option . ']</option>'; ! $template->assign_block_vars('m_names', array('NAME' => $option, 'A_NAME' => addslashes($option))); // Build module modes Index: acp_board.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/acp/acp_board.php,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** acp_board.php 22 Sep 2007 13:33:05 -0000 1.78 --- acp_board.php 22 Sep 2007 18:29:38 -0000 1.79 *************** *** 785,789 **** $user->dst = $old_dst; ! return "<select name=\"dateoptions\" id=\"dateoptions\" onchange=\"if (this.value == 'custom') { document.getElementById('$key').value = '$value'; } else { document.getElementById('$key').value = this.value; }\">$dateformat_options</select> <input type=\"text\" name=\"config[$key]\" id=\"$key\" value=\"$value\" maxlength=\"30\" />"; } --- 785,789 ---- $user->dst = $old_dst; ! return "<select name=\"dateoptions\" id=\"dateoptions\" onchange=\"if (this.value == 'custom') { document.getElementById('" . addslashes($key) . "').value = '" . addslashes($value) . "'; } else { document.getElementById('" . addslashes($key) . "').value = this.value; }\">$dateformat_options</select> <input type=\"text\" name=\"config[$key]\" id=\"$key\" value=\"$value\" maxlength=\"30\" />"; } Index: acp_permissions.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/acp/acp_permissions.php,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** acp_permissions.php 2 Sep 2007 17:32:40 -0000 1.61 --- acp_permissions.php 22 Sep 2007 18:29:38 -0000 1.62 *************** *** 333,338 **** 'S_SELECT_USER' => true, 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=select_victim&field=username&select_single=true'), ! 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=select_victim&field=username&select_single=true', false)) ! ); break; --- 333,337 ---- 'S_SELECT_USER' => true, 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=select_victim&field=username&select_single=true'), ! )); break; *************** *** 396,401 **** 'S_ADD_GROUP_OPTIONS' => group_select_options(false, $items['group_ids'], (($user->data['user_type'] == USER_FOUNDER) ? false : 0)), 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=add_user&field=username&select_single=true'), ! 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=add_user&field=username&select_single=true', false)) ! ); break; --- 395,399 ---- 'S_ADD_GROUP_OPTIONS' => group_select_options(false, $items['group_ids'], (($user->data['user_type'] == USER_FOUNDER) ? false : 0)), 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=add_user&field=username&select_single=true'), ! )); break; Index: acp_prune.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/acp/acp_prune.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** acp_prune.php 20 Jul 2007 19:07:19 -0000 1.27 --- acp_prune.php 22 Sep 2007 18:29:38 -0000 1.28 *************** *** 351,356 **** 'S_ACTIVE_OPTIONS' => $s_find_active_time, 'S_COUNT_OPTIONS' => $s_find_count, ! 'U_FIND_USER' => append_sid($phpbb_root_path . "memberlist.$phpEx", 'mode=searchuser&form=acp_prune&field=users')) ! ); } --- 351,356 ---- 'S_ACTIVE_OPTIONS' => $s_find_active_time, 'S_COUNT_OPTIONS' => $s_find_count, ! 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=acp_prune&field=users'), ! )); } Index: acp_groups.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/acp/acp_groups.php,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** acp_groups.php 22 Jul 2007 20:10:08 -0000 1.60 --- acp_groups.php 22 Sep 2007 18:29:38 -0000 1.61 *************** *** 559,563 **** 'U_BACK' => $u_back, 'U_SWATCH' => append_sid("{$phpbb_admin_path}swatch.$phpEx", 'form=settings&name=group_colour'), - 'UA_SWATCH' => append_sid("{$phpbb_admin_path}swatch.$phpEx", 'form=settings&name=group_colour', false), 'U_ACTION' => "{$this->u_action}&action=$action&g=$group_id", 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024)), --- 559,562 ---- *************** *** 629,635 **** 'U_BACK' => $this->u_action, 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=list&field=usernames'), ! 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=list&field=usernames', false), ! 'U_DEFAULT_ALL' => "{$this->u_action}&action=default&g=$group_id") ! ); // Grab the members --- 628,633 ---- 'U_BACK' => $this->u_action, 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=list&field=usernames'), ! 'U_DEFAULT_ALL' => "{$this->u_action}&action=default&g=$group_id", ! )); // Grab the members Index: acp_search.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/acp/acp_search.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** acp_search.php 18 Aug 2007 13:52:33 -0000 1.36 --- acp_search.php 22 Sep 2007 18:29:38 -0000 1.37 *************** *** 474,479 **** 'U_ACTION' => $this->u_action, 'U_PROGRESS_BAR' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=progress_bar"), ! 'UA_PROGRESS_BAR' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=progress_bar", false)) ! ); if (isset($this->state[1])) --- 474,479 ---- 'U_ACTION' => $this->u_action, 'U_PROGRESS_BAR' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=progress_bar"), ! 'UA_PROGRESS_BAR' => addslashes(append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=progress_bar")), ! )); if (isset($this->state[1])) Index: acp_styles.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/acp/acp_styles.php,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -d -r1.112 -r1.113 *** acp_styles.php 18 Sep 2007 14:48:29 -0000 1.112 --- acp_styles.php 22 Sep 2007 18:29:38 -0000 1.113 *************** *** 988,992 **** $template->assign_block_vars('file', array( 'U_VIEWSOURCE' => $this->u_action . "&action=cache&id=$template_id&source=$file", - 'UA_VIEWSOURCE' => str_replace('&', '&', $this->u_action) . "&action=cache&id=$template_id&source=$file", 'CACHED' => $user->format_date(filemtime("{$phpbb_root_path}cache/$filename")), --- 988,991 ---- *************** *** 1455,1458 **** --- 1454,1458 ---- 'U_BACK' => $this->u_action, 'NAME' => $imageset_name, + 'A_NAME' => addslashes($imageset_name), 'ERROR' => !$valid_name, 'IMG_SRC' => ($image_found) ? '../styles/' . $imageset_path . '/imageset/' . $img_val : 'images/no_image.png', Index: acp_ban.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/acp/acp_ban.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** acp_ban.php 22 Jul 2007 20:10:08 -0000 1.20 --- acp_ban.php 22 Sep 2007 18:29:38 -0000 1.21 *************** *** 98,104 **** 'U_ACTION' => $this->u_action, ! 'U_FIND_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=acp_ban&field=ban'), ! ) ! ); } --- 98,103 ---- 'U_ACTION' => $this->u_action, ! 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=acp_ban&field=ban'), ! )); } *************** *** 180,187 **** { $template->assign_block_vars('ban_length', array( ! 'BAN_ID' => $ban_id, 'LENGTH' => $length, ! 'A_LENGTH' => addslashes($length)) ! ); } } --- 179,186 ---- { $template->assign_block_vars('ban_length', array( ! 'BAN_ID' => (int) $ban_id, 'LENGTH' => $length, ! 'A_LENGTH' => addslashes($length), ! )); } } *************** *** 194,199 **** 'BAN_ID' => $ban_id, 'REASON' => $reason, ! 'A_REASON' => addslashes(htmlspecialchars_decode($reason))) ! ); } } --- 193,198 ---- 'BAN_ID' => $ban_id, 'REASON' => $reason, ! 'A_REASON' => addslashes(htmlspecialchars_decode($reason)), ! )); } } *************** *** 206,211 **** 'BAN_ID' => $ban_id, 'REASON' => $reason, ! 'A_REASON' => addslashes(htmlspecialchars_decode($reason))) ! ); } } --- 205,210 ---- 'BAN_ID' => $ban_id, 'REASON' => $reason, ! 'A_REASON' => addslashes(htmlspecialchars_decode($reason)), ! )); } } Index: acp_email.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/acp/acp_email.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** acp_email.php 22 Jul 2007 20:10:08 -0000 1.29 --- acp_email.php 22 Sep 2007 18:29:38 -0000 1.30 *************** *** 236,240 **** 'USERNAMES' => $usernames, 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=acp_email&field=usernames'), - 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=acp_email&field=usernames', false), 'SUBJECT' => $subject, 'MESSAGE' => $message, --- 236,239 ---- Index: acp_forums.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/acp/acp_forums.php,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** acp_forums.php 7 Sep 2007 14:01:18 -0000 1.70 --- acp_forums.php 22 Sep 2007 18:29:38 -0000 1.71 *************** *** 345,349 **** $template->assign_vars(array( 'U_PROGRESS_BAR' => $this->u_action . "&action=progress_bar&start=$topics_done&total={$row['forum_topics_real']}", ! 'UA_PROGRESS_BAR' => str_replace('&', '&', $this->u_action) . "&action=progress_bar&start=$topics_done&total={$row['forum_topics_real']}", 'S_CONTINUE_SYNC' => true, 'L_PROGRESS_EXPLAIN' => sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], $topics_done, $row['forum_topics_real'])) --- 345,349 ---- $template->assign_vars(array( 'U_PROGRESS_BAR' => $this->u_action . "&action=progress_bar&start=$topics_done&total={$row['forum_topics_real']}", ! 'UA_PROGRESS_BAR' => addslashes($this->u_action . "&action=progress_bar&start=$topics_done&total={$row['forum_topics_real']}"), 'S_CONTINUE_SYNC' => true, 'L_PROGRESS_EXPLAIN' => sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], $topics_done, $row['forum_topics_real'])) *************** *** 359,363 **** $template->assign_vars(array( 'U_PROGRESS_BAR' => $this->u_action . '&action=progress_bar', ! 'UA_PROGRESS_BAR' => str_replace('&', '&', $this->u_action) . '&action=progress_bar', 'S_CONTINUE_SYNC' => true, 'L_PROGRESS_EXPLAIN' => sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], 0, $row['forum_topics_real'])) --- 359,363 ---- $template->assign_vars(array( 'U_PROGRESS_BAR' => $this->u_action . '&action=progress_bar', ! 'UA_PROGRESS_BAR' => addslashes($this->u_action . '&action=progress_bar'), 'S_CONTINUE_SYNC' => true, 'L_PROGRESS_EXPLAIN' => sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], 0, $row['forum_topics_real'])) *************** *** 832,837 **** 'U_PROGRESS_BAR' => $this->u_action . '&action=progress_bar', ! 'UA_PROGRESS_BAR' => str_replace('&', '&', $this->u_action) . '&action=progress_bar') ! ); } --- 832,837 ---- 'U_PROGRESS_BAR' => $this->u_action . '&action=progress_bar', ! 'UA_PROGRESS_BAR' => addslashes($this->u_action . '&action=progress_bar'), ! )); } |