ODBC only returning associative fields so modded next/prev topic code appropriately

git-svn-id: file:///svn/phpbb/trunk@923 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2001-08-23 15:30:12 +00:00
parent ed26a546c6
commit 4ff00f4080

View file

@ -51,6 +51,7 @@ if(!isset($topic_id) && !isset($post_id))
// Find topic id if user requested a newer // Find topic id if user requested a newer
// or older topic // or older topic
// //
include('language/lang_english.php');
if( isset($HTTP_GET_VARS["view"]) && empty($HTTP_GET_VARS[POST_POST_URL]) ) if( isset($HTTP_GET_VARS["view"]) && empty($HTTP_GET_VARS[POST_POST_URL]) )
{ {
if($HTTP_GET_VARS["view"] == "next") if($HTTP_GET_VARS["view"] == "next")
@ -79,8 +80,7 @@ if( isset($HTTP_GET_VARS["view"]) && empty($HTTP_GET_VARS[POST_POST_URL]) )
message_die(GENERAL_ERROR, "Couldn't obtain newer/older topic information", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, "Couldn't obtain newer/older topic information", "", __LINE__, __FILE__, $sql);
} }
list($topic_id) = $db->sql_fetchrow($result); if( !$row = $db->sql_fetchrow($result) )
if( empty($topic_id) )
{ {
if($HTTP_GET_VARS["view"] == "next") if($HTTP_GET_VARS["view"] == "next")
{ {
@ -91,6 +91,10 @@ if( isset($HTTP_GET_VARS["view"]) && empty($HTTP_GET_VARS[POST_POST_URL]) )
message_die(GENERAL_MESSAGE, $lang['No_older_topics']); message_die(GENERAL_MESSAGE, $lang['No_older_topics']);
} }
} }
else
{
$topic_id = $row['topic_id'];
}
} }
// //