|
From: Jon O. <jon...@us...> - 2006-06-27 21:38:46
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv13505/modules/mx_pafiledb/pafiledb/includes Modified Files: functions_pafiledb.php Log Message: a couple of bugs... Index: functions_pafiledb.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_pafiledb.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** functions_pafiledb.php 25 Jun 2006 21:55:56 -0000 1.29 --- functions_pafiledb.php 27 Jun 2006 21:38:43 -0000 1.30 *************** *** 443,447 **** global $mx_root_path, $module_root_path, $is_block, $phpEx; ! $cat_sub .= ''; if ( !empty( $this->subcat_rowset[$cat_id] ) ) { --- 443,447 ---- global $mx_root_path, $module_root_path, $is_block, $phpEx; ! $cat_sub = ''; if ( !empty( $this->subcat_rowset[$cat_id] ) ) { *************** *** 450,454 **** if ( $cat_row['cat_allow_file'] ) { ! $cat_sub .= '<a href="' . append_sid( pa_this_mxurl( 'action=category&cat_id=' . $cat_row['cat_id'] ) ) . '">' . $cat_row['cat_name'] . '</a>, '; } else --- 450,454 ---- if ( $cat_row['cat_allow_file'] ) { ! $cat_sub .= (!empty($cat_sub) ? ', ' : '') . '<a href="' . append_sid( pa_this_mxurl( 'action=category&cat_id=' . $cat_row['cat_id'] ) ) . '">' . $cat_row['cat_name'] . '</a> '; } else *************** *** 460,464 **** if ( $sub_cat_row['cat_allow_file'] ) { ! $cat_sub .= '<a href="' . append_sid( pa_this_mxurl( 'action=category&cat_id=' . $sub_cat_row['cat_id'] ) ) . '">' . $sub_cat_row['cat_name'] . '</a>, '; } } --- 460,464 ---- if ( $sub_cat_row['cat_allow_file'] ) { ! $cat_sub .= (!empty($cat_sub) ? ', ' : '') . '<a href="' . append_sid( pa_this_mxurl( 'action=category&cat_id=' . $sub_cat_row['cat_id'] ) ) . '">' . $sub_cat_row['cat_name'] . '</a> '; } } *************** *** 714,718 **** $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => false, 'U_CAT' => append_sid( pa_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], --- 714,718 ---- $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => false, 'U_CAT' => append_sid( pa_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<br /><b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], *************** *** 780,786 **** $sub_cat = $this->get_sub_cat( $sub_cat_rowset[$k]['cat_id'] ); ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGER_CAT' => false, 'U_CAT' => append_sid( pa_this_mxurl( 'action=category&cat_id=' . $sub_cat_rowset[$k]['cat_id'] ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], --- 780,786 ---- $sub_cat = $this->get_sub_cat( $sub_cat_rowset[$k]['cat_id'] ); ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => false, 'U_CAT' => append_sid( pa_this_mxurl( 'action=category&cat_id=' . $sub_cat_rowset[$k]['cat_id'] ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<br /><b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], *************** *** 836,841 **** $last_file = $last_file_time . '<br />'; $last_file_name = ( strlen( stripslashes( $last_file_info['file_name'] ) ) > 20 ) ? substr( stripslashes( $last_file_info['file_name'] ), 0, 20 ) . '...' : stripslashes( $last_file_info['file_name'] ); ! $last_file .= '<a href="' . append_sid( pa_this_mxurl( 'action=download&file_id=' . $last_file_info['file_id'], true ) ) . '" alt="' . stripslashes( $last_file_info['file_name'] ) . '" title="' . stripslashes( $last_file_info['file_name'] ) . '">' . $last_file_name . '</a> '; ! $last_file .= '<a href="' . append_sid( pa_this_mxurl( 'action=download&file_id=' . $last_file_info['file_id'], true ) ) . '"><img src="' . $images['pa_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; } else --- 836,841 ---- $last_file = $last_file_time . '<br />'; $last_file_name = ( strlen( stripslashes( $last_file_info['file_name'] ) ) > 20 ) ? substr( stripslashes( $last_file_info['file_name'] ), 0, 20 ) . '...' : stripslashes( $last_file_info['file_name'] ); ! $last_file .= '<a href="' . append_sid( pa_this_mxurl( 'actionqdl=download&file_id=' . $last_file_info['file_id'], true ) ) . '" alt="' . stripslashes( $last_file_info['file_name'] ) . '" title="' . stripslashes( $last_file_info['file_name'] ) . '">' . $last_file_name . '</a> '; ! $last_file .= '<a href="' . append_sid( pa_this_mxurl( 'actionqdl=download&file_id=' . $last_file_info['file_id'], true ) ) . '"><img src="' . $images['pa_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; } else *************** *** 855,859 **** $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => false, ! 'U_CAT' => append_sid( pa_this_mxurl( 'action=quickdl&cat_id=' . $subcat_id . $map_xtra ) ), 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], --- 855,859 ---- $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => false, ! 'U_CAT' => append_sid( pa_this_mxurl( 'actionqdl=quickdl&cat_id=' . $subcat_id . $map_xtra ) ), 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], *************** *** 889,893 **** { $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => true, ! 'U_CAT' => append_sid( pa_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), 'CAT_NAME' => $subcat_row['cat_name'] ) ); --- 889,893 ---- { $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => true, ! 'U_CAT' => append_sid( pa_this_mxurl( 'actionqdl=category&cat_id=' . $subcat_id ) ), 'CAT_NAME' => $subcat_row['cat_name'] ) ); *************** *** 905,910 **** $last_file = $last_file_time . '<br />'; $last_file_name = ( strlen( $last_file_info['file_name'] ) > 20 ) ? substr( $last_file_info['file_name'], 0, 20 ) . '...' : $last_file_info['file_name']; ! $last_file .= '<a href="' . append_sid( pa_this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '">' . $last_file_name . '</a> '; ! $last_file .= '<a href="' . append_sid( pa_this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '"><img src="' . $images['pa_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; } else --- 905,910 ---- $last_file = $last_file_time . '<br />'; $last_file_name = ( strlen( $last_file_info['file_name'] ) > 20 ) ? substr( $last_file_info['file_name'], 0, 20 ) . '...' : $last_file_info['file_name']; ! $last_file .= '<a href="' . append_sid( pa_this_mxurl( 'actionqdl=file&file_id=' . $last_file_info['file_id'] ) ) . '">' . $last_file_name . '</a> '; ! $last_file .= '<a href="' . append_sid( pa_this_mxurl( 'actionqdl=file&file_id=' . $last_file_info['file_id'] ) ) . '"><img src="' . $images['pa_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; } else *************** *** 923,927 **** $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGER_CAT' => false, ! 'U_CAT' => append_sid( pa_this_mxurl( 'action=category&cat_id=' . $sub_cat_rowset[$k]['cat_id'] ) ), 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], --- 923,927 ---- $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGER_CAT' => false, ! 'U_CAT' => append_sid( pa_this_mxurl( 'actionqdl=category&cat_id=' . $sub_cat_rowset[$k]['cat_id'] ) ), 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], *************** *** 1081,1085 **** for ( $i = 0; $i < count( $file_rowset ); $i++ ) { ! if ( $file_rowset[$i]['cat_allow_ratings'] ) { $pa_use_ratings = true; --- 1081,1085 ---- for ( $i = 0; $i < count( $file_rowset ); $i++ ) { ! if ( $this->ratings[$file_rowset[$i]['file_catid']]['activated'] ) { $pa_use_ratings = true; *************** *** 1144,1148 **** 'DATE' => $date, 'UPDATED' => $date_updated, ! 'RATING' => ( $file_rowset[$i]['cat_allow_ratings'] ? $rating : $lang['kb_no_ratings'] ), 'FILE_DLS' => $file_rowset[$i]['file_dls'], 'CAT_NAME' => $cat_name, --- 1144,1148 ---- 'DATE' => $date, 'UPDATED' => $date_updated, ! 'RATING' => ( $this->ratings[$file_rowset[$i]['file_catid']]['activated'] ? $rating : $lang['kb_no_ratings'] ), 'FILE_DLS' => $file_rowset[$i]['file_dls'], 'CAT_NAME' => $cat_name, *************** *** 1154,1158 **** ); $filelist = true; ! $pa_use_ratings = $file_rowset[$i]['cat_allow_ratings']; } --- 1154,1158 ---- ); $filelist = true; ! $pa_use_ratings = $this->ratings[$file_rowset[$i]['file_catid']]['activated']; } |