Update of /cvsroot/mxbb/mx_blogs/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv11401/admin Modified Files: admin_weblog_action.php admin_weblog_cfg.php admin_weblog_groups.php admin_weblog_mood.php admin_weblog_templates.php admin_weblog_tools.php Log Message: Removing trailing newlines... Index: admin_weblog_action.php =================================================================== RCS file: /cvsroot/mxbb/mx_blogs/admin/admin_weblog_action.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** admin_weblog_action.php 31 Jan 2008 03:36:34 -0000 1.3 --- admin_weblog_action.php 8 Feb 2008 23:37:18 -0000 1.4 *************** *** 43,47 **** $module_root_path = '../'; $mx_root_path = '../../../'; ! $phpEx = substr(strrchr(__FILE__, '.'), 1); require($mx_root_path . 'admin/pagestart.' . $phpEx); --- 43,47 ---- $module_root_path = '../'; $mx_root_path = '../../../'; ! $phpEx = substr(strrchr(__FILE__, '.'), 1); require($mx_root_path . 'admin/pagestart.' . $phpEx); *************** *** 352,354 **** include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); ! ?> --- 352,354 ---- include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); ! ?> \ No newline at end of file Index: admin_weblog_mood.php =================================================================== RCS file: /cvsroot/mxbb/mx_blogs/admin/admin_weblog_mood.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** admin_weblog_mood.php 31 Jan 2008 03:36:34 -0000 1.3 --- admin_weblog_mood.php 8 Feb 2008 23:37:19 -0000 1.4 *************** *** 574,576 **** include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); ! ?> --- 574,576 ---- include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); ! ?> \ No newline at end of file Index: admin_weblog_templates.php =================================================================== RCS file: /cvsroot/mxbb/mx_blogs/admin/admin_weblog_templates.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_weblog_templates.php 31 Jan 2008 03:36:34 -0000 1.2 --- admin_weblog_templates.php 8 Feb 2008 23:37:19 -0000 1.3 *************** *** 36,40 **** $module_root_path = "./../"; //include($mx_root_path . 'extension.inc'); ! $phpEx = substr(strrchr(__FILE__, '.'), 1); include($mx_root_path . 'admin/pagestart.' . $phpEx); include($module_root_path . 'includes/weblogs_constants.'.$phpEx); --- 36,40 ---- $module_root_path = "./../"; //include($mx_root_path . 'extension.inc'); ! $phpEx = substr(strrchr(__FILE__, '.'), 1); include($mx_root_path . 'admin/pagestart.' . $phpEx); include($module_root_path . 'includes/weblogs_constants.'.$phpEx); *************** *** 80,84 **** if ( !is_file($module_root_path. "weblogs/templates/" . $sub_dir) && $sub_dir != '.' && $sub_dir != '..' ) { ! $dir_select .= '<option value="' . $sub_dir . '"' . $selected . '>' . $sub_dir . '</option>'; } } --- 80,84 ---- if ( !is_file($module_root_path. "weblogs/templates/" . $sub_dir) && $sub_dir != '.' && $sub_dir != '..' ) { ! $dir_select .= '<option value="' . $sub_dir . '"' . $selected . '>' . $sub_dir . '</option>'; } } *************** *** 120,125 **** "L_RESET" => $lang['Reset'], ! "S_TEMPLATE_ACTION" => mx_append_sid("admin_weblog_templates.$phpEx?mode=savenew"), ! "S_HIDDEN_FIELDS" => $s_hidden_fields, "S_FILENAME_OPTIONS" => $filename_list) ); --- 120,125 ---- "L_RESET" => $lang['Reset'], ! "S_TEMPLATE_ACTION" => mx_append_sid("admin_weblog_templates.$phpEx?mode=savenew"), ! "S_HIDDEN_FIELDS" => $s_hidden_fields, "S_FILENAME_OPTIONS" => $filename_list) ); *************** *** 220,224 **** "S_TEMPLATE_ACTION" => mx_append_sid("admin_weblog_templates.$phpEx?mode=edit&id=$template_id"), ! "S_HIDDEN_FIELDS" => $s_hidden_fields, "S_FILENAME_OPTIONS" => $filename_list) ); --- 220,224 ---- "S_TEMPLATE_ACTION" => mx_append_sid("admin_weblog_templates.$phpEx?mode=edit&id=$template_id"), ! "S_HIDDEN_FIELDS" => $s_hidden_fields, "S_FILENAME_OPTIONS" => $filename_list) ); *************** *** 352,356 **** "L_PRIVATE" => $lang['Template_private'], ! "S_HIDDEN_FIELDS" => $s_hidden_fields, "S_TEMPLATE_ACTION" => mx_append_sid("admin_weblog_templates.$phpEx")) ); --- 352,356 ---- "L_PRIVATE" => $lang['Template_private'], ! "S_HIDDEN_FIELDS" => $s_hidden_fields, "S_TEMPLATE_ACTION" => mx_append_sid("admin_weblog_templates.$phpEx")) ); *************** *** 367,375 **** "ROW_COLOR" => "#" . $row_color, "ROW_CLASS" => $row_class, ! "TEMPLATE" => $template_data[$i]['template_name'], "TEMPLATE_IMAGE" => '<img src="' . $module_root_path . 'weblogs/templates/' . $template_data[$i]['template_dir'] . '/preview_img.gif" border="0">', "TEMPLATE_PRIVATE" => ( $template_data[$i]['template_private'] ) ? $lang['Yes'] : $lang['No'], ! "U_TEMPLATE_EDIT" => mx_append_sid("admin_weblog_templates.$phpEx?mode=edit&id=" . $template_data[$i]['template_id']), "U_TEMPLATE_DELETE" => mx_append_sid("admin_weblog_templates.$phpEx?mode=delete&id=" . $template_data[$i]['template_id'])) ); --- 367,375 ---- "ROW_COLOR" => "#" . $row_color, "ROW_CLASS" => $row_class, ! "TEMPLATE" => $template_data[$i]['template_name'], "TEMPLATE_IMAGE" => '<img src="' . $module_root_path . 'weblogs/templates/' . $template_data[$i]['template_dir'] . '/preview_img.gif" border="0">', "TEMPLATE_PRIVATE" => ( $template_data[$i]['template_private'] ) ? $lang['Yes'] : $lang['No'], ! "U_TEMPLATE_EDIT" => mx_append_sid("admin_weblog_templates.$phpEx?mode=edit&id=" . $template_data[$i]['template_id']), "U_TEMPLATE_DELETE" => mx_append_sid("admin_weblog_templates.$phpEx?mode=delete&id=" . $template_data[$i]['template_id'])) ); *************** *** 387,389 **** include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); ! ?> --- 387,389 ---- include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); ! ?> \ No newline at end of file Index: admin_weblog_cfg.php =================================================================== RCS file: /cvsroot/mxbb/mx_blogs/admin/admin_weblog_cfg.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_weblog_cfg.php 31 Jan 2008 03:36:34 -0000 1.2 --- admin_weblog_cfg.php 8 Feb 2008 23:37:18 -0000 1.3 *************** *** 36,40 **** $module_root_path = './../'; //include($mx_root_path . 'extension.inc'); ! $phpEx = substr(strrchr(__FILE__, '.'), 1); include($mx_root_path . 'admin/pagestart.' . $phpEx); //include($phpbb_root_path . 'includes/functions_selects.'.$phpEx); --- 36,40 ---- $module_root_path = './../'; //include($mx_root_path . 'extension.inc'); ! $phpEx = substr(strrchr(__FILE__, '.'), 1); include($mx_root_path . 'admin/pagestart.' . $phpEx); //include($phpbb_root_path . 'includes/functions_selects.'.$phpEx); *************** *** 70,74 **** $config_value = $row['config_value']; $default_config[$config_name] = isset($HTTP_POST_VARS['submit']) ? str_replace("'", "\'", $config_value) : $config_value; ! $new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name]; --- 70,74 ---- $config_value = $row['config_value']; $default_config[$config_name] = isset($HTTP_POST_VARS['submit']) ? str_replace("'", "\'", $config_value) : $config_value; ! $new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name]; *************** *** 159,163 **** // // Escape any quotes in the site description for proper display in the text ! // box on the admin page // $template->assign_vars(array( --- 159,163 ---- // // Escape any quotes in the site description for proper display in the text ! // box on the admin page // $template->assign_vars(array( *************** *** 244,246 **** include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); ! ?> --- 244,246 ---- include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); ! ?> \ No newline at end of file Index: admin_weblog_tools.php =================================================================== RCS file: /cvsroot/mxbb/mx_blogs/admin/admin_weblog_tools.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_weblog_tools.php 31 Jan 2008 03:36:34 -0000 1.2 --- admin_weblog_tools.php 8 Feb 2008 23:37:20 -0000 1.3 *************** *** 32,36 **** $module_root_path = "./../"; //include($mx_root_path . 'extension.inc'); ! $phpEx = substr(strrchr(__FILE__, '.'), 1); include($mx_root_path . 'common.'.$phpEx); include($mx_root_path . 'admin/pagestart.' . $phpEx); --- 32,36 ---- $module_root_path = "./../"; //include($mx_root_path . 'extension.inc'); ! $phpEx = substr(strrchr(__FILE__, '.'), 1); include($mx_root_path . 'common.'.$phpEx); include($mx_root_path . 'admin/pagestart.' . $phpEx); *************** *** 83,87 **** 'L_FIND_USERNAME' => $lang['Find_username'], ! 'U_SEARCH_USER' => mx_append_sid($phpbb_root_path . "search.$phpEx?mode=searchuser"), 'S_USER_ACTION' => mx_append_sid("admin_weblog_tools.$phpEx?mode=user_admin"), --- 83,87 ---- 'L_FIND_USERNAME' => $lang['Find_username'], ! 'U_SEARCH_USER' => mx_append_sid($phpbb_root_path . "search.$phpEx?mode=searchuser"), 'S_USER_ACTION' => mx_append_sid("admin_weblog_tools.$phpEx?mode=user_admin"), *************** *** 311,315 **** 'L_FIND_USERNAME' => $lang['Find_username'], ! 'U_SEARCH_USER' => mx_append_sid($phpbb_root_path . "search.$phpEx?mode=searchuser"), 'S_PURGE_ACTION' => mx_append_sid("admin_weblog_tools.$phpEx?mode=purge"), --- 311,315 ---- 'L_FIND_USERNAME' => $lang['Find_username'], ! 'U_SEARCH_USER' => mx_append_sid($phpbb_root_path . "search.$phpEx?mode=searchuser"), 'S_PURGE_ACTION' => mx_append_sid("admin_weblog_tools.$phpEx?mode=purge"), *************** *** 344,348 **** $username = ( isset($HTTP_POST_VARS['username']) ) ? $HTTP_POST_VARS['username'] : ''; ! $sql = "SELECT * FROM " . USERS_TABLE . " WHERE username = '" . str_replace("\'", "''", $username) . "'"; if ( !($result = $db->sql_query($sql)) ) --- 344,348 ---- $username = ( isset($HTTP_POST_VARS['username']) ) ? $HTTP_POST_VARS['username'] : ''; ! $sql = "SELECT * FROM " . USERS_TABLE . " WHERE username = '" . str_replace("\'", "''", $username) . "'"; if ( !($result = $db->sql_query($sql)) ) *************** *** 420,422 **** include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); ! ?> --- 420,422 ---- include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); ! ?> \ No newline at end of file Index: admin_weblog_groups.php =================================================================== RCS file: /cvsroot/mxbb/mx_blogs/admin/admin_weblog_groups.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_weblog_groups.php 31 Jan 2008 03:37:54 -0000 1.2 --- admin_weblog_groups.php 8 Feb 2008 23:37:18 -0000 1.3 *************** *** 36,40 **** $mx_root_path = '../../../'; $music_root_path = $module_root_path . 'music_box/'; ! $phpEx = substr(strrchr(__FILE__, '.'), 1); require($mx_root_path . 'admin/pagestart.' . $phpEx); --- 36,40 ---- $mx_root_path = '../../../'; $music_root_path = $module_root_path . 'music_box/'; ! $phpEx = substr(strrchr(__FILE__, '.'), 1); require($mx_root_path . 'admin/pagestart.' . $phpEx); *************** *** 151,163 **** $template->assign_vars(array( 'GROUP_NAME' => $group_info['group_name'], ! 'GROUP_DESCRIPTION' => $group_info['group_description'], ! 'GROUP_MODERATOR' => $group_moderator, 'L_GROUP_TITLE' => $lang['Group_administration'], ! 'L_GROUP_EDIT_DELETE' => ( isset($HTTP_POST_VARS['new']) ) ? $lang['New_group'] : $lang['Edit_group'], 'L_GROUP_NAME' => $lang['group_name'], 'L_GROUP_DESCRIPTION' => $lang['group_description'], ! 'L_GROUP_MODERATOR' => $lang['group_moderator'], ! 'L_FIND_USERNAME' => $lang['Find_username'], 'L_GROUP_STATUS' => $lang['group_status'], 'L_GROUP_OPEN' => $lang['group_open'], --- 151,163 ---- $template->assign_vars(array( 'GROUP_NAME' => $group_info['group_name'], ! 'GROUP_DESCRIPTION' => $group_info['group_description'], ! 'GROUP_MODERATOR' => $group_moderator, 'L_GROUP_TITLE' => $lang['Group_administration'], ! 'L_GROUP_EDIT_DELETE' => ( isset($HTTP_POST_VARS['new']) ) ? $lang['New_group'] : $lang['Edit_group'], 'L_GROUP_NAME' => $lang['group_name'], 'L_GROUP_DESCRIPTION' => $lang['group_description'], ! 'L_GROUP_MODERATOR' => $lang['group_moderator'], ! 'L_FIND_USERNAME' => $lang['Find_username'], 'L_GROUP_STATUS' => $lang['group_status'], 'L_GROUP_OPEN' => $lang['group_open'], *************** *** 177,181 **** 'L_NO' => $lang['No'], 'S_GROUP_ALLOW_WEBLOGS_YES' => ( $group_info['group_allow_weblogs'] ) ? ' checked="checked"' : '', ! 'S_GROUP_ALLOW_WEBLOGS_NO' => ( !$group_info['group_allow_weblogs'] ) ? ' checked="checked"' : '', 'S_GROUP_OPEN_TYPE' => GROUP_OPEN, --- 177,181 ---- 'L_NO' => $lang['No'], 'S_GROUP_ALLOW_WEBLOGS_YES' => ( $group_info['group_allow_weblogs'] ) ? ' checked="checked"' : '', ! 'S_GROUP_ALLOW_WEBLOGS_NO' => ( !$group_info['group_allow_weblogs'] ) ? ' checked="checked"' : '', 'S_GROUP_OPEN_TYPE' => GROUP_OPEN, *************** *** 204,208 **** // Is Group moderating a forum ? ! $sql = "SELECT auth_mod FROM " . AUTH_ACCESS_TABLE . " WHERE group_id = " . $group_id; if ( !($result = $db->sql_query($sql)) ) --- 204,208 ---- // Is Group moderating a forum ? ! $sql = "SELECT auth_mod FROM " . AUTH_ACCESS_TABLE . " WHERE group_id = " . $group_id; if ( !($result = $db->sql_query($sql)) ) *************** *** 226,230 **** { $sql = "SELECT g.group_id FROM " . AUTH_ACCESS_TABLE . " a, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug ! WHERE (a.auth_mod = 1) AND (g.group_id = a.group_id) AND (a.group_id = ug.group_id) AND (g.group_id = ug.group_id) AND (ug.user_id = " . intval($rows[$i]['user_id']) . ") AND (ug.group_id <> " . $group_id . ")"; if ( !($result = $db->sql_query($sql)) ) --- 226,230 ---- { $sql = "SELECT g.group_id FROM " . AUTH_ACCESS_TABLE . " a, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug ! WHERE (a.auth_mod = 1) AND (g.group_id = a.group_id) AND (a.group_id = ug.group_id) AND (g.group_id = ug.group_id) AND (ug.user_id = " . intval($rows[$i]['user_id']) . ") AND (ug.group_id <> " . $group_id . ")"; if ( !($result = $db->sql_query($sql)) ) *************** *** 235,241 **** if ($db->sql_numrows($result) == 0) { ! $sql = "UPDATE " . USERS_TABLE . " SET user_level = " . USER . " WHERE user_level = " . MOD . " AND user_id = " . intval($rows[$i]['user_id']); ! if ( !$db->sql_query($sql) ) { --- 235,241 ---- if ($db->sql_numrows($result) == 0) { ! $sql = "UPDATE " . USERS_TABLE . " SET user_level = " . USER . " WHERE user_level = " . MOD . " AND user_id = " . intval($rows[$i]['user_id']); ! if ( !$db->sql_query($sql) ) { *************** *** 291,295 **** mx_message_die(GENERAL_MESSAGE, $lang['No_group_moderator']); } ! $this_userdata = get_userdata($group_moderator, true); $group_moderator = $this_userdata['user_id']; --- 291,295 ---- mx_message_die(GENERAL_MESSAGE, $lang['No_group_moderator']); } ! $this_userdata = get_userdata($group_moderator, true); $group_moderator = $this_userdata['user_id']; *************** *** 299,303 **** mx_message_die(GENERAL_MESSAGE, $lang['No_group_moderator']); } ! if( $mode == "editgroup" ) { --- 299,303 ---- mx_message_die(GENERAL_MESSAGE, $lang['No_group_moderator']); } ! if( $mode == "editgroup" ) { *************** *** 315,319 **** mx_message_die(GENERAL_MESSAGE, $lang['Group_not_exist']); } ! if ( $group_info['group_moderator'] != $group_moderator ) { --- 315,319 ---- mx_message_die(GENERAL_MESSAGE, $lang['Group_not_exist']); } ! if ( $group_info['group_moderator'] != $group_moderator ) { *************** *** 321,325 **** { $sql = "DELETE FROM " . USER_GROUP_TABLE . " ! WHERE user_id = " . $group_info['group_moderator'] . " AND group_id = " . $group_id; if ( !$db->sql_query($sql) ) --- 321,325 ---- { $sql = "DELETE FROM " . USER_GROUP_TABLE . " ! WHERE user_id = " . $group_info['group_moderator'] . " AND group_id = " . $group_id; if ( !$db->sql_query($sql) ) *************** *** 329,335 **** } ! $sql = "SELECT user_id ! FROM " . USER_GROUP_TABLE . " ! WHERE user_id = $group_moderator AND group_id = $group_id"; if ( !($result = $db->sql_query($sql)) ) --- 329,335 ---- } ! $sql = "SELECT user_id ! FROM " . USER_GROUP_TABLE . " ! WHERE user_id = $group_moderator AND group_id = $group_id"; if ( !($result = $db->sql_query($sql)) ) *************** *** 350,354 **** $sql = "UPDATE " . GROUPS_TABLE . " ! SET group_type = $group_type, group_name = '" . str_replace("\'", "''", $group_name) . "', group_description = '" . str_replace("\'", "''", $group_description) . "', group_moderator = $group_moderator, group_allow_weblogs = $group_allow_weblogs WHERE group_id = $group_id"; if ( !$db->sql_query($sql) ) --- 350,354 ---- $sql = "UPDATE " . GROUPS_TABLE . " ! SET group_type = $group_type, group_name = '" . str_replace("\'", "''", $group_name) . "', group_description = '" . str_replace("\'", "''", $group_description) . "', group_moderator = $group_moderator, group_allow_weblogs = $group_allow_weblogs WHERE group_id = $group_id"; if ( !$db->sql_query($sql) ) *************** *** 356,360 **** mx_message_die(GENERAL_ERROR, 'Could not update group', '', __LINE__, __FILE__, $sql); } ! $message = $lang['Updated_group'] . '<br /><br />' . sprintf($lang['Click_return_groupsadmin'], '<a href="' . mx_append_sid("admin_weblog_groups.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . mx_append_sid("index.$phpEx?pane=right") . '">', '</a>');; --- 356,360 ---- mx_message_die(GENERAL_ERROR, 'Could not update group', '', __LINE__, __FILE__, $sql); } ! $message = $lang['Updated_group'] . '<br /><br />' . sprintf($lang['Click_return_groupsadmin'], '<a href="' . mx_append_sid("admin_weblog_groups.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . mx_append_sid("index.$phpEx?pane=right") . '">', '</a>');; *************** *** 363,367 **** else if( $mode == 'newgroup' ) { ! $sql = "INSERT INTO " . GROUPS_TABLE . " (group_type, group_name, group_description, group_moderator, group_single_user, group_allow_weblogs) VALUES ($group_type, '" . str_replace("\'", "''", $group_name) . "', '" . str_replace("\'", "''", $group_description) . "', $group_moderator, '0', $group_allow_weblogs)"; if ( !$db->sql_query($sql) ) --- 363,367 ---- else if( $mode == 'newgroup' ) { ! $sql = "INSERT INTO " . GROUPS_TABLE . " (group_type, group_name, group_description, group_moderator, group_single_user, group_allow_weblogs) VALUES ($group_type, '" . str_replace("\'", "''", $group_name) . "', '" . str_replace("\'", "''", $group_description) . "', $group_moderator, '0', $group_allow_weblogs)"; if ( !$db->sql_query($sql) ) *************** *** 377,381 **** mx_message_die(GENERAL_ERROR, 'Could not insert new user-group info', '', __LINE__, __FILE__, $sql); } ! $message = $lang['Added_new_group'] . '<br /><br />' . sprintf($lang['Click_return_groupsadmin'], '<a href="' . mx_append_sid("admin_weblog_groups.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . mx_append_sid("index.$phpEx?pane=right") . '">', '</a>');; --- 377,381 ---- mx_message_die(GENERAL_ERROR, 'Could not insert new user-group info', '', __LINE__, __FILE__, $sql); } ! $message = $lang['Added_new_group'] . '<br /><br />' . sprintf($lang['Click_return_groupsadmin'], '<a href="' . mx_append_sid("admin_weblog_groups.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . mx_append_sid("index.$phpEx?pane=right") . '">', '</a>');; *************** *** 437,439 **** include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); ! ?> --- 437,439 ---- include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); ! ?> \ No newline at end of file |