fixing some date/linking minor problems

This commit is contained in:
real_nowhereman 2008-04-14 07:46:47 +00:00
parent 90311e328d
commit 1c6fb0bb3d
3 changed files with 9 additions and 6 deletions

View File

@ -489,12 +489,13 @@
function get_day_link($year, $month, $day) {
return wp_specialchars(
apply_filters(
'month_link',
BLOG_BASEURL . '?y:'. str_pad($year, 2, '0', STR_PAD_LEFT)
'day_link',
BLOG_BASEURL . '?x=y:'. str_pad($year, 2, '0', STR_PAD_LEFT)
. ';m:' . str_pad($month, 2, '0', STR_PAD_LEFT)
. ';d:' . str_pad($day, 2, '0', STR_PAD_LEFT),
$year,
$month)
$month,
$day)
);
}

View File

@ -63,9 +63,11 @@ function generate_calendar($year, $month, $days = array(), $day_name_length = 3,
}
function plugin_calendar_widget() {
global $fp_params;
$y = isset($_GET['y'])? $_GET['y'] : date('y');
$m = isset($_GET['m'])? $_GET['m'] : date('m');
$y = isset($fp_params['y'])? $fp_params['y'] : date('y');
$m = isset($fp_params['m'])? $fp_params['m'] : date('m');
global $fpdb;

View File

@ -125,7 +125,7 @@ class Plugin_PrettyURLs {
}
function daylink($str, $y, $m, $d) {
return $this->daylink($str, $y, $m) . "$d/";
return $this->monthlink($str, $y, $m) . "$d/";
}