|
From: Jon O. <jon...@us...> - 2006-08-04 16:32:22
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26533/modules/mx_pafiledb/pafiledb/includes Modified Files: functions.php functions_comment.php functions_pafiledb.php Log Message: finetuning of - notifications - approval Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** functions.php 1 Aug 2006 21:03:24 -0000 1.28 --- functions.php 4 Aug 2006 16:32:19 -0000 1.29 *************** *** 937,941 **** function init( $item_id = 0) { ! global $db, $lang, $module_root_path, $phpbb_root_path, $phpEx, $userdata; // ======================================================= --- 937,941 ---- function init( $item_id = 0) { ! global $db, $lang, $module_root_path, $phpbb_root_path, $phpEx, $userdata, $pafiledb; // ======================================================= *************** *** 978,986 **** { case 'oracle': ! $sql = "SELECT f.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) as total_comments ! FROM " . PA_FILES_TABLE . " AS f, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_CATEGORY_TABLE . " AS c, " . PA_COMMENTS_TABLE . " AS cm WHERE f.file_id = r.votes_file(+) AND f.user_id = u.user_id(+) - AND f.file_id = cm.file_id(+) AND c.cat_id = a.file_catid AND f.file_id = '" . $item_id . "' --- 978,985 ---- { case 'oracle': ! $sql = "SELECT f.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username ! FROM " . PA_FILES_TABLE . " AS f, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_CATEGORY_TABLE . " AS c WHERE f.file_id = r.votes_file(+) AND f.user_id = u.user_id(+) AND c.cat_id = a.file_catid AND f.file_id = '" . $item_id . "' *************** *** 989,997 **** default: ! $sql = "SELECT f.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) as total_comments FROM " . PA_FILES_TABLE . " AS f, " . PA_CATEGORY_TABLE . " AS cat LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f.file_id = r.votes_file LEFT JOIN " . USERS_TABLE . " AS u ON f.user_id = u.user_id - LEFT JOIN " . PA_COMMENTS_TABLE . " AS c ON f.file_id = c.file_id WHERE cat.cat_id = f.file_catid AND f.file_id = '" . $item_id . "' --- 988,995 ---- default: ! $sql = "SELECT f.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username FROM " . PA_FILES_TABLE . " AS f, " . PA_CATEGORY_TABLE . " AS cat LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f.file_id = r.votes_file LEFT JOIN " . USERS_TABLE . " AS u ON f.user_id = u.user_id WHERE cat.cat_id = f.file_catid AND f.file_id = '" . $item_id . "' *************** *** 1043,1047 **** $this->data['item_editor'] = ( $userdata['user_id'] != '-1' ) ? $userdata['username'] : $lang['Guest']; ! //$this->temp_url = PORTAL_URL . $pafiledb->this_mxurl("action=" . "link&link_id=" . $this->data['item_id'], false, true); } } --- 1041,1045 ---- $this->data['item_editor'] = ( $userdata['user_id'] != '-1' ) ? $userdata['username'] : $lang['Guest']; ! $this->temp_url = PORTAL_URL . $pafiledb->this_mxurl("action=" . "file&file_id=" . $this->data['item_id'], false, true); } } Index: functions_comment.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_comment.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** functions_comment.php 1 Aug 2006 21:03:24 -0000 1.23 --- functions_comment.php 4 Aug 2006 16:32:19 -0000 1.24 *************** *** 146,152 **** // Toggles // ! $bbcode_on = !$pafiledb_config['allow_wysiwyg'] ? ($pafiledb_config['allow_bbcode'] ? true : false) : false; ! $html_on = !$pafiledb_config['allow_wysiwyg'] ? ($pafiledb_config['allow_html'] ? true : false) : true; ! $smilies_on = !$pafiledb_config['allow_wysiwyg'] ? ($pafiledb_config['allow_smilies'] ? true : false) : false; // --- 146,152 ---- // Toggles // ! $bbcode_on = !$pafiledb_config['allow_comment_wysiwyg'] ? ($pafiledb_config['allow_comment_bbcode'] ? true : false) : false; ! $html_on = !$pafiledb_config['allow_comment_wysiwyg'] ? ($pafiledb_config['allow_comment_html'] ? true : false) : true; ! $smilies_on = !$pafiledb_config['allow_comment_wysiwyg'] ? ($pafiledb_config['allow_comment_smilies'] ? true : false) : false; // *************** *** 351,357 **** // Toggles // ! $bbcode_on = !$pafiledb_config['allow_wysiwyg'] ? ($pafiledb_config['allow_bbcode'] ? true : false) : false; ! $html_on = !$pafiledb_config['allow_wysiwyg'] ? ($pafiledb_config['allow_html'] ? true : false) : true; ! $smilies_on = !$pafiledb_config['allow_wysiwyg'] ? ($pafiledb_config['allow_smilies'] ? true : false) : false; // --- 351,357 ---- // Toggles // ! $bbcode_on = !$pafiledb_config['allow_comment_wysiwyg'] ? ($pafiledb_config['allow_comment_bbcode'] ? true : false) : false; ! $html_on = !$pafiledb_config['allow_comment_wysiwyg'] ? ($pafiledb_config['allow_comment_html'] ? true : false) : true; ! $smilies_on = !$pafiledb_config['allow_comment_wysiwyg'] ? ($pafiledb_config['allow_comment_smilies'] ? true : false) : false; // Index: functions_pafiledb.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_pafiledb.php,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** functions_pafiledb.php 1 Aug 2006 21:03:24 -0000 1.37 --- functions_pafiledb.php 4 Aug 2006 16:32:19 -0000 1.38 *************** *** 1890,1894 **** function update_add_item( $file_id = false ) { ! global $db, $phpbb_root_path, $db, $userdata, $pafiledb_config, $_FILES, $pafiledb_functions, $user_ip, $auth, $module_root_path, $pafiledb; $ss_upload = ( empty( $_POST['screen_shot_url'] ) ) ? true : false; --- 1890,1894 ---- function update_add_item( $file_id = false ) { ! global $db, $phpbb_root_path, $userdata, $pafiledb_config, $_FILES, $pafiledb_functions, $user_ip, $auth, $module_root_path; $ss_upload = ( empty( $_POST['screen_shot_url'] ) ) ? true : false; *************** *** 2026,2029 **** --- 2026,2053 ---- } + if ( !$file_id ) + { + if ($this->auth_user[$cat_id]['auth_approval'] || $this->auth_user[$cat_id]['auth_mod']) + { + $file_approved = 1; + } + else + { + $file_approved = 0; + } + } + else + { + if ($this->auth_user[$cat_id]['auth_approval_edit'] || $this->auth_user[$cat_id]['auth_mod']) + { + $file_approved = 1; + } + else + { + $file_approved = 0; + } + } + + /* if ( $pafiledb->modules[$pafiledb->module_name]->auth_user[$cat_id]['auth_approval'] || ( $pafiledb->modules[$pafiledb->module_name]->auth_user[$cat_id]['auth_mod'] && $userdata['session_logged_in'] ) ) { *************** *** 2041,2044 **** --- 2065,2070 ---- $file_approved = 0; } + */ + if ( !$file_id ) *************** *** 2170,2174 **** $mx_pa_notification->notify( $mx_notification_mode, $mx_notification_action ); ! if ( $this->notification[$cat_id]['notify_group'] > 0 ) { $mx_pa_notification->notify( $mx_notification_mode, $mx_notification_action, - intval($this->notification[$catId]['notify_group']) ); --- 2196,2200 ---- $mx_pa_notification->notify( $mx_notification_mode, $mx_notification_action ); ! if ( $this->notification[$catId]['notify_group'] > 0 ) { $mx_pa_notification->notify( $mx_notification_mode, $mx_notification_action, - intval($this->notification[$catId]['notify_group']) ); |