@@ -15,9 +15,15 @@ |
||
15 | 15 | } |
16 | 16 | require_once CALENDAR_ROOT.'Week.php'; |
17 | 17 | |
18 | -if (!isset($_GET['y'])) $_GET['y'] = date('Y'); |
|
19 | -if (!isset($_GET['m'])) $_GET['m'] = date('m'); |
|
20 | -if (!isset($_GET['d'])) $_GET['d'] = 1; |
|
18 | +if (!isset($_GET['y'])) { |
|
19 | + $_GET['y'] = date('Y'); |
|
20 | +} |
|
21 | +if (!isset($_GET['m'])) { |
|
22 | + $_GET['m'] = date('m'); |
|
23 | +} |
|
24 | +if (!isset($_GET['d'])) { |
|
25 | + $_GET['d'] = 1; |
|
26 | +} |
|
21 | 27 | |
22 | 28 | // Build the month |
23 | 29 | $Week = new Calendar_Week($_GET['y'], $_GET['m'], $_GET['d']); |
@@ -118,12 +118,24 @@ |
||
118 | 118 | */ |
119 | 119 | function setFragments($y, $m=null, $d=null, $h=null, $i=null, $s=null) |
120 | 120 | { |
121 | - if (!is_null($y)) $this->uris['Year'] = $y; |
|
122 | - if (!is_null($m)) $this->uris['Month'] = $m; |
|
123 | - if (!is_null($d)) $this->uris['Day'] = $d; |
|
124 | - if (!is_null($h)) $this->uris['Hour'] = $h; |
|
125 | - if (!is_null($i)) $this->uris['Minute'] = $i; |
|
126 | - if (!is_null($s)) $this->uris['Second'] = $s; |
|
121 | + if (!is_null($y)) { |
|
122 | + $this->uris['Year'] = $y; |
|
123 | + } |
|
124 | + if (!is_null($m)) { |
|
125 | + $this->uris['Month'] = $m; |
|
126 | + } |
|
127 | + if (!is_null($d)) { |
|
128 | + $this->uris['Day'] = $d; |
|
129 | + } |
|
130 | + if (!is_null($h)) { |
|
131 | + $this->uris['Hour'] = $h; |
|
132 | + } |
|
133 | + if (!is_null($i)) { |
|
134 | + $this->uris['Minute'] = $i; |
|
135 | + } |
|
136 | + if (!is_null($s)) { |
|
137 | + $this->uris['Second'] = $s; |
|
138 | + } |
|
127 | 139 | } |
128 | 140 | |
129 | 141 | /** |
@@ -8,8 +8,12 @@ |
||
8 | 8 | require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
9 | 9 | require_once CALENDAR_ROOT.'Util/Uri.php'; |
10 | 10 | |
11 | -if (!isset($_GET['jahr'])) $_GET['jahr'] = date('Y'); |
|
12 | -if (!isset($_GET['monat'])) $_GET['monat'] = date('m'); |
|
11 | +if (!isset($_GET['jahr'])) { |
|
12 | + $_GET['jahr'] = date('Y'); |
|
13 | +} |
|
14 | +if (!isset($_GET['monat'])) { |
|
15 | + $_GET['monat'] = date('m'); |
|
16 | +} |
|
13 | 17 | |
14 | 18 | // Build the month |
15 | 19 | $Calendar = new Calendar_Month_Weekdays($_GET['jahr'], $_GET['monat']); |
@@ -19,12 +19,24 @@ |
||
19 | 19 | define('CALENDAR_ROOT','../../'); |
20 | 20 | } |
21 | 21 | |
22 | -if (!isset($_GET['y'])) $_GET['y'] = 2003; |
|
23 | -if (!isset($_GET['m'])) $_GET['m'] = 8; |
|
24 | -if (!isset($_GET['d'])) $_GET['d'] = 9; |
|
25 | -if (!isset($_GET['h'])) $_GET['h'] = 12; |
|
26 | -if (!isset($_GET['i'])) $_GET['i'] = 34; |
|
27 | -if (!isset($_GET['s'])) $_GET['s'] = 46; |
|
22 | +if (!isset($_GET['y'])) { |
|
23 | + $_GET['y'] = 2003; |
|
24 | +} |
|
25 | +if (!isset($_GET['m'])) { |
|
26 | + $_GET['m'] = 8; |
|
27 | +} |
|
28 | +if (!isset($_GET['d'])) { |
|
29 | + $_GET['d'] = 9; |
|
30 | +} |
|
31 | +if (!isset($_GET['h'])) { |
|
32 | + $_GET['h'] = 12; |
|
33 | +} |
|
34 | +if (!isset($_GET['i'])) { |
|
35 | + $_GET['i'] = 34; |
|
36 | +} |
|
37 | +if (!isset($_GET['s'])) { |
|
38 | + $_GET['s'] = 46; |
|
39 | +} |
|
28 | 40 | |
29 | 41 | switch (@$_GET['view']) { |
30 | 42 | default: |