aboutsummaryrefslogtreecommitdiffstats
path: root/functions/template.php
diff options
context:
space:
mode:
authorWesley Miaw <josuah@users.sourceforge.net>2005-12-01 06:15:28 +0000
committerWesley Miaw <josuah@users.sourceforge.net>2005-12-01 06:15:28 +0000
commite5e49f470c5e4cdcf55671416ea7297177d139ff (patch)
tree2c6233826d3571047cd67a0654332b9fde761860 /functions/template.php
parent036239864e3eb20ebbea3343b8397bc8df030ed8 (diff)
downloadphpicalendar-e5e49f470c5e4cdcf55671416ea7297177d139ff.tar.gz
phpicalendar-e5e49f470c5e4cdcf55671416ea7297177d139ff.tar.bz2
phpicalendar-e5e49f470c5e4cdcf55671416ea7297177d139ff.zip
Feature #1353342. You can now specify how many days should be
displayed on the week view. All numbers, negative to more than seven, work with the expected behavior. Thanks to Nicolas Contamin for the code changes.
Diffstat (limited to 'functions/template.php')
-rw-r--r--functions/template.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/functions/template.php b/functions/template.php
index 260d057..c70da14 100644
--- a/functions/template.php
+++ b/functions/template.php
@@ -231,7 +231,7 @@ class Page {
}#end draw_search
function draw_week($template_p) {
- global $unique_colors, $start_week_time, $template, $getdate, $cal, $master_array, $daysofweek_lang, $week_start_day, $dateFormat_week_list, $current_view, $day_array, $timeFormat, $gridLength, $timeFormat_small, $day_start;
+ global $unique_colors, $start_week_time, $template, $getdate, $cal, $master_array, $daysofweek_lang, $week_start_day, $dateFormat_week_list, $current_view, $day_array, $timeFormat, $gridLength, $timeFormat_small, $day_start, $week_length;
// Figure out colspans
$dayborder = 0;
@@ -252,7 +252,7 @@ class Page {
$thisdate = ($thisdate + (25 * 60 * 60));
}
- for ($i=0; $i<7; $i++) {
+ for ($i=0; $i<$week_length; $i++) {
$thisdate = date ('Ymd', $start_week_time);
$weekarray[$i] = $thisdate;
$start_week_time = strtotime('+1 day', $start_week_time);
@@ -289,7 +289,7 @@ class Page {
$loop_dof = trim($match1[1]);
$start_wt = strtotime(dateOfWeek($getdate, $week_start_day));
$start_day = strtotime($week_start_day);
- for ($i=0; $i<7; $i++) {
+ for ($i=0; $i<$week_length; $i++) {
$day_num = date("w", $start_day);
$daylink = date('Ymd', $start_wt);
if ($current_view == 'day') {
@@ -360,7 +360,7 @@ class Page {
$thisdate = $swt;
// loop this part 7 times, one for each day
- for ($week_loop=0; $week_loop<7; $week_loop++) {
+ for ($week_loop=0; $week_loop<$week_length; $week_loop++) {
$thisday = date("Ymd", $thisdate);
$dayborder = 0;
unset($this_time_arr);

© 2014-2024 Faster IT GmbH | imprint | privacy policy