mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Fix for News SEF Url 'list/all'
This commit is contained in:
parent
3030ca3570
commit
34bbd17277
@ -10,6 +10,7 @@ if (!defined('e107_INIT')){ exit; }
|
|||||||
|
|
||||||
class core_news_sef_noid_url extends eUrlConfig
|
class core_news_sef_noid_url extends eUrlConfig
|
||||||
{
|
{
|
||||||
|
|
||||||
public function config()
|
public function config()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
@ -134,6 +135,15 @@ class core_news_sef_noid_url extends eUrlConfig
|
|||||||
|
|
||||||
if(empty($r)) return false;
|
if(empty($r)) return false;
|
||||||
|
|
||||||
|
|
||||||
|
//XXX TODO Find a better place to put this check.
|
||||||
|
$urlFormat = e107::getConfig()->get('url_sef_translate');
|
||||||
|
if($urlFormat == 'dashl' || $urlFormat == 'underscorel' || $urlFormat == 'plusl') // convert template to lowercase when using lowercase SEF URL format.
|
||||||
|
{
|
||||||
|
// $r[0] = strtolower($r[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return array($r, $parm);
|
return array($r, $parm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2476,6 +2476,7 @@ class eUrlRule
|
|||||||
|
|
||||||
$suffix = $this->urlSuffix === null ? $manager->urlSuffix : $this->urlSuffix;
|
$suffix = $this->urlSuffix === null ? $manager->urlSuffix : $this->urlSuffix;
|
||||||
|
|
||||||
|
// XXX TODO Find better place for this check which will affect all types of SEF URL configurations. (@see news/sef_noid_url.php for duplicate)
|
||||||
$urlFormat = e107::getConfig()->get('url_sef_translate');
|
$urlFormat = e107::getConfig()->get('url_sef_translate');
|
||||||
|
|
||||||
if($urlFormat == 'dashl' || $urlFormat == 'underscorel' || $urlFormat == 'plusl') // convert template to lowercase when using lowercase SEF URL format.
|
if($urlFormat == 'dashl' || $urlFormat == 'underscorel' || $urlFormat == 'plusl') // convert template to lowercase when using lowercase SEF URL format.
|
||||||
|
2
news.php
2
news.php
@ -318,7 +318,7 @@ if ($action == 'cat' || $action == 'all' || vartrue($_GET['tag']))
|
|||||||
$NEWSLISTTITLE = str_replace("{NEWSCATEGORY}",$tp->toHTML($category_name,FALSE,'TITLE'),$NEWSLISTTITLE);
|
$NEWSLISTTITLE = str_replace("{NEWSCATEGORY}",$tp->toHTML($category_name,FALSE,'TITLE'),$NEWSLISTTITLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$text .= "<div class='center news-list-footer'><a class='btn btn-default' href='".e107::getUrl()->create('news/all')."'>".LAN_NEWS_84."</a></div>";
|
$text .= "<div class='center news-list-footer'><a class='btn btn-default' href='".e107::getUrl()->create('news/list/all')."'>".LAN_NEWS_84."</a></div>";
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
$ns->tablerender($NEWSLISTTITLE, $text, 'news');
|
$ns->tablerender($NEWSLISTTITLE, $text, 'news');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user