diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html index 279217b7f5..5ca6a324cd 100644 --- a/phpBB/docs/INSTALL.html +++ b/phpBB/docs/INSTALL.html @@ -76,10 +76,10 @@ p,ul,td {font-size:10pt;}
  1. Decompress the phpBB 2 archive to a local directory on your system.
  2. Upload all the files contained in this archive (retaining the directory structure) to a web accessible directory on your server or hosting account. -
  3. Change the permissions on config.php to be writeable by all
  4. +
  5. Change the permissions on config.php to be writeable by all (666 or -rw-rw-rw- within your FTP Client)
  6. Using your web browser visit the location you placed phpBB 2 with the addition of install/install.php, e.g. http://www.mydomain.com/phpBB2/install/install.php, http://www.mydomain.com/forum/install/install.php etc.
  7. Fill out all the requested information and hit Submit
  8. -
  9. Change the permissions on config.php to be writeable only by yourself
  10. +
  11. Change the permissions on config.php to be writeable only by yourself (644 or -rw-r--r-- within your FTP Client)
  12. Click the Complete Installation button or revisit the location you entered above.
  13. phpBB 2 should now be available, please MAKE SURE you read at least Section 8 below for important, security related post-installation instructions.
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index eeb3fc7787..ee157de709 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -94,7 +94,7 @@ function get_userdata($user) function make_jumpbox($action, $match_forum_id = 0) { - global $template, $userdata, $lang, $db, $nav_links, $phpEx; + global $template, $userdata, $lang, $db, $nav_links, $phpEx, $SID; // $is_auth = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata); @@ -492,7 +492,7 @@ function obtain_word_list(&$orig_word, &$replacement_word) { do { - $orig_word[] = '#\b(' . str_replace('\*', '\w*?', phpbb_preg_quote($row['word'], '#')) . ')\b#i'; + $orig_word[] = '#(' . str_replace('\*', '\w*?', phpbb_preg_quote($row['word'], '#')) . ')#i'; $replacement_word[] = $row['replacement']; } while ( $row = $db->sql_fetchrow($result) ); diff --git a/phpBB/templates/subSilver/admin/forum_edit_body.tpl b/phpBB/templates/subSilver/admin/forum_edit_body.tpl index f29194551b..7f56bbe9d8 100644 --- a/phpBB/templates/subSilver/admin/forum_edit_body.tpl +++ b/phpBB/templates/subSilver/admin/forum_edit_body.tpl @@ -10,7 +10,7 @@ {L_FORUM_NAME} - + {L_FORUM_DESCRIPTION} @@ -33,11 +33,11 @@ {L_PRUNE_DAYS} -   {L_DAYS} +   {L_DAYS} {L_PRUNE_FREQ} -   {L_DAYS} +   {L_DAYS} diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 8c5b74b80a..b2b127d776 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -64,14 +64,19 @@ if ( isset($HTTP_GET_VARS['view']) && empty($HTTP_GET_VARS[POST_POST_URL]) ) if ( $session_id ) { + $tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array(); + + $topic_last_read = (!empty($tracking_topics[$topic_id])) ? $tracking_topics[$topic_id] : 'u.user_lastvisit'; + $sql = "SELECT p.post_id FROM " . POSTS_TABLE . " p, " . SESSIONS_TABLE . " s, " . USERS_TABLE . " u WHERE s.session_id = '$session_id' AND u.user_id = s.session_user_id - AND p.topic_id = $topic_id - AND p.post_time >= u.user_lastvisit - ORDER BY p.post_time ASC + AND p.topic_id = " . intval($topic_id) . " + AND p.post_time >= " . intval($topic_last_read) . " + ORDER BY p.post_time DESC LIMIT 1"; + if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain newer/older topic information', '', __LINE__, __FILE__, $sql); @@ -79,7 +84,19 @@ if ( isset($HTTP_GET_VARS['view']) && empty($HTTP_GET_VARS[POST_POST_URL]) ) if ( !($row = $db->sql_fetchrow($result)) ) { - message_die(GENERAL_MESSAGE, 'No_new_posts_last_visit'); + $sql = "SELECT topic_last_post_id as post_id + FROM " . TOPICS_TABLE . " + WHERE topic_id = " . intval($topic_id); + + if ( !($result = $db->sql_query($sql)) ) + { + message_die(GENERAL_ERROR, 'Could not obtain newer/older topic information', '', __LINE__, __FILE__, $sql); + } + + if ( !($row = $db->sql_fetchrow($result)) ) + { + message_die(GENERAL_MESSAGE, 'No_new_posts_last_visit'); + } } $post_id = $row['post_id'];