1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-25 15:31:41 +02:00

Updates to use new plugin specific prefs. Change file headers as well.

This commit is contained in:
mcfly
2010-03-10 01:23:57 +00:00
parent a62ec69609
commit bf1c62d6fe
23 changed files with 135 additions and 164 deletions

View File

@@ -8,14 +8,13 @@
*
* Forum e_list Handler
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/e_list.php,v $
* $Revision$
* $Date$
* $Author$
* $URL$
* $Id$
*
*/
if (!defined('e107_INIT')) { exit; }
//TODO: Investigate queries
class list_forum
{
function list_forum($parent)
@@ -30,29 +29,29 @@ class list_forum
$bullet = $this->parent->getBullet($this->parent->settings['icon']);
if($this->parent->mode == "new_page" || $this->parent->mode == "new_menu" )
if($this->parent->mode == 'new_page' || $this->parent->mode == 'new_menu' )
{
$lvisit = $this->parent->getlvisit();
$qry = "
SELECT tp.thread_name AS parent_name, tp.thread_id as parent_id, f.forum_id, f.forum_name, f.forum_class, u.user_name, lp.user_name AS lp_name, t.thread_thread, t.thread_id, t.thread_views as tviews, t.thread_name, tp.thread_parent, t.thread_datestamp, t.thread_user, tp.thread_views, tp.thread_lastpost, tp.thread_lastuser, tp.thread_total_replies
FROM #forum_t AS t
LEFT JOIN #forum_t AS tp ON t.thread_parent = tp.thread_id
LEFT JOIN #forum AS f ON f.forum_id = t.thread_forum_id
LEFT JOIN #user AS u ON t.thread_user = u.user_id
LEFT JOIN #user AS lp ON tp.thread_lastuser = lp.user_id
WHERE f.forum_class REGEXP '".e_CLASS_REGEXP."'
AND t.thread_datestamp > $lvisit
SELECT tp.thread_name AS parent_name, tp.thread_id as parent_id, f.forum_id, f.forum_name, f.forum_class, u.user_name, lp.user_name AS lp_name, t.thread_thread, t.thread_id, t.thread_views as tviews, t.thread_name, tp.thread_parent, t.thread_datestamp, t.thread_user, tp.thread_views, tp.thread_lastpost, tp.thread_lastuser, tp.thread_total_replies
FROM #forum_t AS t
LEFT JOIN #forum_t AS tp ON t.thread_parent = tp.thread_id
LEFT JOIN #forum AS f ON f.forum_id = t.thread_forum_id
LEFT JOIN #user AS u ON t.thread_user = u.user_id
LEFT JOIN #user AS lp ON tp.thread_lastuser = lp.user_id
WHERE f.forum_class REGEXP '".e_CLASS_REGEXP."'
AND t.thread_datestamp > $lvisit
ORDER BY t.thread_datestamp DESC LIMIT 0,".intval($this->parent->settings['amount']);
}
else
{
$qry = "
SELECT t.thread_id, t.thread_name AS parent_name, t.thread_datestamp, t.thread_user, t.thread_views, t.thread_lastpost, t.thread_lastuser, t.thread_total_replies, f.forum_id, f.forum_name, f.forum_class, u.user_name, lp.user_name AS lp_name
FROM #forum_t AS t
LEFT JOIN #forum AS f ON f.forum_id = t.thread_forum_id
LEFT JOIN #user AS u ON t.thread_user = u.user_id
LEFT JOIN #user AS lp ON t.thread_lastuser = lp.user_id
WHERE t.thread_parent=0 AND f.forum_class REGEXP '".e_CLASS_REGEXP."'
SELECT t.thread_id, t.thread_name AS parent_name, t.thread_datestamp, t.thread_user, t.thread_views, t.thread_lastpost, t.thread_lastuser, t.thread_total_replies, f.forum_id, f.forum_name, f.forum_class, u.user_name, lp.user_name AS lp_name
FROM #forum_t AS t
LEFT JOIN #forum AS f ON f.forum_id = t.thread_forum_id
LEFT JOIN #user AS u ON t.thread_user = u.user_id
LEFT JOIN #user AS lp ON t.thread_lastuser = lp.user_id
WHERE t.thread_parent=0 AND f.forum_class REGEXP '".e_CLASS_REGEXP."'
ORDER BY t.thread_lastpost DESC LIMIT 0,".intval($this->parent->settings['amount']);
}
@@ -147,8 +146,8 @@ class list_forum
}
//return array with 'records', (global)'caption', 'display'
return array(
'records'=>$list_data,
'caption'=>$list_caption,
'records'=>$list_data,
'caption'=>$list_caption,
'display'=>$list_display
);
}