mirror of
https://github.com/e107inc/e107.git
synced 2025-08-17 03:54:09 +02:00
Moving the system to the new URL assembling, fixed call to a non-existent eUrl method system wide.
This commit is contained in:
@@ -91,7 +91,7 @@ for($i = $start_year; $i <= $end_year; $i++)
|
||||
list($xmonth, $xday) = explode(" ", date("n j", $news['news_datestamp']));
|
||||
if (!$day_links[$xmonth][$xday])
|
||||
{
|
||||
$day_links[$xmonth][$xday] = e107::getUrl()->create('core:news', 'main', 'action=day&value='.formatDate($req_year, $xmonth, $xday));
|
||||
$day_links[$xmonth][$xday] = e107::getUrl()->create('news/list/day', 'id='.formatDate($req_year, $xmonth, $xday));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -122,7 +122,7 @@ for($i = 1; $i <= 12; $i++)
|
||||
// href the current month regardless of newsposts or any month with news
|
||||
if (($req_year == $cur_year && $i == $cur_month) || $day_links[$i])
|
||||
{
|
||||
$archive .= "<a class='forumlink' href='".e107::getUrl()->create('core:news', 'main', 'action=month&value='.formatDate($req_year, $i))."'>".$marray[$i-1]."</a>";
|
||||
$archive .= "<a class='forumlink' href='".e107::getUrl()->create('news/list/month', 'id='.formatDate($req_year, $i))."'>".$marray[$i-1]."</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -42,8 +42,9 @@ if(false === $cached)
|
||||
list($cur_year, $cur_month, $cur_day) = explode(" ", date("Y n j"));
|
||||
if (e_PAGE == 'news.php' && strstr(e_QUERY, "day"))
|
||||
{
|
||||
//$tmp = explode(".", e_QUERY);
|
||||
$tmp = e107::getUrl()->parseRequest('core:news', 'main', urldecode(e_QUERY));
|
||||
$tmp = explode(".", e_QUERY);
|
||||
// Core now support legacy queries - use just the old way
|
||||
//$tmp = e107::getUrl()->parseRequest('core:news', 'main', urldecode(e_QUERY));
|
||||
$item = $tmp[1];
|
||||
$req_year = intval(substr($item, 0, 4));
|
||||
$req_month = intval(substr($item, 4, 2));
|
||||
@@ -63,8 +64,9 @@ if(false === $cached)
|
||||
}
|
||||
elseif(e_PAGE == 'news.php' && strstr(e_QUERY, "month"))
|
||||
{
|
||||
//$tmp = explode(".", e_QUERY);
|
||||
$tmp = e107::getUrl()->parseRequest('core:news', 'main', urldecode(e_QUERY));
|
||||
$tmp = explode(".", e_QUERY);
|
||||
// Core now support legacy queries - use just the old way
|
||||
//$tmp = e107::getUrl()->parseRequest('core:news', 'main', urldecode(e_QUERY));
|
||||
$item = $tmp[1];
|
||||
$req_year = intval(substr($item, 0, 4));
|
||||
$req_month = intval(substr($item, 4, 2));
|
||||
@@ -107,14 +109,14 @@ if(false === $cached)
|
||||
$xmonth = date("n", $news['news_datestamp']);
|
||||
if (!isset($month_links[$xmonth]) || !$month_links[$xmonth])
|
||||
{
|
||||
$month_links[$xmonth] = e107::getUrl()->create('core:news', 'main', 'action=month&value='.formatDate($req_year, $xmonth));//e_BASE."news.php?month.".formatDate($req_year, $xmonth);
|
||||
$month_links[$xmonth] = e107::getUrl()->create('news/list/month', 'idv='.formatDate($req_year, $xmonth));//e_BASE."news.php?month.".formatDate($req_year, $xmonth);
|
||||
}
|
||||
if($news['news_datestamp'] >= $month_start AND $news['news_datestamp'] <= $month_end)
|
||||
{
|
||||
$xday = date("j", $news['news_datestamp']);
|
||||
if (!isset($day_links[$xday]) || !$day_links[$xday])
|
||||
{
|
||||
$day_links[$xday] = e107::getUrl()->create('core:news', 'main', 'action=day&value='.formatDate($req_year, $xmonth, $xday));//e_BASE."news.php?day.".formatDate($req_year, $req_month, $xday);
|
||||
$day_links[$xday] = e107::getUrl()->create('news/list/day', 'id='.formatDate($req_year, $xmonth, $xday));//e_BASE."news.php?day.".formatDate($req_year, $req_month, $xday);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -122,7 +124,7 @@ if(false === $cached)
|
||||
// if we're listing the current year, add the current month to the list regardless of posts
|
||||
if ($req_year == $cur_year)
|
||||
{
|
||||
$month_links[$cur_month] = e107::getUrl()->create('core:news', 'main', 'action=month&value='.formatDate($cur_year, $cur_month));//e_BASE."news.php?month.".formatDate($cur_year, $cur_month);
|
||||
$month_links[$cur_month] = e107::getUrl()->create('news/list/month', 'id='.formatDate($cur_year, $cur_month));//e_BASE."news.php?month.".formatDate($cur_year, $cur_month);
|
||||
}
|
||||
|
||||
// go over the link array and create the option fields
|
||||
|
Reference in New Issue
Block a user