mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Issue #106: News Category SEF - fix category URLs in other news and
other news2
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
// FIXME full rewrite
|
||||
global $e107cache;
|
||||
|
||||
// Load Data
|
||||
@@ -88,7 +88,7 @@ $param['caticon'] = OTHERNEWS2_CATICON;
|
||||
$style = defset('OTHERNEWS2_CELL','padding:0px;vertical-align:top');
|
||||
$nbr_cols = defset('OTHERNEWS2_COLS', 1);
|
||||
|
||||
$query = "SELECT n.*, u.user_id, u.user_name, u.user_customtitle, nc.category_name, nc.category_icon FROM #news AS n
|
||||
$query = "SELECT n.*, u.user_id, u.user_name, u.user_customtitle, nc.category_id, nc.category_name, nc.category_sef, nc.category_icon FROM #news AS n
|
||||
LEFT JOIN #user AS u ON n.news_author = u.user_id
|
||||
LEFT JOIN #news_category AS nc ON n.news_category = nc.category_id
|
||||
WHERE n.news_class IN (".USERCLASS_LIST.") AND n.news_start < ".time()." AND (n.news_end=0 || n.news_end>".time().")
|
||||
|
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
// FIXME full rewrite
|
||||
// Load Data
|
||||
if($cacheData = e107::getCache()->retrieve("nq_othernews"))
|
||||
{
|
||||
@@ -82,11 +82,11 @@ $param['caticon'] = defset('OTHERNEWS_CATICON');
|
||||
$style = defset('OTHERNEWS_CELL');
|
||||
$nbr_cols = defset('OTHERNEWS_COLS');
|
||||
|
||||
|
||||
$query = "SELECT n.*, u.user_id, u.user_name, u.user_customtitle, nc.category_name, nc.category_icon FROM #news AS n
|
||||
$_t = time();
|
||||
$query = "SELECT n.*, u.user_id, u.user_name, u.user_customtitle, nc.category_id, nc.category_name, nc.category_sef, nc.category_icon FROM #news AS n
|
||||
LEFT JOIN #user AS u ON n.news_author = u.user_id
|
||||
LEFT JOIN #news_category AS nc ON n.news_category = nc.category_id
|
||||
WHERE n.news_class IN (".USERCLASS_LIST.") AND n.news_start < ".time()." AND (n.news_end=0 || n.news_end>".time().") AND FIND_IN_SET(2, n.news_render_type) ORDER BY n.news_datestamp DESC LIMIT 0,".OTHERNEWS_LIMIT;
|
||||
WHERE n.news_class IN (".USERCLASS_LIST.") AND n.news_start < ".$_t." AND (n.news_end=0 || n.news_end>".$_t.") AND FIND_IN_SET(2, n.news_render_type) ORDER BY n.news_datestamp DESC LIMIT 0,".OTHERNEWS_LIMIT;
|
||||
|
||||
if ($sql->db_Select_gen($query))
|
||||
{
|
||||
|
Reference in New Issue
Block a user