this should stop any possible errors

This commit is contained in:
Daku 2012-01-26 06:42:37 +00:00
parent 9f92e7badf
commit 4dc4ed45a4
2 changed files with 3 additions and 3 deletions

View file

@ -122,13 +122,13 @@ class NumericScore implements Extension {
$year = $event->get_arg(0);
}
//month
if(int_escape($event->get_arg(1)) == 0){
if(int_escape($event->get_arg(1)) == 0 || int_escape($event->get_arg(1)) > 12){
$month = date("m");
}else{
$month = $event->get_arg(1);
}
//day
if(int_escape($event->get_arg(2)) == 0){
if(int_escape($event->get_arg(2)) == 0 || int_escape($event->get_arg(2)) > 31){
$day = date("d");
}else{
$day = $event->get_arg(2);

View file

@ -67,7 +67,7 @@ class NumericScoreTheme extends Themelet {
'</span>';
}
$b_dte = make_link("popular_by_".$dte[3]."/".date($dte[2], (strtotime(('-1 '.$dte[3]), strtotime($dte[0])))));
$b_dte = make_link("popular_by_".$dte[3]."/".date($dte[2], (strtotime('-1 '.$dte[3], strtotime($dte[0])))));
$f_dte = make_link("popular_by_".$dte[3]."/".date($dte[2], (strtotime('+1 '.$dte[3], strtotime($dte[0])))));
$html = '<center><h3><a href="'.$b_dte.'">&laquo;</a> '.$dte[1]