Status: | Merged | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Approved by: | Dan Garner | ||||||||||||
Approved revision: | 9 | ||||||||||||
Merged at revision: | not available | ||||||||||||
Proposed branch: | lp:~dangarner/xibo/334359 | ||||||||||||
Merge into: | lp:xibo/1.0 | ||||||||||||
Diff against target: | None lines | ||||||||||||
To merge this branch: | bzr merge lp:~dangarner/xibo/334359 | ||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Dan Garner | Approve | ||
Review via email: mp+4024@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Dan Garner (dangarner) wrote : | # |
Revision history for this message
Dan Garner (dangarner) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'server/modules/flash.module.php' | |||
2 | --- server/modules/flash.module.php 2009-01-11 18:20:19 +0000 | |||
3 | +++ server/modules/flash.module.php 2009-02-27 19:30:45 +0000 | |||
4 | @@ -504,7 +504,7 @@ | |||
5 | 504 | 504 | ||
6 | 505 | // Other properties | 505 | // Other properties |
7 | 506 | $name = Kit::GetParam('name', _POST, _STRING); | 506 | $name = Kit::GetParam('name', _POST, _STRING); |
9 | 507 | $duration = Kit::GetParam('duration', _POST, _INT, 1); | 507 | $duration = Kit::GetParam('duration', _POST, _INT, 0); |
10 | 508 | $permissionid = Kit::GetParam('permissionid', _POST, _INT, 1); | 508 | $permissionid = Kit::GetParam('permissionid', _POST, _INT, 1); |
11 | 509 | 509 | ||
12 | 510 | if ($name == '') $name = Kit::ValidateParam($fileName, _FILENAME); | 510 | if ($name == '') $name = Kit::ValidateParam($fileName, _FILENAME); |
13 | @@ -525,6 +525,13 @@ | |||
14 | 525 | return $this->response; | 525 | return $this->response; |
15 | 526 | } | 526 | } |
16 | 527 | 527 | ||
17 | 528 | if ($duration == 0) | ||
18 | 529 | { | ||
19 | 530 | $this->response->SetError('You must enter a duration.'); | ||
20 | 531 | $this->response->keepOpen = true; | ||
21 | 532 | return $this->response; | ||
22 | 533 | } | ||
23 | 534 | |||
24 | 528 | // Ensure the name is not already in the database | 535 | // Ensure the name is not already in the database |
25 | 529 | $SQL = sprintf("SELECT name FROM media WHERE name = '%s' AND userid = %d", $db->escape_string($name), $userid); | 536 | $SQL = sprintf("SELECT name FROM media WHERE name = '%s' AND userid = %d", $db->escape_string($name), $userid); |
26 | 530 | 537 | ||
27 | @@ -653,7 +660,7 @@ | |||
28 | 653 | 660 | ||
29 | 654 | // Other properties | 661 | // Other properties |
30 | 655 | $name = Kit::GetParam('name', _POST, _STRING); | 662 | $name = Kit::GetParam('name', _POST, _STRING); |
32 | 656 | $duration = Kit::GetParam('duration', _POST, _INT, 1); | 663 | $duration = Kit::GetParam('duration', _POST, _INT, 0); |
33 | 657 | $permissionid = Kit::GetParam('permissionid', _POST, _INT, 1); | 664 | $permissionid = Kit::GetParam('permissionid', _POST, _INT, 1); |
34 | 658 | 665 | ||
35 | 659 | if ($name == '') | 666 | if ($name == '') |
36 | @@ -678,6 +685,13 @@ | |||
37 | 678 | return $this->response; | 685 | return $this->response; |
38 | 679 | } | 686 | } |
39 | 680 | 687 | ||
40 | 688 | if ($duration == 0) | ||
41 | 689 | { | ||
42 | 690 | $this->response->SetError('You must enter a duration.'); | ||
43 | 691 | $this->response->keepOpen = true; | ||
44 | 692 | return $this->response; | ||
45 | 693 | } | ||
46 | 694 | |||
47 | 681 | // Ensure the name is not already in the database | 695 | // Ensure the name is not already in the database |
48 | 682 | $SQL = sprintf("SELECT name FROM media WHERE name = '%s' AND userid = %d AND mediaid <> %d ", $db->escape_string($name), $userid, $mediaid); | 696 | $SQL = sprintf("SELECT name FROM media WHERE name = '%s' AND userid = %d AND mediaid <> %d ", $db->escape_string($name), $userid, $mediaid); |
49 | 683 | 697 | ||
50 | @@ -804,6 +818,18 @@ | |||
51 | 804 | 818 | ||
52 | 805 | // Stored As from the XML | 819 | // Stored As from the XML |
53 | 806 | $this->uri = $this->GetOption('uri'); | 820 | $this->uri = $this->GetOption('uri'); |
54 | 821 | |||
55 | 822 | // Do we need to remove this from a layout? | ||
56 | 823 | if ($layoutid != '') | ||
57 | 824 | { | ||
58 | 825 | // Call base method - which will set up the response | ||
59 | 826 | parent::DeleteMedia(); | ||
60 | 827 | } | ||
61 | 828 | else | ||
62 | 829 | { | ||
63 | 830 | // Set this message now in preparation | ||
64 | 831 | $this->response->message = 'Deleted the Media.'; | ||
65 | 832 | } | ||
66 | 807 | 833 | ||
67 | 808 | // If we are set to retire we retire | 834 | // If we are set to retire we retire |
68 | 809 | if ($options == "retire") | 835 | if ($options == "retire") |
69 | @@ -838,20 +864,8 @@ | |||
70 | 838 | 864 | ||
71 | 839 | $this->DeleteMediaFiles(); | 865 | $this->DeleteMediaFiles(); |
72 | 840 | } | 866 | } |
87 | 841 | 867 | ||
88 | 842 | // Options | 868 | return $this->response; |
75 | 843 | if ($layoutid != '') | ||
76 | 844 | { | ||
77 | 845 | // Call base method - which will handle the response too | ||
78 | 846 | return parent::DeleteMedia(); | ||
79 | 847 | } | ||
80 | 848 | else | ||
81 | 849 | { | ||
82 | 850 | // We want to load a new form | ||
83 | 851 | $this->response->message = 'Deleted the Media.'; | ||
84 | 852 | |||
85 | 853 | return $this->response; | ||
86 | 854 | } | ||
89 | 855 | } | 869 | } |
90 | 856 | 870 | ||
91 | 857 | /** | 871 | /** |
92 | 858 | 872 | ||
93 | === modified file 'server/modules/image.module.php' | |||
94 | --- server/modules/image.module.php 2009-01-11 17:55:31 +0000 | |||
95 | +++ server/modules/image.module.php 2009-02-27 19:30:45 +0000 | |||
96 | @@ -504,7 +504,7 @@ | |||
97 | 504 | 504 | ||
98 | 505 | // Other properties | 505 | // Other properties |
99 | 506 | $name = Kit::GetParam('name', _POST, _STRING); | 506 | $name = Kit::GetParam('name', _POST, _STRING); |
101 | 507 | $duration = Kit::GetParam('duration', _POST, _INT, 1); | 507 | $duration = Kit::GetParam('duration', _POST, _INT, 0); |
102 | 508 | $permissionid = Kit::GetParam('permissionid', _POST, _INT, 1); | 508 | $permissionid = Kit::GetParam('permissionid', _POST, _INT, 1); |
103 | 509 | 509 | ||
104 | 510 | if ($name == '') $name = Kit::ValidateParam($fileName, _FILENAME); | 510 | if ($name == '') $name = Kit::ValidateParam($fileName, _FILENAME); |
105 | @@ -525,6 +525,13 @@ | |||
106 | 525 | return $this->response; | 525 | return $this->response; |
107 | 526 | } | 526 | } |
108 | 527 | 527 | ||
109 | 528 | if ($duration == 0) | ||
110 | 529 | { | ||
111 | 530 | $this->response->SetError('You must enter a duration.'); | ||
112 | 531 | $this->response->keepOpen = true; | ||
113 | 532 | return $this->response; | ||
114 | 533 | } | ||
115 | 534 | |||
116 | 528 | // Ensure the name is not already in the database | 535 | // Ensure the name is not already in the database |
117 | 529 | $SQL = sprintf("SELECT name FROM media WHERE name = '%s' AND userid = %d", $db->escape_string($name), $userid); | 536 | $SQL = sprintf("SELECT name FROM media WHERE name = '%s' AND userid = %d", $db->escape_string($name), $userid); |
118 | 530 | 537 | ||
119 | @@ -656,7 +663,7 @@ | |||
120 | 656 | 663 | ||
121 | 657 | // Other properties | 664 | // Other properties |
122 | 658 | $name = Kit::GetParam('name', _POST, _STRING); | 665 | $name = Kit::GetParam('name', _POST, _STRING); |
124 | 659 | $duration = Kit::GetParam('duration', _POST, _INT, 1); | 666 | $duration = Kit::GetParam('duration', _POST, _INT, 0); |
125 | 660 | $permissionid = Kit::GetParam('permissionid', _POST, _INT, 1); | 667 | $permissionid = Kit::GetParam('permissionid', _POST, _INT, 1); |
126 | 661 | 668 | ||
127 | 662 | if ($name == '') | 669 | if ($name == '') |
128 | @@ -681,6 +688,13 @@ | |||
129 | 681 | return $this->response; | 688 | return $this->response; |
130 | 682 | } | 689 | } |
131 | 683 | 690 | ||
132 | 691 | if ($duration == 0) | ||
133 | 692 | { | ||
134 | 693 | $this->response->SetError('You must enter a duration.'); | ||
135 | 694 | $this->response->keepOpen = true; | ||
136 | 695 | return $this->response; | ||
137 | 696 | } | ||
138 | 697 | |||
139 | 684 | // Ensure the name is not already in the database | 698 | // Ensure the name is not already in the database |
140 | 685 | $SQL = sprintf("SELECT name FROM media WHERE name = '%s' AND userid = %d AND mediaid <> %d ", $db->escape_string($name), $userid, $mediaid); | 699 | $SQL = sprintf("SELECT name FROM media WHERE name = '%s' AND userid = %d AND mediaid <> %d ", $db->escape_string($name), $userid, $mediaid); |
141 | 686 | 700 | ||
142 | @@ -814,6 +828,18 @@ | |||
143 | 814 | 828 | ||
144 | 815 | // Stored As from the XML | 829 | // Stored As from the XML |
145 | 816 | $this->uri = $this->GetOption('uri'); | 830 | $this->uri = $this->GetOption('uri'); |
146 | 831 | |||
147 | 832 | // Do we need to remove this from a layout? | ||
148 | 833 | if ($layoutid != '') | ||
149 | 834 | { | ||
150 | 835 | // Call base method - which will set up the response | ||
151 | 836 | parent::DeleteMedia(); | ||
152 | 837 | } | ||
153 | 838 | else | ||
154 | 839 | { | ||
155 | 840 | // Set this message now in preparation | ||
156 | 841 | $this->response->message = 'Deleted the Media.'; | ||
157 | 842 | } | ||
158 | 817 | 843 | ||
159 | 818 | // If we are set to retire we retire | 844 | // If we are set to retire we retire |
160 | 819 | if ($options == "retire") | 845 | if ($options == "retire") |
161 | @@ -849,19 +875,7 @@ | |||
162 | 849 | $this->DeleteMediaFiles(); | 875 | $this->DeleteMediaFiles(); |
163 | 850 | } | 876 | } |
164 | 851 | 877 | ||
178 | 852 | // Options | 878 | return $this->response; |
166 | 853 | if ($layoutid != '') | ||
167 | 854 | { | ||
168 | 855 | // Call base method - which will handle the response too | ||
169 | 856 | return parent::DeleteMedia(); | ||
170 | 857 | } | ||
171 | 858 | else | ||
172 | 859 | { | ||
173 | 860 | // We want to load a new form | ||
174 | 861 | $this->response->message = 'Deleted the Media.'; | ||
175 | 862 | |||
176 | 863 | return $this->response; | ||
177 | 864 | } | ||
179 | 865 | } | 879 | } |
180 | 866 | 880 | ||
181 | 867 | /** | 881 | /** |
182 | 868 | 882 | ||
183 | === modified file 'server/modules/powerpoint.module.php' | |||
184 | --- server/modules/powerpoint.module.php 2009-01-11 18:20:19 +0000 | |||
185 | +++ server/modules/powerpoint.module.php 2009-02-27 19:30:45 +0000 | |||
186 | @@ -504,7 +504,7 @@ | |||
187 | 504 | 504 | ||
188 | 505 | // Other properties | 505 | // Other properties |
189 | 506 | $name = Kit::GetParam('name', _POST, _STRING); | 506 | $name = Kit::GetParam('name', _POST, _STRING); |
191 | 507 | $duration = Kit::GetParam('duration', _POST, _INT, 1); | 507 | $duration = Kit::GetParam('duration', _POST, _INT, 0); |
192 | 508 | $permissionid = Kit::GetParam('permissionid', _POST, _INT, 1); | 508 | $permissionid = Kit::GetParam('permissionid', _POST, _INT, 1); |
193 | 509 | 509 | ||
194 | 510 | if ($name == '') $name = Kit::ValidateParam($fileName, _FILENAME); | 510 | if ($name == '') $name = Kit::ValidateParam($fileName, _FILENAME); |
195 | @@ -525,6 +525,13 @@ | |||
196 | 525 | return $this->response; | 525 | return $this->response; |
197 | 526 | } | 526 | } |
198 | 527 | 527 | ||
199 | 528 | if ($duration == 0) | ||
200 | 529 | { | ||
201 | 530 | $this->response->SetError('You must enter a duration.'); | ||
202 | 531 | $this->response->keepOpen = true; | ||
203 | 532 | return $this->response; | ||
204 | 533 | } | ||
205 | 534 | |||
206 | 528 | // Ensure the name is not already in the database | 535 | // Ensure the name is not already in the database |
207 | 529 | $SQL = sprintf("SELECT name FROM media WHERE name = '%s' AND userid = %d", $db->escape_string($name), $userid); | 536 | $SQL = sprintf("SELECT name FROM media WHERE name = '%s' AND userid = %d", $db->escape_string($name), $userid); |
208 | 530 | 537 | ||
209 | @@ -653,7 +660,7 @@ | |||
210 | 653 | 660 | ||
211 | 654 | // Other properties | 661 | // Other properties |
212 | 655 | $name = Kit::GetParam('name', _POST, _STRING); | 662 | $name = Kit::GetParam('name', _POST, _STRING); |
214 | 656 | $duration = Kit::GetParam('duration', _POST, _INT, 1); | 663 | $duration = Kit::GetParam('duration', _POST, _INT, 0); |
215 | 657 | $permissionid = Kit::GetParam('permissionid', _POST, _INT, 1); | 664 | $permissionid = Kit::GetParam('permissionid', _POST, _INT, 1); |
216 | 658 | 665 | ||
217 | 659 | if ($name == '') | 666 | if ($name == '') |
218 | @@ -678,6 +685,13 @@ | |||
219 | 678 | return $this->response; | 685 | return $this->response; |
220 | 679 | } | 686 | } |
221 | 680 | 687 | ||
222 | 688 | if ($duration == 0) | ||
223 | 689 | { | ||
224 | 690 | $this->response->SetError('You must enter a duration.'); | ||
225 | 691 | $this->response->keepOpen = true; | ||
226 | 692 | return $this->response; | ||
227 | 693 | } | ||
228 | 694 | |||
229 | 681 | // Ensure the name is not already in the database | 695 | // Ensure the name is not already in the database |
230 | 682 | $SQL = sprintf("SELECT name FROM media WHERE name = '%s' AND userid = %d AND mediaid <> %d ", $db->escape_string($name), $userid, $mediaid); | 696 | $SQL = sprintf("SELECT name FROM media WHERE name = '%s' AND userid = %d AND mediaid <> %d ", $db->escape_string($name), $userid, $mediaid); |
231 | 683 | 697 | ||
232 | @@ -804,6 +818,18 @@ | |||
233 | 804 | 818 | ||
234 | 805 | // Stored As from the XML | 819 | // Stored As from the XML |
235 | 806 | $this->uri = $this->GetOption('uri'); | 820 | $this->uri = $this->GetOption('uri'); |
236 | 821 | |||
237 | 822 | // Do we need to remove this from a layout? | ||
238 | 823 | if ($layoutid != '') | ||
239 | 824 | { | ||
240 | 825 | // Call base method - which will set up the response | ||
241 | 826 | parent::DeleteMedia(); | ||
242 | 827 | } | ||
243 | 828 | else | ||
244 | 829 | { | ||
245 | 830 | // Set this message now in preparation | ||
246 | 831 | $this->response->message = 'Deleted the Media.'; | ||
247 | 832 | } | ||
248 | 807 | 833 | ||
249 | 808 | // If we are set to retire we retire | 834 | // If we are set to retire we retire |
250 | 809 | if ($options == "retire") | 835 | if ($options == "retire") |
251 | @@ -838,20 +864,8 @@ | |||
252 | 838 | 864 | ||
253 | 839 | $this->DeleteMediaFiles(); | 865 | $this->DeleteMediaFiles(); |
254 | 840 | } | 866 | } |
255 | 841 | |||
256 | 842 | // Options | ||
257 | 843 | if ($layoutid != '') | ||
258 | 844 | { | ||
259 | 845 | // Call base method - which will handle the response too | ||
260 | 846 | return parent::DeleteMedia(); | ||
261 | 847 | } | ||
262 | 848 | else | ||
263 | 849 | { | ||
264 | 850 | // We want to load a new form | ||
265 | 851 | $this->response->message = 'Deleted the Media.'; | ||
266 | 852 | 867 | ||
269 | 853 | return $this->response; | 868 | return $this->response; |
268 | 854 | } | ||
270 | 855 | } | 869 | } |
271 | 856 | 870 | ||
272 | 857 | /** | 871 | /** |
273 | 858 | 872 | ||
274 | === modified file 'server/modules/text.module.php' | |||
275 | --- server/modules/text.module.php 2009-01-10 14:57:08 +0000 | |||
276 | +++ server/modules/text.module.php 2009-02-27 19:30:45 +0000 | |||
277 | @@ -167,7 +167,7 @@ | |||
278 | 167 | 167 | ||
279 | 168 | //Other properties | 168 | //Other properties |
280 | 169 | $direction = Kit::GetParam('direction', _POST, _WORD, 'none'); | 169 | $direction = Kit::GetParam('direction', _POST, _WORD, 'none'); |
282 | 170 | $duration = Kit::GetParam('duration', _POST, _INT, 1); | 170 | $duration = Kit::GetParam('duration', _POST, _INT, 0); |
283 | 171 | $text = Kit::GetParam('ta_text', _POST, _HTMLSTRING); | 171 | $text = Kit::GetParam('ta_text', _POST, _HTMLSTRING); |
284 | 172 | 172 | ||
285 | 173 | $url = "index.php?p=layout&layoutid=$layoutid®ionid=$regionid&q=RegionOptions"; | 173 | $url = "index.php?p=layout&layoutid=$layoutid®ionid=$regionid&q=RegionOptions"; |
286 | @@ -180,6 +180,13 @@ | |||
287 | 180 | return $this->response; | 180 | return $this->response; |
288 | 181 | } | 181 | } |
289 | 182 | 182 | ||
290 | 183 | if ($duration == 0) | ||
291 | 184 | { | ||
292 | 185 | $this->response->SetError('You must enter a duration.'); | ||
293 | 186 | $this->response->keepOpen = true; | ||
294 | 187 | return $this->response; | ||
295 | 188 | } | ||
296 | 189 | |||
297 | 183 | // Required Attributes | 190 | // Required Attributes |
298 | 184 | $this->mediaid = md5(uniqid()); | 191 | $this->mediaid = md5(uniqid()); |
299 | 185 | $this->duration = $duration; | 192 | $this->duration = $duration; |
300 | @@ -216,7 +223,7 @@ | |||
301 | 216 | 223 | ||
302 | 217 | //Other properties | 224 | //Other properties |
303 | 218 | $direction = Kit::GetParam('direction', _POST, _WORD, 'none'); | 225 | $direction = Kit::GetParam('direction', _POST, _WORD, 'none'); |
305 | 219 | $duration = Kit::GetParam('duration', _POST, _INT, 1); | 226 | $duration = Kit::GetParam('duration', _POST, _INT, 0); |
306 | 220 | $text = Kit::GetParam('ta_text', _POST, _HTMLSTRING); | 227 | $text = Kit::GetParam('ta_text', _POST, _HTMLSTRING); |
307 | 221 | 228 | ||
308 | 222 | $url = "index.php?p=layout&layoutid=$layoutid®ionid=$regionid&q=RegionOptions"; | 229 | $url = "index.php?p=layout&layoutid=$layoutid®ionid=$regionid&q=RegionOptions"; |
309 | @@ -229,6 +236,13 @@ | |||
310 | 229 | return $this->response; | 236 | return $this->response; |
311 | 230 | } | 237 | } |
312 | 231 | 238 | ||
313 | 239 | if ($duration == 0) | ||
314 | 240 | { | ||
315 | 241 | $this->response->SetError('You must enter a duration.'); | ||
316 | 242 | $this->response->keepOpen = true; | ||
317 | 243 | return $this->response; | ||
318 | 244 | } | ||
319 | 245 | |||
320 | 232 | // Required Attributes | 246 | // Required Attributes |
321 | 233 | $this->duration = $duration; | 247 | $this->duration = $duration; |
322 | 234 | 248 | ||
323 | 235 | 249 | ||
324 | === modified file 'server/modules/ticker.module.php' | |||
325 | --- server/modules/ticker.module.php 2009-02-23 19:48:15 +0000 | |||
326 | +++ server/modules/ticker.module.php 2009-02-27 19:30:45 +0000 | |||
327 | @@ -178,7 +178,7 @@ | |||
328 | 178 | //Other properties | 178 | //Other properties |
329 | 179 | $uri = Kit::GetParam('uri', _POST, _URI); | 179 | $uri = Kit::GetParam('uri', _POST, _URI); |
330 | 180 | $direction = Kit::GetParam('direction', _POST, _WORD, 'none'); | 180 | $direction = Kit::GetParam('direction', _POST, _WORD, 'none'); |
332 | 181 | $duration = Kit::GetParam('duration', _POST, _INT, 1); | 181 | $duration = Kit::GetParam('duration', _POST, _INT, 0); |
333 | 182 | $text = Kit::GetParam('ta_text', _POST, _HTMLSTRING); | 182 | $text = Kit::GetParam('ta_text', _POST, _HTMLSTRING); |
334 | 183 | $copyright = Kit::GetParam('copyright', _POST, _STRING); | 183 | $copyright = Kit::GetParam('copyright', _POST, _STRING); |
335 | 184 | 184 | ||
336 | @@ -200,6 +200,13 @@ | |||
337 | 200 | return $this->response; | 200 | return $this->response; |
338 | 201 | } | 201 | } |
339 | 202 | 202 | ||
340 | 203 | if ($duration == 0) | ||
341 | 204 | { | ||
342 | 205 | $this->response->SetError('You must enter a duration.'); | ||
343 | 206 | $this->response->keepOpen = true; | ||
344 | 207 | return $this->response; | ||
345 | 208 | } | ||
346 | 209 | |||
347 | 203 | // Required Attributes | 210 | // Required Attributes |
348 | 204 | $this->mediaid = md5(uniqid()); | 211 | $this->mediaid = md5(uniqid()); |
349 | 205 | $this->duration = $duration; | 212 | $this->duration = $duration; |
350 | @@ -240,7 +247,7 @@ | |||
351 | 240 | //Other properties | 247 | //Other properties |
352 | 241 | $uri = Kit::GetParam('uri', _POST, _URI); | 248 | $uri = Kit::GetParam('uri', _POST, _URI); |
353 | 242 | $direction = Kit::GetParam('direction', _POST, _WORD, 'none'); | 249 | $direction = Kit::GetParam('direction', _POST, _WORD, 'none'); |
355 | 243 | $duration = Kit::GetParam('duration', _POST, _INT, 1); | 250 | $duration = Kit::GetParam('duration', _POST, _INT, 0); |
356 | 244 | $text = Kit::GetParam('ta_text', _POST, _HTMLSTRING); | 251 | $text = Kit::GetParam('ta_text', _POST, _HTMLSTRING); |
357 | 245 | $copyright = Kit::GetParam('copyright', _POST, _STRING); | 252 | $copyright = Kit::GetParam('copyright', _POST, _STRING); |
358 | 246 | 253 | ||
359 | @@ -262,6 +269,13 @@ | |||
360 | 262 | return $this->response; | 269 | return $this->response; |
361 | 263 | } | 270 | } |
362 | 264 | 271 | ||
363 | 272 | if ($duration == 0) | ||
364 | 273 | { | ||
365 | 274 | $this->response->SetError('You must enter a duration.'); | ||
366 | 275 | $this->response->keepOpen = true; | ||
367 | 276 | return $this->response; | ||
368 | 277 | } | ||
369 | 278 | |||
370 | 265 | // Required Attributes | 279 | // Required Attributes |
371 | 266 | $this->duration = $duration; | 280 | $this->duration = $duration; |
372 | 267 | 281 | ||
373 | 268 | 282 | ||
374 | === modified file 'server/modules/video.module.php' | |||
375 | --- server/modules/video.module.php 2009-01-11 18:20:19 +0000 | |||
376 | +++ server/modules/video.module.php 2009-02-27 19:30:45 +0000 | |||
377 | @@ -504,7 +504,7 @@ | |||
378 | 504 | 504 | ||
379 | 505 | // Other properties | 505 | // Other properties |
380 | 506 | $name = Kit::GetParam('name', _POST, _STRING); | 506 | $name = Kit::GetParam('name', _POST, _STRING); |
382 | 507 | $duration = Kit::GetParam('duration', _POST, _INT, 1); | 507 | $duration = Kit::GetParam('duration', _POST, _INT, 0); |
383 | 508 | $permissionid = Kit::GetParam('permissionid', _POST, _INT, 1); | 508 | $permissionid = Kit::GetParam('permissionid', _POST, _INT, 1); |
384 | 509 | 509 | ||
385 | 510 | if ($name == '') $name = Kit::ValidateParam($fileName, _FILENAME); | 510 | if ($name == '') $name = Kit::ValidateParam($fileName, _FILENAME); |
386 | @@ -525,6 +525,13 @@ | |||
387 | 525 | return $this->response; | 525 | return $this->response; |
388 | 526 | } | 526 | } |
389 | 527 | 527 | ||
390 | 528 | if ($duration == 0) | ||
391 | 529 | { | ||
392 | 530 | $this->response->SetError('You must enter a duration.'); | ||
393 | 531 | $this->response->keepOpen = true; | ||
394 | 532 | return $this->response; | ||
395 | 533 | } | ||
396 | 534 | |||
397 | 528 | // Ensure the name is not already in the database | 535 | // Ensure the name is not already in the database |
398 | 529 | $SQL = sprintf("SELECT name FROM media WHERE name = '%s' AND userid = %d", $db->escape_string($name), $userid); | 536 | $SQL = sprintf("SELECT name FROM media WHERE name = '%s' AND userid = %d", $db->escape_string($name), $userid); |
399 | 530 | 537 | ||
400 | @@ -654,7 +661,7 @@ | |||
401 | 654 | 661 | ||
402 | 655 | // Other properties | 662 | // Other properties |
403 | 656 | $name = Kit::GetParam('name', _POST, _STRING); | 663 | $name = Kit::GetParam('name', _POST, _STRING); |
405 | 657 | $duration = Kit::GetParam('duration', _POST, _INT, 1); | 664 | $duration = Kit::GetParam('duration', _POST, _INT, 0); |
406 | 658 | $permissionid = Kit::GetParam('permissionid', _POST, _INT, 1); | 665 | $permissionid = Kit::GetParam('permissionid', _POST, _INT, 1); |
407 | 659 | 666 | ||
408 | 660 | if ($name == '') | 667 | if ($name == '') |
409 | @@ -679,6 +686,13 @@ | |||
410 | 679 | return $this->response; | 686 | return $this->response; |
411 | 680 | } | 687 | } |
412 | 681 | 688 | ||
413 | 689 | if ($duration == 0) | ||
414 | 690 | { | ||
415 | 691 | $this->response->SetError('You must enter a duration.'); | ||
416 | 692 | $this->response->keepOpen = true; | ||
417 | 693 | return $this->response; | ||
418 | 694 | } | ||
419 | 695 | |||
420 | 682 | // Ensure the name is not already in the database | 696 | // Ensure the name is not already in the database |
421 | 683 | $SQL = sprintf("SELECT name FROM media WHERE name = '%s' AND userid = %d AND mediaid <> %d ", $db->escape_string($name), $userid, $mediaid); | 697 | $SQL = sprintf("SELECT name FROM media WHERE name = '%s' AND userid = %d AND mediaid <> %d ", $db->escape_string($name), $userid, $mediaid); |
422 | 684 | 698 | ||
423 | @@ -805,6 +819,18 @@ | |||
424 | 805 | 819 | ||
425 | 806 | // Stored As from the XML | 820 | // Stored As from the XML |
426 | 807 | $this->uri = $this->GetOption('uri'); | 821 | $this->uri = $this->GetOption('uri'); |
427 | 822 | |||
428 | 823 | // Do we need to remove this from a layout? | ||
429 | 824 | if ($layoutid != '') | ||
430 | 825 | { | ||
431 | 826 | // Call base method - which will set up the response | ||
432 | 827 | parent::DeleteMedia(); | ||
433 | 828 | } | ||
434 | 829 | else | ||
435 | 830 | { | ||
436 | 831 | // Set this message now in preparation | ||
437 | 832 | $this->response->message = 'Deleted the Media.'; | ||
438 | 833 | } | ||
439 | 808 | 834 | ||
440 | 809 | // If we are set to retire we retire | 835 | // If we are set to retire we retire |
441 | 810 | if ($options == "retire") | 836 | if ($options == "retire") |
442 | @@ -839,20 +865,8 @@ | |||
443 | 839 | 865 | ||
444 | 840 | $this->DeleteMediaFiles(); | 866 | $this->DeleteMediaFiles(); |
445 | 841 | } | 867 | } |
446 | 842 | |||
447 | 843 | // Options | ||
448 | 844 | if ($layoutid != '') | ||
449 | 845 | { | ||
450 | 846 | // Call base method - which will handle the response too | ||
451 | 847 | return parent::DeleteMedia(); | ||
452 | 848 | } | ||
453 | 849 | else | ||
454 | 850 | { | ||
455 | 851 | // We want to load a new form | ||
456 | 852 | $this->response->message = 'Deleted the Media.'; | ||
457 | 853 | 868 | ||
460 | 854 | return $this->response; | 869 | return $this->response; |
459 | 855 | } | ||
461 | 856 | } | 870 | } |
462 | 857 | 871 | ||
463 | 858 | /** | 872 | /** |
464 | 859 | 873 | ||
465 | === modified file 'server/modules/webpage.module.php' | |||
466 | --- server/modules/webpage.module.php 2009-01-10 15:24:06 +0000 | |||
467 | +++ server/modules/webpage.module.php 2009-02-27 19:30:45 +0000 | |||
468 | @@ -149,7 +149,7 @@ | |||
469 | 149 | 149 | ||
470 | 150 | //Other properties | 150 | //Other properties |
471 | 151 | $uri = Kit::GetParam('uri', _POST, _URI); | 151 | $uri = Kit::GetParam('uri', _POST, _URI); |
473 | 152 | $duration = Kit::GetParam('duration', _POST, _INT, 1); | 152 | $duration = Kit::GetParam('duration', _POST, _INT, 0); |
474 | 153 | 153 | ||
475 | 154 | $url = "index.php?p=layout&layoutid=$layoutid®ionid=$regionid&q=RegionOptions"; | 154 | $url = "index.php?p=layout&layoutid=$layoutid®ionid=$regionid&q=RegionOptions"; |
476 | 155 | 155 | ||
477 | @@ -161,6 +161,13 @@ | |||
478 | 161 | return $this->response; | 161 | return $this->response; |
479 | 162 | } | 162 | } |
480 | 163 | 163 | ||
481 | 164 | if ($duration == 0) | ||
482 | 165 | { | ||
483 | 166 | $this->response->SetError('You must enter a duration.'); | ||
484 | 167 | $this->response->keepOpen = true; | ||
485 | 168 | return $this->response; | ||
486 | 169 | } | ||
487 | 170 | |||
488 | 164 | // Required Attributes | 171 | // Required Attributes |
489 | 165 | $this->mediaid = md5(uniqid()); | 172 | $this->mediaid = md5(uniqid()); |
490 | 166 | $this->duration = $duration; | 173 | $this->duration = $duration; |
491 | @@ -196,7 +203,7 @@ | |||
492 | 196 | 203 | ||
493 | 197 | //Other properties | 204 | //Other properties |
494 | 198 | $uri = Kit::GetParam('uri', _POST, _URI); | 205 | $uri = Kit::GetParam('uri', _POST, _URI); |
496 | 199 | $duration = Kit::GetParam('duration', _POST, _INT, 1); | 206 | $duration = Kit::GetParam('duration', _POST, _INT, 0); |
497 | 200 | 207 | ||
498 | 201 | $url = "index.php?p=layout&layoutid=$layoutid®ionid=$regionid&q=RegionOptions"; | 208 | $url = "index.php?p=layout&layoutid=$layoutid®ionid=$regionid&q=RegionOptions"; |
499 | 202 | 209 | ||
500 | @@ -208,6 +215,13 @@ | |||
501 | 208 | return $this->response; | 215 | return $this->response; |
502 | 209 | } | 216 | } |
503 | 210 | 217 | ||
504 | 218 | if ($duration == 0) | ||
505 | 219 | { | ||
506 | 220 | $this->response->SetError('You must enter a duration.'); | ||
507 | 221 | $this->response->keepOpen = true; | ||
508 | 222 | return $this->response; | ||
509 | 223 | } | ||
510 | 224 | |||
511 | 211 | // Required Attributes | 225 | // Required Attributes |
512 | 212 | $this->duration = $duration; | 226 | $this->duration = $duration; |
513 | 213 | 227 |
Fixed the two bugs as indicated in the Bug reports.