|
From: Jon O. <jon...@us...> - 2006-08-04 16:32:22
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26533/modules/mx_pafiledb/pafiledb/modules Modified Files: pa_user_upload.php Log Message: finetuning of - notifications - approval Index: pa_user_upload.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_user_upload.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** pa_user_upload.php 1 Aug 2006 21:03:25 -0000 1.21 --- pa_user_upload.php 4 Aug 2006 16:32:19 -0000 1.22 *************** *** 83,86 **** --- 83,87 ---- $file_data = $db->sql_fetchrow( $result ); + $cat_id = $file_data['file_catid']; $db->sql_freeresult( $result ); *************** *** 91,95 **** // Reset vars if no related data exist. // ! if ( $file_id && !$file_data['file_catid'] ) { $file_id = 0; --- 92,96 ---- // Reset vars if no related data exist. // ! if ( $file_id && !$cat_id ) { $file_id = 0; *************** *** 112,116 **** if ( $do == 'delete' && $file_id ) { ! if ( ( $this->auth_user[$file_data['file_catid']]['auth_delete_file'] && $file_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$file_data['file_catid']]['auth_mod'] ) { // --- 113,117 ---- if ( $do == 'delete' && $file_id ) { ! if ( ( $this->auth_user[$cat_id]['auth_delete_file'] && $file_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$cat_id]['auth_mod'] ) { // *************** *** 122,128 **** // Comments // ! if ($this->comments[$file_data['file_catid']]['activated'] && $pafiledb_config['del_topic']) { ! if ( $this->comments[$file_data['file_catid']]['internal_comments'] ) { $sql = 'DELETE FROM ' . PA_COMMENTS_TABLE . " --- 123,129 ---- // Comments // ! if ($this->comments[$cat_id]['activated'] && $pafiledb_config['del_topic']) { ! if ( $this->comments[$cat_id]['internal_comments'] ) { $sql = 'DELETE FROM ' . PA_COMMENTS_TABLE . " *************** *** 148,152 **** $this->delete_items( $file_id ); $this->_pafiledb(); ! $message = $lang['Filedeleted'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "action=category&cat_id=" . $file_data['file_catid'] ) ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 149,153 ---- $this->delete_items( $file_id ); $this->_pafiledb(); ! $message = $lang['Filedeleted'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "action=category&cat_id=" . $cat_id ) ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 274,278 **** // AUTH CHECK // ! if ( ( $this->auth_user[$file_data['file_catid']]['auth_edit_file'] && $file_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$file_data['file_catid']]['auth_mod'] ) { $file_name = $file_data['file_name']; --- 275,279 ---- // AUTH CHECK // ! if ( ( $this->auth_user[$cat_id]['auth_edit_file'] && $file_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$cat_id]['auth_mod'] ) { $file_name = $file_data['file_name']; *************** *** 283,287 **** $file_website = $file_data['file_docsurl']; $file_posticons = $pafiledb_functions->post_icons( $file_data['file_posticon'] ); ! $file_cat_list = $this->generate_jumpbox( 0, 0, array( $file_data['file_catid'] => 1 ), true ); $file_license = $pafiledb_functions->license_list( $file_data['file_license'] ); $pin_checked_yes = ( $file_data['file_pin'] ) ? ' checked' : ''; --- 284,288 ---- $file_website = $file_data['file_docsurl']; $file_posticons = $pafiledb_functions->post_icons( $file_data['file_posticon'] ); ! $file_cat_list = $this->generate_jumpbox( 0, 0, array( $cat_id => 1 ), true ); $file_license = $pafiledb_functions->license_list( $file_data['file_license'] ); $pin_checked_yes = ( $file_data['file_pin'] ) ? ' checked' : ''; |