Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions cycle.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@
break;
}

function cycle_get_timespan() {
$timespan = [];
$first_weekdayid = read_user_setting('first_weekdayid');

get_timespan($timespan, time(), get_request_var('timespan'), $first_weekdayid);

return $timespan;
}

function cycle_graphs() {
global $graphs_ppage, $graph_cols, $graphs;
global $page_refresh_interval, $graph_timespans;
Expand All @@ -82,9 +91,7 @@ function cycle_graphs() {
}

// get the start and end times for the graph
$timespan = [];
$first_weekdayid = read_user_setting('first_weekdayid');
get_timespan($timespan, time(), get_request_var('timespan'), $first_weekdayid);
$timespan = cycle_get_timespan();

$graph_tree = $tree_id;
$html = '';
Expand Down Expand Up @@ -182,9 +189,7 @@ function cycle() {
}

// get the start and end times for the graph
$timespan = [];
$first_weekdayid = read_user_setting('first_weekdayid');
get_timespan($timespan, time(), get_request_var('timespan') , $first_weekdayid);
$timespan = cycle_get_timespan();

$graph_tree = $tree_id;
$html = '';
Expand Down