|
From: <ir...@us...> - 2012-11-08 08:17:10
|
Revision: 10250
http://sourceforge.net/p/xoops/svn/10250
Author: irmtfan
Date: 2012-11-08 08:17:07 +0000 (Thu, 08 Nov 2012)
Log Message:
-----------
bug fix: in viewforum.php?forum=XXX : change sort fields
Modified Paths:
--------------
XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt
XoopsModules/newbb/branches/irmtfan/newbb/viewforum.php
Modified: XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt
===================================================================
--- XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt 2012-11-07 16:18:31 UTC (rev 10249)
+++ XoopsModules/newbb/branches/irmtfan/newbb/changelog-rev10109.txt 2012-11-08 08:17:07 UTC (rev 10250)
@@ -1,3 +1,8 @@
+date 2012-11-08
+===================================
+1- bug fix: in viewforum.php?forum=XXX : change sort fields u.uname => t.topic_poster | t.topic_time => t.topic_id | "t.topic_ratings"=>_MD_RATINGS, | p.post_time => t.topic_last_post_id
+in newbb/viewforum.php
+
date 2012-11-07
===================================
1- bug fix: in XOOPSCORE/search.php $xoopsModuleConfig and $xoopsModule is not set
Modified: XoopsModules/newbb/branches/irmtfan/newbb/viewforum.php
===================================================================
--- XoopsModules/newbb/branches/irmtfan/newbb/viewforum.php 2012-11-07 16:18:31 UTC (rev 10249)
+++ XoopsModules/newbb/branches/irmtfan/newbb/viewforum.php 2012-11-08 08:17:07 UTC (rev 10250)
@@ -142,8 +142,8 @@
$xoopsTpl->assign('forum_name', $forum_obj->getVar('forum_name'));
$xoopsTpl->assign('forum_moderators', $forum_obj->disp_forumModerators());
-
-$sel_sort_array = array("t.topic_title"=>_MD_TOPICTITLE, "u.uname"=>_MD_TOPICPOSTER, "t.topic_time"=>_MD_TOPICTIME, "t.topic_replies"=>_MD_NUMBERREPLIES, "t.topic_views"=>_MD_VIEWS, "p.post_time"=>_MD_LASTPOSTTIME);
+// irmtfan - add and edit: u.uname => t.topic_poster | t.topic_time => t.topic_id | "t.topic_ratings"=>_MD_RATINGS, | p.post_time => t.topic_last_post_id
+$sel_sort_array = array("t.topic_title"=>_MD_TOPICTITLE, "t.topic_poster"=>_MD_TOPICPOSTER, "t.topic_id"=>_MD_TOPICTIME, "t.topic_replies"=>_MD_NUMBERREPLIES, "t.topic_views"=>_MD_VIEWS, "t.topic_ratings"=>_MD_RATINGS, "t.topic_last_post_id"=>_MD_LASTPOSTTIME);
if ( !isset($_GET['sort']) || !in_array($_GET['sort'], array_keys($sel_sort_array)) ) {
$sort = "t.topic_last_post_id";
} else {
@@ -175,13 +175,14 @@
unset($query_sort["sort"], $query_sort["order"]);
$page_query_sort = implode("&", array_values($query_sort));
unset($query_sort);
+// irmtfan - edit: u.uname => t.topic_poster | t.topic_time => t.topic_id | p.post_time => t.topic_last_post_id
$xoopsTpl->assign('h_topic_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_title&order=". (($sort == "t.topic_title" && $order == "DESC") ? "ASC" : "DESC"));
$xoopsTpl->assign('h_reply_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_replies&order=". (($sort == "t.topic_replies" && $order == "DESC") ? "ASC" : "DESC"));
-$xoopsTpl->assign('h_poster_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&sort=u.uname&order=". (($sort == "u.uname" && $order == "DESC") ? "ASC" : "DESC"));
+$xoopsTpl->assign('h_poster_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_poster&order=". (($sort == "t.topic_poster" && $order == "DESC") ? "ASC" : "DESC"));
$xoopsTpl->assign('h_views_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_views&order=". (($sort == "t.topic_views" && $order == "DESC") ? "ASC" : "DESC"));
$xoopsTpl->assign('h_rating_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_ratings&order=". (($sort == "t.topic_ratings" && $order == "DESC") ? "ASC" : "DESC"));
-$xoopsTpl->assign('h_date_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&sort=p.post_time&order=". (($sort == "p.post_time" && $order == "DESC") ? "ASC" : "DESC"));
-$xoopsTpl->assign('h_publish_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_time&order=". (($sort == "t.topic_time" && $order == "DESC") ? "ASC" : "DESC"));
+$xoopsTpl->assign('h_date_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_last_post_id&order=". (($sort == "t.topic_last_post_id" && $order == "DESC") ? "ASC" : "DESC"));
+$xoopsTpl->assign('h_publish_link', XOOPS_URL."/modules/newbb/viewforum.php?{$page_query_sort}&sort=t.topic_id&order=". (($sort == "t.topic_id" && $order == "DESC") ? "ASC" : "DESC"));
$xoopsTpl->assign('forum_since', $since); // For $since in search.php
// irmtfan - if no since it should be 0
|