fixed bugs #1487, #1385 and #1505, changed newest post code a little bit (now it should work as intended)

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3609 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2003-03-07 19:32:46 +00:00
parent 0c92a18e16
commit 34f1c6df98
4 changed files with 28 additions and 11 deletions

View file

@ -76,10 +76,10 @@ p,ul,td {font-size:10pt;}
<ol>
<li>Decompress the phpBB 2 archive to a local directory on your system.</li>
<li>Upload all the files contained in this archive (retaining the directory structure) to a web accessible directory on your server or hosting account.
<li>Change the permissions on config.php to be writeable by all</li>
<li>Change the permissions on config.php to be writeable by all (666 or -rw-rw-rw- within your FTP Client)</li>
<li>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.
<li>Fill out all the requested information and hit <i>Submit</i></li>
<li>Change the permissions on config.php to be writeable only by yourself</li>
<li>Change the permissions on config.php to be writeable only by yourself (644 or -rw-r--r-- within your FTP Client)</li>
<li>Click the <i>Complete Installation</i> button or revisit the location you entered above.</li>
<li>phpBB 2 should now be available, please <b>MAKE SURE</b> you read at least <a href="#postinstall">Section 8</a> below for important, security related post-installation instructions.</li>
</ol>

View file

@ -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) );

View file

@ -10,7 +10,7 @@
</tr>
<tr>
<td class="row1">{L_FORUM_NAME}</td>
<td class="row2"><input class="post" type="text" size="25" name="forumname" value="{FORUM_NAME}" class="post" /></td>
<td class="row2"><input type="text" size="25" name="forumname" value="{FORUM_NAME}" class="post" /></td>
</tr>
<tr>
<td class="row1">{L_FORUM_DESCRIPTION}</td>
@ -33,11 +33,11 @@
</tr>
<tr>
<td align="right" valign="middle">{L_PRUNE_DAYS}</td>
<td align="left" valign="middle">&nbsp;<input class="post" type="text" name="prune_days" value="{PRUNE_DAYS}" size="5" class="post" />&nbsp;{L_DAYS}</td>
<td align="left" valign="middle">&nbsp;<input type="text" name="prune_days" value="{PRUNE_DAYS}" size="5" class="post" />&nbsp;{L_DAYS}</td>
</tr>
<tr>
<td align="right" valign="middle">{L_PRUNE_FREQ}</td>
<td align="left" valign="middle">&nbsp;<input class="post" type="text" name="prune_freq" value="{PRUNE_FREQ}" size="5" class="post" />&nbsp;{L_DAYS}</td>
<td align="left" valign="middle">&nbsp;<input type="text" name="prune_freq" value="{PRUNE_FREQ}" size="5" class="post" />&nbsp;{L_DAYS}</td>
</tr>
</table></td>
</tr>

View file

@ -64,14 +64,30 @@ 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);
}
if ( !($row = $db->sql_fetchrow($result)) )
{
$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);
@ -81,6 +97,7 @@ if ( isset($HTTP_GET_VARS['view']) && empty($HTTP_GET_VARS[POST_POST_URL]) )
{
message_die(GENERAL_MESSAGE, 'No_new_posts_last_visit');
}
}
$post_id = $row['post_id'];