mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Date Class terms() method corrected. 'months' now uses the correct key. terms() method usage updated throughout.
Chart Class debug() method added
This commit is contained in:
@@ -208,6 +208,16 @@ class e_chart
|
||||
return json_encode($this->options);
|
||||
}
|
||||
|
||||
public function debug($flag=false)
|
||||
{
|
||||
if($flag === true)
|
||||
{
|
||||
e107::getDebug()->log($this->data);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the type of graph
|
||||
* @param string $type - line | bar | pie | radar | doughnut | polar
|
||||
|
@@ -92,7 +92,7 @@ class convert
|
||||
$marray = array();
|
||||
for ($i=1; $i < 13; $i++)
|
||||
{
|
||||
$marray[] = strftime($val,mktime(1,1,1,$i,1,2000));
|
||||
$marray[$i] = strftime($val,mktime(1,1,1,$i,1,2000));
|
||||
}
|
||||
|
||||
return $marray;
|
||||
|
@@ -129,11 +129,11 @@ 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('news/list/month', 'id='.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]."</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$archive .= $marray[$i-1];
|
||||
$archive .= $marray[$i];
|
||||
}
|
||||
|
||||
$archive .= "</div>";
|
||||
|
@@ -199,7 +199,7 @@ if(false === $cached)
|
||||
{
|
||||
$month_selector .= "<option value='".$val."'";
|
||||
$month_selector .= ($index == $req_month)?" selected='selected'": "";
|
||||
$month_selector .= ">".$marray[$index-1]."</option>";
|
||||
$month_selector .= ">".$marray[$index]."</option>";
|
||||
}
|
||||
|
||||
$month_selector .= "</select></div>";
|
||||
|
@@ -142,7 +142,7 @@ function calendar($req_day, $req_month, $req_year, $links = NULL, $ws = "sunday"
|
||||
{
|
||||
$active = date("n-Y") == ($req_month."-".$req_year) ? 'active' : '';
|
||||
$text = "<div class='item {$active}'>";
|
||||
$text .= "<h5>".$marray[$req_month - 1]." ".$req_year."</h5>";
|
||||
$text .= "<h5>".$marray[$req_month]." ".$req_year."</h5>";
|
||||
$text .= $calendar;
|
||||
$text .= "</div>";
|
||||
}
|
||||
|
@@ -116,7 +116,7 @@ if(false === $cached)
|
||||
$vars->addData(array(
|
||||
'active' => $index == $req_month ? " active" : '',
|
||||
'url' => $val,
|
||||
'month' => $marray[$index-1],
|
||||
'month' => $marray[$index],
|
||||
'count' => $xmonth_cnt[$index],
|
||||
));
|
||||
$menu_text[] = $tp->simpleParse($template['item'], $vars);
|
||||
|
Reference in New Issue
Block a user