1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

Issue #106: News Category SEF - fix category URLs in other news and

other news2
This commit is contained in:
SecretR
2013-02-20 14:40:49 +02:00
parent 06fe59b28d
commit a9fb3fbfbc
2 changed files with 6 additions and 6 deletions

View File

@@ -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().")

View File

@@ -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))
{