Update of /cvsroot/phpbb/phpBB2/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11360/includes Modified Files: functions.php functions_display.php functions_posting.php functions_privmsgs.php message_parser.php session.php Log Message: - re-enable polls (user is now able to decide if users are able to change votes if this feature is enabled within the given forum) Index: functions.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/functions.php,v retrieving revision 1.291 retrieving revision 1.292 diff -C2 -r1.291 -r1.292 *** functions.php 4 Sep 2004 19:32:18 -0000 1.291 --- functions.php 5 Sep 2004 15:45:38 -0000 1.292 *************** *** 266,280 **** // User authorisation levels output ! function gen_forum_auth_level($mode, &$forum_id) { global $SID, $template, $auth, $user; ! $rules = array('post', 'reply', 'edit', 'delete', 'attach'); foreach ($rules as $rule) { ! $template->assign_block_vars('rules', array( ! 'RULE' => ($auth->acl_get('f_' . $rule, intval($forum_id))) ? $user->lang['RULES_' . strtoupper($rule) . '_CAN'] : $user->lang['RULES_' . strtoupper($rule) . '_CANNOT']) ! ); } --- 266,284 ---- // User authorisation levels output ! function gen_forum_auth_level($mode, $forum_id) { global $SID, $template, $auth, $user; ! $rules = array( ! ($auth->acl_get('f_post', $forum_id)) ? $user->lang['RULES_POST_CAN'] : $user->lang['RULES_POST_CANNOT'], ! ($auth->acl_get('f_reply', $forum_id)) ? $user->lang['RULES_REPLY_CAN'] : $user->lang['RULES_REPLY_CANNOT'], ! ($auth->acl_gets('f_edit', 'm_edit', $forum_id)) ? $user->lang['RULES_EDIT_CAN'] : $user->lang['RULES_EDIT_CANNOT'], ! ($auth->acl_gets('f_delete', 'm_delete', $forum_id)) ? $user->lang['RULES_DELETE_CAN'] : $user->lang['RULES_DELETE_CANNOT'], ! ($auth->acl_get('f_attach', $forum_id) && $auth->acl_get('u_attach', $forum_id)) ? $user->lang['RULES_ATTACH_CAN'] : $user->lang['RULES_ATTACH_CANNOT'] ! ); foreach ($rules as $rule) { ! $template->assign_block_vars('rules', array('RULE' => $rule)); } Index: functions_display.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/functions_display.php,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -r1.56 -r1.57 *** functions_display.php 8 Jul 2004 22:41:01 -0000 1.56 --- functions_display.php 5 Sep 2004 15:45:42 -0000 1.57 *************** *** 106,110 **** $active_forum_ary['forum_id'][] = $forum_id; $active_forum_ary['enable_icons'][] = $row['enable_icons']; ! $active_forum_ary['forum_topics'] += $row['forum_topics']; $active_forum_ary['forum_posts'] += $row['forum_posts']; } --- 106,110 ---- $active_forum_ary['forum_id'][] = $forum_id; $active_forum_ary['enable_icons'][] = $row['enable_icons']; ! $active_forum_ary['forum_topics'] += ($auth->acl_get('m_approve', $forum_id)) ? $row['forum_topics_real'] : $row['forum_topics']; $active_forum_ary['forum_posts'] += $row['forum_posts']; } *************** *** 129,133 **** // Include subforum topic/post counts in parent counts ! $forum_rows[$parent_id]['forum_topics'] += $row['forum_topics']; // Do not list redirects in LINK Forums as Posts. --- 129,133 ---- // Include subforum topic/post counts in parent counts ! $forum_rows[$parent_id]['forum_topics'] += ($auth->acl_get('m_approve', $forum_id)) ? $row['forum_topics_real'] : $row['forum_topics']; // Do not list redirects in LINK Forums as Posts. *************** *** 314,318 **** 'FORUM_DESC' => $row['forum_desc'], $l_post_click_count => $post_click_count, ! 'TOPICS' => $row['forum_topics'], 'LAST_POST_TIME' => $last_post_time, 'LAST_POSTER' => $last_poster, --- 314,318 ---- 'FORUM_DESC' => $row['forum_desc'], $l_post_click_count => $post_click_count, ! 'TOPICS' => ($auth->acl_get('m_approve', $row['forum_id'])) ? $row['forum_topics_real'] : $row['forum_topics'], 'LAST_POST_TIME' => $last_post_time, 'LAST_POSTER' => $last_poster, Index: functions_posting.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/functions_posting.php,v retrieving revision 1.121 retrieving revision 1.122 diff -C2 -r1.121 -r1.122 *** functions_posting.php 4 Sep 2004 19:32:19 -0000 1.121 --- functions_posting.php 5 Sep 2004 15:45:43 -0000 1.122 *************** *** 69,73 **** $template->assign_block_vars('emoticon', array( 'SMILEY_CODE' => $row['code'], ! 'SMILEY_IMG' => $config['smilies_path'] . '/' . $row['smile_url'], 'SMILEY_WIDTH' => $row['smile_width'], 'SMILEY_HEIGHT' => $row['smile_height'], --- 69,73 ---- $template->assign_block_vars('emoticon', array( 'SMILEY_CODE' => $row['code'], ! 'SMILEY_IMG' => $phpbb_root_path . $config['smilies_path'] . '/' . $row['smile_url'], 'SMILEY_WIDTH' => $row['smile_width'], 'SMILEY_HEIGHT' => $row['smile_height'], Index: functions_privmsgs.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/functions_privmsgs.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** functions_privmsgs.php 5 Sep 2004 09:59:56 -0000 1.5 --- functions_privmsgs.php 5 Sep 2004 15:45:44 -0000 1.6 *************** *** 502,506 **** } ! if ($full_folder_action != FULL_FOLDER_MOVE) { $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . " --- 502,506 ---- } ! if ($full_folder_action < 0) { $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . " Index: message_parser.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/message_parser.php,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -r1.74 -r1.75 *** message_parser.php 4 Sep 2004 19:32:19 -0000 1.74 --- message_parser.php 5 Sep 2004 15:45:44 -0000 1.75 *************** *** 996,1053 **** // Parse Poll ! function parse_poll(&$poll, $poll_data) { ! global $auth, $forum_id, $user, $config; ! // Need a second look at ! return; ! /* ! // Process poll options ! if ($poll_data['poll_option_text'] && (($auth->acl_get('f_poll', $forum_id) && !$poll_data['poll_last_vote']) || $auth->acl_get('m_edit', $forum_id))) ! { ! $message = $this->message; ! $this->message = $poll_data['poll_option_text']; ! ! if (($result = $this->parse($poll_data['enable_html'], $poll_data['enable_bbcode'], $poll_data['bbcode_uid'], $poll_data['enable_urls'], $poll_data['enable_smilies'], false)) != '') ! { ! $this->warn_msg[] = $result; ! } ! $poll_data['poll_option_text'] = $this->message; ! $this->message = $message; ! unset($message); ! $poll['poll_options'] = explode("\n", trim($poll_data['poll_option_text'])); ! $poll['poll_options_size'] = sizeof($poll['poll_options']); ! ! if (sizeof($poll['poll_options']) == 1) ! { ! $this->warn_msg[] = $user->lang['TOO_FEW_POLL_OPTIONS']; ! } ! elseif (sizeof($poll['poll_options']) > intval($config['max_poll_options'])) ! { ! $this->warn_msg[] = $user->lang['TOO_MANY_POLL_OPTIONS']; ! } ! elseif (sizeof($poll['poll_options']) < $poll['poll_options_size']) ! { ! $this->warn_msg[] = $user->lang['NO_DELETE_POLL_OPTIONS']; ! } ! elseif ($poll_data['poll_max_options'] > sizeof($poll['poll_options'])) ! { ! $this->warn_msg[] = $user->lang['TOO_MANY_USER_OPTIONS']; ! } ! $poll['poll_title'] = ($poll_data['poll_title']) ? $poll_data['poll_title'] : ''; ! $poll['poll_length'] = ($poll_data['poll_length']) ? intval($poll_data['poll_length']) : 0; ! if (!$poll['poll_title'] && $poll['poll_options_size']) ! { ! $this->warn_msg[] = $user->lang['NO_POLL_TITLE']; ! } } ! $poll['poll_start'] = $poll_data['poll_start']; ! $poll['poll_max_options'] = ($poll_data['poll_max_options'] < 1) ? 1 : (($poll_data['poll_max_options'] > $config['max_poll_options']) ? $config['max_poll_options'] : $poll_data['poll_max_options']); ! */ } } --- 996,1049 ---- // Parse Poll ! function parse_poll(&$poll) { ! global $auth, $user, $config; ! $poll_max_options = $poll['poll_max_options']; ! // Parse Poll Option text ;) ! $tmp_message = $this->message; ! $this->message = $poll['poll_option_text']; ! $bbcode_bitfield = $this->bbcode_bitfield; ! $poll['poll_option_text'] = $this->parse($poll['enable_html'], $poll['enable_bbcode'], $poll['enable_urls'], $poll['enable_smilies'], $poll['img_status'], false, false, false); ! ! $this->bbcode_bitfield |= $bbcode_bitfield; ! $this->message = $tmp_message; ! // Parse Poll Title ! $tmp_message = $this->message; ! $this->message = $poll['poll_title']; ! $bbcode_bitfield = $this->bbcode_bitfield; ! $poll['poll_title'] = $this->parse($poll['enable_html'], $poll['enable_bbcode'], $poll['enable_urls'], $poll['enable_smilies'], $poll['img_status'], false, false, false); ! ! $this->bbcode_bitfield |= $bbcode_bitfield; ! $this->message = $tmp_message; ! ! unset($tmp_message); ! ! $poll['poll_options'] = explode("\n", trim($poll['poll_option_text'])); ! $poll['poll_options_size'] = sizeof($poll['poll_options']); ! ! if (sizeof($poll['poll_options']) == 1) ! { ! $this->warn_msg[] = $user->lang['TOO_FEW_POLL_OPTIONS']; ! } ! else if ($poll['poll_options_size'] > (int) $config['max_poll_options']) ! { ! $this->warn_msg[] = $user->lang['TOO_MANY_POLL_OPTIONS']; ! } ! else if ($poll_max_options > $poll['poll_options_size']) ! { ! $this->warn_msg[] = $user->lang['TOO_MANY_USER_OPTIONS']; ! } ! ! if (!$poll['poll_title'] && $poll['poll_options_size']) ! { ! $this->warn_msg[] = $user->lang['NO_POLL_TITLE']; } ! $poll['poll_max_options'] = ($poll['poll_max_options'] < 1) ? 1 : (($poll['poll_max_options'] > $config['max_poll_options']) ? $config['max_poll_options'] : $poll['poll_max_options']); } } Index: session.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/includes/session.php,v retrieving revision 1.127 retrieving revision 1.128 diff -C2 -r1.127 -r1.128 *** session.php 4 Sep 2004 19:32:20 -0000 1.127 --- session.php 5 Sep 2004 15:45:46 -0000 1.128 *************** *** 752,756 **** global $phpbb_root_path; ! if (empty($imgs[$img . $suffix]) || $width) { if (!isset($this->theme['primary'][$img]) || !$this->theme['primary'][$img]) --- 752,756 ---- global $phpbb_root_path; ! if (empty($imgs[$img . $suffix]) || $width !== false) { if (!isset($this->theme['primary'][$img]) || !$this->theme['primary'][$img]) *************** *** 761,765 **** } ! if (!$width) { list($imgsrc, $height, $width) = explode('*', $this->theme['primary'][$img]); --- 761,765 ---- } ! if ($width === false) { list($imgsrc, $height, $width) = explode('*', $this->theme['primary'][$img]); |