From beaec6bc5b9bebaf95a8f3ab1daacfe8865f24d0 Mon Sep 17 00:00:00 2001 From: Kazuki Przyborowski Date: Thu, 4 Jun 2009 17:08:37 +0000 Subject: [PATCH] Some more bug fixes. git-svn-id: svn://svn.code.sf.net/p/intdb/svn/trunk@260 2b68903e-0b30-0410-9a39-a2e4f3c5be39 --- inc/categories.php | 9 ++++----- inc/forums.php | 9 ++++----- inc/replies.php | 20 ++++++++++---------- inc/searchs.php | 9 ++++----- inc/subforums.php | 12 ++++++++---- inc/topics.php | 9 ++++----- inc/versioninfo.php | 4 ++-- 7 files changed, 36 insertions(+), 36 deletions(-) diff --git a/inc/categories.php b/inc/categories.php index 314f57c..3ffe51a 100644 --- a/inc/categories.php +++ b/inc/categories.php @@ -11,7 +11,7 @@ Copyright 2004-2009 Cool Dude 2k - http://idb.berlios.de/ Copyright 2004-2009 Game Maker 2k - http://intdb.sourceforge.net/ - $FileInfo: categories.php - Last Update: 6/04/2009 SVN 259 - Author: cooldude2k $ + $FileInfo: categories.php - Last Update: 6/04/2009 SVN 260 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="categories.php"||$File3Name=="/categories.php") { @@ -156,8 +156,7 @@ $NumPages = null; $NumRPosts = $NumReplys + 1; if(!isset($Settings['max_posts'])) { $Settings['max_posts'] = 10; } if($NumRPosts>$Settings['max_posts']) { $NumPages = ceil($NumRPosts/$Settings['max_posts']); } -if($NumRPosts<=$Settings['max_posts']) { -$NumPages = 1; } +if($NumRPosts<=$Settings['max_posts']) { $NumPages = 1; } $TopicName1 = pre_substr($TopicName,0,20); $oldtopicname=$TopicName; if (pre_strlen($TopicName)>20) { @@ -182,9 +181,9 @@ $UsersName1 = $UsersName1."..."; $UsersName=$UsersName1; } $lul = null; if($UsersID!="-1") { $lul = url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$UsersID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); -$LastTopic = $TimeStamp."
\nTopic: ".$TopicName."
\nUser: ".$UsersName.""; } +$LastTopic = $TimeStamp."
\nTopic: ".$TopicName."
\nUser: ".$UsersName.""; } if($UsersID=="-1") { -$LastTopic = $TimeStamp."
\nTopic: ".$TopicName."
\nGuest: ".$UsersName.""; } } +$LastTopic = $TimeStamp."
\nTopic: ".$TopicName."
\nGuest: ".$UsersName.""; } } if($LastTopic==null) { $LastTopic = " 
 
 "; } } @mysql_free_result($gltresult); if ($ForumType=="redirect") { $LastTopic="Redirects: ".$NumRedirects; } diff --git a/inc/forums.php b/inc/forums.php index 941ab9a..d80ffa6 100644 --- a/inc/forums.php +++ b/inc/forums.php @@ -11,7 +11,7 @@ Copyright 2004-2009 Cool Dude 2k - http://idb.berlios.de/ Copyright 2004-2009 Game Maker 2k - http://intdb.sourceforge.net/ - $FileInfo: forums.php - Last Update: 6/04/2009 SVN 259 - Author: cooldude2k $ + $FileInfo: forums.php - Last Update: 6/04/2009 SVN 260 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="forums.php"||$File3Name=="/forums.php") { @@ -141,8 +141,7 @@ $NumPages = null; $NumRPosts = $NumReplys + 1; if(!isset($Settings['max_posts'])) { $Settings['max_posts'] = 10; } if($NumRPosts>$Settings['max_posts']) { $NumPages = ceil($NumRPosts/$Settings['max_posts']); } -if($NumRPosts<=$Settings['max_posts']) { -$NumPages = 1; } +if($NumRPosts<=$Settings['max_posts']) { $NumPages = 1; } $TopicName1 = pre_substr($TopicName,0,20); $oldtopicname=$TopicName; if (pre_strlen($TopicName)>20) { @@ -167,9 +166,9 @@ $UsersName1 = $UsersName1."..."; $UsersName=$UsersName1; } $lul = null; if($UsersID!="-1") { $lul = url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$UsersID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); -$LastTopic = $TimeStamp."
\nTopic: ".$TopicName."
\nUser: ".$UsersName.""; } +$LastTopic = $TimeStamp."
\nTopic: ".$TopicName."
\nUser: ".$UsersName.""; } if($UsersID=="-1") { -$LastTopic = $TimeStamp."
\nTopic: ".$TopicName."
\nGuest: ".$UsersName.""; } } +$LastTopic = $TimeStamp."
\nTopic: ".$TopicName."
\nGuest: ".$UsersName.""; } } if($LastTopic==null) { $LastTopic=" 
 "; } } @mysql_free_result($gltresult); if ($ForumType=="redirect") { $LastTopic=" 
Redirects: ".$NumRedirects."
 "; } diff --git a/inc/replies.php b/inc/replies.php index 0c294cb..a93e691 100644 --- a/inc/replies.php +++ b/inc/replies.php @@ -11,7 +11,7 @@ Copyright 2004-2009 Cool Dude 2k - http://idb.berlios.de/ Copyright 2004-2009 Game Maker 2k - http://intdb.sourceforge.net/ - $FileInfo: replies.php - Last Update: 6/04/2009 SVN 259 - Author: cooldude2k $ + $FileInfo: replies.php - Last Update: 6/04/2009 SVN 260 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="replies.php"||$File3Name=="/replies.php") { @@ -320,13 +320,13 @@ $ReplyNum = $i + $PageLimit + 1;
-"> ( ) +"> ( )
- @@ -779,11 +779,11 @@ if($MyPostNum>$Settings['max_posts']) { $NumPages = ceil($MyPostNum/$Settings['max_posts']); } if($MyPostNum<=$Settings['max_posts']) { $NumPages = 1; } -@redirect("refresh",$basedir.url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=".$NumPages,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'],FALSE)."#reply".$MyPostNum,"3"); +@redirect("refresh",$basedir.url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=".$NumPages,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'],FALSE)."&#reply".$MyPostNum,"3"); ?> @@ -825,7 +825,7 @@ $queryupd = query("UPDATE `".$Settings['sqltable']."topics` SET `Pinned`=1 WHERE if($_GET['act']=="unpin") { $queryupd = query("UPDATE `".$Settings['sqltable']."topics` SET `Pinned`=0 WHERE `id`=%i", array($TTopicID)); } mysql_query($queryupd); -@redirect("refresh",$basedir.url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TTopicID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'],false)."#post".$_GET['post'],"4"); +@redirect("refresh",$basedir.url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TTopicID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'],false)."&#post".$_GET['post'],"4"); ?>
@@ -882,7 +882,7 @@ $queryupd = query("UPDATE `".$Settings['sqltable']."topics` SET `Closed`=1 WHERE if($_GET['act']=="open") { $queryupd = query("UPDATE `".$Settings['sqltable']."topics` SET `Closed`=0 WHERE `id`=%i", array($TTopicID)); } mysql_query($queryupd); -@redirect("refresh",$basedir.url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TTopicID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'],false)."#post".$_GET['post'],"4"); +@redirect("refresh",$basedir.url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TTopicID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'],false)."&#post".$_GET['post'],"4"); ?>
@@ -1404,7 +1404,7 @@ if ($_POST['ReplyDesc']==null) { $Error="Yes"; ?>   +@redirect("refresh",$basedir.url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'],false)."&#post".$_GET['post'],"4"); ?>
"> ( ) +"> ( )

Reply to Topic was posted.
- Click #reply">here to view your reply.
  + Click &#reply">here to view your reply.
 


Click ">here to goto index page.
  @@ -1427,12 +1427,12 @@ mysql_query($queryupd); if($ShowEditTopic===true) { $queryupd = query("UPDATE `".$Settings['sqltable']."topics` SET `TopicName`='%s',`Description`='%s' WHERE `id`=%i", array($_POST['TopicName'],$_POST['ReplyDesc'],$TopicID)); mysql_query($queryupd); } } -@redirect(url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'],FALSE)."#post".$_GET['post'],"3"); +@redirect(url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'],FALSE)."&#post".$_GET['post'],"3"); ?>

Reply to Topic was edited.
- Click ">here to view topic.
  + Click ">here to view topic.
 

diff --git a/inc/searchs.php b/inc/searchs.php index 61f6fd8..96b39cd 100644 --- a/inc/searchs.php +++ b/inc/searchs.php @@ -11,7 +11,7 @@ Copyright 2004-2009 Cool Dude 2k - http://idb.berlios.de/ Copyright 2004-2009 Game Maker 2k - http://intdb.sourceforge.net/ - $FileInfo: searchs.php - Last Update: 6/04/2009 SVN 259 - Author: cooldude2k $ + $FileInfo: searchs.php - Last Update: 6/04/2009 SVN 260 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="searchs.php"||$File3Name=="/searchs.php") { @@ -365,8 +365,7 @@ $NumPages = null; $NumRPosts = $NumReply + 1; if(!isset($Settings['max_posts'])) { $Settings['max_posts'] = 10; } if($NumRPosts>$Settings['max_posts']) { $NumPages = ceil($NumRPosts/$Settings['max_posts']); } -if($NumRPosts<=$Settings['max_posts']) { -$NumPages = 1; } +if($NumRPosts<=$Settings['max_posts']) { $NumPages = 1; } $Users_Name1 = pre_substr($UsersName1,0,20); if($UsersName1=="Guest") { $UsersName1=$GuestsName1; if($UsersName1==null) { $UsersName1="Guest"; } } @@ -375,11 +374,11 @@ $oldusername=$UsersName1; $UsersName1=$Users_Name1; } $lul = null; if($TimeStamp1!=null) { $lul = null; if($UsersID1!="-1") { $lul = url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$UsersID1,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); -$luln = url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=".$NumPages,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."#reply".$NumRPosts; +$luln = url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=".$NumPages,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."&#reply".$NumRPosts; $LastReply = "User: ".$UsersName1."
\nTime: ".$TimeStamp1.""; } if($UsersID1=="-1") { $lul = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); -$luln = url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=".$NumPages,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."#reply".$NumRPosts; +$luln = url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=".$NumPages,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."&#reply".$NumRPosts; $LastReply = "Guest: ".$UsersName1."
\nTime: ".$TimeStamp1.""; } } @mysql_free_result($glrresult); if($TimeStamp1==null) { $LastReply = " 
 "; } diff --git a/inc/subforums.php b/inc/subforums.php index 0475f01..f0e7e97 100644 --- a/inc/subforums.php +++ b/inc/subforums.php @@ -11,7 +11,7 @@ Copyright 2004-2009 Cool Dude 2k - http://idb.berlios.de/ Copyright 2004-2009 Game Maker 2k - http://intdb.sourceforge.net/ - $FileInfo: subforums.php - Last Update: 6/04/2009 SVN 259 - Author: cooldude2k $ + $FileInfo: subforums.php - Last Update: 6/04/2009 SVN 260 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="subforums.php"||$File3Name=="/subforums.php") { @@ -180,7 +180,11 @@ $TopicID=mysql_result($gltresult,0,"id"); $TopicName=mysql_result($gltresult,0,"TopicName"); $NumReplys=mysql_result($gltresult,0,"NumReply"); $TopicName1 = pre_substr($TopicName,0,20); -$oldtopicname=$TopicName; +$oldtopicname=$TopicName; $NumRPosts = $NumReplys + 1; +if(!isset($Settings['max_posts'])) { $Settings['max_posts'] = 10; } +if($NumRPosts>$Settings['max_posts']) { +$NumPages = ceil($NumRPosts/$Settings['max_posts']); } +if($NumRPosts<=$Settings['max_posts']) { $NumPages = 1; } if (pre_strlen($TopicName)>20) { $TopicName1 = $TopicName1."..."; $TopicName=$TopicName1; } $glrquery = query("SELECT * FROM `".$Settings['sqltable']."posts` WHERE `TopicID`=%i ORDER BY `TimeStamp` DESC LIMIT 1", array($TopicID)); @@ -203,9 +207,9 @@ $UsersName1 = $UsersName1."..."; $UsersName=$UsersName1; } $lul = null; if($UsersID!="-1") { $lul = url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$UsersID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); -$LastTopic = $TimeStamp."
\nTopic: ".$TopicName."
\nUser: ".$UsersName.""; } +$LastTopic = $TimeStamp."
\nTopic: ".$TopicName."
\nUser: ".$UsersName.""; } if($UsersID=="-1") { -$LastTopic = $TimeStamp."
\nTopic: ".$TopicName."
\nGuest: ".$UsersName.""; } } +$LastTopic = $TimeStamp."
\nTopic: ".$TopicName."
\nGuest: ".$UsersName.""; } } if($LastTopic==null) { $LastTopic = " 
 
 "; } } @mysql_free_result($gltresult); if ($ForumType=="redirect") { $LastTopic="Redirects: ".$NumRedirects; } diff --git a/inc/topics.php b/inc/topics.php index f0a9b16..3cd59d0 100644 --- a/inc/topics.php +++ b/inc/topics.php @@ -11,7 +11,7 @@ Copyright 2004-2009 Cool Dude 2k - http://idb.berlios.de/ Copyright 2004-2009 Game Maker 2k - http://intdb.sourceforge.net/ - $FileInfo: topics.php - Last Update: 6/04/2009 SVN 259 - Author: cooldude2k $ + $FileInfo: topics.php - Last Update: 6/04/2009 SVN 260 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="topics.php"||$File3Name=="/topics.php") { @@ -351,8 +351,7 @@ $NumPages = null; $NumRPosts = $NumReply + 1; if(!isset($Settings['max_posts'])) { $Settings['max_posts'] = 10; } if($NumRPosts>$Settings['max_posts']) { $NumPages = ceil($NumRPosts/$Settings['max_posts']); } -if($NumRPosts<=$Settings['max_posts']) { -$NumPages = 1; } +if($NumRPosts<=$Settings['max_posts']) { $NumPages = 1; } $Users_Name1 = pre_substr($UsersName1,0,20); if($UsersName1=="Guest") { $UsersName1=$GuestsName1; if($UsersName1==null) { $UsersName1="Guest"; } } @@ -362,11 +361,11 @@ $Users_Name1 = $Users_Name1."..."; $UsersName1=$Users_Name1; } $lul = null; if($TimeStamp1!=null) { $lul = null; if($UsersID1!="-1") { $lul = url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$UsersID1,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); -$luln = url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=".$NumPages,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."#reply".$NumRPosts; +$luln = url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=".$NumPages,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."&#reply".$NumRPosts; $LastReply = "".$TimeStamp1."
\nUser: ".$UsersName1.""; } if($UsersID1=="-1") { $lul = url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$UsersID1,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); -$luln = url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=".$NumPages,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."#reply".$NumRPosts; +$luln = url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID."&page=".$NumPages,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."&#reply".$NumRPosts; $LastReply = "".$TimeStamp1."
\nGuest: ".$UsersName1.""; } } @mysql_free_result($glrresult); if(!isset($TimeStamp1)) { $TimeStamp1 = null; } if(!isset($LastReply)) { $LastReply = " 
 "; } diff --git a/inc/versioninfo.php b/inc/versioninfo.php index b615d9d..495c96b 100644 --- a/inc/versioninfo.php +++ b/inc/versioninfo.php @@ -11,7 +11,7 @@ Copyright 2004-2009 Cool Dude 2k - http://idb.berlios.de/ Copyright 2004-2009 Game Maker 2k - http://intdb.sourceforge.net/ - $FileInfo: versioninfo.php - Last Update: 6/04/2009 SVN 259 - Author: cooldude2k $ + $FileInfo: versioninfo.php - Last Update: 6/04/2009 SVN 260 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="versioninfo.php"||$File3Name=="/versioninfo.php") { @@ -27,7 +27,7 @@ function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) { return $return_var; } // Version number and date stuff. :P $VER1[0] = 0; $VER1[1] = 2; $VER1[2] = 7; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2]; -$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 259; $RName = "iDB"; $SFName = "IntDB"; +$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 260; $RName = "iDB"; $SFName = "IntDB"; $SVNDay[0] = 6; $SVNDay[1] = 04; $SVNDay[2] = 2009; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2]; $VerInfo['iDB_Ver'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[1],$SubVerN,false); $VerInfo['iDB_Ver_SVN'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[1],$SubVerN,true); -- 2.11.0