1
0
mirror of https://github.com/e107inc/e107.git synced 2025-09-09 13:50:47 +02:00

Closes #4311 - gSitemap select-all option.

This commit is contained in:
Cameron
2020-12-29 10:30:05 -08:00
parent 94f772577a
commit 15488f1c7e
4 changed files with 18 additions and 12 deletions

View File

@@ -35,7 +35,7 @@ class news_gsitemap
'id' => $row['category_id'],
'table' => 'news_category',
'name' => $row['category_name'],
'url' => e107::getUrl()->create('news/list/category', $row, array('full' => 1)) ,
'url' => $this->url('news_category', $row), // e107::getUrl()->create('news/list/category', $row, array('full' => 1)) ,
'type' => LAN_NEWS_23
);
}
@@ -56,7 +56,7 @@ class news_gsitemap
'id' => $row['news_id'],
'table' => 'news',
'name' => $row['news_title'],
'url' => $this->url($row),
'url' => $this->url('news', $row),
'type' => ADLAN_0
);
}
@@ -69,8 +69,13 @@ class news_gsitemap
* @param $row
* @return string
*/
function url($row)
function url($table, $row)
{
if($table === 'news_category')
{
return e107::getUrl()->create('news/list/category', $row, array('full' => 1));
}
return e107::getUrl()->create('news/view/item', $row, array('full' => 1));
}