Merge lp:~dangarner/xibo/server-162 into lp:xibo/1.6
- server-162
- Merge into ponswinnecke
Proposed by
Dan Garner
Status: | Merged |
---|---|
Approved by: | Dan Garner |
Approved revision: | 384 |
Merged at revision: | 339 |
Proposed branch: | lp:~dangarner/xibo/server-162 |
Merge into: | lp:xibo/1.6 |
Diff against target: |
7452 lines (+3498/-876) 85 files modified
default.pot (+319/-288) example_oauth/index.php (+239/-18) example_oauth/nice-json.php (+73/-0) example_oauth/test_files/test.csv (+6/-0) server/3rdparty/simplepie/library/SimplePie/File.php (+4/-0) server/3rdparty/simplepie/library/SimplePie/HTTP/Parser.php (+21/-0) server/config/config.class.php (+3/-24) server/install.php (+2/-2) server/install/database/70.sql (+15/-0) server/install/master/data.sql (+1/-1) server/lib/app/session.class.php (+1/-1) server/lib/data/dataset.data.class.php (+165/-1) server/lib/data/datasetcolumn.data.class.php (+88/-2) server/lib/data/datasetdata.data.class.php (+177/-0) server/lib/data/datasetgroupsecurity.data.class.php (+63/-2) server/lib/data/file.data.class.php (+14/-0) server/lib/data/layout.data.class.php (+17/-2) server/lib/data/region.data.class.php (+59/-3) server/lib/include.php (+6/-3) server/lib/modules/module.class.php (+4/-4) server/lib/oauth.inc.php (+1/-1) server/lib/pages/admin.class.php (+1/-1) server/lib/pages/campaign.class.php (+5/-5) server/lib/pages/dataset.class.php (+31/-45) server/lib/pages/display.class.php (+35/-6) server/lib/pages/displaygroup.class.php (+4/-4) server/lib/pages/fault.class.php (+3/-59) server/lib/pages/group.class.php (+4/-4) server/lib/pages/help.class.php (+3/-3) server/lib/pages/index.class.php (+1/-1) server/lib/pages/layout.class.php (+9/-6) server/lib/pages/log.class.php (+45/-1) server/lib/pages/module.class.php (+1/-1) server/lib/pages/oauth.class.php (+1/-1) server/lib/pages/resolution.class.php (+3/-3) server/lib/pages/schedule.class.php (+87/-216) server/lib/pages/sessions.class.php (+6/-4) server/lib/pages/stats.class.php (+4/-4) server/lib/pages/statusdashboard.class.php (+24/-18) server/lib/pages/template.class.php (+3/-3) server/lib/pages/timeline.class.php (+2/-2) server/lib/pages/transition.class.php (+1/-1) server/lib/pages/user.class.php (+12/-12) server/lib/service/rest.class.php (+464/-8) server/lib/service/restjson.class.php (+20/-16) server/lib/service/xmdssoap.class.php (+15/-4) server/locale/dbtranslate.php (+1/-0) server/manual/content/admin/api_datasets.php (+615/-0) server/manual/content/admin/api_library.php (+33/-15) server/manual/content/admin/release_notes_1.6.2.php (+76/-0) server/manual/content/routes.php (+2/-0) server/manual/content/toc_developer_api.php (+1/-0) server/manual/content/toc_developer_releasenotes.php (+1/-0) server/manual/css/manual.css (+5/-0) server/manual/template.php (+1/-1) server/modules/datasetview.module.php (+21/-2) server/modules/embedded.module.php (+27/-3) server/modules/module_user_general.php (+19/-5) server/modules/powerpoint.module.php (+11/-0) server/modules/preview/HtmlTemplateForGetResource.html (+11/-4) server/modules/preview/HtmlTemplateSimple.html (+30/-0) server/modules/preview/html-preview.js (+7/-12) server/modules/preview/vendor/jquery-1.11.1.min.js (+4/-0) server/modules/preview/xibo-text-render.js (+50/-11) server/modules/preview/xibo-webpage-render.js (+66/-0) server/modules/text.module.php (+3/-2) server/modules/ticker.module.php (+34/-6) server/modules/webpage.module.php (+51/-12) server/services.php (+0/-2) server/theme/default/css/xibo.css (+12/-0) server/theme/default/html/dataset_form_csv_import.php (+6/-4) server/theme/default/html/display_page.php (+10/-1) server/theme/default/html/fault_page.php (+6/-6) server/theme/default/html/layout_designer.php (+3/-0) server/theme/default/html/log_form_display_last100.php (+47/-0) server/theme/default/html/media_form_embedded_add.php (+6/-0) server/theme/default/html/media_form_embedded_edit.php (+6/-0) server/theme/default/html/media_form_ticker_edit.php (+8/-2) server/theme/default/html/schedule_form_add_event.php (+96/-0) server/theme/default/html/schedule_form_edit_event.php (+96/-0) server/theme/default/html/schedule_form_schedule_now.php (+62/-0) server/theme/default/html/status_dashboard.php (+3/-3) server/theme/default/js/xibo-layout-designer.js (+1/-1) server/theme/default/libraries/bootstrap/js/bootstrap-ckeditor-fix.js (+3/-2) server/upgrade.php (+2/-2) |
To merge this branch: | bzr merge lp:~dangarner/xibo/server-162 |
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Xibo Maintainters | Pending | ||
Review via email:
|
Commit message
Description of the change
To post a comment you must log in.
lp:~dangarner/xibo/server-162
updated
- 382. By Dan Garner
-
[cms] Bump version in install.
- 383. By Dan Garner
-
[cms] Bump version in include.php
- 384. By Dan Garner
-
[api] Disable errors in API.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'default.mo' |
2 | Binary files default.mo 2014-03-29 16:01:24 +0000 and default.mo 2014-07-15 15:37:36 +0000 differ |
3 | === modified file 'default.pot' |
4 | --- default.pot 2014-03-29 16:01:24 +0000 |
5 | +++ default.pot 2014-07-15 15:37:36 +0000 |
6 | @@ -2,7 +2,7 @@ |
7 | msgstr "" |
8 | "Project-Id-Version: Xibo Digital Signage\n" |
9 | "Report-Msgid-Bugs-To: \n" |
10 | -"POT-Creation-Date: 2014-03-29 16:01-0000\n" |
11 | +"POT-Creation-Date: 2014-06-09 20:00-0000\n" |
12 | "PO-Revision-Date: \n" |
13 | "Last-Translator: Dan Garner <dan@xibo.org.uk>\n" |
14 | "Language-Team: <info@xibo.org.uk>\n" |
15 | @@ -10,7 +10,7 @@ |
16 | "MIME-Version: 1.0\n" |
17 | "Content-Type: text/plain; charset=UTF-8\n" |
18 | "Content-Transfer-Encoding: 8bit\n" |
19 | -"X-Poedit-Basepath: C:\\Users\\dan\\www\\release\\1.6.0-rc2\n" |
20 | +"X-Poedit-Basepath: C:\\Users\\dan\\www\\1.6\\server-162\n" |
21 | "X-Poedit-KeywordsList: __;Translate\n" |
22 | "X-Generator: Poedit 1.5.5\n" |
23 | "X-Poedit-SearchPath-0: server\n" |
24 | @@ -37,7 +37,7 @@ |
25 | #: server/install.php:329 server/install.php:345 server/install.php:384 |
26 | #: server/install.php:413 server/install.php:516 server/upgrade.php:104 |
27 | #: server/upgrade.php:199 server/upgrade.php:206 server/upgrade.php:278 |
28 | -#: server/lib/pages/schedule.class.php:1449 |
29 | +#: server/lib/pages/schedule.class.php:1452 |
30 | msgid "Next" |
31 | msgstr "" |
32 | |
33 | @@ -409,6 +409,14 @@ |
34 | msgid "Maintenance key invalid." |
35 | msgstr "" |
36 | |
37 | +#: server/settings.php:11 |
38 | +msgid "Sorry, you are not allowed to directly access this page." |
39 | +msgstr "" |
40 | + |
41 | +#: server/settings.php:11 |
42 | +msgid "Please press the back button in your browser." |
43 | +msgstr "" |
44 | + |
45 | #: server/upgrade.php:63 |
46 | msgid "" |
47 | "Unable to connect to the MySQL database using the settings stored in " |
48 | @@ -658,8 +666,8 @@ |
49 | msgstr "" |
50 | |
51 | #: server/lib/app/helpmanager.class.php:54 |
52 | -#: server/lib/modules/module.class.php:493 |
53 | -#: server/lib/modules/module.class.php:1401 |
54 | +#: server/lib/modules/module.class.php:498 |
55 | +#: server/lib/modules/module.class.php:1433 |
56 | #: server/lib/pages/campaign.class.php:144 |
57 | #: server/lib/pages/campaign.class.php:214 |
58 | #: server/lib/pages/campaign.class.php:283 |
59 | @@ -684,14 +692,14 @@ |
60 | #: server/lib/pages/displaygroup.class.php:156 |
61 | #: server/lib/pages/displaygroup.class.php:204 |
62 | #: server/lib/pages/displaygroup.class.php:232 |
63 | -#: server/lib/pages/displaygroup.class.php:306 |
64 | -#: server/lib/pages/displaygroup.class.php:540 |
65 | -#: server/lib/pages/displaygroup.class.php:701 |
66 | +#: server/lib/pages/displaygroup.class.php:309 |
67 | +#: server/lib/pages/displaygroup.class.php:549 |
68 | +#: server/lib/pages/displaygroup.class.php:710 |
69 | #: server/lib/pages/group.class.php:224 server/lib/pages/group.class.php:248 |
70 | #: server/lib/pages/group.class.php:342 server/lib/pages/group.class.php:501 |
71 | #: server/lib/pages/group.class.php:698 server/lib/pages/help.class.php:107 |
72 | -#: server/lib/pages/layout.class.php:267 server/lib/pages/layout.class.php:512 |
73 | -#: server/lib/pages/layout.class.php:598 server/lib/pages/layout.class.php:800 |
74 | +#: server/lib/pages/layout.class.php:270 server/lib/pages/layout.class.php:515 |
75 | +#: server/lib/pages/layout.class.php:601 server/lib/pages/layout.class.php:803 |
76 | #: server/lib/pages/log.class.php:182 server/lib/pages/module.class.php:201 |
77 | #: server/lib/pages/oauth.class.php:130 server/lib/pages/oauth.class.php:208 |
78 | #: server/lib/pages/oauth.class.php:286 |
79 | @@ -699,11 +707,11 @@ |
80 | #: server/lib/pages/resolution.class.php:165 |
81 | #: server/lib/pages/resolution.class.php:190 |
82 | #: server/lib/pages/schedule.class.php:435 |
83 | -#: server/lib/pages/schedule.class.php:1447 |
84 | -#: server/lib/pages/schedule.class.php:1613 |
85 | -#: server/lib/pages/schedule.class.php:1819 |
86 | -#: server/lib/pages/schedule.class.php:1939 |
87 | -#: server/lib/pages/schedule.class.php:2026 |
88 | +#: server/lib/pages/schedule.class.php:1450 |
89 | +#: server/lib/pages/schedule.class.php:1616 |
90 | +#: server/lib/pages/schedule.class.php:1822 |
91 | +#: server/lib/pages/schedule.class.php:1942 |
92 | +#: server/lib/pages/schedule.class.php:2029 |
93 | #: server/lib/pages/sessions.class.php:152 |
94 | #: server/lib/pages/template.class.php:154 |
95 | #: server/lib/pages/template.class.php:256 |
96 | @@ -722,22 +730,22 @@ |
97 | msgid "Help" |
98 | msgstr "" |
99 | |
100 | -#: server/lib/app/kit.class.php:240 |
101 | +#: server/lib/app/kit.class.php:241 |
102 | #, php-format |
103 | msgid "No integer match found for [%s] and return value is not an integer" |
104 | msgstr "" |
105 | |
106 | -#: server/lib/app/kit.class.php:254 |
107 | +#: server/lib/app/kit.class.php:255 |
108 | #, php-format |
109 | msgid "No integer match found for %s, and return value is not an integer" |
110 | msgstr "" |
111 | |
112 | -#: server/lib/app/kit.class.php:289 |
113 | +#: server/lib/app/kit.class.php:290 |
114 | #, php-format |
115 | msgid "No integer found for %s, and return value is not an integer" |
116 | msgstr "" |
117 | |
118 | -#: server/lib/app/kit.class.php:355 |
119 | +#: server/lib/app/kit.class.php:360 |
120 | #, php-format |
121 | msgid "Unknown Type %s" |
122 | msgstr "" |
123 | @@ -800,21 +808,22 @@ |
124 | msgstr "" |
125 | |
126 | #: server/lib/data/campaign.data.class.php:104 |
127 | -#: server/lib/modules/module.class.php:1440 |
128 | -#: server/lib/modules/module.class.php:1446 |
129 | -#: server/lib/modules/module.class.php:1476 |
130 | -#: server/lib/modules/module.class.php:1481 |
131 | +#: server/lib/modules/module.class.php:1472 |
132 | +#: server/lib/modules/module.class.php:1478 |
133 | +#: server/lib/modules/module.class.php:1508 |
134 | #: server/lib/modules/module.class.php:1513 |
135 | -#: server/lib/modules/module.class.php:1518 |
136 | +#: server/lib/modules/module.class.php:1545 |
137 | +#: server/lib/modules/module.class.php:1550 |
138 | #: server/lib/pages/campaign.class.php:416 |
139 | #: server/lib/pages/campaign.class.php:443 |
140 | #: server/lib/pages/campaign.class.php:472 |
141 | #: server/lib/pages/dataset.class.php:938 |
142 | #: server/lib/pages/dataset.class.php:965 |
143 | #: server/lib/pages/dataset.class.php:994 |
144 | -#: server/lib/pages/displaygroup.class.php:570 |
145 | -#: server/lib/pages/displaygroup.class.php:597 |
146 | -#: server/lib/pages/displaygroup.class.php:626 |
147 | +#: server/lib/pages/displaygroup.class.php:342 |
148 | +#: server/lib/pages/displaygroup.class.php:579 |
149 | +#: server/lib/pages/displaygroup.class.php:606 |
150 | +#: server/lib/pages/displaygroup.class.php:635 |
151 | #: server/lib/pages/template.class.php:400 |
152 | #: server/lib/pages/template.class.php:427 |
153 | #: server/lib/pages/template.class.php:456 |
154 | @@ -1041,11 +1050,12 @@ |
155 | #: server/lib/data/mediagroupsecurity.data.class.php:98 |
156 | #: server/lib/data/region.data.class.php:627 |
157 | #: server/lib/data/region.data.class.php:670 |
158 | -#: server/lib/data/region.data.class.php:975 |
159 | +#: server/lib/data/region.data.class.php:977 |
160 | #: server/lib/data/schedule.data.class.php:413 |
161 | #: server/lib/data/schedule.data.class.php:601 |
162 | #: server/lib/data/usergroup.data.class.php:337 |
163 | -#: server/lib/modules/module.class.php:1058 |
164 | +#: server/lib/modules/module.class.php:1063 |
165 | +#: server/lib/modules/module.class.php:1279 |
166 | #: server/lib/pages/error.class.php:49 |
167 | msgid "Unknown Error" |
168 | msgstr "" |
169 | @@ -1182,7 +1192,7 @@ |
170 | msgstr "" |
171 | |
172 | #: server/lib/data/displaygroup.data.class.php:435 |
173 | -#: server/lib/pages/displaygroup.class.php:860 |
174 | +#: server/lib/pages/displaygroup.class.php:869 |
175 | msgid "" |
176 | "You have selected media that you no longer have permission to use. Please " |
177 | "reload the form." |
178 | @@ -1324,7 +1334,7 @@ |
179 | msgstr "" |
180 | |
181 | #: server/lib/data/layout.data.class.php:843 |
182 | -#: server/lib/pages/layout.class.php:587 |
183 | +#: server/lib/pages/layout.class.php:590 |
184 | msgid "Unable to get the Resolution information" |
185 | msgstr "" |
186 | |
187 | @@ -1369,7 +1379,7 @@ |
188 | |
189 | #: server/lib/data/media.data.class.php:61 |
190 | #: server/lib/data/media.data.class.php:251 |
191 | -#: server/lib/modules/module.class.php:797 |
192 | +#: server/lib/modules/module.class.php:802 |
193 | #, php-format |
194 | msgid "Your library is full. Library Limit: %s K" |
195 | msgstr "" |
196 | @@ -1385,8 +1395,8 @@ |
197 | |
198 | #: server/lib/data/media.data.class.php:81 |
199 | #: server/lib/data/media.data.class.php:190 |
200 | -#: server/modules/datasetview.module.php:252 |
201 | -#: server/modules/datasetview.module.php:309 |
202 | +#: server/modules/datasetview.module.php:231 |
203 | +#: server/modules/datasetview.module.php:288 |
204 | msgid "You must enter a duration." |
205 | msgstr "" |
206 | |
207 | @@ -1452,7 +1462,6 @@ |
208 | msgstr "" |
209 | |
210 | #: server/lib/data/region.data.class.php:81 |
211 | -#: server/lib/data/region.data.class.php:559 |
212 | msgid "Size and coordinates must be generic" |
213 | msgstr "" |
214 | |
215 | @@ -1478,13 +1487,17 @@ |
216 | msgid "Database error deleting this link record." |
217 | msgstr "" |
218 | |
219 | -#: server/lib/data/region.data.class.php:932 |
220 | +#: server/lib/data/region.data.class.php:559 |
221 | +msgid "Size and coordinates must be numeric" |
222 | +msgstr "" |
223 | + |
224 | +#: server/lib/data/region.data.class.php:934 |
225 | msgid "" |
226 | "You have selected media that you no longer have permission to use. Please " |
227 | "reload Library form." |
228 | msgstr "" |
229 | |
230 | -#: server/lib/data/region.data.class.php:941 |
231 | +#: server/lib/data/region.data.class.php:943 |
232 | #: server/lib/service/rest.class.php:1037 |
233 | msgid "Error getting type from a media item." |
234 | msgstr "" |
235 | @@ -1678,154 +1691,155 @@ |
236 | msgid "Cannot find this media item. Please refresh the region options." |
237 | msgstr "" |
238 | |
239 | -#: server/lib/modules/module.class.php:256 |
240 | +#: server/lib/modules/module.class.php:248 |
241 | +#: server/lib/modules/module.class.php:260 |
242 | msgid "Unable to find media record with the provided ID" |
243 | msgstr "" |
244 | |
245 | -#: server/lib/modules/module.class.php:410 |
246 | +#: server/lib/modules/module.class.php:415 |
247 | msgid "There is an error in the HTML/XML" |
248 | msgstr "" |
249 | |
250 | -#: server/lib/modules/module.class.php:458 |
251 | +#: server/lib/modules/module.class.php:463 |
252 | msgid "Unable to Remove this media from the Layout" |
253 | msgstr "" |
254 | |
255 | -#: server/lib/modules/module.class.php:468 |
256 | +#: server/lib/modules/module.class.php:473 |
257 | msgid "Unable to assign to the Region" |
258 | msgstr "" |
259 | |
260 | -#: server/lib/modules/module.class.php:476 |
261 | +#: server/lib/modules/module.class.php:481 |
262 | msgid "Error adding this media to the library" |
263 | msgstr "" |
264 | |
265 | -#: server/lib/modules/module.class.php:511 |
266 | +#: server/lib/modules/module.class.php:516 |
267 | msgid "Return to the Region Options" |
268 | msgstr "" |
269 | |
270 | -#: server/lib/modules/module.class.php:512 |
271 | +#: server/lib/modules/module.class.php:517 |
272 | msgid "Are you sure you want to remove this item?" |
273 | msgstr "" |
274 | |
275 | -#: server/lib/modules/module.class.php:513 |
276 | +#: server/lib/modules/module.class.php:518 |
277 | msgid "It will be lost" |
278 | msgstr "" |
279 | |
280 | -#: server/lib/modules/module.class.php:514 |
281 | -#: server/lib/modules/module.class.php:528 |
282 | -#: server/lib/modules/module.class.php:629 |
283 | +#: server/lib/modules/module.class.php:519 |
284 | +#: server/lib/modules/module.class.php:533 |
285 | +#: server/lib/modules/module.class.php:634 |
286 | #: server/lib/pages/campaign.class.php:285 |
287 | #: server/lib/pages/display.class.php:478 |
288 | #: server/lib/pages/display.class.php:616 |
289 | #: server/lib/pages/displaygroup.class.php:234 |
290 | #: server/lib/pages/group.class.php:344 server/lib/pages/help.class.php:256 |
291 | -#: server/lib/pages/layout.class.php:269 server/lib/pages/log.class.php:184 |
292 | +#: server/lib/pages/layout.class.php:272 server/lib/pages/log.class.php:184 |
293 | #: server/lib/pages/resolution.class.php:192 |
294 | -#: server/lib/pages/schedule.class.php:1821 |
295 | -#: server/lib/pages/schedule.class.php:2028 |
296 | +#: server/lib/pages/schedule.class.php:1824 |
297 | +#: server/lib/pages/schedule.class.php:2031 |
298 | #: server/lib/pages/sessions.class.php:154 |
299 | #: server/lib/pages/template.class.php:258 |
300 | #: server/lib/pages/timeline.class.php:334 server/lib/pages/user.class.php:574 |
301 | msgid "Yes" |
302 | msgstr "" |
303 | |
304 | -#: server/lib/modules/module.class.php:515 |
305 | -#: server/lib/modules/module.class.php:527 |
306 | -#: server/lib/modules/module.class.php:625 |
307 | -#: server/lib/modules/module.class.php:627 |
308 | +#: server/lib/modules/module.class.php:520 |
309 | +#: server/lib/modules/module.class.php:532 |
310 | +#: server/lib/modules/module.class.php:630 |
311 | +#: server/lib/modules/module.class.php:632 |
312 | #: server/lib/pages/campaign.class.php:284 |
313 | #: server/lib/pages/display.class.php:477 |
314 | #: server/lib/pages/display.class.php:616 |
315 | #: server/lib/pages/displaygroup.class.php:233 |
316 | #: server/lib/pages/group.class.php:343 server/lib/pages/help.class.php:255 |
317 | -#: server/lib/pages/layout.class.php:268 server/lib/pages/log.class.php:183 |
318 | +#: server/lib/pages/layout.class.php:271 server/lib/pages/log.class.php:183 |
319 | #: server/lib/pages/resolution.class.php:191 |
320 | -#: server/lib/pages/schedule.class.php:1820 |
321 | -#: server/lib/pages/schedule.class.php:2027 |
322 | +#: server/lib/pages/schedule.class.php:1823 |
323 | +#: server/lib/pages/schedule.class.php:2030 |
324 | #: server/lib/pages/sessions.class.php:153 |
325 | #: server/lib/pages/template.class.php:257 |
326 | #: server/lib/pages/timeline.class.php:335 server/lib/pages/user.class.php:573 |
327 | msgid "No" |
328 | msgstr "" |
329 | |
330 | -#: server/lib/modules/module.class.php:536 |
331 | +#: server/lib/modules/module.class.php:541 |
332 | msgid "Unassign from this region only" |
333 | msgstr "" |
334 | |
335 | -#: server/lib/modules/module.class.php:551 |
336 | -#: server/lib/modules/module.class.php:935 |
337 | +#: server/lib/modules/module.class.php:556 |
338 | +#: server/lib/modules/module.class.php:940 |
339 | msgid "Error querying for the Media information" |
340 | msgstr "" |
341 | |
342 | -#: server/lib/modules/module.class.php:556 |
343 | +#: server/lib/modules/module.class.php:561 |
344 | msgid "Unassign from this region and retire" |
345 | msgstr "" |
346 | |
347 | -#: server/lib/modules/module.class.php:578 |
348 | +#: server/lib/modules/module.class.php:583 |
349 | msgid "Cannot determine if this media has been used." |
350 | msgstr "" |
351 | |
352 | -#: server/lib/modules/module.class.php:585 |
353 | +#: server/lib/modules/module.class.php:590 |
354 | msgid "Delete this media" |
355 | msgstr "" |
356 | |
357 | -#: server/lib/modules/module.class.php:589 |
358 | +#: server/lib/modules/module.class.php:594 |
359 | msgid "Unassign from all Layouts" |
360 | msgstr "" |
361 | |
362 | -#: server/lib/modules/module.class.php:590 |
363 | +#: server/lib/modules/module.class.php:595 |
364 | msgid "Retire this media" |
365 | msgstr "" |
366 | |
367 | -#: server/lib/modules/module.class.php:598 |
368 | +#: server/lib/modules/module.class.php:603 |
369 | msgid "You do not have permission to alter/delete this media." |
370 | msgstr "" |
371 | |
372 | -#: server/lib/modules/module.class.php:608 |
373 | +#: server/lib/modules/module.class.php:613 |
374 | msgid "Are you sure you want to delete this media?" |
375 | msgstr "" |
376 | |
377 | -#: server/lib/modules/module.class.php:609 |
378 | +#: server/lib/modules/module.class.php:614 |
379 | msgid "Please select from the following options" |
380 | msgstr "" |
381 | |
382 | -#: server/lib/modules/module.class.php:610 |
383 | +#: server/lib/modules/module.class.php:615 |
384 | msgid "Deleting media cannot be undone" |
385 | msgstr "" |
386 | |
387 | -#: server/lib/modules/module.class.php:633 |
388 | +#: server/lib/modules/module.class.php:638 |
389 | msgid "Delete Media" |
390 | msgstr "" |
391 | |
392 | -#: server/lib/modules/module.class.php:706 |
393 | +#: server/lib/modules/module.class.php:711 |
394 | msgid "Completed Successfully" |
395 | msgstr "" |
396 | |
397 | -#: server/lib/modules/module.class.php:762 |
398 | +#: server/lib/modules/module.class.php:767 |
399 | msgid "Media unassigned from all Layouts" |
400 | msgstr "" |
401 | |
402 | -#: server/lib/modules/module.class.php:772 |
403 | -#: server/lib/modules/module.class.php:890 |
404 | +#: server/lib/modules/module.class.php:777 |
405 | +#: server/lib/modules/module.class.php:895 |
406 | msgid "Not yet implemented by this module." |
407 | msgstr "" |
408 | |
409 | -#: server/lib/modules/module.class.php:775 |
410 | -#: server/lib/modules/module.class.php:893 |
411 | +#: server/lib/modules/module.class.php:780 |
412 | +#: server/lib/modules/module.class.php:898 |
413 | msgid "Add Item" |
414 | msgstr "" |
415 | |
416 | -#: server/lib/modules/module.class.php:842 |
417 | +#: server/lib/modules/module.class.php:847 |
418 | msgid "Assign to Layout" |
419 | msgstr "" |
420 | |
421 | -#: server/lib/modules/module.class.php:843 |
422 | +#: server/lib/modules/module.class.php:848 |
423 | msgid "View Library" |
424 | msgstr "" |
425 | |
426 | -#: server/lib/modules/module.class.php:844 |
427 | -#: server/lib/modules/module.class.php:848 |
428 | -#: server/lib/modules/module.class.php:852 |
429 | -#: server/lib/modules/module.class.php:859 |
430 | +#: server/lib/modules/module.class.php:849 |
431 | +#: server/lib/modules/module.class.php:853 |
432 | +#: server/lib/modules/module.class.php:857 |
433 | +#: server/lib/modules/module.class.php:864 |
434 | #: server/lib/pages/admin.class.php:588 server/lib/pages/admin.class.php:611 |
435 | #: server/lib/pages/content.class.php:209 |
436 | #: server/lib/pages/dataset.class.php:373 |
437 | @@ -1838,13 +1852,13 @@ |
438 | msgid "Close" |
439 | msgstr "" |
440 | |
441 | -#: server/lib/modules/module.class.php:952 |
442 | -#: server/lib/modules/module.class.php:956 |
443 | -#: server/lib/modules/module.class.php:960 |
444 | -#: server/lib/modules/module.class.php:1404 |
445 | -#: server/lib/modules/module.class.php:1407 |
446 | -#: server/lib/modules/module.class.php:1654 |
447 | -#: server/lib/modules/module.class.php:1656 |
448 | +#: server/lib/modules/module.class.php:957 |
449 | +#: server/lib/modules/module.class.php:961 |
450 | +#: server/lib/modules/module.class.php:965 |
451 | +#: server/lib/modules/module.class.php:1436 |
452 | +#: server/lib/modules/module.class.php:1439 |
453 | +#: server/lib/modules/module.class.php:1686 |
454 | +#: server/lib/modules/module.class.php:1688 |
455 | #: server/lib/pages/admin.class.php:672 |
456 | #: server/lib/pages/campaign.class.php:145 |
457 | #: server/lib/pages/campaign.class.php:215 |
458 | @@ -1865,20 +1879,20 @@ |
459 | #: server/lib/pages/display.class.php:825 |
460 | #: server/lib/pages/displaygroup.class.php:157 |
461 | #: server/lib/pages/displaygroup.class.php:205 |
462 | -#: server/lib/pages/displaygroup.class.php:307 |
463 | -#: server/lib/pages/displaygroup.class.php:541 |
464 | -#: server/lib/pages/displaygroup.class.php:702 |
465 | -#: server/lib/pages/displaygroup.class.php:836 |
466 | +#: server/lib/pages/displaygroup.class.php:310 |
467 | +#: server/lib/pages/displaygroup.class.php:550 |
468 | +#: server/lib/pages/displaygroup.class.php:711 |
469 | +#: server/lib/pages/displaygroup.class.php:845 |
470 | #: server/lib/pages/group.class.php:225 server/lib/pages/group.class.php:699 |
471 | #: server/lib/pages/help.class.php:195 server/lib/pages/help.class.php:233 |
472 | -#: server/lib/pages/layout.class.php:513 server/lib/pages/layout.class.php:600 |
473 | -#: server/lib/pages/layout.class.php:801 server/lib/pages/module.class.php:202 |
474 | +#: server/lib/pages/layout.class.php:516 server/lib/pages/layout.class.php:603 |
475 | +#: server/lib/pages/layout.class.php:804 server/lib/pages/module.class.php:202 |
476 | #: server/lib/pages/oauth.class.php:209 |
477 | #: server/lib/pages/resolution.class.php:125 |
478 | #: server/lib/pages/resolution.class.php:166 |
479 | -#: server/lib/pages/schedule.class.php:1448 |
480 | -#: server/lib/pages/schedule.class.php:1615 |
481 | -#: server/lib/pages/schedule.class.php:1940 |
482 | +#: server/lib/pages/schedule.class.php:1451 |
483 | +#: server/lib/pages/schedule.class.php:1618 |
484 | +#: server/lib/pages/schedule.class.php:1943 |
485 | #: server/lib/pages/template.class.php:155 |
486 | #: server/lib/pages/template.class.php:368 |
487 | #: server/lib/pages/timeline.class.php:190 |
488 | @@ -1888,10 +1902,10 @@ |
489 | #: server/lib/pages/user.class.php:547 server/lib/pages/user.class.php:601 |
490 | #: server/modules/counter.module.php:60 server/modules/counter.module.php:64 |
491 | #: server/modules/counter.module.php:126 server/modules/counter.module.php:130 |
492 | -#: server/modules/datasetview.module.php:86 |
493 | -#: server/modules/datasetview.module.php:90 |
494 | -#: server/modules/datasetview.module.php:206 |
495 | -#: server/modules/datasetview.module.php:210 |
496 | +#: server/modules/datasetview.module.php:65 |
497 | +#: server/modules/datasetview.module.php:69 |
498 | +#: server/modules/datasetview.module.php:185 |
499 | +#: server/modules/datasetview.module.php:189 |
500 | #: server/modules/embedded.module.php:67 server/modules/embedded.module.php:71 |
501 | #: server/modules/embedded.module.php:135 |
502 | #: server/modules/embedded.module.php:139 |
503 | @@ -1917,9 +1931,9 @@ |
504 | msgid "Cancel" |
505 | msgstr "" |
506 | |
507 | -#: server/lib/modules/module.class.php:963 |
508 | -#: server/lib/modules/module.class.php:1410 |
509 | -#: server/lib/modules/module.class.php:1659 |
510 | +#: server/lib/modules/module.class.php:968 |
511 | +#: server/lib/modules/module.class.php:1442 |
512 | +#: server/lib/modules/module.class.php:1691 |
513 | #: server/lib/pages/admin.class.php:168 |
514 | #: server/lib/pages/campaign.class.php:146 |
515 | #: server/lib/pages/campaign.class.php:216 |
516 | @@ -1933,18 +1947,18 @@ |
517 | #: server/lib/pages/display.class.php:731 |
518 | #: server/lib/pages/displaygroup.class.php:158 |
519 | #: server/lib/pages/displaygroup.class.php:206 |
520 | -#: server/lib/pages/displaygroup.class.php:308 |
521 | -#: server/lib/pages/displaygroup.class.php:542 |
522 | -#: server/lib/pages/displaygroup.class.php:837 |
523 | +#: server/lib/pages/displaygroup.class.php:311 |
524 | +#: server/lib/pages/displaygroup.class.php:551 |
525 | +#: server/lib/pages/displaygroup.class.php:846 |
526 | #: server/lib/pages/group.class.php:226 server/lib/pages/group.class.php:700 |
527 | #: server/lib/pages/help.class.php:196 server/lib/pages/help.class.php:234 |
528 | -#: server/lib/pages/layout.class.php:514 server/lib/pages/layout.class.php:601 |
529 | +#: server/lib/pages/layout.class.php:517 server/lib/pages/layout.class.php:604 |
530 | #: server/lib/pages/module.class.php:203 |
531 | #: server/lib/pages/resolution.class.php:126 |
532 | #: server/lib/pages/resolution.class.php:167 |
533 | -#: server/lib/pages/schedule.class.php:1450 |
534 | -#: server/lib/pages/schedule.class.php:1616 |
535 | -#: server/lib/pages/schedule.class.php:1941 |
536 | +#: server/lib/pages/schedule.class.php:1453 |
537 | +#: server/lib/pages/schedule.class.php:1619 |
538 | +#: server/lib/pages/schedule.class.php:1944 |
539 | #: server/lib/pages/template.class.php:156 |
540 | #: server/lib/pages/template.class.php:369 |
541 | #: server/lib/pages/timeline.class.php:191 |
542 | @@ -1953,8 +1967,8 @@ |
543 | #: server/lib/pages/user.class.php:548 server/lib/pages/user.class.php:602 |
544 | #: server/lib/pages/user.class.php:693 server/lib/pages/user.class.php:744 |
545 | #: server/modules/counter.module.php:70 server/modules/counter.module.php:136 |
546 | -#: server/modules/datasetview.module.php:93 |
547 | -#: server/modules/datasetview.module.php:213 |
548 | +#: server/modules/datasetview.module.php:72 |
549 | +#: server/modules/datasetview.module.php:192 |
550 | #: server/modules/embedded.module.php:79 |
551 | #: server/modules/embedded.module.php:147 |
552 | #: server/modules/localvideo.module.php:78 |
553 | @@ -1970,21 +1984,21 @@ |
554 | msgid "Save" |
555 | msgstr "" |
556 | |
557 | -#: server/lib/modules/module.class.php:1001 |
558 | +#: server/lib/modules/module.class.php:1006 |
559 | msgid "Add Media has not been implemented for this module." |
560 | msgstr "" |
561 | |
562 | -#: server/lib/modules/module.class.php:1048 |
563 | +#: server/lib/modules/module.class.php:1053 |
564 | msgid "Unable to get the storage name" |
565 | msgstr "" |
566 | |
567 | -#: server/lib/modules/module.class.php:1084 |
568 | +#: server/lib/modules/module.class.php:1089 |
569 | msgid "Edit Media has not been implemented for this module." |
570 | msgstr "" |
571 | |
572 | -#: server/lib/modules/module.class.php:1300 |
573 | -#: server/lib/pages/schedule.class.php:1195 |
574 | -#: server/lib/pages/schedule.class.php:1315 |
575 | +#: server/lib/modules/module.class.php:1332 |
576 | +#: server/lib/pages/schedule.class.php:1198 |
577 | +#: server/lib/pages/schedule.class.php:1318 |
578 | #: server/modules/ticker.module.php:433 |
579 | #: server/theme/default/html/displaygroup_fileassociations_form_assign.php:49 |
580 | #: server/theme/default/html/displaygroup_fileassociations_form_assign_list.php:27 |
581 | @@ -2001,10 +2015,10 @@ |
582 | msgid "Type" |
583 | msgstr "" |
584 | |
585 | -#: server/lib/modules/module.class.php:1301 |
586 | +#: server/lib/modules/module.class.php:1333 |
587 | #: server/lib/pages/schedule.class.php:462 |
588 | -#: server/lib/pages/schedule.class.php:1194 |
589 | -#: server/lib/pages/schedule.class.php:1314 |
590 | +#: server/lib/pages/schedule.class.php:1197 |
591 | +#: server/lib/pages/schedule.class.php:1317 |
592 | #: server/theme/default/html/campaign_form_add.php:31 |
593 | #: server/theme/default/html/campaign_form_edit.php:32 |
594 | #: server/theme/default/html/campaign_form_layout_assign.php:47 |
595 | @@ -2045,7 +2059,7 @@ |
596 | msgid "Name" |
597 | msgstr "" |
598 | |
599 | -#: server/lib/modules/module.class.php:1302 |
600 | +#: server/lib/modules/module.class.php:1334 |
601 | #: server/modules/localvideo.module.php:48 |
602 | #: server/modules/localvideo.module.php:112 |
603 | #: server/modules/ticker.module.php:435 |
604 | @@ -2071,18 +2085,18 @@ |
605 | msgid "Duration" |
606 | msgstr "" |
607 | |
608 | -#: server/lib/modules/module.class.php:1314 |
609 | +#: server/lib/modules/module.class.php:1346 |
610 | #: server/modules/ticker.module.php:452 |
611 | msgid "seconds" |
612 | msgstr "" |
613 | |
614 | -#: server/lib/modules/module.class.php:1338 |
615 | +#: server/lib/modules/module.class.php:1370 |
616 | msgid "You do not have permissions to edit this media" |
617 | msgstr "" |
618 | |
619 | -#: server/lib/modules/module.class.php:1347 |
620 | +#: server/lib/modules/module.class.php:1379 |
621 | #: server/lib/pages/schedule.class.php:477 |
622 | -#: server/lib/pages/schedule.class.php:1329 |
623 | +#: server/lib/pages/schedule.class.php:1332 |
624 | #: server/lib/pages/timeline.class.php:504 |
625 | #: server/theme/default/html/campaign_form_permissions.php:39 |
626 | #: server/theme/default/html/dataset_form_permissions.php:39 |
627 | @@ -2091,7 +2105,7 @@ |
628 | msgid "Group" |
629 | msgstr "" |
630 | |
631 | -#: server/lib/modules/module.class.php:1348 |
632 | +#: server/lib/modules/module.class.php:1380 |
633 | #: server/lib/pages/timeline.class.php:505 |
634 | #: server/theme/default/html/campaign_form_permissions.php:40 |
635 | #: server/theme/default/html/dataset_form_permissions.php:40 |
636 | @@ -2100,7 +2114,7 @@ |
637 | msgid "View" |
638 | msgstr "" |
639 | |
640 | -#: server/lib/modules/module.class.php:1349 |
641 | +#: server/lib/modules/module.class.php:1381 |
642 | #: server/lib/pages/campaign.class.php:93 |
643 | #: server/lib/pages/content.class.php:127 |
644 | #: server/lib/pages/dataset.class.php:102 |
645 | @@ -2109,7 +2123,7 @@ |
646 | #: server/lib/pages/display.class.php:345 |
647 | #: server/lib/pages/displaygroup.class.php:91 |
648 | #: server/lib/pages/group.class.php:144 server/lib/pages/help.class.php:153 |
649 | -#: server/lib/pages/layout.class.php:422 |
650 | +#: server/lib/pages/layout.class.php:425 |
651 | #: server/lib/pages/mediamanager.class.php:158 |
652 | #: server/lib/pages/module.class.php:135 |
653 | #: server/lib/pages/resolution.class.php:87 |
654 | @@ -2125,7 +2139,7 @@ |
655 | msgid "Edit" |
656 | msgstr "" |
657 | |
658 | -#: server/lib/modules/module.class.php:1350 |
659 | +#: server/lib/modules/module.class.php:1382 |
660 | #: server/lib/pages/campaign.class.php:103 |
661 | #: server/lib/pages/content.class.php:137 |
662 | #: server/lib/pages/dataset.class.php:119 |
663 | @@ -2135,10 +2149,10 @@ |
664 | #: server/lib/pages/display.class.php:369 |
665 | #: server/lib/pages/displaygroup.class.php:108 |
666 | #: server/lib/pages/group.class.php:151 server/lib/pages/help.class.php:160 |
667 | -#: server/lib/pages/layout.class.php:438 server/lib/pages/layout.class.php:746 |
668 | +#: server/lib/pages/layout.class.php:441 server/lib/pages/layout.class.php:749 |
669 | #: server/lib/pages/resolution.class.php:94 |
670 | #: server/lib/pages/schedule.class.php:482 |
671 | -#: server/lib/pages/schedule.class.php:1614 |
672 | +#: server/lib/pages/schedule.class.php:1617 |
673 | #: server/lib/pages/template.class.php:112 |
674 | #: server/lib/pages/timeline.class.php:349 |
675 | #: server/lib/pages/timeline.class.php:507 |
676 | @@ -2150,11 +2164,11 @@ |
677 | msgid "Delete" |
678 | msgstr "" |
679 | |
680 | -#: server/lib/modules/module.class.php:1381 |
681 | +#: server/lib/modules/module.class.php:1413 |
682 | msgid "Unable to get permissions for this layout" |
683 | msgstr "" |
684 | |
685 | -#: server/lib/modules/module.class.php:1400 |
686 | +#: server/lib/modules/module.class.php:1432 |
687 | #: server/lib/pages/campaign.class.php:113 |
688 | #: server/lib/pages/campaign.class.php:387 |
689 | #: server/lib/pages/content.class.php:147 |
690 | @@ -2162,8 +2176,8 @@ |
691 | #: server/lib/pages/dataset.class.php:909 |
692 | #: server/lib/pages/display.class.php:386 |
693 | #: server/lib/pages/displaygroup.class.php:118 |
694 | -#: server/lib/pages/displaygroup.class.php:539 |
695 | -#: server/lib/pages/layout.class.php:448 server/lib/pages/layout.class.php:747 |
696 | +#: server/lib/pages/displaygroup.class.php:548 |
697 | +#: server/lib/pages/layout.class.php:451 server/lib/pages/layout.class.php:750 |
698 | #: server/lib/pages/template.class.php:122 |
699 | #: server/lib/pages/template.class.php:366 |
700 | #: server/lib/pages/timeline.class.php:546 |
701 | @@ -2175,124 +2189,124 @@ |
702 | msgid "Permissions" |
703 | msgstr "" |
704 | |
705 | -#: server/lib/modules/module.class.php:1433 |
706 | -#: server/lib/pages/layout.class.php:65 server/lib/pages/layout.class.php:530 |
707 | -#: server/lib/pages/layout.class.php:625 |
708 | +#: server/lib/modules/module.class.php:1465 |
709 | +#: server/lib/pages/layout.class.php:65 server/lib/pages/layout.class.php:533 |
710 | +#: server/lib/pages/layout.class.php:628 |
711 | msgid "You do not have permissions to edit this layout" |
712 | msgstr "" |
713 | |
714 | -#: server/lib/modules/module.class.php:1522 |
715 | +#: server/lib/modules/module.class.php:1554 |
716 | #: server/lib/pages/campaign.class.php:475 |
717 | #: server/lib/pages/dataset.class.php:997 |
718 | -#: server/lib/pages/displaygroup.class.php:629 |
719 | +#: server/lib/pages/displaygroup.class.php:638 |
720 | #: server/lib/pages/template.class.php:459 |
721 | #: server/lib/pages/timeline.class.php:634 |
722 | msgid "Permissions Changed" |
723 | msgstr "" |
724 | |
725 | -#: server/lib/modules/module.class.php:1595 |
726 | -#: server/lib/modules/module.class.php:1707 |
727 | -#: server/lib/modules/module.class.php:1740 |
728 | +#: server/lib/modules/module.class.php:1627 |
729 | +#: server/lib/modules/module.class.php:1739 |
730 | +#: server/lib/modules/module.class.php:1772 |
731 | msgid "Unknown transition type" |
732 | msgstr "" |
733 | |
734 | -#: server/lib/modules/module.class.php:1607 |
735 | +#: server/lib/modules/module.class.php:1639 |
736 | #: server/lib/pages/timeline.class.php:169 |
737 | msgid "North" |
738 | msgstr "" |
739 | |
740 | -#: server/lib/modules/module.class.php:1608 |
741 | +#: server/lib/modules/module.class.php:1640 |
742 | #: server/lib/pages/timeline.class.php:170 |
743 | msgid "North East" |
744 | msgstr "" |
745 | |
746 | -#: server/lib/modules/module.class.php:1609 |
747 | +#: server/lib/modules/module.class.php:1641 |
748 | #: server/lib/pages/timeline.class.php:171 |
749 | msgid "East" |
750 | msgstr "" |
751 | |
752 | -#: server/lib/modules/module.class.php:1610 |
753 | +#: server/lib/modules/module.class.php:1642 |
754 | #: server/lib/pages/timeline.class.php:172 |
755 | msgid "South East" |
756 | msgstr "" |
757 | |
758 | -#: server/lib/modules/module.class.php:1611 |
759 | +#: server/lib/modules/module.class.php:1643 |
760 | #: server/lib/pages/timeline.class.php:173 |
761 | msgid "South" |
762 | msgstr "" |
763 | |
764 | -#: server/lib/modules/module.class.php:1612 |
765 | +#: server/lib/modules/module.class.php:1644 |
766 | #: server/lib/pages/timeline.class.php:174 |
767 | msgid "South West" |
768 | msgstr "" |
769 | |
770 | -#: server/lib/modules/module.class.php:1613 |
771 | +#: server/lib/modules/module.class.php:1645 |
772 | #: server/lib/pages/timeline.class.php:175 |
773 | msgid "West" |
774 | msgstr "" |
775 | |
776 | -#: server/lib/modules/module.class.php:1614 |
777 | +#: server/lib/modules/module.class.php:1646 |
778 | #: server/lib/pages/timeline.class.php:176 |
779 | msgid "North West" |
780 | msgstr "" |
781 | |
782 | -#: server/lib/modules/module.class.php:1621 |
783 | +#: server/lib/modules/module.class.php:1653 |
784 | msgid "What transition should be applied to this media item?" |
785 | msgstr "" |
786 | |
787 | -#: server/lib/modules/module.class.php:1622 |
788 | +#: server/lib/modules/module.class.php:1654 |
789 | #: server/theme/default/html/region_form_options.php:56 |
790 | msgid "The duration for this transition, in milliseconds." |
791 | msgstr "" |
792 | |
793 | -#: server/lib/modules/module.class.php:1623 |
794 | +#: server/lib/modules/module.class.php:1655 |
795 | msgid "The direction for this transition." |
796 | msgstr "" |
797 | |
798 | -#: server/lib/modules/module.class.php:1744 server/modules/text.module.php:52 |
799 | +#: server/lib/modules/module.class.php:1776 server/modules/text.module.php:52 |
800 | #: server/modules/text.module.php:130 server/modules/ticker.module.php:132 |
801 | #: server/modules/webpage.module.php:51 server/modules/webpage.module.php:108 |
802 | msgid "None" |
803 | msgstr "" |
804 | |
805 | -#: server/lib/modules/module.class.php:1761 |
806 | +#: server/lib/modules/module.class.php:1793 |
807 | msgid "No XLF provided" |
808 | msgstr "" |
809 | |
810 | -#: server/lib/modules/module.class.php:1769 |
811 | +#: server/lib/modules/module.class.php:1801 |
812 | msgid "Invalid XLF" |
813 | msgstr "" |
814 | |
815 | -#: server/lib/modules/module.class.php:1797 |
816 | +#: server/lib/modules/module.class.php:1829 |
817 | msgid "Too many media nodes" |
818 | msgstr "" |
819 | |
820 | -#: server/lib/modules/module.class.php:1804 |
821 | +#: server/lib/modules/module.class.php:1836 |
822 | msgid "SchemaVersion does not match" |
823 | msgstr "" |
824 | |
825 | -#: server/lib/modules/module.class.php:1808 |
826 | +#: server/lib/modules/module.class.php:1840 |
827 | msgid "Media Type does not match" |
828 | msgstr "" |
829 | |
830 | -#: server/lib/modules/module.class.php:1817 |
831 | +#: server/lib/modules/module.class.php:1849 |
832 | #, php-format |
833 | msgid "ID does not match [%s vs %s]" |
834 | msgstr "" |
835 | |
836 | -#: server/lib/modules/module.class.php:1821 |
837 | +#: server/lib/modules/module.class.php:1853 |
838 | msgid "UserId does not match" |
839 | msgstr "" |
840 | |
841 | -#: server/lib/modules/module.class.php:1836 |
842 | +#: server/lib/modules/module.class.php:1868 |
843 | msgid "ID does not match" |
844 | msgstr "" |
845 | |
846 | -#: server/lib/modules/module.class.php:1848 |
847 | +#: server/lib/modules/module.class.php:1880 |
848 | msgid "Duration not provided or not a number" |
849 | msgstr "" |
850 | |
851 | -#: server/lib/modules/module.class.php:1851 |
852 | +#: server/lib/modules/module.class.php:1883 |
853 | msgid "Cannot be less than zero" |
854 | msgstr "" |
855 | |
856 | @@ -2516,8 +2530,8 @@ |
857 | |
858 | #: server/lib/pages/campaign.class.php:76 |
859 | #: server/lib/pages/display.class.php:322 |
860 | -#: server/lib/pages/layout.class.php:399 |
861 | -#: server/lib/pages/schedule.class.php:1938 |
862 | +#: server/lib/pages/layout.class.php:402 |
863 | +#: server/lib/pages/schedule.class.php:1941 |
864 | #: server/theme/default/html/layout_designer.php:49 |
865 | msgid "Schedule Now" |
866 | msgstr "" |
867 | @@ -2644,7 +2658,7 @@ |
868 | msgstr "" |
869 | |
870 | #: server/lib/pages/content.class.php:260 |
871 | -#: server/lib/pages/displaygroup.class.php:703 |
872 | +#: server/lib/pages/displaygroup.class.php:712 |
873 | msgid "Assign" |
874 | msgstr "" |
875 | |
876 | @@ -2798,7 +2812,7 @@ |
877 | msgstr "" |
878 | |
879 | #: server/lib/pages/dataset.class.php:1097 |
880 | -msgid "Files with a CSV extention only." |
881 | +msgid "Files with a CSV extension only." |
882 | msgstr "" |
883 | |
884 | #: server/lib/pages/dataset.class.php:1134 |
885 | @@ -2929,13 +2943,13 @@ |
886 | msgstr "" |
887 | |
888 | #: server/lib/pages/display.class.php:728 |
889 | -#: server/lib/pages/displaygroup.class.php:305 |
890 | +#: server/lib/pages/displaygroup.class.php:308 |
891 | #: server/lib/pages/group.class.php:697 |
892 | msgid "Manage Membership" |
893 | msgstr "" |
894 | |
895 | #: server/lib/pages/display.class.php:797 |
896 | -#: server/lib/pages/displaygroup.class.php:470 |
897 | +#: server/lib/pages/displaygroup.class.php:479 |
898 | #: server/lib/pages/group.class.php:765 |
899 | msgid "Group membership set" |
900 | msgstr "" |
901 | @@ -2967,12 +2981,12 @@ |
902 | |
903 | #: server/lib/pages/displaygroup.class.php:177 |
904 | #: server/lib/pages/displaygroup.class.php:222 |
905 | -#: server/lib/pages/displaygroup.class.php:359 |
906 | -#: server/lib/pages/displaygroup.class.php:391 |
907 | -#: server/lib/pages/displaygroup.class.php:422 |
908 | -#: server/lib/pages/displaygroup.class.php:640 |
909 | -#: server/lib/pages/displaygroup.class.php:777 |
910 | -#: server/lib/pages/displaygroup.class.php:854 |
911 | +#: server/lib/pages/displaygroup.class.php:368 |
912 | +#: server/lib/pages/displaygroup.class.php:400 |
913 | +#: server/lib/pages/displaygroup.class.php:431 |
914 | +#: server/lib/pages/displaygroup.class.php:649 |
915 | +#: server/lib/pages/displaygroup.class.php:786 |
916 | +#: server/lib/pages/displaygroup.class.php:863 |
917 | msgid "You do not have permission to edit this display group" |
918 | msgstr "" |
919 | |
920 | @@ -2992,65 +3006,65 @@ |
921 | msgid "Delete Display Group" |
922 | msgstr "" |
923 | |
924 | -#: server/lib/pages/displaygroup.class.php:272 |
925 | -#: server/lib/pages/displaygroup.class.php:297 |
926 | -#: server/lib/pages/displaygroup.class.php:435 |
927 | +#: server/lib/pages/displaygroup.class.php:270 |
928 | +#: server/lib/pages/displaygroup.class.php:290 |
929 | +#: server/lib/pages/displaygroup.class.php:444 |
930 | msgid "Error getting Displays" |
931 | msgstr "" |
932 | |
933 | -#: server/lib/pages/displaygroup.class.php:335 |
934 | +#: server/lib/pages/displaygroup.class.php:344 |
935 | msgid "Display Group Added" |
936 | msgstr "" |
937 | |
938 | -#: server/lib/pages/displaygroup.class.php:369 |
939 | +#: server/lib/pages/displaygroup.class.php:378 |
940 | msgid "Display Group Edited" |
941 | msgstr "" |
942 | |
943 | -#: server/lib/pages/displaygroup.class.php:401 |
944 | +#: server/lib/pages/displaygroup.class.php:410 |
945 | msgid "Display Group Deleted" |
946 | msgstr "" |
947 | |
948 | -#: server/lib/pages/displaygroup.class.php:489 |
949 | -#: server/lib/pages/displaygroup.class.php:565 |
950 | +#: server/lib/pages/displaygroup.class.php:498 |
951 | +#: server/lib/pages/displaygroup.class.php:574 |
952 | msgid "You do not have permissions to edit this display group" |
953 | msgstr "" |
954 | |
955 | -#: server/lib/pages/displaygroup.class.php:510 |
956 | +#: server/lib/pages/displaygroup.class.php:519 |
957 | msgid "Unable to get permissions for this DisplayGroup" |
958 | msgstr "" |
959 | |
960 | -#: server/lib/pages/displaygroup.class.php:683 |
961 | -#: server/lib/pages/displaygroup.class.php:735 |
962 | +#: server/lib/pages/displaygroup.class.php:692 |
963 | +#: server/lib/pages/displaygroup.class.php:744 |
964 | msgid "Unable to get existing assignments." |
965 | msgstr "" |
966 | |
967 | -#: server/lib/pages/displaygroup.class.php:699 |
968 | +#: server/lib/pages/displaygroup.class.php:708 |
969 | msgid "Associate an item from the Library" |
970 | msgstr "" |
971 | |
972 | -#: server/lib/pages/displaygroup.class.php:772 |
973 | +#: server/lib/pages/displaygroup.class.php:781 |
974 | msgid "Display Group not selected" |
975 | msgstr "" |
976 | |
977 | -#: server/lib/pages/displaygroup.class.php:786 |
978 | +#: server/lib/pages/displaygroup.class.php:795 |
979 | #: server/lib/pages/timeline.class.php:391 |
980 | #, php-format |
981 | msgid "%d Media Items Assigned" |
982 | msgstr "" |
983 | |
984 | -#: server/lib/pages/displaygroup.class.php:803 |
985 | +#: server/lib/pages/displaygroup.class.php:812 |
986 | msgid "Unknown Display" |
987 | msgstr "" |
988 | |
989 | -#: server/lib/pages/displaygroup.class.php:808 |
990 | +#: server/lib/pages/displaygroup.class.php:817 |
991 | msgid "No displays in this group" |
992 | msgstr "" |
993 | |
994 | -#: server/lib/pages/displaygroup.class.php:835 |
995 | +#: server/lib/pages/displaygroup.class.php:844 |
996 | msgid "Set Instructions for Upgrading this client" |
997 | msgstr "" |
998 | |
999 | -#: server/lib/pages/displaygroup.class.php:881 |
1000 | +#: server/lib/pages/displaygroup.class.php:890 |
1001 | msgid "Version Instructions Set" |
1002 | msgstr "" |
1003 | |
1004 | @@ -3205,111 +3219,115 @@ |
1005 | "corrupt." |
1006 | msgstr "" |
1007 | |
1008 | -#: server/lib/pages/layout.class.php:189 server/lib/pages/layout.class.php:220 |
1009 | +#: server/lib/pages/layout.class.php:152 |
1010 | +msgid "Save Position" |
1011 | +msgstr "" |
1012 | + |
1013 | +#: server/lib/pages/layout.class.php:192 server/lib/pages/layout.class.php:223 |
1014 | msgid "Layout Details Changed." |
1015 | msgstr "" |
1016 | |
1017 | -#: server/lib/pages/layout.class.php:232 server/lib/pages/layout.class.php:287 |
1018 | -#: server/lib/pages/layout.class.php:314 |
1019 | +#: server/lib/pages/layout.class.php:235 server/lib/pages/layout.class.php:290 |
1020 | +#: server/lib/pages/layout.class.php:317 |
1021 | msgid "You do not have permissions to delete this layout" |
1022 | msgstr "" |
1023 | |
1024 | -#: server/lib/pages/layout.class.php:245 |
1025 | +#: server/lib/pages/layout.class.php:248 |
1026 | msgid "Can not get layout information" |
1027 | msgstr "" |
1028 | |
1029 | -#: server/lib/pages/layout.class.php:266 |
1030 | +#: server/lib/pages/layout.class.php:269 |
1031 | msgid "Delete Layout" |
1032 | msgstr "" |
1033 | |
1034 | -#: server/lib/pages/layout.class.php:294 |
1035 | +#: server/lib/pages/layout.class.php:297 |
1036 | msgid "The Layout has been Deleted" |
1037 | msgstr "" |
1038 | |
1039 | -#: server/lib/pages/layout.class.php:322 |
1040 | +#: server/lib/pages/layout.class.php:325 |
1041 | msgid "The Layout has been Retired" |
1042 | msgstr "" |
1043 | |
1044 | -#: server/lib/pages/layout.class.php:359 |
1045 | +#: server/lib/pages/layout.class.php:362 |
1046 | msgid "Unable to get layouts for user" |
1047 | msgstr "" |
1048 | |
1049 | -#: server/lib/pages/layout.class.php:376 server/lib/pages/layout.class.php:962 |
1050 | +#: server/lib/pages/layout.class.php:379 server/lib/pages/layout.class.php:965 |
1051 | msgid "This Layout is ready to play" |
1052 | msgstr "" |
1053 | |
1054 | -#: server/lib/pages/layout.class.php:380 server/lib/pages/layout.class.php:966 |
1055 | +#: server/lib/pages/layout.class.php:383 server/lib/pages/layout.class.php:969 |
1056 | msgid "There are items on this Layout that can only be assessed by the client" |
1057 | msgstr "" |
1058 | |
1059 | -#: server/lib/pages/layout.class.php:384 server/lib/pages/layout.class.php:970 |
1060 | +#: server/lib/pages/layout.class.php:387 server/lib/pages/layout.class.php:973 |
1061 | msgid "This Layout is invalid and should not be scheduled" |
1062 | msgstr "" |
1063 | |
1064 | -#: server/lib/pages/layout.class.php:388 server/lib/pages/layout.class.php:974 |
1065 | +#: server/lib/pages/layout.class.php:391 server/lib/pages/layout.class.php:977 |
1066 | msgid "The Status of this Layout is not known" |
1067 | msgstr "" |
1068 | |
1069 | -#: server/lib/pages/layout.class.php:405 |
1070 | +#: server/lib/pages/layout.class.php:408 |
1071 | #: server/theme/default/html/layout_designer.php:48 |
1072 | msgid "Preview Layout" |
1073 | msgstr "" |
1074 | |
1075 | -#: server/lib/pages/layout.class.php:415 |
1076 | +#: server/lib/pages/layout.class.php:418 |
1077 | msgid "Design" |
1078 | msgstr "" |
1079 | |
1080 | -#: server/lib/pages/layout.class.php:429 server/lib/pages/layout.class.php:802 |
1081 | +#: server/lib/pages/layout.class.php:432 server/lib/pages/layout.class.php:805 |
1082 | msgid "Copy" |
1083 | msgstr "" |
1084 | |
1085 | -#: server/lib/pages/layout.class.php:509 |
1086 | +#: server/lib/pages/layout.class.php:512 |
1087 | #: server/theme/default/html/layout_page.php:45 |
1088 | msgid "Add Layout" |
1089 | msgstr "" |
1090 | |
1091 | -#: server/lib/pages/layout.class.php:509 |
1092 | +#: server/lib/pages/layout.class.php:512 |
1093 | msgid "Edit Layout" |
1094 | msgstr "" |
1095 | |
1096 | -#: server/lib/pages/layout.class.php:597 |
1097 | +#: server/lib/pages/layout.class.php:600 |
1098 | msgid "Change the Background Properties" |
1099 | msgstr "" |
1100 | |
1101 | -#: server/lib/pages/layout.class.php:599 |
1102 | +#: server/lib/pages/layout.class.php:602 |
1103 | msgid "Add Image" |
1104 | msgstr "" |
1105 | |
1106 | -#: server/lib/pages/layout.class.php:633 |
1107 | +#: server/lib/pages/layout.class.php:636 |
1108 | msgid "Layout Background Changed" |
1109 | msgstr "" |
1110 | |
1111 | -#: server/lib/pages/layout.class.php:663 |
1112 | +#: server/lib/pages/layout.class.php:666 |
1113 | msgid "Unable to determine display resolution" |
1114 | msgstr "" |
1115 | |
1116 | -#: server/lib/pages/layout.class.php:744 |
1117 | +#: server/lib/pages/layout.class.php:747 |
1118 | msgid "Timeline" |
1119 | msgstr "" |
1120 | |
1121 | -#: server/lib/pages/layout.class.php:744 |
1122 | +#: server/lib/pages/layout.class.php:747 |
1123 | msgid "Edit Timeline" |
1124 | msgstr "" |
1125 | |
1126 | -#: server/lib/pages/layout.class.php:745 |
1127 | +#: server/lib/pages/layout.class.php:748 |
1128 | #: server/theme/default/html/layout_designer.php:40 |
1129 | msgid "Options" |
1130 | msgstr "" |
1131 | |
1132 | -#: server/lib/pages/layout.class.php:799 |
1133 | +#: server/lib/pages/layout.class.php:802 |
1134 | msgid "Copy a Layout." |
1135 | msgstr "" |
1136 | |
1137 | -#: server/lib/pages/layout.class.php:830 |
1138 | +#: server/lib/pages/layout.class.php:833 |
1139 | msgid "Layout Copied" |
1140 | msgstr "" |
1141 | |
1142 | -#: server/lib/pages/layout.class.php:859 |
1143 | +#: server/lib/pages/layout.class.php:862 |
1144 | msgid "Unable to get group information for layout" |
1145 | msgstr "" |
1146 | |
1147 | @@ -3469,8 +3487,8 @@ |
1148 | msgstr "" |
1149 | |
1150 | #: server/lib/pages/schedule.class.php:463 |
1151 | -#: server/lib/pages/schedule.class.php:1126 |
1152 | -#: server/lib/pages/schedule.class.php:1210 server/locale/dbtranslate.php:26 |
1153 | +#: server/lib/pages/schedule.class.php:1129 |
1154 | +#: server/lib/pages/schedule.class.php:1213 server/locale/dbtranslate.php:26 |
1155 | #: server/theme/default/html/homepage_mediamanager.php:44 |
1156 | #: server/theme/default/html/homepage_mediamanager_grid.php:38 |
1157 | #: server/theme/default/html/layout_designer.php:80 |
1158 | @@ -3510,8 +3528,8 @@ |
1159 | msgstr "" |
1160 | |
1161 | #: server/lib/pages/schedule.class.php:477 |
1162 | -#: server/lib/pages/schedule.class.php:1240 |
1163 | -#: server/lib/pages/schedule.class.php:1329 |
1164 | +#: server/lib/pages/schedule.class.php:1243 |
1165 | +#: server/lib/pages/schedule.class.php:1332 |
1166 | #: server/theme/default/html/display_form_edit.php:34 |
1167 | #: server/theme/default/html/display_form_version_instructions.php:39 |
1168 | #: server/theme/default/html/display_page_grid.php:46 |
1169 | @@ -3525,136 +3543,136 @@ |
1170 | msgstr "" |
1171 | |
1172 | #: server/lib/pages/schedule.class.php:610 |
1173 | -#: server/lib/pages/schedule.class.php:805 |
1174 | -#: server/lib/pages/schedule.class.php:908 |
1175 | -#: server/lib/pages/schedule.class.php:1004 |
1176 | +#: server/lib/pages/schedule.class.php:808 |
1177 | +#: server/lib/pages/schedule.class.php:911 |
1178 | +#: server/lib/pages/schedule.class.php:1007 |
1179 | msgid "Error getting events for date." |
1180 | msgstr "" |
1181 | |
1182 | -#: server/lib/pages/schedule.class.php:829 |
1183 | -#: server/lib/pages/schedule.class.php:1028 |
1184 | -#: server/lib/pages/schedule.class.php:1612 |
1185 | +#: server/lib/pages/schedule.class.php:832 |
1186 | +#: server/lib/pages/schedule.class.php:1031 |
1187 | +#: server/lib/pages/schedule.class.php:1615 |
1188 | msgid "Edit Event" |
1189 | msgstr "" |
1190 | |
1191 | -#: server/lib/pages/schedule.class.php:1079 |
1192 | +#: server/lib/pages/schedule.class.php:1082 |
1193 | msgid "Can not list Display Groups" |
1194 | msgstr "" |
1195 | |
1196 | -#: server/lib/pages/schedule.class.php:1083 |
1197 | +#: server/lib/pages/schedule.class.php:1086 |
1198 | msgid "No Display Groups" |
1199 | msgstr "" |
1200 | |
1201 | -#: server/lib/pages/schedule.class.php:1086 server/locale/dbtranslate.php:32 |
1202 | +#: server/lib/pages/schedule.class.php:1089 server/locale/dbtranslate.php:32 |
1203 | #: server/theme/default/html/schedule_page_display_list.php:38 |
1204 | msgid "Groups" |
1205 | msgstr "" |
1206 | |
1207 | -#: server/lib/pages/schedule.class.php:1107 server/locale/dbtranslate.php:31 |
1208 | +#: server/lib/pages/schedule.class.php:1110 server/locale/dbtranslate.php:31 |
1209 | #: server/theme/default/html/schedule_page_display_list.php:48 |
1210 | msgid "Displays" |
1211 | msgstr "" |
1212 | |
1213 | -#: server/lib/pages/schedule.class.php:1210 |
1214 | +#: server/lib/pages/schedule.class.php:1213 |
1215 | msgid "Campaign" |
1216 | msgstr "" |
1217 | |
1218 | -#: server/lib/pages/schedule.class.php:1446 |
1219 | +#: server/lib/pages/schedule.class.php:1449 |
1220 | msgid "Schedule Event" |
1221 | msgstr "" |
1222 | |
1223 | -#: server/lib/pages/schedule.class.php:1497 |
1224 | +#: server/lib/pages/schedule.class.php:1500 |
1225 | msgid "Error getting details for this event." |
1226 | msgstr "" |
1227 | |
1228 | -#: server/lib/pages/schedule.class.php:1524 |
1229 | +#: server/lib/pages/schedule.class.php:1527 |
1230 | msgid "You do not have permission to edit this event." |
1231 | msgstr "" |
1232 | |
1233 | -#: server/lib/pages/schedule.class.php:1664 |
1234 | -#: server/lib/pages/schedule.class.php:1749 |
1235 | -#: server/lib/pages/schedule.class.php:1969 |
1236 | +#: server/lib/pages/schedule.class.php:1667 |
1237 | +#: server/lib/pages/schedule.class.php:1752 |
1238 | +#: server/lib/pages/schedule.class.php:1972 |
1239 | msgid "No layout selected" |
1240 | msgstr "" |
1241 | |
1242 | -#: server/lib/pages/schedule.class.php:1670 |
1243 | -#: server/lib/pages/schedule.class.php:1755 |
1244 | -#: server/lib/pages/schedule.class.php:1976 |
1245 | +#: server/lib/pages/schedule.class.php:1673 |
1246 | +#: server/lib/pages/schedule.class.php:1758 |
1247 | +#: server/lib/pages/schedule.class.php:1979 |
1248 | msgid "No displays selected" |
1249 | msgstr "" |
1250 | |
1251 | -#: server/lib/pages/schedule.class.php:1676 |
1252 | -#: server/lib/pages/schedule.class.php:1761 |
1253 | +#: server/lib/pages/schedule.class.php:1679 |
1254 | +#: server/lib/pages/schedule.class.php:1764 |
1255 | msgid "Can not have an end time earlier than your start time" |
1256 | msgstr "" |
1257 | |
1258 | -#: server/lib/pages/schedule.class.php:1680 |
1259 | -#: server/lib/pages/schedule.class.php:1979 |
1260 | +#: server/lib/pages/schedule.class.php:1683 |
1261 | +#: server/lib/pages/schedule.class.php:1982 |
1262 | msgid "Your start time is in the past. Cannot schedule events in the past" |
1263 | msgstr "" |
1264 | |
1265 | -#: server/lib/pages/schedule.class.php:1686 |
1266 | -#: server/lib/pages/schedule.class.php:1767 |
1267 | +#: server/lib/pages/schedule.class.php:1689 |
1268 | +#: server/lib/pages/schedule.class.php:1770 |
1269 | msgid "" |
1270 | "Your repeat until date is in the past. Cannot schedule events to repeat in " |
1271 | "to the past" |
1272 | msgstr "" |
1273 | |
1274 | -#: server/lib/pages/schedule.class.php:1697 |
1275 | +#: server/lib/pages/schedule.class.php:1700 |
1276 | msgid "The Event has been Added." |
1277 | msgstr "" |
1278 | |
1279 | -#: server/lib/pages/schedule.class.php:1778 |
1280 | +#: server/lib/pages/schedule.class.php:1781 |
1281 | msgid "The Event has been Modified." |
1282 | msgstr "" |
1283 | |
1284 | -#: server/lib/pages/schedule.class.php:1798 |
1285 | +#: server/lib/pages/schedule.class.php:1801 |
1286 | msgid "Are you sure you want to delete this event from <b>all</b> displays?" |
1287 | msgstr "" |
1288 | |
1289 | -#: server/lib/pages/schedule.class.php:1799 |
1290 | +#: server/lib/pages/schedule.class.php:1802 |
1291 | msgid "" |
1292 | "If you only want to delete this item from certain displays, please deselect " |
1293 | "the displays in the edit dialogue and click Save." |
1294 | msgstr "" |
1295 | |
1296 | -#: server/lib/pages/schedule.class.php:1818 |
1297 | +#: server/lib/pages/schedule.class.php:1821 |
1298 | msgid "Delete Event." |
1299 | msgstr "" |
1300 | |
1301 | -#: server/lib/pages/schedule.class.php:1854 |
1302 | +#: server/lib/pages/schedule.class.php:1857 |
1303 | msgid "The Event has been Deleted." |
1304 | msgstr "" |
1305 | |
1306 | -#: server/lib/pages/schedule.class.php:1972 |
1307 | +#: server/lib/pages/schedule.class.php:1975 |
1308 | msgid "You must enter a duration" |
1309 | msgstr "" |
1310 | |
1311 | -#: server/lib/pages/schedule.class.php:1989 |
1312 | +#: server/lib/pages/schedule.class.php:1992 |
1313 | msgid "The Event has been Scheduled" |
1314 | msgstr "" |
1315 | |
1316 | -#: server/lib/pages/schedule.class.php:2004 |
1317 | -#: server/lib/pages/schedule.class.php:2051 |
1318 | +#: server/lib/pages/schedule.class.php:2007 |
1319 | +#: server/lib/pages/schedule.class.php:2054 |
1320 | msgid "Day not selected" |
1321 | msgstr "" |
1322 | |
1323 | -#: server/lib/pages/schedule.class.php:2006 |
1324 | +#: server/lib/pages/schedule.class.php:2009 |
1325 | msgid "" |
1326 | "Are you sure you want to delete all events that intersect this day from " |
1327 | "<b>all</b> displays?" |
1328 | msgstr "" |
1329 | |
1330 | -#: server/lib/pages/schedule.class.php:2007 |
1331 | +#: server/lib/pages/schedule.class.php:2010 |
1332 | msgid "This action cannot be undone." |
1333 | msgstr "" |
1334 | |
1335 | -#: server/lib/pages/schedule.class.php:2025 |
1336 | +#: server/lib/pages/schedule.class.php:2028 |
1337 | #, php-format |
1338 | msgid "Delete %s" |
1339 | msgstr "" |
1340 | |
1341 | -#: server/lib/pages/schedule.class.php:2068 |
1342 | +#: server/lib/pages/schedule.class.php:2071 |
1343 | #, php-format |
1344 | msgid "All events for %s have been deleted" |
1345 | msgstr "" |
1346 | @@ -3676,11 +3694,15 @@ |
1347 | msgid "User Logged Out." |
1348 | msgstr "" |
1349 | |
1350 | -#: server/lib/pages/stats.class.php:98 |
1351 | +#: server/lib/pages/stats.class.php:93 server/lib/pages/stats.class.php:262 |
1352 | +msgid "No displays with View permissions" |
1353 | +msgstr "" |
1354 | + |
1355 | +#: server/lib/pages/stats.class.php:117 |
1356 | msgid "Unable to get Layouts Shown" |
1357 | msgstr "" |
1358 | |
1359 | -#: server/lib/pages/stats.class.php:139 server/lib/pages/stats.class.php:181 |
1360 | +#: server/lib/pages/stats.class.php:159 server/lib/pages/stats.class.php:202 |
1361 | msgid "Unable to get Library Media Ran" |
1362 | msgstr "" |
1363 | |
1364 | @@ -4021,12 +4043,12 @@ |
1365 | msgid "Trying to change the password for another user denied" |
1366 | msgstr "" |
1367 | |
1368 | -#: server/lib/service/xmdssoap.class.php:1126 |
1369 | +#: server/lib/service/xmdssoap.class.php:1135 |
1370 | #, php-format |
1371 | msgid "Recovery for Display %s" |
1372 | msgstr "" |
1373 | |
1374 | -#: server/lib/service/xmdssoap.class.php:1127 |
1375 | +#: server/lib/service/xmdssoap.class.php:1136 |
1376 | #, php-format |
1377 | msgid "Display %s with ID %d is now back online." |
1378 | msgstr "" |
1379 | @@ -4349,46 +4371,46 @@ |
1380 | msgid "DataSet View" |
1381 | msgstr "" |
1382 | |
1383 | -#: server/modules/datasetview.module.php:81 |
1384 | +#: server/modules/datasetview.module.php:60 |
1385 | msgid "Add DataSet View" |
1386 | msgstr "" |
1387 | |
1388 | -#: server/modules/datasetview.module.php:201 |
1389 | +#: server/modules/datasetview.module.php:180 |
1390 | #, php-format |
1391 | msgid "Edit DataSet View for DataSet %s" |
1392 | msgstr "" |
1393 | |
1394 | -#: server/modules/datasetview.module.php:238 |
1395 | +#: server/modules/datasetview.module.php:217 |
1396 | #: server/modules/ticker.module.php:253 |
1397 | msgid "Please select a DataSet" |
1398 | msgstr "" |
1399 | |
1400 | -#: server/modules/datasetview.module.php:247 |
1401 | +#: server/modules/datasetview.module.php:226 |
1402 | #: server/modules/ticker.module.php:257 |
1403 | msgid "You do not have permission to use that dataset" |
1404 | msgstr "" |
1405 | |
1406 | -#: server/modules/datasetview.module.php:331 |
1407 | +#: server/modules/datasetview.module.php:310 |
1408 | #: server/modules/ticker.module.php:362 |
1409 | msgid "Limits must be numbers" |
1410 | msgstr "" |
1411 | |
1412 | -#: server/modules/datasetview.module.php:334 |
1413 | +#: server/modules/datasetview.module.php:313 |
1414 | #: server/modules/ticker.module.php:365 |
1415 | msgid "Limits cannot be lower than 0" |
1416 | msgstr "" |
1417 | |
1418 | -#: server/modules/datasetview.module.php:338 |
1419 | +#: server/modules/datasetview.module.php:317 |
1420 | #: server/modules/ticker.module.php:369 |
1421 | msgid "Upper limit must be higher than lower limit" |
1422 | msgstr "" |
1423 | |
1424 | -#: server/modules/datasetview.module.php:341 |
1425 | +#: server/modules/datasetview.module.php:320 |
1426 | #: server/modules/ticker.module.php:391 |
1427 | msgid "Update Interval must be greater than or equal to 0" |
1428 | msgstr "" |
1429 | |
1430 | -#: server/modules/datasetview.module.php:345 |
1431 | +#: server/modules/datasetview.module.php:324 |
1432 | #: server/modules/ticker.module.php:359 |
1433 | msgid "Cannot user ordering criteria in the Filter Clause" |
1434 | msgstr "" |
1435 | @@ -4452,8 +4474,11 @@ |
1436 | msgstr "" |
1437 | |
1438 | #: server/modules/module_user_general.php:314 |
1439 | +msgid "User does not have a group and Xibo is unable to add one." |
1440 | +msgstr "" |
1441 | + |
1442 | #: server/modules/module_user_general.php:371 |
1443 | -msgid "User does not have a group and Xibo is unable to add one." |
1444 | +msgid "User does not have a group and we are unable to add one." |
1445 | msgstr "" |
1446 | |
1447 | #: server/modules/module_user_general.php:456 |
1448 | @@ -4857,13 +4882,11 @@ |
1449 | msgstr "" |
1450 | |
1451 | #: server/theme/default/html/displaygroup_form_display_assign.php:33 |
1452 | -#: server/theme/default/html/display_form_group_assign.php:33 |
1453 | -msgid "Assigned Groups" |
1454 | +msgid "Assigned Displays" |
1455 | msgstr "" |
1456 | |
1457 | #: server/theme/default/html/displaygroup_form_display_assign.php:41 |
1458 | -#: server/theme/default/html/display_form_group_assign.php:41 |
1459 | -msgid "Available Groups" |
1460 | +msgid "Available Displays" |
1461 | msgstr "" |
1462 | |
1463 | #: server/theme/default/html/displaygroup_page.php:37 |
1464 | @@ -4998,6 +5021,14 @@ |
1465 | msgid "Longitude" |
1466 | msgstr "" |
1467 | |
1468 | +#: server/theme/default/html/display_form_group_assign.php:33 |
1469 | +msgid "Assigned Groups" |
1470 | +msgstr "" |
1471 | + |
1472 | +#: server/theme/default/html/display_form_group_assign.php:41 |
1473 | +msgid "Available Groups" |
1474 | +msgstr "" |
1475 | + |
1476 | #: server/theme/default/html/display_form_mediainventory.php:35 |
1477 | msgid "Id" |
1478 | msgstr "" |
1479 | |
1480 | === modified file 'example_oauth/index.php' |
1481 | --- example_oauth/index.php 2013-05-25 09:42:36 +0000 |
1482 | +++ example_oauth/index.php 2014-07-15 15:37:36 +0000 |
1483 | @@ -2,6 +2,7 @@ |
1484 | require_once('oauth-php/library/OAuthStore.php'); |
1485 | require_once('oauth-php/library/OAuthRequester.php'); |
1486 | require_once('oauth-php/library/OAuthRequestLogger.php'); |
1487 | +require_once('nice-json.php'); |
1488 | |
1489 | DEFINE('OAUTH_LOG_REQUEST', true); |
1490 | |
1491 | @@ -12,14 +13,18 @@ |
1492 | |
1493 | OAuthStore::instance('MySQL', $connection); |
1494 | |
1495 | -DEFINE('SERVER_BASE', 'http://localhost/xibo/1.5/server-151-api/server/'); |
1496 | -DEFINE('CONSUMER_KEY', 'e5adc06021aa90157114862e5a22287d0519918d2'); |
1497 | -DEFINE('CONSUMER_SECRET', '9411a8a5d9a8fc63c105cb3119a89395'); |
1498 | +DEFINE('SERVER_BASE', 'http://localhost/xibo/1.6/server-162/server/'); |
1499 | +DEFINE('CONSUMER_KEY', 'e982575d2ab70546923b92e50c5b96ca053b407a8'); |
1500 | +DEFINE('CONSUMER_SECRET', 'a891f97e69985230a2e0e869b9f875e3'); |
1501 | //DEFINE('SERVER_BASE', 'http://unittest2.xibo.org.uk/api/'); |
1502 | //DEFINE('CONSUMER_KEY', '201798cda77e4e82e0488d0c8c2e43ae0519d180f'); |
1503 | //DEFINE('CONSUMER_SECRET', '9eb4aa8a51e4a393b3fb5ad6f1a75bae'); |
1504 | - |
1505 | -switch($_GET['action']) |
1506 | +// |
1507 | + |
1508 | +// $RESPONSE = 'xml'; |
1509 | +define('RESPONSE', 'json'); |
1510 | + |
1511 | +switch((isset($_GET['action']) ? $_GET['action'] : '')) |
1512 | { |
1513 | case 'AddServer': |
1514 | AddServerToOAuth(); |
1515 | @@ -37,11 +42,16 @@ |
1516 | MakeSignedRequest(); |
1517 | break; |
1518 | |
1519 | + case '': |
1520 | + die('No action'); |
1521 | + |
1522 | default: |
1523 | $action = $_GET['action']; |
1524 | $action(); |
1525 | } |
1526 | |
1527 | +die(); |
1528 | + |
1529 | function AddServerToOAuth() |
1530 | { |
1531 | // Get the id of the current user (must be an int) |
1532 | @@ -82,7 +92,7 @@ |
1533 | } |
1534 | |
1535 | // Callback to our (consumer) site, will be called when the user finished the authorization at the server |
1536 | - $callback_uri = 'http://localhost/xibo/1.5/server-151-api/example_oauth/?action=Exchange&consumer_key='.rawurlencode(CONSUMER_KEY).'&usr_id='.intval($user_id); |
1537 | + $callback_uri = '?action=Exchange&consumer_key='.rawurlencode(CONSUMER_KEY).'&usr_id='.intval($user_id); |
1538 | |
1539 | // Now redirect to the autorization uri and get us authorized |
1540 | if (!empty($token['authorize_uri'])) |
1541 | @@ -142,7 +152,7 @@ |
1542 | $params = array( |
1543 | 'service' => 'rest', |
1544 | 'method' => 'Version', |
1545 | - 'response' => 'xml' |
1546 | + 'response' => RESPONSE |
1547 | ); |
1548 | |
1549 | // Obtain a request object for the request we want to make |
1550 | @@ -167,7 +177,7 @@ |
1551 | $params = array( |
1552 | 'service' => 'rest', |
1553 | 'method' => 'LayoutList', |
1554 | - 'response' => 'xml' |
1555 | + 'response' => RESPONSE |
1556 | ); |
1557 | |
1558 | // Obtain a request object for the request we want to make |
1559 | @@ -203,7 +213,7 @@ |
1560 | $params = array( |
1561 | 'service' => 'rest', |
1562 | 'method' => 'LayoutRegionList', |
1563 | - 'response' => 'xml', |
1564 | + 'response' => RESPONSE, |
1565 | 'layoutid' => 11 |
1566 | ); |
1567 | |
1568 | @@ -234,7 +244,7 @@ |
1569 | $params = array( |
1570 | 'service' => 'rest', |
1571 | 'method' => 'LayoutAdd', |
1572 | - 'response' => 'xml', |
1573 | + 'response' => RESPONSE, |
1574 | 'layout' => 'API test' |
1575 | ); |
1576 | |
1577 | @@ -246,7 +256,7 @@ |
1578 | $params = array( |
1579 | 'service' => 'rest', |
1580 | 'method' => 'LayoutRegionAdd', |
1581 | - 'response' => 'xml', |
1582 | + 'response' => RESPONSE, |
1583 | 'layoutid' => 11, |
1584 | 'top' => 102, |
1585 | 'name' => 'apitest' |
1586 | @@ -261,7 +271,7 @@ |
1587 | $params = array( |
1588 | 'service' => 'rest', |
1589 | 'method' => 'LayoutRegionEdit', |
1590 | - 'response' => 'xml', |
1591 | + 'response' => RESPONSE, |
1592 | 'layoutid' => 124, |
1593 | 'regionid' => '519d199c5cb50', |
1594 | 'width' => 400, |
1595 | @@ -280,7 +290,7 @@ |
1596 | $params = array( |
1597 | 'service' => 'rest', |
1598 | 'method' => 'LayoutRegionDelete', |
1599 | - 'response' => 'xml', |
1600 | + 'response' => RESPONSE, |
1601 | 'layoutid' => 124, |
1602 | 'regionid' => '519d1bb00e7a9' |
1603 | ); |
1604 | @@ -292,7 +302,7 @@ |
1605 | $params = array( |
1606 | 'service' => 'rest', |
1607 | 'method' => 'LayoutRegionTimelineList', |
1608 | - 'response' => 'xml', |
1609 | + 'response' => RESPONSE, |
1610 | 'layoutid' => 11, |
1611 | 'regionid' => '519d211ded076' |
1612 | ); |
1613 | @@ -305,7 +315,7 @@ |
1614 | $params = array( |
1615 | 'service' => 'rest', |
1616 | 'method' => 'LayoutRegionMediaAdd', |
1617 | - 'response' => 'xml', |
1618 | + 'response' => RESPONSE, |
1619 | 'layoutid' => 11, |
1620 | 'regionid' => '519d211ded076', |
1621 | 'type' => 'webpage', |
1622 | @@ -324,7 +334,7 @@ |
1623 | $params = array( |
1624 | 'service' => 'rest', |
1625 | 'method' => 'LayoutRegionMediaDetails', |
1626 | - 'response' => 'xml', |
1627 | + 'response' => RESPONSE, |
1628 | 'layoutid' => 11, |
1629 | 'regionid' => '519d211ded076', |
1630 | 'mediaid' => 'b2036df53ae2bdcbb5322a183709afbc', |
1631 | @@ -340,7 +350,7 @@ |
1632 | $params = array( |
1633 | 'service' => 'rest', |
1634 | 'method' => 'LayoutRegionMediaEdit', |
1635 | - 'response' => 'xml', |
1636 | + 'response' => RESPONSE, |
1637 | 'layoutid' => 11, |
1638 | 'regionid' => '519d211ded076', |
1639 | 'type' => 'webpage', |
1640 | @@ -355,6 +365,211 @@ |
1641 | callService($params, true); |
1642 | } |
1643 | |
1644 | +function DataSetList() { |
1645 | + $params = array( |
1646 | + 'service' => 'rest', |
1647 | + 'method' => 'DataSetList', |
1648 | + 'response' => RESPONSE |
1649 | + ); |
1650 | + |
1651 | + callService($params, true); |
1652 | +} |
1653 | + |
1654 | +function DataSetAdd() { |
1655 | + $params = array( |
1656 | + 'service' => 'rest', |
1657 | + 'method' => 'DataSetAdd', |
1658 | + 'response' => RESPONSE, |
1659 | + 'dataSet' => 'API Test', |
1660 | + 'description' => 'A test description.' |
1661 | + ); |
1662 | + |
1663 | + callService($params, true); |
1664 | +} |
1665 | + |
1666 | +function DataSetEdit() { |
1667 | + $params = array( |
1668 | + 'service' => 'rest', |
1669 | + 'method' => 'DataSetEdit', |
1670 | + 'response' => RESPONSE, |
1671 | + 'dataSetId' => 3, |
1672 | + 'dataSet' => 'API Test', |
1673 | + 'description' => 'A test description.' |
1674 | + ); |
1675 | + |
1676 | + callService($params, true); |
1677 | +} |
1678 | + |
1679 | +function DataSetDelete() { |
1680 | + $params = array( |
1681 | + 'service' => 'rest', |
1682 | + 'method' => 'DataSetDelete', |
1683 | + 'response' => RESPONSE, |
1684 | + 'dataSetId' => 3 |
1685 | + ); |
1686 | + |
1687 | + callService($params, true); |
1688 | +} |
1689 | + |
1690 | +function DataSetColumnList() { |
1691 | + $params = array( |
1692 | + 'service' => 'rest', |
1693 | + 'method' => 'DataSetColumnList', |
1694 | + 'response' => RESPONSE, |
1695 | + 'dataSetId' => 1 |
1696 | + ); |
1697 | + |
1698 | + callService($params, true); |
1699 | +} |
1700 | + |
1701 | +function DataSetColumnAdd() { |
1702 | + $params = array( |
1703 | + 'service' => 'rest', |
1704 | + 'method' => 'DataSetColumnAdd', |
1705 | + 'response' => RESPONSE, |
1706 | + 'dataSetId' => 4, |
1707 | + 'heading' => 'API Column 1' |
1708 | + ); |
1709 | + |
1710 | + callService($params, true); |
1711 | +} |
1712 | + |
1713 | +function DataSetColumnEdit() { |
1714 | + $params = array( |
1715 | + 'service' => 'rest', |
1716 | + 'method' => 'DataSetColumnEdit', |
1717 | + 'response' => RESPONSE, |
1718 | + 'dataTypeId' => 1, |
1719 | + 'dataSetColumnTypeId' => 1, |
1720 | + 'dataSetId' => 4, |
1721 | + 'dataSetColumnId' => 3, |
1722 | + 'heading' => 'API Column 1 Edited' |
1723 | + ); |
1724 | + |
1725 | + callService($params, true); |
1726 | +} |
1727 | + |
1728 | +function DataSetColumnDelete() { |
1729 | + $params = array( |
1730 | + 'service' => 'rest', |
1731 | + 'method' => 'DataSetColumnDelete', |
1732 | + 'response' => RESPONSE, |
1733 | + 'dataSetId' => 4, |
1734 | + 'dataSetColumnId' => 3 |
1735 | + ); |
1736 | + |
1737 | + callService($params, true); |
1738 | +} |
1739 | + |
1740 | +function DataSetDataList() { |
1741 | + $params = array( |
1742 | + 'service' => 'rest', |
1743 | + 'method' => 'DataSetDataList', |
1744 | + 'response' => RESPONSE, |
1745 | + 'dataSetId' => 1 |
1746 | + ); |
1747 | + |
1748 | + callService($params, true); |
1749 | +} |
1750 | + |
1751 | +function DataSetSecurityList() { |
1752 | + $params = array( |
1753 | + 'service' => 'rest', |
1754 | + 'method' => 'DataSetSecurityList', |
1755 | + 'response' => RESPONSE, |
1756 | + 'dataSetId' => 4 |
1757 | + ); |
1758 | + |
1759 | + callService($params, true); |
1760 | +} |
1761 | + |
1762 | +function DataSetSecurityAdd() { |
1763 | + $params = array( |
1764 | + 'service' => 'rest', |
1765 | + 'method' => 'DataSetSecurityAdd', |
1766 | + 'response' => RESPONSE, |
1767 | + 'dataSetId' => 4, |
1768 | + 'groupId' => 1, |
1769 | + 'view' => 1, |
1770 | + 'edit' => 1, |
1771 | + 'delete' => 1 |
1772 | + ); |
1773 | + |
1774 | + callService($params, true); |
1775 | +} |
1776 | + |
1777 | +function DataSetSecurityDelete() { |
1778 | + $params = array( |
1779 | + 'service' => 'rest', |
1780 | + 'method' => 'DataSetSecurityDelete', |
1781 | + 'response' => RESPONSE, |
1782 | + 'dataSetId' => 4, |
1783 | + 'groupId' => 1 |
1784 | + ); |
1785 | + |
1786 | + callService($params, true); |
1787 | +} |
1788 | + |
1789 | +function DataSetImportCsv() { |
1790 | + |
1791 | + $mappings = array( |
1792 | + '0' => '1', |
1793 | + '2' => '4', |
1794 | + '1' => '5' |
1795 | + ); |
1796 | + |
1797 | + $params = array( |
1798 | + 'service' => 'rest', |
1799 | + 'method' => 'DataSetImportCsv', |
1800 | + 'response' => RESPONSE, |
1801 | + 'dataSetId' => 1, |
1802 | + 'fileId' => 3, |
1803 | + 'spreadSheetMapping' => json_encode($mappings), |
1804 | + 'overwrite' => 0, |
1805 | + 'ignoreFirstRow' => 1, |
1806 | + ); |
1807 | + |
1808 | + callService($params, true); |
1809 | +} |
1810 | + |
1811 | +function LibraryMediaFileUpload() { |
1812 | + |
1813 | + // Get the test file |
1814 | + $file = file_get_contents('test_files/test.csv'); |
1815 | + $payload = base64_encode($file); |
1816 | + |
1817 | + $params = array( |
1818 | + 'service' => 'rest', |
1819 | + 'method' => 'LibraryMediaFileUpload', |
1820 | + 'response' => RESPONSE, |
1821 | + 'fileId' => NULL, |
1822 | + 'checksum' => md5($payload), |
1823 | + 'payload' => $payload |
1824 | + ); |
1825 | + |
1826 | + callService($params, true); |
1827 | +} |
1828 | + |
1829 | +function DataTypeList() { |
1830 | + $params = array( |
1831 | + 'service' => 'rest', |
1832 | + 'method' => 'DataTypeList', |
1833 | + 'response' => RESPONSE |
1834 | + ); |
1835 | + |
1836 | + callService($params, true); |
1837 | +} |
1838 | + |
1839 | +function DataSetColumnTypeList() { |
1840 | + $params = array( |
1841 | + 'service' => 'rest', |
1842 | + 'method' => 'DataSetColumnTypeList', |
1843 | + 'response' => RESPONSE |
1844 | + ); |
1845 | + |
1846 | + callService($params, true); |
1847 | +} |
1848 | + |
1849 | function callService($params, $echo = false) { |
1850 | // The request uri being called. |
1851 | $user_id = 1; |
1852 | @@ -366,9 +581,15 @@ |
1853 | // Sign the request, perform a curl request and return the results, throws OAuthException exception on an error |
1854 | $return = $req->doRequest($user_id); |
1855 | |
1856 | - if ($echo) |
1857 | + if ($echo) { |
1858 | var_dump($return); |
1859 | |
1860 | + if (RESPONSE == 'json') |
1861 | + echo '<pre>' . json_format($return['body']) . '</pre>'; |
1862 | + else |
1863 | + echo $return['body']; |
1864 | + } |
1865 | + |
1866 | return $return; |
1867 | } |
1868 | ?> |
1869 | |
1870 | === added file 'example_oauth/nice-json.php' |
1871 | --- example_oauth/nice-json.php 1970-01-01 00:00:00 +0000 |
1872 | +++ example_oauth/nice-json.php 2014-07-15 15:37:36 +0000 |
1873 | @@ -0,0 +1,73 @@ |
1874 | +<?php |
1875 | + |
1876 | +// original code: http://www.daveperrett.com/articles/2008/03/11/format-json-with-php/ |
1877 | +// adapted to allow native functionality in php version >= 5.4.0 |
1878 | + |
1879 | +/** |
1880 | +* Format a flat JSON string to make it more human-readable |
1881 | +* |
1882 | +* @param string $json The original JSON string to process |
1883 | +* When the input is not a string it is assumed the input is RAW |
1884 | +* and should be converted to JSON first of all. |
1885 | +* @return string Indented version of the original JSON string |
1886 | +*/ |
1887 | +function json_format($json) { |
1888 | + if (!is_string($json)) { |
1889 | + if (phpversion() && phpversion() >= 5.4) { |
1890 | + return json_encode($json, JSON_PRETTY_PRINT); |
1891 | + } |
1892 | + $json = json_encode($json); |
1893 | + } |
1894 | + $result = ''; |
1895 | + $pos = 0; // indentation level |
1896 | + $strLen = strlen($json); |
1897 | + $indentStr = "\t"; |
1898 | + $newLine = "\n"; |
1899 | + $prevChar = ''; |
1900 | + $outOfQuotes = true; |
1901 | + |
1902 | + for ($i = 0; $i < $strLen; $i++) { |
1903 | + // Grab the next character in the string |
1904 | + $char = substr($json, $i, 1); |
1905 | + |
1906 | + // Are we inside a quoted string? |
1907 | + if ($char == '"' && $prevChar != '\\') { |
1908 | + $outOfQuotes = !$outOfQuotes; |
1909 | + } |
1910 | + // If this character is the end of an element, |
1911 | + // output a new line and indent the next line |
1912 | + else if (($char == '}' || $char == ']') && $outOfQuotes) { |
1913 | + $result .= $newLine; |
1914 | + $pos--; |
1915 | + for ($j = 0; $j < $pos; $j++) { |
1916 | + $result .= $indentStr; |
1917 | + } |
1918 | + } |
1919 | + // eat all non-essential whitespace in the input as we do our own here and it would only mess up our process |
1920 | + else if ($outOfQuotes && false !== strpos(" \t\r\n", $char)) { |
1921 | + continue; |
1922 | + } |
1923 | + |
1924 | + // Add the character to the result string |
1925 | + $result .= $char; |
1926 | + // always add a space after a field colon: |
1927 | + if ($char == ':' && $outOfQuotes) { |
1928 | + $result .= ' '; |
1929 | + } |
1930 | + |
1931 | + // If the last character was the beginning of an element, |
1932 | + // output a new line and indent the next line |
1933 | + if (($char == ',' || $char == '{' || $char == '[') && $outOfQuotes) { |
1934 | + $result .= $newLine; |
1935 | + if ($char == '{' || $char == '[') { |
1936 | + $pos++; |
1937 | + } |
1938 | + for ($j = 0; $j < $pos; $j++) { |
1939 | + $result .= $indentStr; |
1940 | + } |
1941 | + } |
1942 | + $prevChar = $char; |
1943 | + } |
1944 | + |
1945 | + return $result; |
1946 | +} |
1947 | |
1948 | === added directory 'example_oauth/test_files' |
1949 | === added file 'example_oauth/test_files/test.csv' |
1950 | --- example_oauth/test_files/test.csv 1970-01-01 00:00:00 +0000 |
1951 | +++ example_oauth/test_files/test.csv 2014-07-15 15:37:36 +0000 |
1952 | @@ -0,0 +1,6 @@ |
1953 | +Col1,Col2,Col3,Col4 |
1954 | +Row1-1,Row1-2,Row1-3,Row1-4 |
1955 | +Row2-1,Row2-2,Row2-3,Row2-4 |
1956 | +Row3-1,Row3-2,Row3-3,Row3-4 |
1957 | +Row4-1,Row4-2,Row4-3,Row4-4 |
1958 | +Row5-1,Row5-2,Row5-3,Row5-4 |
1959 | \ No newline at end of file |
1960 | |
1961 | === modified file 'server/3rdparty/simplepie/library/SimplePie/File.php' |
1962 | --- server/3rdparty/simplepie/library/SimplePie/File.php 2014-03-23 13:52:47 +0000 |
1963 | +++ server/3rdparty/simplepie/library/SimplePie/File.php 2014-07-15 15:37:36 +0000 |
1964 | @@ -137,6 +137,10 @@ |
1965 | { |
1966 | $info = curl_getinfo($fp); |
1967 | curl_close($fp); |
1968 | + |
1969 | + // DG: Patch to strip double headers |
1970 | + $this->headers = SimplePie_HTTP_Parser::strip_double_headers($this->headers); |
1971 | + |
1972 | $this->headers = explode("\r\n\r\n", $this->headers, $info['redirect_count'] + 1); |
1973 | $this->headers = array_pop($this->headers); |
1974 | $parser = new SimplePie_HTTP_Parser($this->headers); |
1975 | |
1976 | === modified file 'server/3rdparty/simplepie/library/SimplePie/HTTP/Parser.php' |
1977 | --- server/3rdparty/simplepie/library/SimplePie/HTTP/Parser.php 2013-05-11 15:26:38 +0000 |
1978 | +++ server/3rdparty/simplepie/library/SimplePie/HTTP/Parser.php 2014-07-15 15:37:36 +0000 |
1979 | @@ -497,4 +497,25 @@ |
1980 | } |
1981 | } |
1982 | } |
1983 | + |
1984 | + public static function strip_double_headers($input) { |
1985 | + // I have tried to make this regular expression as specific as possible |
1986 | + // to avoid any case where it does weird stuff if you happen to put |
1987 | + // HTTP/1.1 200 at the start of any line in your RSS file. This should |
1988 | + // also make it faster because it can abandon regex processing as soon |
1989 | + // as it hits something that doesn't look like an http header. The |
1990 | + // header definition is taken from RFC 822, except I didn't support |
1991 | + // folding which is never used in practice. |
1992 | + $crlf = "\r\n"; |
1993 | + return preg_replace( |
1994 | + // HTTP version and status code (ignore value of code). |
1995 | + '~^HTTP/1\..*' . $crlf . |
1996 | + // Header name: character between 33 and 126 decimal, except colon. |
1997 | + // Colon. Header value: any character except \r and \n. CRLF. |
1998 | + '(?:[\x21-\x39\x3b-\x7e]+:[^' . $crlf . ']+' . $crlf . ')*' . |
1999 | + // Headers are terminated by another CRLF (blank line). |
2000 | + $crlf . |
2001 | + // Second HTTP status code, this time must be 200. |
2002 | + '(HTTP/1.[01] 200 )~', '$1', $input); |
2003 | + } |
2004 | } |
2005 | |
2006 | === modified file 'server/config/config.class.php' |
2007 | --- server/config/config.class.php 2014-02-15 11:25:09 +0000 |
2008 | +++ server/config/config.class.php 2014-07-15 15:37:36 +0000 |
2009 | @@ -127,29 +127,18 @@ |
2010 | $output .= '<div class="checks">'; |
2011 | |
2012 | // Check for PHP version |
2013 | - $message = __('PHP Version 5.2.4 or later'); |
2014 | + $message = __('PHP Version'); |
2015 | |
2016 | if ($this->CheckPHP() == 1) |
2017 | { |
2018 | $output .= $imgGood.$message.'<br />'; |
2019 | } |
2020 | - else if ($this->CheckPHP() == 2) |
2021 | - { |
2022 | - $this->envWarning = true; |
2023 | - $output .= $imgWarn.$message.'<br />'; |
2024 | - $output .= <<<END |
2025 | - <div class="check_explain"> |
2026 | - <p>Xibo requires PHP version 5.2.4 or later. It may run on PHP 5.1.0 and we have provided compatibility functions to enable that.</p> |
2027 | - <p>However, we recommend upgrading your version of PHP to 5.2.4 or later.</p> |
2028 | - </div> |
2029 | -END; |
2030 | - } |
2031 | else |
2032 | { |
2033 | $this->envFault = true; |
2034 | |
2035 | $output .= $imgBad.$message.'<br />'; |
2036 | - $output .= '<div class="check_explain"> <p>' . __("PHP version 5.2.4 or later required.") . '</p></div>'; |
2037 | + $output .= '<div class="check_explain"> <p>' . __("PHP version 5.3.3 or later required.") . '. Detected ' . phpversion() . '</p></div>'; |
2038 | } |
2039 | |
2040 | // Check for file system permissions |
2041 | @@ -474,17 +463,7 @@ |
2042 | */ |
2043 | function CheckPHP() |
2044 | { |
2045 | - if (phpversion() >= '5.2.4') |
2046 | - { |
2047 | - return 1; |
2048 | - } |
2049 | - |
2050 | - if (phpversion() >= '5.1.0') |
2051 | - { |
2052 | - return 2; |
2053 | - } |
2054 | - |
2055 | - return 0; |
2056 | + return ((version_compare('5.3.3', phpversion(), '>='))) ? 1 : 0; |
2057 | } |
2058 | |
2059 | /** |
2060 | |
2061 | === modified file 'server/install.php' |
2062 | --- server/install.php 2013-08-21 22:27:13 +0000 |
2063 | +++ server/install.php 2014-07-15 15:37:36 +0000 |
2064 | @@ -22,7 +22,7 @@ |
2065 | |
2066 | if (! checkPHP()) |
2067 | { |
2068 | - die('Xibo requires PHP 5.2.4 or later'); |
2069 | + die('Xibo requires PHP 5.3.3 or later'); |
2070 | } |
2071 | |
2072 | error_reporting(0); |
2073 | @@ -693,7 +693,7 @@ |
2074 | |
2075 | function checkPHP() |
2076 | { |
2077 | - return (version_compare("5.2.4",phpversion(), "<=")); |
2078 | + return (version_compare("5.3.3",phpversion(), "<=")); |
2079 | } |
2080 | |
2081 | function CheckGettext() |
2082 | |
2083 | === added file 'server/install/database/70.sql' |
2084 | --- server/install/database/70.sql 1970-01-01 00:00:00 +0000 |
2085 | +++ server/install/database/70.sql 2014-07-15 15:37:36 +0000 |
2086 | @@ -0,0 +1,15 @@ |
2087 | +ALTER TABLE `dataset` ADD `LastDataEdit` INT NOT NULL DEFAULT '0'; |
2088 | + |
2089 | +CREATE TABLE IF NOT EXISTS `lkdatasetlayout` ( |
2090 | + `LkDataSetLayoutID` int(11) NOT NULL AUTO_INCREMENT, |
2091 | + `DataSetID` int(11) NOT NULL, |
2092 | + `LayoutID` int(11) NOT NULL, |
2093 | + `RegionID` varchar(50) NOT NULL, |
2094 | + `MediaID` varchar(50) NOT NULL, |
2095 | + PRIMARY KEY (`LkDataSetLayoutID`) |
2096 | +) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; |
2097 | + |
2098 | + |
2099 | +UPDATE `version` SET `app_ver` = '1.6.2', `XmdsVersion` = 3; |
2100 | +UPDATE `setting` SET `value` = 0 WHERE `setting` = 'PHONE_HOME_DATE'; |
2101 | +UPDATE `version` SET `DBVersion` = '70'; |
2102 | |
2103 | === modified file 'server/install/master/data.sql' |
2104 | --- server/install/master/data.sql 2014-05-26 10:12:05 +0000 |
2105 | +++ server/install/master/data.sql 2014-07-15 15:37:36 +0000 |
2106 | @@ -1,5 +1,5 @@ |
2107 | INSERT INTO `version` (`app_ver`, `XmdsVersion`, `XlfVersion`, `DBVersion`) VALUES |
2108 | -('1.6.1', 3, 1, 69); |
2109 | +('1.6.2', 3, 1, 70); |
2110 | |
2111 | INSERT INTO `group` (`groupID`, `group`, `IsUserSpecific`, `IsEveryone`) VALUES |
2112 | (1, 'Users', 0, 0), |
2113 | |
2114 | === modified file 'server/lib/app/session.class.php' |
2115 | --- server/lib/app/session.class.php 2014-01-18 09:47:41 +0000 |
2116 | +++ server/lib/app/session.class.php 2014-07-15 15:37:36 +0000 |
2117 | @@ -75,7 +75,7 @@ |
2118 | $sth->execute(array('session_id' => $key)); |
2119 | |
2120 | if (!$row = $sth->fetch()) |
2121 | - throw new Exception('No session returned'); |
2122 | + return settype($empty, "string"); |
2123 | |
2124 | // What happens if the UserAgent has changed? |
2125 | if ($row['useragent'] != $userAgent) { |
2126 | |
2127 | === modified file 'server/lib/data/dataset.data.class.php' |
2128 | --- server/lib/data/dataset.data.class.php 2014-01-18 09:47:41 +0000 |
2129 | +++ server/lib/data/dataset.data.class.php 2014-07-15 15:37:36 +0000 |
2130 | @@ -152,6 +152,7 @@ |
2131 | $security->UnlinkAll($dataSetId); |
2132 | |
2133 | // Delete columns |
2134 | + Kit::ClassLoader('datasetcolumn'); |
2135 | $dataSetObject = new DataSetColumn($this->db); |
2136 | if (!$dataSetObject->DeleteAll($dataSetId)) |
2137 | return $this->SetError(25005, __('Cannot delete dataset, columns could not be deleted.')); |
2138 | @@ -175,6 +176,129 @@ |
2139 | } |
2140 | } |
2141 | |
2142 | + public function LinkLayout($dataSetId, $layoutId, $regionId, $mediaId) { |
2143 | + try { |
2144 | + $dbh = PDOConnect::init(); |
2145 | + |
2146 | + $sth = $dbh->prepare('INSERT INTO `lkdatasetlayout` (DataSetID, LayoutID, RegionID, MediaID) VALUES (:datasetid, :layoutid, :regionid, :mediaid)'); |
2147 | + $sth->execute(array( |
2148 | + 'datasetid' => $dataSetId, |
2149 | + 'layoutid' => $layoutId, |
2150 | + 'regionid' => $regionId, |
2151 | + 'mediaid' => $mediaId |
2152 | + )); |
2153 | + } |
2154 | + catch (Exception $e) { |
2155 | + |
2156 | + Debug::LogEntry('error', $e->getMessage()); |
2157 | + |
2158 | + if (!$this->IsError()) |
2159 | + $this->SetError(1, __('Unknown Error')); |
2160 | + |
2161 | + return false; |
2162 | + } |
2163 | + } |
2164 | + |
2165 | + public function UnlinkLayout($dataSetId, $layoutId, $regionId, $mediaId) { |
2166 | + try { |
2167 | + $dbh = PDOConnect::init(); |
2168 | + |
2169 | + $sth = $dbh->prepare('DELETE FROM `lkdatasetlayout` WHERE DataSetID = :datasetid AND LayoutID = :layoutid AND RegionID = :regionid AND MediaID = :mediaid'); |
2170 | + $sth->execute(array( |
2171 | + 'datasetid' => $dataSetId, |
2172 | + 'layoutid' => $layoutId, |
2173 | + 'regionid' => $regionId, |
2174 | + 'mediaid' => $mediaId |
2175 | + )); |
2176 | + } |
2177 | + catch (Exception $e) { |
2178 | + |
2179 | + Debug::LogEntry('error', $e->getMessage()); |
2180 | + |
2181 | + if (!$this->IsError()) |
2182 | + $this->SetError(1, __('Unknown Error')); |
2183 | + |
2184 | + return false; |
2185 | + } |
2186 | + } |
2187 | + |
2188 | + public function GetDataSetFromLayout($layoutId, $regionId, $mediaId) { |
2189 | + try { |
2190 | + $dbh = PDOConnect::init(); |
2191 | + |
2192 | + $sth = $dbh->prepare('SELECT `dataset`.* FROM `lkdatasetlayout` INNER JOIN `dataset` ON lkdatasetlayout.DataSetId = dataset.DataSetID WHERE LayoutID = :layoutid AND RegionID = :regionid AND MediaID = :mediaid'); |
2193 | + $sth->execute(array( |
2194 | + 'layoutid' => $layoutId, |
2195 | + 'regionid' => $regionId, |
2196 | + 'mediaid' => $mediaId |
2197 | + )); |
2198 | + |
2199 | + return $sth->fetchAll(); |
2200 | + } |
2201 | + catch (Exception $e) { |
2202 | + |
2203 | + Debug::LogEntry('error', $e->getMessage()); |
2204 | + |
2205 | + if (!$this->IsError()) |
2206 | + $this->SetError(1, __('Unknown Error')); |
2207 | + |
2208 | + return false; |
2209 | + } |
2210 | + } |
2211 | + |
2212 | + public function GetCampaignsForDataSet($dataSetId) { |
2213 | + try { |
2214 | + $dbh = PDOConnect::init(); |
2215 | + |
2216 | + $sth = $dbh->prepare('SELECT `lkcampaignlayout`.CampaignID FROM `lkdatasetlayout` INNER JOIN `lkcampaignlayout` ON `lkcampaignlayout`.LayoutID = `lkdatasetlayout`.LayoutID WHERE DataSetID = :datasetid'); |
2217 | + $sth->execute(array( |
2218 | + 'datasetid' => $dataSetId |
2219 | + )); |
2220 | + |
2221 | + $ids = array(); |
2222 | + |
2223 | + foreach ($sth->fetchAll() as $id) |
2224 | + $ids[] = $id['CampaignID']; |
2225 | + |
2226 | + return $ids; |
2227 | + } |
2228 | + catch (Exception $e) { |
2229 | + |
2230 | + Debug::LogEntry('error', $e->getMessage()); |
2231 | + |
2232 | + if (!$this->IsError()) |
2233 | + $this->SetError(1, __('Unknown Error')); |
2234 | + |
2235 | + return false; |
2236 | + } |
2237 | + } |
2238 | + |
2239 | + public function GetLastDataEditTime($dataSetId) { |
2240 | + try { |
2241 | + $dbh = PDOConnect::init(); |
2242 | + |
2243 | + $sth = $dbh->prepare('SELECT LastDataEdit FROM `dataset` WHERE DataSetID = :dataset_id'); |
2244 | + $sth->execute(array( |
2245 | + 'dataset_id' => $dataSetId |
2246 | + )); |
2247 | + |
2248 | + $updateDate = $sth->fetchColumn(0); |
2249 | + |
2250 | + Debug::LogEntry('audit', sprintf('Returning update date %s for DataSetId %d', $updateDate, $dataSetId), 'dataset', 'GetLastDataEditTime'); |
2251 | + |
2252 | + return $updateDate; |
2253 | + } |
2254 | + catch (Exception $e) { |
2255 | + |
2256 | + Debug::LogEntry('error', $e->getMessage()); |
2257 | + |
2258 | + if (!$this->IsError()) |
2259 | + $this->SetError(1, __('Unknown Error')); |
2260 | + |
2261 | + return false; |
2262 | + } |
2263 | + } |
2264 | + |
2265 | /** |
2266 | * Data Set Results |
2267 | * @param <type> $dataSetId |
2268 | @@ -327,5 +451,45 @@ |
2269 | |
2270 | return $results; |
2271 | } |
2272 | + |
2273 | + public function GetDataTypes() { |
2274 | + try { |
2275 | + $dbh = PDOConnect::init(); |
2276 | + |
2277 | + $sth = $dbh->prepare('SELECT datatypeid, datatype FROM datatype'); |
2278 | + $sth->execute(); |
2279 | + |
2280 | + return $sth->fetchAll(); |
2281 | + } |
2282 | + catch (Exception $e) { |
2283 | + |
2284 | + Debug::LogEntry('error', $e->getMessage()); |
2285 | + |
2286 | + if (!$this->IsError()) |
2287 | + $this->SetError(1, __('Unknown Error')); |
2288 | + |
2289 | + return false; |
2290 | + } |
2291 | + } |
2292 | + |
2293 | + public function GetDataSetColumnTypes() { |
2294 | + try { |
2295 | + $dbh = PDOConnect::init(); |
2296 | + |
2297 | + $sth = $dbh->prepare('SELECT datasetcolumntypeid, datasetcolumntype FROM datasetcolumntype'); |
2298 | + $sth->execute(); |
2299 | + |
2300 | + return $sth->fetchAll(); |
2301 | + } |
2302 | + catch (Exception $e) { |
2303 | + |
2304 | + Debug::LogEntry('error', $e->getMessage()); |
2305 | + |
2306 | + if (!$this->IsError()) |
2307 | + $this->SetError(1, __('Unknown Error')); |
2308 | + |
2309 | + return false; |
2310 | + } |
2311 | + } |
2312 | } |
2313 | -?> |
2314 | \ No newline at end of file |
2315 | +?> |
2316 | |
2317 | === modified file 'server/lib/data/datasetcolumn.data.class.php' |
2318 | --- server/lib/data/datasetcolumn.data.class.php 2014-01-18 09:47:41 +0000 |
2319 | +++ server/lib/data/datasetcolumn.data.class.php 2014-07-15 15:37:36 +0000 |
2320 | @@ -26,6 +26,18 @@ |
2321 | { |
2322 | Debug::LogEntry('audit', sprintf('IN - DataSetID = %d', $dataSetId), 'DataSetColumn', 'Add'); |
2323 | |
2324 | + if ($dataSetId == 0 || $dataSetId == '') |
2325 | + return $this->SetError(25001, __('Missing dataSetId')); |
2326 | + |
2327 | + if ($dataTypeId == 0 || $dataTypeId == '') |
2328 | + return $this->SetError(25001, __('Missing dataTypeId')); |
2329 | + |
2330 | + if ($dataSetColumnTypeId == 0 || $dataSetColumnTypeId == '') |
2331 | + return $this->SetError(25001, __('Missing dataSetColumnTypeId')); |
2332 | + |
2333 | + if ($heading == '') |
2334 | + return $this->SetError(25001, __('Please provide a column heading.')); |
2335 | + |
2336 | try { |
2337 | $dbh = PDOConnect::init(); |
2338 | |
2339 | @@ -77,6 +89,18 @@ |
2340 | |
2341 | public function Edit($dataSetColumnId, $heading, $dataTypeId, $listContent, $columnOrder, $dataSetColumnTypeId, $formula = '') |
2342 | { |
2343 | + if ($dataSetColumnId == 0 || $dataSetColumnId == '') |
2344 | + return $this->SetError(25001, __('Missing dataSetColumnId')); |
2345 | + |
2346 | + if ($dataTypeId == 0 || $dataTypeId == '') |
2347 | + return $this->SetError(25001, __('Missing dataTypeId')); |
2348 | + |
2349 | + if ($dataSetColumnTypeId == 0 || $dataSetColumnTypeId == '') |
2350 | + return $this->SetError(25001, __('Missing dataSetColumnTypeId')); |
2351 | + |
2352 | + if ($heading == '') |
2353 | + return $this->SetError(25001, __('Please provide a column heading.')); |
2354 | + |
2355 | try { |
2356 | $dbh = PDOConnect::init(); |
2357 | |
2358 | @@ -122,7 +146,7 @@ |
2359 | 'formula' => $formula |
2360 | )); |
2361 | |
2362 | - Debug::LogEntry('audit', 'Complete', 'DataSetColumn', 'Edit'); |
2363 | + Debug::LogEntry('audit', 'Complete for ' . $heading, 'DataSetColumn', 'Edit'); |
2364 | |
2365 | return true; |
2366 | } |
2367 | @@ -134,6 +158,9 @@ |
2368 | |
2369 | public function Delete($dataSetColumnId) |
2370 | { |
2371 | + if ($dataSetColumnId == 0 || $dataSetColumnId == '') |
2372 | + return $this->SetError(25001, __('Missing dataSetColumnId')); |
2373 | + |
2374 | try { |
2375 | $dbh = PDOConnect::init(); |
2376 | |
2377 | @@ -155,6 +182,9 @@ |
2378 | // Delete All Data Set columns |
2379 | public function DeleteAll($dataSetId) |
2380 | { |
2381 | + if ($dataSetId == 0 || $dataSetId == '') |
2382 | + return $this->SetError(25001, __('Missing dataSetId')); |
2383 | + |
2384 | try { |
2385 | $dbh = PDOConnect::init(); |
2386 | |
2387 | @@ -172,5 +202,61 @@ |
2388 | return $this->SetError(25005, __('Could not delete DataSet Column')); |
2389 | } |
2390 | } |
2391 | + |
2392 | + public function GetColumns($dataSetId) { |
2393 | + |
2394 | + if ($dataSetId == 0 || $dataSetId == '') |
2395 | + return $this->SetError(25001, __('Missing dataSetId')); |
2396 | + |
2397 | + try { |
2398 | + $dbh = PDOConnect::init(); |
2399 | + |
2400 | + $sth = $dbh->prepare('SELECT DataSetColumnID, Heading, datatype.DataType, datasetcolumntype.DataSetColumnType, ListContent, ColumnOrder |
2401 | + FROM datasetcolumn |
2402 | + INNER JOIN `datatype` |
2403 | + ON datatype.DataTypeID = datasetcolumn.DataTypeID |
2404 | + INNER JOIN `datasetcolumntype` |
2405 | + ON datasetcolumntype.DataSetColumnTypeID = datasetcolumn.DataSetColumnTypeID |
2406 | + WHERE DataSetID = :datasetid |
2407 | + ORDER BY ColumnOrder '); |
2408 | + |
2409 | + $sth->execute(array( |
2410 | + 'datasetid' => $dataSetId |
2411 | + )); |
2412 | + |
2413 | + $results = $sth->fetchAll(); |
2414 | + |
2415 | + // Check there are some columns returned |
2416 | + if (count($results) <= 0) |
2417 | + $this->ThrowError(__('No columns')); |
2418 | + |
2419 | + $rows = array(); |
2420 | + |
2421 | + foreach($results as $row) { |
2422 | + |
2423 | + $col['datasetcolumnid'] = Kit::ValidateParam($row['DataSetColumnID'], _INT); |
2424 | + $col['heading'] = Kit::ValidateParam($row['Heading'], _STRING); |
2425 | + $col['listcontent'] = Kit::ValidateParam($row['ListContent'], _STRING); |
2426 | + $col['columnorder'] = Kit::ValidateParam($row['ColumnOrder'], _INT); |
2427 | + $col['datatype'] = Kit::ValidateParam($row['DataType'], _STRING); |
2428 | + $col['datasetcolumntype'] = Kit::ValidateParam($row['DataSetColumnType'], _STRING); |
2429 | + |
2430 | + $rows[] = $col; |
2431 | + } |
2432 | + |
2433 | + Debug::LogEntry('audit', sprintf('Returning %d columns.', count($rows)), 'DataSetColumn', 'GetColumns'); |
2434 | + |
2435 | + return $rows; |
2436 | + } |
2437 | + catch (Exception $e) { |
2438 | + |
2439 | + Debug::LogEntry('error', $e->getMessage()); |
2440 | + |
2441 | + if (!$this->IsError()) |
2442 | + $this->SetError(1, __('Unknown Error')); |
2443 | + |
2444 | + return false; |
2445 | + } |
2446 | + } |
2447 | } |
2448 | -?> |
2449 | \ No newline at end of file |
2450 | +?> |
2451 | |
2452 | === modified file 'server/lib/data/datasetdata.data.class.php' |
2453 | --- server/lib/data/datasetdata.data.class.php 2014-01-18 09:47:41 +0000 |
2454 | +++ server/lib/data/datasetdata.data.class.php 2014-07-15 15:37:36 +0000 |
2455 | @@ -22,8 +22,75 @@ |
2456 | |
2457 | class DataSetData extends Data |
2458 | { |
2459 | + private $updateWatermark; |
2460 | + |
2461 | + public function __construct(database $db) { |
2462 | + |
2463 | + $this->updateWatermark = true; |
2464 | + |
2465 | + parent::__construct($db); |
2466 | + } |
2467 | + |
2468 | + /** |
2469 | + * List all data for this dataset |
2470 | + * @param int $dataSetId The DataSet ID |
2471 | + */ |
2472 | + public function GetData($dataSetId) { |
2473 | + |
2474 | + if ($dataSetId == 0 || $dataSetId == '') |
2475 | + return $this->SetError(25001, __('Missing dataSetId')); |
2476 | + |
2477 | + try { |
2478 | + $dbh = PDOConnect::init(); |
2479 | + |
2480 | + $sth = $dbh->prepare('SELECT datasetdata.DataSetColumnID, datasetdata.RowNumber, datasetdata.Value |
2481 | + FROM datasetdata |
2482 | + INNER JOIN datasetcolumn |
2483 | + ON datasetcolumn.DataSetColumnID = datasetdata.DataSetColumnID |
2484 | + WHERE datasetcolumn.DataSetID = :dataset_id'); |
2485 | + |
2486 | + $sth->execute(array('dataset_id' => $dataSetId)); |
2487 | + |
2488 | + $results = $sth->fetchAll(); |
2489 | + |
2490 | + // Check there are some columns returned |
2491 | + if (count($results) <= 0) |
2492 | + $this->ThrowError(__('No data')); |
2493 | + |
2494 | + $rows = array(); |
2495 | + |
2496 | + foreach($results as $row) { |
2497 | + |
2498 | + $col['datasetcolumnid'] = Kit::ValidateParam($row['DataSetColumnID'], _INT); |
2499 | + $col['rownumber'] = Kit::ValidateParam($row['RowNumber'], _INT); |
2500 | + $col['value'] = Kit::ValidateParam($row['Value'], _STRING); |
2501 | + |
2502 | + $rows[] = $col; |
2503 | + } |
2504 | + |
2505 | + Debug::LogEntry('audit', sprintf('Returning %d columns.', count($rows)), 'DataSetColumn', 'GetData'); |
2506 | + |
2507 | + return $rows; |
2508 | + } |
2509 | + catch (Exception $e) { |
2510 | + |
2511 | + Debug::LogEntry('error', $e->getMessage()); |
2512 | + |
2513 | + if (!$this->IsError()) |
2514 | + $this->SetError(1, __('Unknown Error')); |
2515 | + |
2516 | + return false; |
2517 | + } |
2518 | + } |
2519 | + |
2520 | public function Add($dataSetColumnId, $rowNumber, $value) |
2521 | { |
2522 | + if ($dataSetColumnId == 0 || $dataSetColumnId == '') |
2523 | + return $this->SetError(25001, __('Missing dataSetColumnId')); |
2524 | + |
2525 | + if ($rowNumber == 0 || $rowNumber == '') |
2526 | + return $this->SetError(25001, __('Missing rowNumber')); |
2527 | + |
2528 | try { |
2529 | $dbh = PDOConnect::init(); |
2530 | |
2531 | @@ -39,6 +106,9 @@ |
2532 | |
2533 | $id = $dbh->lastInsertId(); |
2534 | |
2535 | + // Update the Water Mark |
2536 | + $this->UpdateWatermarkWithColumnId($dataSetColumnId); |
2537 | + |
2538 | Debug::LogEntry('audit', 'Complete', 'DataSetData', 'Add'); |
2539 | |
2540 | return $id; |
2541 | @@ -51,6 +121,12 @@ |
2542 | |
2543 | public function Edit($dataSetColumnId, $rowNumber, $value) |
2544 | { |
2545 | + if ($dataSetColumnId == 0 || $dataSetColumnId == '') |
2546 | + return $this->SetError(25001, __('Missing dataSetColumnId')); |
2547 | + |
2548 | + if ($rowNumber == 0 || $rowNumber == '') |
2549 | + return $this->SetError(25001, __('Missing rowNumber')); |
2550 | + |
2551 | try { |
2552 | $dbh = PDOConnect::init(); |
2553 | |
2554 | @@ -64,6 +140,8 @@ |
2555 | 'value' => $value |
2556 | )); |
2557 | |
2558 | + $this->UpdateWatermarkWithColumnId($dataSetColumnId); |
2559 | + |
2560 | Debug::LogEntry('audit', 'Complete', 'DataSetData', 'Edit'); |
2561 | |
2562 | return true; |
2563 | @@ -88,6 +166,8 @@ |
2564 | 'rownumber' => $rowNumber |
2565 | )); |
2566 | |
2567 | + $this->UpdateWatermarkWithColumnId($dataSetColumnId); |
2568 | + |
2569 | Debug::LogEntry('audit', 'Complete', 'DataSetData', 'Delete'); |
2570 | |
2571 | return true; |
2572 | @@ -100,6 +180,9 @@ |
2573 | |
2574 | public function DeleteAll($dataSetId) { |
2575 | |
2576 | + if ($dataSetId == 0 || $dataSetId == '') |
2577 | + return $this->SetError(25001, __('Missing dataSetId')); |
2578 | + |
2579 | try { |
2580 | $dbh = PDOConnect::init(); |
2581 | |
2582 | @@ -113,6 +196,8 @@ |
2583 | 'datasetid' => $dataSetId |
2584 | )); |
2585 | |
2586 | + $this->UpdateWatermark($dataSetId); |
2587 | + |
2588 | return true; |
2589 | } |
2590 | catch (Exception $e) { |
2591 | @@ -121,8 +206,98 @@ |
2592 | } |
2593 | } |
2594 | |
2595 | + /** |
2596 | + * Update the Water Mark to indicate the last data edit |
2597 | + * @param int $dataSetColumnId The Data Set Column ID |
2598 | + */ |
2599 | + private function UpdateWatermarkWithColumnId($dataSetColumnId) { |
2600 | + |
2601 | + if (!$this->updateWatermark) |
2602 | + return; |
2603 | + |
2604 | + try { |
2605 | + $dbh = PDOConnect::init(); |
2606 | + |
2607 | + $sth = $dbh->prepare('SELECT DataSetID FROM `datasetcolumn` WHERE DataSetColumnID = :dataset_column_id'); |
2608 | + $sth->execute(array( |
2609 | + 'dataset_column_id' => $dataSetColumnId |
2610 | + )); |
2611 | + |
2612 | + $this->UpdateWatermark($sth->fetchColumn(0)); |
2613 | + } |
2614 | + catch (Exception $e) { |
2615 | + |
2616 | + Debug::LogEntry('error', $e->getMessage()); |
2617 | + |
2618 | + if (!$this->IsError()) |
2619 | + $this->SetError(1, __('Unknown Error')); |
2620 | + |
2621 | + return false; |
2622 | + } |
2623 | + } |
2624 | + |
2625 | + /** |
2626 | + * Update the Water Mark to indicate the last data edit |
2627 | + * @param int $dataSetId The Data Set ID to Update |
2628 | + */ |
2629 | + private function UpdateWatermark($dataSetId) { |
2630 | + |
2631 | + if ($dataSetId == 0 || $dataSetId == '') |
2632 | + return $this->SetError(25001, __('Missing dataSetId')); |
2633 | + |
2634 | + if (!$this->updateWatermark) |
2635 | + return; |
2636 | + |
2637 | + Debug::LogEntry('audit', sprintf('Updating water mark on DataSetId: %d', $dataSetId), 'DataSetData', 'UpdateWatermark'); |
2638 | + |
2639 | + try { |
2640 | + $dbh = PDOConnect::init(); |
2641 | + |
2642 | + $sth = $dbh->prepare('UPDATE `dataset` SET LastDataEdit = :last_data_edit WHERE DataSetID = :dataset_id'); |
2643 | + $sth->execute(array( |
2644 | + 'last_data_edit' => time(), |
2645 | + 'dataset_id' => $dataSetId |
2646 | + )); |
2647 | + |
2648 | + // Get affected Campaigns |
2649 | + Kit::ClassLoader('dataset'); |
2650 | + $dataSet = new DataSet($this->db); |
2651 | + $campaigns = $dataSet->GetCampaignsForDataSet($dataSetId); |
2652 | + |
2653 | + Kit::ClassLoader('display'); |
2654 | + $display = new Display($this->db); |
2655 | + |
2656 | + foreach ($campaigns as $campaignId) { |
2657 | + // Assess all displays |
2658 | + $campaigns = $display->NotifyDisplays($campaignId); |
2659 | + } |
2660 | + } |
2661 | + catch (Exception $e) { |
2662 | + |
2663 | + Debug::LogEntry('error', $e->getMessage()); |
2664 | + |
2665 | + if (!$this->IsError()) |
2666 | + $this->SetError(1, __('Unknown Error')); |
2667 | + |
2668 | + return false; |
2669 | + } |
2670 | + } |
2671 | + |
2672 | public function ImportCsv($dataSetId, $csvFile, $spreadSheetMapping, $overwrite = false, $ignoreFirstRow = true) { |
2673 | |
2674 | + if ($dataSetId == 0 || $dataSetId == '') |
2675 | + return $this->SetError(25001, __('Missing dataSetId')); |
2676 | + |
2677 | + if (!file_exists($csvFile)) |
2678 | + return $this->SetError(25001, __('CSV File does not exist')); |
2679 | + |
2680 | + if (!is_array($spreadSheetMapping) || count($spreadSheetMapping) <= 0) |
2681 | + return $this->SetError(25001, __('Missing spreadSheetMapping')); |
2682 | + |
2683 | + Debug::LogEntry('audit', 'spreadSheetMapping: ' . json_encode($spreadSheetMapping), 'DataSetData', 'ImportCsv'); |
2684 | + |
2685 | + $this->updateWatermark = false; |
2686 | + |
2687 | try { |
2688 | $dbh = PDOConnect::init(); |
2689 | |
2690 | @@ -187,6 +362,8 @@ |
2691 | |
2692 | // TODO: Update list content definitions |
2693 | |
2694 | + $this->UpdateWatermark($dataSetId); |
2695 | + |
2696 | return true; |
2697 | } |
2698 | catch (Exception $e) { |
2699 | |
2700 | === modified file 'server/lib/data/datasetgroupsecurity.data.class.php' |
2701 | --- server/lib/data/datasetgroupsecurity.data.class.php 2014-01-18 09:47:41 +0000 |
2702 | +++ server/lib/data/datasetgroupsecurity.data.class.php 2014-07-15 15:37:36 +0000 |
2703 | @@ -22,6 +22,53 @@ |
2704 | |
2705 | class DataSetGroupSecurity extends Data |
2706 | { |
2707 | + public function ListSecurity($dataSetId, $groupId) { |
2708 | + |
2709 | + if ($dataSetId == 0 || $dataSetId == '') |
2710 | + return $this->SetError(25001, __('Missing dataSetId')); |
2711 | + |
2712 | + try { |
2713 | + $dbh = PDOConnect::init(); |
2714 | + |
2715 | + $sth = $dbh->prepare('SELECT `group`.groupid, `group`.`group`, view, edit, del, `group`.isuserspecific |
2716 | + FROM `group` |
2717 | + LEFT OUTER JOIN lkdatasetgroup |
2718 | + ON lkdatasetgroup.GroupID = group.GroupID |
2719 | + AND lkdatasetgroup.DataSetID = :datasetid |
2720 | + WHERE `group`.GroupID <> :groupid |
2721 | + ORDER BY `group`.IsEveryone DESC, `group`.IsUserSpecific, `group`.`Group`'); |
2722 | + |
2723 | + $sth->execute(array( |
2724 | + 'datasetid' => $dataSetId, |
2725 | + 'groupid' => $groupId |
2726 | + )); |
2727 | + |
2728 | + $security = array(); |
2729 | + |
2730 | + foreach($sth->fetchAll() as $row) { |
2731 | + $security[] = array( |
2732 | + 'groupid' => Kit::ValidateParam($row['groupid'], _INT), |
2733 | + 'group' => Kit::ValidateParam($row['group'], _STRING), |
2734 | + 'view' => Kit::ValidateParam($row['view'], _INT), |
2735 | + 'edit' => Kit::ValidateParam($row['edit'], _INT), |
2736 | + 'del' => Kit::ValidateParam($row['del'], _INT), |
2737 | + 'isuserspecific' => Kit::ValidateParam($row['isuserspecific'], _INT), |
2738 | + ); |
2739 | + } |
2740 | + |
2741 | + return $security; |
2742 | + } |
2743 | + catch (Exception $e) { |
2744 | + |
2745 | + Debug::LogEntry('error', $e->getMessage()); |
2746 | + |
2747 | + if (!$this->IsError()) |
2748 | + $this->SetError(1, __('Unknown Error')); |
2749 | + |
2750 | + return false; |
2751 | + } |
2752 | + } |
2753 | + |
2754 | /** |
2755 | * Links a Display Group to a Group |
2756 | * @return |
2757 | @@ -30,7 +77,11 @@ |
2758 | */ |
2759 | public function Link($dataSetId, $groupId, $view, $edit, $del) |
2760 | { |
2761 | - Debug::LogEntry('audit', 'IN', 'DataSetGroupSecurity', 'Link'); |
2762 | + if ($dataSetId == 0 || $dataSetId == '') |
2763 | + return $this->SetError(25001, __('Missing dataSetId')); |
2764 | + |
2765 | + if ($groupId == 0 || $groupId == '') |
2766 | + return $this->SetError(25001, __('Missing groupId')); |
2767 | |
2768 | try { |
2769 | $dbh = PDOConnect::init(); |
2770 | @@ -69,6 +120,9 @@ |
2771 | public function LinkEveryone($dataSetId, $view, $edit, $del) |
2772 | { |
2773 | Debug::LogEntry('audit', 'IN', 'DataSetGroupSecurity', 'LinkEveryone'); |
2774 | + |
2775 | + if ($dataSetId == 0 || $dataSetId == '') |
2776 | + return $this->SetError(25001, __('Missing dataSetId')); |
2777 | |
2778 | try { |
2779 | $dbh = PDOConnect::init(); |
2780 | @@ -97,7 +151,11 @@ |
2781 | */ |
2782 | public function Unlink($dataSetId, $groupId) |
2783 | { |
2784 | - Debug::LogEntry('audit', 'IN', 'DataSetGroupSecurity', 'Unlink'); |
2785 | + if ($dataSetId == 0 || $dataSetId == '') |
2786 | + return $this->SetError(25001, __('Missing dataSetId')); |
2787 | + |
2788 | + if ($groupId == 0 || $groupId == '') |
2789 | + return $this->SetError(25001, __('Missing groupId')); |
2790 | |
2791 | try { |
2792 | $dbh = PDOConnect::init(); |
2793 | @@ -128,6 +186,9 @@ |
2794 | { |
2795 | Debug::LogEntry('audit', 'IN', 'DataSetGroupSecurity', 'UnlinkAll'); |
2796 | |
2797 | + if ($dataSetId == 0 || $dataSetId == '') |
2798 | + return $this->SetError(25001, __('Missing dataSetId')); |
2799 | + |
2800 | try { |
2801 | $dbh = PDOConnect::init(); |
2802 | |
2803 | |
2804 | === modified file 'server/lib/data/file.data.class.php' |
2805 | --- server/lib/data/file.data.class.php 2014-01-18 09:47:41 +0000 |
2806 | +++ server/lib/data/file.data.class.php 2014-07-15 15:37:36 +0000 |
2807 | @@ -132,6 +132,20 @@ |
2808 | } |
2809 | |
2810 | /** |
2811 | + * Get the Path to a file |
2812 | + * @param int $fileId The File ID |
2813 | + */ |
2814 | + public function GetPath($fileId) { |
2815 | + |
2816 | + if ($fileId == '' || $fileId == 0) |
2817 | + return $this->SetError(25001, __('Missing fileId')); |
2818 | + |
2819 | + $libraryFolder = Config::GetSetting('LIBRARY_LOCATION'); |
2820 | + $libraryFolder = $libraryFolder . 'temp'; |
2821 | + return $libraryFolder . '/' . $fileId; |
2822 | + } |
2823 | + |
2824 | + /** |
2825 | * The current size of a file |
2826 | * @param <type> $fileId |
2827 | * @return <int> filesize |
2828 | |
2829 | === modified file 'server/lib/data/layout.data.class.php' |
2830 | --- server/lib/data/layout.data.class.php 2014-02-16 18:10:59 +0000 |
2831 | +++ server/lib/data/layout.data.class.php 2014-07-15 15:37:36 +0000 |
2832 | @@ -1065,13 +1065,28 @@ |
2833 | $regionObject = new Region($this->db); |
2834 | $mediaNodes = $regionObject->GetMediaNodeList($layoutId, $region['regionid']); |
2835 | |
2836 | + // Create a data set to see if there are any requirements to serve an updated date time |
2837 | + Kit::ClassLoader('dataset'); |
2838 | + $dataSetObject = new DataSet($this->db); |
2839 | + |
2840 | foreach($mediaNodes as $mediaNode) { |
2841 | - // Put this node vertically in the region timeline |
2842 | - $region['media'][] = array( |
2843 | + |
2844 | + $node = array( |
2845 | 'mediaid' => $mediaNode->getAttribute('id'), |
2846 | 'lkid' => $mediaNode->getAttribute('lkid'), |
2847 | 'mediatype' => $mediaNode->getAttribute('type') |
2848 | ); |
2849 | + |
2850 | + // DataSets are a special case. We want to get the last updated time from the dataset. |
2851 | + $dataSet = $dataSetObject->GetDataSetFromLayout($layoutId, $region['regionid'], $mediaNode->getAttribute('id')); |
2852 | + |
2853 | + if (count($dataSet) == 1) { |
2854 | + |
2855 | + $node['updated'] = $dataSet[0]['LastDataEdit']; |
2856 | + } |
2857 | + |
2858 | + // Put this node vertically in the region time-line |
2859 | + $region['media'][] = $node; |
2860 | } |
2861 | |
2862 | Debug::LogEntry('audit', 'Finished with Region', 'layout', 'LayoutInformation'); |
2863 | |
2864 | === modified file 'server/lib/data/region.data.class.php' |
2865 | --- server/lib/data/region.data.class.php 2014-04-26 09:25:32 +0000 |
2866 | +++ server/lib/data/region.data.class.php 2014-07-15 15:37:36 +0000 |
2867 | @@ -22,6 +22,10 @@ |
2868 | |
2869 | class Region extends Data |
2870 | { |
2871 | + // Caching |
2872 | + private $layoutXml; |
2873 | + private $layoutDocument; |
2874 | + |
2875 | public function __construct(database $db) |
2876 | { |
2877 | $this->db =& $db; |
2878 | @@ -37,9 +41,23 @@ |
2879 | */ |
2880 | public function GetLayoutXml($layoutid) |
2881 | { |
2882 | - $layout = new Layout($this->db); |
2883 | - |
2884 | - return $layout->GetLayoutXml($layoutid); |
2885 | + if ($this->layoutXml == '') { |
2886 | + $layout = new Layout($this->db); |
2887 | + $this->layoutXml = $layout->GetLayoutXml($layoutid); |
2888 | + } |
2889 | + |
2890 | + return $this->layoutXml; |
2891 | + } |
2892 | + |
2893 | + public function GetLayoutDom($layoutId) { |
2894 | + |
2895 | + if ($this->layoutDocument == NULL) { |
2896 | + // Load the XML into a new DOMDocument |
2897 | + $this->layoutDocument = new DOMDocument(); |
2898 | + $this->layoutDocument->loadXML($this->GetLayoutXml($layoutId)); |
2899 | + } |
2900 | + |
2901 | + return $this->layoutDocument; |
2902 | } |
2903 | |
2904 | /** |
2905 | @@ -50,6 +68,9 @@ |
2906 | */ |
2907 | private function SetLayoutXml($layoutid, $xml) |
2908 | { |
2909 | + // Update Cache |
2910 | + $this->layoutXml = $xml; |
2911 | + |
2912 | $layout = new Layout($this->db); |
2913 | |
2914 | if (!$layout->SetLayoutXml($layoutid, $xml)) |
2915 | @@ -904,6 +925,41 @@ |
2916 | } |
2917 | |
2918 | /** |
2919 | + * Get Option for Media Id |
2920 | + * @param int $layoutId The Layout ID |
2921 | + * @param string $mediaId The Media ID |
2922 | + * @param string $name The Option Name |
2923 | + * @param string $default The Default Value if none found |
2924 | + */ |
2925 | + public function GetOptionForMediaId($layoutId, $mediaId, $name, $default = false) { |
2926 | + |
2927 | + if ($name == '') |
2928 | + return false; |
2929 | + |
2930 | + if (!$this->GetLayoutDom($layoutId)) |
2931 | + return false; |
2932 | + |
2933 | + // Check to see if we already have this option or not |
2934 | + $xpath = new DOMXPath($this->layoutDocument); |
2935 | + |
2936 | + // Xpath for it |
2937 | + $userOptions = $xpath->query('//region/media[@id=\'' . $mediaId . '\']/options/' . $name); |
2938 | + |
2939 | + // Debug::LogEntry('audit', '//region/media[@id=\'' . $mediaId . '\']/options/' . $name); |
2940 | + |
2941 | + if ($userOptions->length == 0) { |
2942 | + // We do not have an option - return the default |
2943 | + Debug::LogEntry('audit', 'GetOption ' . $name . ': Not Set - returning default ' . $default, 'region'); |
2944 | + return $default; |
2945 | + } |
2946 | + else { |
2947 | + // Replace the old node we found with XPath with the new node we just created |
2948 | + Debug::LogEntry('audit', 'GetOption ' . $name . ': Set - returning: ' . $userOptions->item(0)->nodeValue, 'region'); |
2949 | + return ($userOptions->item(0)->nodeValue != '') ? $userOptions->item(0)->nodeValue : $default; |
2950 | + } |
2951 | + } |
2952 | + |
2953 | + /** |
2954 | * Add Existing Media from the Library |
2955 | * @param [int] $user [A user object for the currently logged in user] |
2956 | * @param [int] $layoutId [The LayoutID to Add on] |
2957 | |
2958 | === modified file 'server/lib/include.php' |
2959 | --- server/lib/include.php 2014-05-26 10:09:54 +0000 |
2960 | +++ server/lib/include.php 2014-07-15 15:37:36 +0000 |
2961 | @@ -20,7 +20,7 @@ |
2962 | */ |
2963 | defined('XIBO') or die("Sorry, you are not allowed to directly access this page.<br /> Please press the back button in your browser."); |
2964 | |
2965 | -define('WEBSITE_VERSION', 69); |
2966 | +define('WEBSITE_VERSION', 70); |
2967 | |
2968 | // No errors reported until we read the settings from the DB |
2969 | error_reporting(0); |
2970 | @@ -137,8 +137,8 @@ |
2971 | // Create login control system |
2972 | require_once('modules/' . Config::GetSetting("userModule")); |
2973 | |
2974 | -$user = new User($db); |
2975 | -$session = new Session(); |
2976 | +// Create a Session |
2977 | +$session = new Session(); |
2978 | |
2979 | // Work out the location of this service |
2980 | $serviceLocation = Kit::GetXiboRoot(); |
2981 | @@ -152,6 +152,9 @@ |
2982 | // Assign the page name to the session |
2983 | $session->set_page(session_id(), $page); |
2984 | |
2985 | +// Create a user |
2986 | +$user = new User($db); |
2987 | + |
2988 | // Create Page |
2989 | try { |
2990 | $pageManager = new PageManager($db, $user, $page); |
2991 | |
2992 | === modified file 'server/lib/modules/module.class.php' |
2993 | --- server/lib/modules/module.class.php 2014-05-12 20:36:33 +0000 |
2994 | +++ server/lib/modules/module.class.php 2014-07-15 15:37:36 +0000 |
2995 | @@ -522,7 +522,7 @@ |
2996 | if ($this->regionSpecific) |
2997 | { |
2998 | $form = <<<END |
2999 | - <form id="MediaDeleteForm" class="XiboForm" method="post" action="index.php?p=module&mod=text&q=Exec&method=DeleteMedia"> |
3000 | + <form id="MediaDeleteForm" class="XiboForm" method="post" action="index.php?p=module&mod=$this->type&q=Exec&method=DeleteMedia"> |
3001 | <input type="hidden" name="mediaid" value="$mediaid"> |
3002 | <input type="hidden" name="layoutid" value="$layoutid"> |
3003 | <input type="hidden" name="regionid" value="$regionid"> |
3004 | @@ -870,13 +870,13 @@ |
3005 | Theme::Set('form_meta', '<input type="hidden" id="PHPSESSID" value="' . $sessionId . '" /><input type="hidden" id="SecurityToken" value="' . $securityToken . '" /><input type="hidden" name="type" value="' . $this->type . '"><input type="hidden" name="layoutid" value="' . $layoutid . '"><input type="hidden" name="regionid" value="' . $regionid . '">'); |
3006 | Theme::Set('form_valid_ext', '/(\.|\/)' . implode('|', $this->validExtensions) . '$/i'); |
3007 | Theme::Set('form_max_size', Kit::ReturnBytes($this->maxFileSize)); |
3008 | - Theme::Set('valid_extensions', 'This form accepts: ' . $this->validExtensionsText . ' files up to a maximum size of ' . $this->maxFileSize); |
3009 | + Theme::Set('valid_extensions', sprintf(__('This form accepts: %s files up to a maximum size of %s'), $this->validExtensionsText, $this->maxFileSize)); |
3010 | Theme::Set('default_duration', $defaultDuration); |
3011 | |
3012 | $form = Theme::RenderReturn('library_form_media_add'); |
3013 | |
3014 | $this->response->html = $form; |
3015 | - $this->response->dialogTitle = 'Add New ' . $this->displayType; |
3016 | + $this->response->dialogTitle = sprintf(__('Add New %s'), __($this->displayType)); |
3017 | $this->response->dialogSize = true; |
3018 | $this->response->dialogWidth = '450px'; |
3019 | $this->response->dialogHeight = '280px'; |
3020 | @@ -1264,7 +1264,7 @@ |
3021 | // Update the LKID with the new media id |
3022 | $sth_update->execute(array( |
3023 | 'media_id' => $newMediaId, |
3024 | - 'layout_id' => $row['lklayoutmediaid'] |
3025 | + 'lklayoutmediaid' => $row['lklayoutmediaid'] |
3026 | )); |
3027 | |
3028 | $count++; |
3029 | |
3030 | === modified file 'server/lib/oauth.inc.php' |
3031 | --- server/lib/oauth.inc.php 2014-05-25 12:15:26 +0000 |
3032 | +++ server/lib/oauth.inc.php 2014-07-15 15:37:36 +0000 |
3033 | @@ -33,6 +33,6 @@ |
3034 | require_once('3rdparty/oauth-php/library/OAuthServer.php'); |
3035 | require_once('3rdparty/oauth-php/library/OAuthStore.php'); |
3036 | |
3037 | -OAuthStore::instance('PDO', array('server' => $dbhost, 'username' => $dbuser, 'password' => $dbpass, 'database' => $dbname)); |
3038 | +OAuthStore::instance('PDO', array('conn' => PDOConnect::init())); |
3039 | |
3040 | ?> |
3041 | |
3042 | === modified file 'server/lib/pages/admin.class.php' |
3043 | --- server/lib/pages/admin.class.php 2014-02-15 10:32:44 +0000 |
3044 | +++ server/lib/pages/admin.class.php 2014-07-15 15:37:36 +0000 |
3045 | @@ -51,7 +51,7 @@ |
3046 | |
3047 | // Check the token |
3048 | if (!Kit::CheckToken()) |
3049 | - trigger_error('Token does not match', E_USER_ERROR); |
3050 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3051 | |
3052 | $refer = Kit::GetParam('refer', _POST, _STRING); |
3053 | $usertype = Kit::GetParam('usertype', _SESSION, _INT); |
3054 | |
3055 | === modified file 'server/lib/pages/campaign.class.php' |
3056 | --- server/lib/pages/campaign.class.php 2014-01-18 09:47:41 +0000 |
3057 | +++ server/lib/pages/campaign.class.php 2014-07-15 15:37:36 +0000 |
3058 | @@ -154,7 +154,7 @@ |
3059 | { |
3060 | // Check the token |
3061 | if (!Kit::CheckToken()) |
3062 | - trigger_error('Token does not match', E_USER_ERROR); |
3063 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3064 | |
3065 | $db =& $this->db; |
3066 | $response = new ResponseManager(); |
3067 | @@ -224,7 +224,7 @@ |
3068 | { |
3069 | // Check the token |
3070 | if (!Kit::CheckToken()) |
3071 | - trigger_error('Token does not match', E_USER_ERROR); |
3072 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3073 | |
3074 | $db =& $this->db; |
3075 | $response = new ResponseManager(); |
3076 | @@ -293,7 +293,7 @@ |
3077 | { |
3078 | // Check the token |
3079 | if (!Kit::CheckToken()) |
3080 | - trigger_error('Token does not match', E_USER_ERROR); |
3081 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3082 | |
3083 | $db =& $this->db; |
3084 | $response = new ResponseManager(); |
3085 | @@ -395,7 +395,7 @@ |
3086 | { |
3087 | // Check the token |
3088 | if (!Kit::CheckToken()) |
3089 | - trigger_error('Token does not match', E_USER_ERROR); |
3090 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3091 | |
3092 | $db =& $this->db; |
3093 | $user =& $this->user; |
3094 | @@ -484,7 +484,7 @@ |
3095 | { |
3096 | // Check the token |
3097 | if (!Kit::CheckToken()) |
3098 | - trigger_error('Token does not match', E_USER_ERROR); |
3099 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3100 | |
3101 | $db =& $this->db; |
3102 | $response = new ResponseManager(); |
3103 | |
3104 | === modified file 'server/lib/pages/dataset.class.php' |
3105 | --- server/lib/pages/dataset.class.php 2014-05-26 09:09:06 +0000 |
3106 | +++ server/lib/pages/dataset.class.php 2014-07-15 15:37:36 +0000 |
3107 | @@ -167,7 +167,7 @@ |
3108 | { |
3109 | // Check the token |
3110 | if (!Kit::CheckToken()) |
3111 | - trigger_error('Token does not match', E_USER_ERROR); |
3112 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3113 | |
3114 | $db =& $this->db; |
3115 | $user =& $this->user; |
3116 | @@ -227,7 +227,7 @@ |
3117 | { |
3118 | // Check the token |
3119 | if (!Kit::CheckToken()) |
3120 | - trigger_error('Token does not match', E_USER_ERROR); |
3121 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3122 | |
3123 | $db =& $this->db; |
3124 | $user =& $this->user; |
3125 | @@ -283,7 +283,7 @@ |
3126 | { |
3127 | // Check the token |
3128 | if (!Kit::CheckToken()) |
3129 | - trigger_error('Token does not match', E_USER_ERROR); |
3130 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3131 | |
3132 | $db =& $this->db; |
3133 | $user =& $this->user; |
3134 | @@ -326,29 +326,24 @@ |
3135 | $SQL .= sprintf(" WHERE DataSetID = %d ", $dataSetId); |
3136 | $SQL .= "ORDER BY ColumnOrder "; |
3137 | |
3138 | + Kit::ClassLoader('datasetcolumn'); |
3139 | + $dataSetColumnObject = new DataSetColumn($db); |
3140 | + |
3141 | // Load results into an array |
3142 | - $dataSetColumns = $db->GetArray($SQL); |
3143 | - |
3144 | - if (!is_array($dataSetColumns)) |
3145 | - { |
3146 | - trigger_error($db->error()); |
3147 | - trigger_error(__('Error getting list of dataSetColumns'), E_USER_ERROR); |
3148 | - } |
3149 | + if (!$dataSetColumns = $dataSetColumnObject->GetColumns($dataSetId)) |
3150 | + trigger_error($dataSetColumnObject->GetErrorMessage(), E_USER_ERROR); |
3151 | |
3152 | $rows = array(); |
3153 | |
3154 | foreach ($dataSetColumns as $row) { |
3155 | |
3156 | - $row['heading'] = Kit::ValidateParam($row['Heading'], _STRING); |
3157 | - $row['listcontent'] = Kit::ValidateParam($row['ListContent'], _STRING); |
3158 | - $row['columnorder'] = Kit::ValidateParam($row['ColumnOrder'], _INT); |
3159 | - $row['datatype'] = __(Kit::ValidateParam($row['DataType'], _STRING)); |
3160 | - $row['datasetcolumntype'] = __(Kit::ValidateParam($row['DataSetColumnType'], _STRING)); |
3161 | + $row['datatype'] = __($row['datatype']); |
3162 | + $row['datasetcolumntype'] = __($row['datasetcolumntype']); |
3163 | |
3164 | // Edit |
3165 | $row['buttons'][] = array( |
3166 | 'id' => 'dataset_button_edit', |
3167 | - 'url' => 'index.php?p=dataset&q=EditDataSetColumnForm&datasetid=' . $dataSetId . '&datasetcolumnid=' . $row['DataSetColumnID'] . '&dataset=' . $dataSet, |
3168 | + 'url' => 'index.php?p=dataset&q=EditDataSetColumnForm&datasetid=' . $dataSetId . '&datasetcolumnid=' . $row['datasetcolumnid'] . '&dataset=' . $dataSet, |
3169 | 'text' => __('Edit') |
3170 | ); |
3171 | |
3172 | @@ -356,7 +351,7 @@ |
3173 | // Delete |
3174 | $row['buttons'][] = array( |
3175 | 'id' => 'dataset_button_delete', |
3176 | - 'url' => 'index.php?p=dataset&q=DeleteDataSetColumnForm&datasetid=' . $dataSetId . '&datasetcolumnid=' . $row['DataSetColumnID'] . '&dataset=' . $dataSet, |
3177 | + 'url' => 'index.php?p=dataset&q=DeleteDataSetColumnForm&datasetid=' . $dataSetId . '&datasetcolumnid=' . $row['datasetcolumnid'] . '&dataset=' . $dataSet, |
3178 | 'text' => __('Delete') |
3179 | ); |
3180 | } |
3181 | @@ -410,7 +405,7 @@ |
3182 | { |
3183 | // Check the token |
3184 | if (!Kit::CheckToken()) |
3185 | - trigger_error('Token does not match', E_USER_ERROR); |
3186 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3187 | |
3188 | $db =& $this->db; |
3189 | $user =& $this->user; |
3190 | @@ -490,7 +485,7 @@ |
3191 | { |
3192 | // Check the token |
3193 | if (!Kit::CheckToken()) |
3194 | - trigger_error('Token does not match', E_USER_ERROR); |
3195 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3196 | |
3197 | $db =& $this->db; |
3198 | $user =& $this->user; |
3199 | @@ -555,7 +550,7 @@ |
3200 | { |
3201 | // Check the token |
3202 | if (!Kit::CheckToken()) |
3203 | - trigger_error('Token does not match', E_USER_ERROR); |
3204 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3205 | |
3206 | $db =& $this->db; |
3207 | $user =& $this->user; |
3208 | @@ -863,40 +858,29 @@ |
3209 | Theme::Set('form_meta', '<input type="hidden" name="datasetid" value="' . $dataSetId . '" />'); |
3210 | |
3211 | // List of all Groups with a view/edit/delete checkbox |
3212 | - $SQL = ''; |
3213 | - $SQL .= 'SELECT `group`.GroupID, `group`.`Group`, View, Edit, Del, `group`.IsUserSpecific '; |
3214 | - $SQL .= ' FROM `group` '; |
3215 | - $SQL .= ' LEFT OUTER JOIN lkdatasetgroup '; |
3216 | - $SQL .= ' ON lkdatasetgroup.GroupID = group.GroupID '; |
3217 | - $SQL .= ' AND lkdatasetgroup.DataSetID = %d '; |
3218 | - $SQL .= ' WHERE `group`.GroupID <> %d '; |
3219 | - $SQL .= 'ORDER BY `group`.IsEveryone DESC, `group`.IsUserSpecific, `group`.`Group` '; |
3220 | - |
3221 | - $SQL = sprintf($SQL, $dataSetId, $user->getGroupFromId($user->userid, true)); |
3222 | - |
3223 | - if (!$results = $db->query($SQL)) |
3224 | - { |
3225 | - trigger_error($db->error()); |
3226 | + Kit::ClassLoader('datasetgroupsecurity'); |
3227 | + $security = new DataSetGroupSecurity($this->db); |
3228 | + |
3229 | + if (!$results = $security->ListSecurity($dataSetId, $user->getGroupFromId($user->userid, true))) { |
3230 | trigger_error(__('Unable to get permissions for this dataset'), E_USER_ERROR); |
3231 | } |
3232 | |
3233 | $checkboxes = array(); |
3234 | |
3235 | - while ($row = $db->get_assoc_row($results)) |
3236 | - { |
3237 | - $groupId = $row['GroupID']; |
3238 | - $rowClass = ($row['IsUserSpecific'] == 0) ? 'strong_text' : ''; |
3239 | + foreach ($results as $row) { |
3240 | + $groupId = $row['groupid']; |
3241 | + $rowClass = ($row['isuserspecific'] == 0) ? 'strong_text' : ''; |
3242 | |
3243 | $checkbox = array( |
3244 | 'id' => $groupId, |
3245 | - 'name' => Kit::ValidateParam($row['Group'], _STRING), |
3246 | + 'name' => Kit::ValidateParam($row['group'], _STRING), |
3247 | 'class' => $rowClass, |
3248 | 'value_view' => $groupId . '_view', |
3249 | - 'value_view_checked' => (($row['View'] == 1) ? 'checked' : ''), |
3250 | + 'value_view_checked' => (($row['view'] == 1) ? 'checked' : ''), |
3251 | 'value_edit' => $groupId . '_edit', |
3252 | - 'value_edit_checked' => (($row['Edit'] == 1) ? 'checked' : ''), |
3253 | + 'value_edit_checked' => (($row['edit'] == 1) ? 'checked' : ''), |
3254 | 'value_del' => $groupId . '_del', |
3255 | - 'value_del_checked' => (($row['Del'] == 1) ? 'checked' : ''), |
3256 | + 'value_del_checked' => (($row['del'] == 1) ? 'checked' : ''), |
3257 | ); |
3258 | |
3259 | $checkboxes[] = $checkbox; |
3260 | @@ -917,7 +901,7 @@ |
3261 | { |
3262 | // Check the token |
3263 | if (!Kit::CheckToken()) |
3264 | - trigger_error('Token does not match', E_USER_ERROR); |
3265 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3266 | |
3267 | $db =& $this->db; |
3268 | $user =& $this->user; |
3269 | @@ -1122,8 +1106,10 @@ |
3270 | |
3271 | $dataSetColumnId = Kit::ValidateParam($row['DataSetColumnID'], _INT); |
3272 | $spreadSheetColumn = Kit::GetParam('csvImport_' . $dataSetColumnId, _POST, _INT); |
3273 | - |
3274 | - $spreadSheetMapping[($spreadSheetColumn - 1)] = $dataSetColumnId; |
3275 | + |
3276 | + // If it has been left blank, then skip |
3277 | + if ($spreadSheetColumn != 0) |
3278 | + $spreadSheetMapping[($spreadSheetColumn - 1)] = $dataSetColumnId; |
3279 | } |
3280 | |
3281 | $dataSetObject = new DataSetData($db); |
3282 | |
3283 | === modified file 'server/lib/pages/display.class.php' |
3284 | --- server/lib/pages/display.class.php 2014-03-09 14:41:56 +0000 |
3285 | +++ server/lib/pages/display.class.php 2014-07-15 15:37:36 +0000 |
3286 | @@ -145,11 +145,22 @@ |
3287 | // Configure the theme |
3288 | $id = uniqid(); |
3289 | Theme::Set('id', $id); |
3290 | - Theme::Set('campaign_form_add_url', 'index.php?p=campaign&q=AddForm'); |
3291 | Theme::Set('form_meta', '<input type="hidden" name="p" value="display"><input type="hidden" name="q" value="DisplayGrid">'); |
3292 | Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter')); |
3293 | Theme::Set('pager', ResponseManager::Pager($id)); |
3294 | |
3295 | + // Default options |
3296 | + if (Kit::IsFilterPinned('display', 'DisplayFilter')) { |
3297 | + Theme::Set('filter_pinned', 'checked'); |
3298 | + Theme::Set('filter_displaygroup', Session::Get('display', 'filter_displaygroup')); |
3299 | + Theme::Set('filter_display', Session::Get('display', 'filter_display')); |
3300 | + } |
3301 | + |
3302 | + $displayGroups = $this->user->DisplayGroupList(0); |
3303 | + array_unshift($displayGroups, array('displaygroupid' => '0', 'displaygroup' => 'All')); |
3304 | + |
3305 | + Theme::Set('displaygroup_field_list', $displayGroups); |
3306 | + |
3307 | // Render the Theme and output |
3308 | Theme::Render('display_page'); |
3309 | } |
3310 | @@ -162,7 +173,7 @@ |
3311 | { |
3312 | // Check the token |
3313 | if (!Kit::CheckToken()) |
3314 | - trigger_error('Token does not match', E_USER_ERROR); |
3315 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3316 | |
3317 | $db =& $this->db; |
3318 | $response = new ResponseManager(); |
3319 | @@ -280,7 +291,18 @@ |
3320 | $user =& $this->user; |
3321 | $response = new ResponseManager(); |
3322 | |
3323 | - $displays = $user->DisplayList(); |
3324 | + // Filter by Name |
3325 | + $filter_display = Kit::GetParam('filter_display', _POST, _STRING); |
3326 | + setSession('display', 'filter_display', $filter_display); |
3327 | + |
3328 | + // Display Group |
3329 | + $filter_displaygroupid = Kit::GetParam('filter_displaygroup', _POST, _INT); |
3330 | + setSession('display', 'filter_displaygroup', $filter_displaygroupid); |
3331 | + |
3332 | + // Pinned option? |
3333 | + setSession('display', 'DisplayFilter', Kit::GetParam('XiboFilterPinned', _REQUEST, _CHECKBOX, 'off')); |
3334 | + |
3335 | + $displays = $user->DisplayList(array('displayid'), array('displaygroupid' => $filter_displaygroupid, 'display' => $filter_display)); |
3336 | |
3337 | if (!is_array($displays)) |
3338 | { |
3339 | @@ -358,6 +380,13 @@ |
3340 | 'url' => 'index.php?p=displaygroup&q=FileAssociations&DisplayGroupID=' . $row['displaygroupid'], |
3341 | 'text' => __('Assign Files') |
3342 | ); |
3343 | + |
3344 | + // Logs |
3345 | + $row['buttons'][] = array( |
3346 | + 'id' => 'displaygroup_button_logs', |
3347 | + 'url' => 'index.php?p=log&q=LastHundredForDisplay&displayid=' . $row['displayid'], |
3348 | + 'text' => __('Last 100 Log Messages') |
3349 | + ); |
3350 | } |
3351 | |
3352 | if ($row['del'] == 1) { |
3353 | @@ -486,7 +515,7 @@ |
3354 | { |
3355 | // Check the token |
3356 | if (!Kit::CheckToken()) |
3357 | - trigger_error('Token does not match', E_USER_ERROR); |
3358 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3359 | |
3360 | $db =& $this->db; |
3361 | $response = new ResponseManager(); |
3362 | @@ -550,7 +579,7 @@ |
3363 | { |
3364 | // Check the token |
3365 | if (!Kit::CheckToken()) |
3366 | - trigger_error('Token does not match', E_USER_ERROR); |
3367 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3368 | |
3369 | $db =& $this->db; |
3370 | $response = new ResponseManager(); |
3371 | @@ -834,7 +863,7 @@ |
3372 | { |
3373 | // Check the token |
3374 | if (!Kit::CheckToken()) |
3375 | - trigger_error('Token does not match', E_USER_ERROR); |
3376 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3377 | |
3378 | $db =& $this->db; |
3379 | $response = new ResponseManager(); |
3380 | |
3381 | === modified file 'server/lib/pages/displaygroup.class.php' |
3382 | --- server/lib/pages/displaygroup.class.php 2014-05-25 11:09:45 +0000 |
3383 | +++ server/lib/pages/displaygroup.class.php 2014-07-15 15:37:36 +0000 |
3384 | @@ -320,7 +320,7 @@ |
3385 | { |
3386 | // Check the token |
3387 | if (!Kit::CheckToken()) |
3388 | - trigger_error('Token does not match', E_USER_ERROR); |
3389 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3390 | |
3391 | $db =& $this->db; |
3392 | $response = new ResponseManager(); |
3393 | @@ -353,7 +353,7 @@ |
3394 | { |
3395 | // Check the token |
3396 | if (!Kit::CheckToken()) |
3397 | - trigger_error('Token does not match', E_USER_ERROR); |
3398 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3399 | |
3400 | $db =& $this->db; |
3401 | $response = new ResponseManager(); |
3402 | @@ -387,7 +387,7 @@ |
3403 | { |
3404 | // Check the token |
3405 | if (!Kit::CheckToken()) |
3406 | - trigger_error('Token does not match', E_USER_ERROR); |
3407 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3408 | |
3409 | $db =& $this->db; |
3410 | $response = new ResponseManager(); |
3411 | @@ -559,7 +559,7 @@ |
3412 | { |
3413 | // Check the token |
3414 | if (!Kit::CheckToken()) |
3415 | - trigger_error('Token does not match', E_USER_ERROR); |
3416 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3417 | |
3418 | $db =& $this->db; |
3419 | $user =& $this->user; |
3420 | |
3421 | === modified file 'server/lib/pages/fault.class.php' |
3422 | --- server/lib/pages/fault.class.php 2014-01-18 09:47:41 +0000 |
3423 | +++ server/lib/pages/fault.class.php 2014-07-15 15:37:36 +0000 |
3424 | @@ -64,12 +64,6 @@ |
3425 | |
3426 | echo "\n"; |
3427 | echo "--------------------------------------\n"; |
3428 | - echo 'PHP INFO' . "\n"; |
3429 | - echo "--------------------------------------\n"; |
3430 | - $this->phpinfo_array(); |
3431 | - |
3432 | - echo "\n"; |
3433 | - echo "--------------------------------------\n"; |
3434 | echo 'LOG Dump' . "\n"; |
3435 | echo "--------------------------------------\n"; |
3436 | |
3437 | @@ -83,6 +77,8 @@ |
3438 | trigger_error($db->error()); |
3439 | trigger_error("Can not query the log", E_USER_ERROR); |
3440 | } |
3441 | + |
3442 | + echo 'Date,Page,Function,Message' . PHP_EOL; |
3443 | |
3444 | while ($row = $db->get_row($results)) |
3445 | { |
3446 | @@ -91,14 +87,7 @@ |
3447 | $function = Kit::ValidateParam($row[2], _STRING); |
3448 | $message = Kit::ValidateParam($row[3], _HTMLSTRING); |
3449 | |
3450 | - $output = <<<END |
3451 | -Date: $logdate |
3452 | -Page: $page |
3453 | -Function: $function |
3454 | -Message: $message |
3455 | -\n |
3456 | -END; |
3457 | - echo $output; |
3458 | + echo '"' . $logdate . '","' . $page . '","' . $function . '","' . $message . '"' . PHP_EOL; |
3459 | } |
3460 | |
3461 | echo "\n"; |
3462 | @@ -213,50 +202,5 @@ |
3463 | |
3464 | exit; |
3465 | } |
3466 | - |
3467 | - /** |
3468 | - * Outputs PHP info as an array rather than HTML |
3469 | - * Taken from: http://uk2.php.net/phpinfo |
3470 | - * @return |
3471 | - * @param $return Object[optional] |
3472 | - */ |
3473 | - function phpinfo_array($return=false) |
3474 | - { |
3475 | - ob_start(); |
3476 | - phpinfo(-1); |
3477 | - |
3478 | - $pi = preg_replace( |
3479 | - array('#^.*<body>(.*)</body>.*$#ms', '#<h2>PHP License</h2>.*$#ms', |
3480 | - '#<h1>Configuration</h1>#', "#\r?\n#", "#</(h1|h2|h3|tr)>#", '# +<#', |
3481 | - "#[ \t]+#", '# #', '# +#', '# class=".*?"#', '%'%', |
3482 | - '#<tr>(?:.*?)" src="(?:.*?)=(.*?)" alt="PHP Logo" /></a>' |
3483 | - .'<h1>PHP Version (.*?)</h1>(?:\n+?)</td></tr>#', |
3484 | - '#<h1><a href="(?:.*?)\?=(.*?)">PHP Credits</a></h1>#', |
3485 | - '#<tr>(?:.*?)" src="(?:.*?)=(.*?)"(?:.*?)Zend Engine (.*?),(?:.*?)</tr>#', |
3486 | - "# +#", '#<tr>#', '#</tr>#'), |
3487 | - array('$1', '', '', '', '</$1>' . "\n", '<', ' ', ' ', ' ', '', ' ', |
3488 | - '<h2>PHP Configuration</h2>'."\n".'<tr><td>PHP Version</td><td>$2</td></tr>'. |
3489 | - "\n".'<tr><td>PHP Egg</td><td>$1</td></tr>', |
3490 | - '<tr><td>PHP Credits Egg</td><td>$1</td></tr>', |
3491 | - '<tr><td>Zend Engine</td><td>$2</td></tr>' . "\n" . |
3492 | - '<tr><td>Zend Egg</td><td>$1</td></tr>', ' ', '%S%', '%E%'), |
3493 | - ob_get_clean()); |
3494 | - |
3495 | - $sections = explode('<h2>', strip_tags($pi, '<h2><th><td>')); |
3496 | - unset($sections[0]); |
3497 | - |
3498 | - $pi = array(); |
3499 | - foreach($sections as $section) |
3500 | - { |
3501 | - $n = substr($section, 0, strpos($section, '</h2>')); |
3502 | - preg_match_all( |
3503 | - '#%S%(?:<td>(.*?)</td>)?(?:<td>(.*?)</td>)?(?:<td>(.*?)</td>)?%E%#', |
3504 | - $section, $askapache, PREG_SET_ORDER); |
3505 | - foreach($askapache as $m) |
3506 | - $pi[$n][$m[1]]=(!isset($m[3])||$m[2]==$m[3])?$m[2]:array_slice($m,2); |
3507 | - } |
3508 | - |
3509 | - return ($return === false) ? print_r($pi) : $pi; |
3510 | - } |
3511 | } |
3512 | ?> |
3513 | |
3514 | === modified file 'server/lib/pages/group.class.php' |
3515 | --- server/lib/pages/group.class.php 2014-01-18 09:47:41 +0000 |
3516 | +++ server/lib/pages/group.class.php 2014-07-15 15:37:36 +0000 |
3517 | @@ -355,7 +355,7 @@ |
3518 | { |
3519 | // Check the token |
3520 | if (!Kit::CheckToken()) |
3521 | - trigger_error('Token does not match', E_USER_ERROR); |
3522 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3523 | |
3524 | $db =& $this->db; |
3525 | $response = new ResponseManager(); |
3526 | @@ -379,7 +379,7 @@ |
3527 | { |
3528 | // Check the token |
3529 | if (!Kit::CheckToken()) |
3530 | - trigger_error('Token does not match', E_USER_ERROR); |
3531 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3532 | |
3533 | $db =& $this->db; |
3534 | |
3535 | @@ -404,7 +404,7 @@ |
3536 | { |
3537 | // Check the token |
3538 | if (!Kit::CheckToken()) |
3539 | - trigger_error('Token does not match', E_USER_ERROR); |
3540 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3541 | |
3542 | $db =& $this->db; |
3543 | $groupid = Kit::GetParam('groupid', _POST, _INT); |
3544 | @@ -587,7 +587,7 @@ |
3545 | { |
3546 | // Check the token |
3547 | if (!Kit::CheckToken()) |
3548 | - trigger_error('Token does not match', E_USER_ERROR); |
3549 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3550 | |
3551 | $db =& $this->db; |
3552 | $groupid = Kit::GetParam('groupid', _POST, _INT); |
3553 | |
3554 | === modified file 'server/lib/pages/help.class.php' |
3555 | --- server/lib/pages/help.class.php 2014-01-19 11:52:23 +0000 |
3556 | +++ server/lib/pages/help.class.php 2014-07-15 15:37:36 +0000 |
3557 | @@ -264,7 +264,7 @@ |
3558 | { |
3559 | // Check the token |
3560 | if (!Kit::CheckToken()) |
3561 | - trigger_error('Token does not match', E_USER_ERROR); |
3562 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3563 | |
3564 | $db =& $this->db; |
3565 | $response = new ResponseManager(); |
3566 | @@ -291,7 +291,7 @@ |
3567 | { |
3568 | // Check the token |
3569 | if (!Kit::CheckToken()) |
3570 | - trigger_error('Token does not match', E_USER_ERROR); |
3571 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3572 | |
3573 | $db =& $this->db; |
3574 | $response = new ResponseManager(); |
3575 | @@ -316,7 +316,7 @@ |
3576 | { |
3577 | // Check the token |
3578 | if (!Kit::CheckToken()) |
3579 | - trigger_error('Token does not match', E_USER_ERROR); |
3580 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3581 | |
3582 | $db =& $this->db; |
3583 | $response = new ResponseManager(); |
3584 | |
3585 | === modified file 'server/lib/pages/index.class.php' |
3586 | --- server/lib/pages/index.class.php 2014-02-15 11:25:09 +0000 |
3587 | +++ server/lib/pages/index.class.php 2014-07-15 15:37:36 +0000 |
3588 | @@ -50,7 +50,7 @@ |
3589 | // Split on & and rejoin with & |
3590 | $params = explode('&', $referingpage, 3); |
3591 | unset($params['message']); |
3592 | - $referingpage = implode('&', $params) . '&message=Token Error'; |
3593 | + $referingpage = implode('&', $params) . '&message=' . __('Sorry the form has expired. Please refresh.'); |
3594 | |
3595 | header('Location:index.php?' . $referingpage); |
3596 | exit; |
3597 | |
3598 | === modified file 'server/lib/pages/layout.class.php' |
3599 | --- server/lib/pages/layout.class.php 2014-03-23 14:43:11 +0000 |
3600 | +++ server/lib/pages/layout.class.php 2014-07-15 15:37:36 +0000 |
3601 | @@ -148,6 +148,9 @@ |
3602 | // Set up the theme variables for the Layout Jump List |
3603 | $this->LayoutJumpListFilter(); |
3604 | |
3605 | + // Set up any JavaScript translations |
3606 | + Theme::Set('translations', json_encode(array('save_position_button' => __('Save Position')))); |
3607 | + |
3608 | // Call the render the template |
3609 | Theme::Render('layout_designer'); |
3610 | |
3611 | @@ -168,7 +171,7 @@ |
3612 | { |
3613 | // Check the token |
3614 | if (!Kit::CheckToken()) |
3615 | - trigger_error('Token does not match', E_USER_ERROR); |
3616 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3617 | |
3618 | $db =& $this->db; |
3619 | $response = new ResponseManager(); |
3620 | @@ -199,7 +202,7 @@ |
3621 | { |
3622 | // Check the token |
3623 | if (!Kit::CheckToken()) |
3624 | - trigger_error('Token does not match', E_USER_ERROR); |
3625 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3626 | |
3627 | $db =& $this->db; |
3628 | $response = new ResponseManager(); |
3629 | @@ -277,7 +280,7 @@ |
3630 | { |
3631 | // Check the token |
3632 | if (!Kit::CheckToken()) |
3633 | - trigger_error('Token does not match', E_USER_ERROR); |
3634 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3635 | |
3636 | $db =& $this->db; |
3637 | $response = new ResponseManager(); |
3638 | @@ -303,7 +306,7 @@ |
3639 | { |
3640 | // Check the token |
3641 | if (!Kit::CheckToken()) |
3642 | - trigger_error('Token does not match', E_USER_ERROR); |
3643 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3644 | |
3645 | $db =& $this->db; |
3646 | $response = new ResponseManager(); |
3647 | @@ -609,7 +612,7 @@ |
3648 | { |
3649 | // Check the token |
3650 | if (!Kit::CheckToken()) |
3651 | - trigger_error('Token does not match', E_USER_ERROR); |
3652 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3653 | |
3654 | $db =& $this->db; |
3655 | $user =& $this->user; |
3656 | @@ -810,7 +813,7 @@ |
3657 | { |
3658 | // Check the token |
3659 | if (!Kit::CheckToken()) |
3660 | - trigger_error('Token does not match', E_USER_ERROR); |
3661 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3662 | |
3663 | $db =& $this->db; |
3664 | $user =& $this->user; |
3665 | |
3666 | === modified file 'server/lib/pages/log.class.php' |
3667 | --- server/lib/pages/log.class.php 2014-01-18 09:47:41 +0000 |
3668 | +++ server/lib/pages/log.class.php 2014-07-15 15:37:36 +0000 |
3669 | @@ -164,6 +164,50 @@ |
3670 | $response->Respond(); |
3671 | } |
3672 | |
3673 | + function LastHundredForDisplay() { |
3674 | + $response = new ResponseManager(); |
3675 | + $displayId = Kit::GetParam('displayid', _GET, _INT); |
3676 | + |
3677 | + try { |
3678 | + $dbh = PDOConnect::init(); |
3679 | + |
3680 | + $sth = $dbh->prepare('SELECT logid, logdate, page, function, message FROM log WHERE displayid = :displayid ORDER BY logid DESC LIMIT 100'); |
3681 | + $sth->execute(array( |
3682 | + 'displayid' => $displayId |
3683 | + )); |
3684 | + |
3685 | + $log = $sth->fetchAll(); |
3686 | + |
3687 | + if (count($log) <= 0) |
3688 | + throw new Exception(__('No log messages for this display')); |
3689 | + |
3690 | + $rows = array(); |
3691 | + |
3692 | + foreach ($log as $row) { |
3693 | + |
3694 | + $row['logid'] = Kit::ValidateParam($row['logid'], _INT); |
3695 | + $row['logdate'] = Kit::ValidateParam($row['logdate'], _STRING); |
3696 | + $row['page'] = Kit::ValidateParam($row['page'], _STRING); |
3697 | + $row['function'] = Kit::ValidateParam($row['function'], _STRING); |
3698 | + $row['message'] = nl2br(htmlspecialchars($row['message'])); |
3699 | + |
3700 | + $rows[] = $row; |
3701 | + } |
3702 | + |
3703 | + Theme::Set('table_rows', $rows); |
3704 | + |
3705 | + $output = Theme::RenderReturn('log_form_display_last100'); |
3706 | + |
3707 | + $response->initialSortOrder = 2; |
3708 | + $response->pageSize = 10; |
3709 | + $response->SetGridResponse($output); |
3710 | + $response->Respond(); |
3711 | + } |
3712 | + catch (Exception $e) { |
3713 | + trigger_error($e->getMessage(), E_USER_ERROR); |
3714 | + } |
3715 | + } |
3716 | + |
3717 | public function TruncateForm() { |
3718 | $db =& $this->db; |
3719 | $user =& $this->user; |
3720 | @@ -192,7 +236,7 @@ |
3721 | { |
3722 | // Check the token |
3723 | if (!Kit::CheckToken()) |
3724 | - trigger_error('Token does not match', E_USER_ERROR); |
3725 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3726 | |
3727 | $db =& $this->db; |
3728 | |
3729 | |
3730 | === modified file 'server/lib/pages/module.class.php' |
3731 | --- server/lib/pages/module.class.php 2014-03-02 15:53:38 +0000 |
3732 | +++ server/lib/pages/module.class.php 2014-07-15 15:37:36 +0000 |
3733 | @@ -208,7 +208,7 @@ |
3734 | { |
3735 | // Check the token |
3736 | if (!Kit::CheckToken()) |
3737 | - trigger_error('Token does not match', E_USER_ERROR); |
3738 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3739 | |
3740 | $db =& $this->db; |
3741 | $response = new ResponseManager(); |
3742 | |
3743 | === modified file 'server/lib/pages/oauth.class.php' |
3744 | --- server/lib/pages/oauth.class.php 2014-01-18 09:47:41 +0000 |
3745 | +++ server/lib/pages/oauth.class.php 2014-07-15 15:37:36 +0000 |
3746 | @@ -218,7 +218,7 @@ |
3747 | { |
3748 | // Check the token |
3749 | if (!Kit::CheckToken()) |
3750 | - trigger_error('Token does not match', E_USER_ERROR); |
3751 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3752 | |
3753 | $db =& $this->db; |
3754 | $user =& $this->user; |
3755 | |
3756 | === modified file 'server/lib/pages/resolution.class.php' |
3757 | --- server/lib/pages/resolution.class.php 2014-01-18 09:47:41 +0000 |
3758 | +++ server/lib/pages/resolution.class.php 2014-07-15 15:37:36 +0000 |
3759 | @@ -197,7 +197,7 @@ |
3760 | { |
3761 | // Check the token |
3762 | if (!Kit::CheckToken()) |
3763 | - trigger_error('Token does not match', E_USER_ERROR); |
3764 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3765 | |
3766 | $db =& $this->db; |
3767 | $user =& $this->user; |
3768 | @@ -221,7 +221,7 @@ |
3769 | { |
3770 | // Check the token |
3771 | if (!Kit::CheckToken()) |
3772 | - trigger_error('Token does not match', E_USER_ERROR); |
3773 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3774 | |
3775 | $db =& $this->db; |
3776 | $user =& $this->user; |
3777 | @@ -246,7 +246,7 @@ |
3778 | { |
3779 | // Check the token |
3780 | if (!Kit::CheckToken()) |
3781 | - trigger_error('Token does not match', E_USER_ERROR); |
3782 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
3783 | |
3784 | $db =& $this->db; |
3785 | $user =& $this->user; |
3786 | |
3787 | === modified file 'server/lib/pages/schedule.class.php' |
3788 | --- server/lib/pages/schedule.class.php 2014-05-24 15:42:46 +0000 |
3789 | +++ server/lib/pages/schedule.class.php 2014-07-15 15:37:36 +0000 |
3790 | @@ -72,7 +72,7 @@ |
3791 | $groups = array(); |
3792 | $displays = array(); |
3793 | |
3794 | - foreach ($user->DisplayGroupList(0 /*IsDisplaySpecific*/, $filter_name) as $display) { |
3795 | + foreach ($user->DisplayGroupList(-1 /*IsDisplaySpecific*/, $filter_name) as $display) { |
3796 | |
3797 | $display['checked_text'] = (in_array($display['displaygroupid'], $displayGroupIDs)) ? 'checked' : ''; |
3798 | |
3799 | @@ -1086,7 +1086,7 @@ |
3800 | trigger_error(__('No Display Groups'), E_USER_ERROR); |
3801 | |
3802 | if ($outputForm) $output .= '<form id="DisplayList" class="DisplayListForm">'; |
3803 | - $output .= __('Groups'); |
3804 | + $output .= __('Groups'); |
3805 | $output .= '<ul class="DisplayList">'; |
3806 | $nested = false; |
3807 | |
3808 | @@ -1140,6 +1140,8 @@ |
3809 | $filterName = ''; |
3810 | } |
3811 | |
3812 | + $pinTranslated = __('Pin?'); |
3813 | + |
3814 | $form = <<<HTML |
3815 | <div class="XiboFilterInner"> |
3816 | <form onsubmit="return false"> |
3817 | @@ -1151,7 +1153,7 @@ |
3818 | <td>$msgName</td> |
3819 | <td><input type="text" name="name" value="$filterName"></td> |
3820 | <td> |
3821 | - <label for="XiboFilterPinned">Pin?</label> |
3822 | + <label for="XiboFilterPinned">$pinTranslated</label> |
3823 | <input id="XiboFilterPinned" name="XiboFilterPinned" type="checkbox" class="XiboFilter" $filterPinned /> |
3824 | </td> |
3825 | </tr> |
3826 | @@ -1253,7 +1255,10 @@ |
3827 | $filterPinned = ''; |
3828 | $filterName = ''; |
3829 | } |
3830 | - |
3831 | + |
3832 | + $pinTranslated = __('Pin?'); |
3833 | + $checkAllTranslated = __('Check All'); |
3834 | + |
3835 | // Serialize the list of display group ids |
3836 | $displayGroupIdsSerialized = ""; |
3837 | foreach ($displayGroupIds as $displayGroupId) |
3838 | @@ -1261,7 +1266,7 @@ |
3839 | |
3840 | $form = <<<HTML |
3841 | <div class="XiboFilterInner"> |
3842 | - <div class="scheduleFormCheckAll pull-right"><label for"checkAll"><input type="checkbox" name="checkAll">Check All</label></div> |
3843 | + <div class="scheduleFormCheckAll pull-right"><label for"checkAll"><input type="checkbox" name="checkAll">$checkAllTranslated</label></div> |
3844 | <form onsubmit="return false"> |
3845 | <input type="hidden" name="p" value="schedule"> |
3846 | <input type="hidden" name="q" value="EventFormDisplay"> |
3847 | @@ -1271,7 +1276,7 @@ |
3848 | <td>$msgName</td> |
3849 | <td><input type="text" name="name" value="$filterName"></td> |
3850 | <td> |
3851 | - <label for="XiboFilterPinned">Pin?</label> |
3852 | + <label for="XiboFilterPinned">$pinTranslated</label> |
3853 | <input id="XiboFilterPinned" name="XiboFilterPinned" type="checkbox" class="XiboFilter" $filterPinned /> |
3854 | </td> |
3855 | </tr> |
3856 | @@ -1308,7 +1313,7 @@ |
3857 | setSession('scheduleEvent', 'DisplayName', $displayName); |
3858 | |
3859 | // Layout list |
3860 | - $displays = $user->DisplayGroupList(0, $displayName); |
3861 | + $displays = $user->DisplayGroupList(-1, $displayName); |
3862 | |
3863 | // Show a list of layouts we have permission to jump to |
3864 | $output = '<table class="table table-bordered">'; |
3865 | @@ -1364,89 +1369,28 @@ |
3866 | $layoutFilter = $this->EventFormLayoutFilter(); |
3867 | $displayFilter = $this->EventFormDisplayFilter($displayGroupIds); |
3868 | |
3869 | - $token = Kit::Token(); |
3870 | - |
3871 | - $form = <<<END |
3872 | -<div class="container-fluid"> |
3873 | - <div class="row-fluid"> |
3874 | - <div class="span6"> |
3875 | - $layoutFilter |
3876 | - </div> |
3877 | - <div class="span6"> |
3878 | - $displayFilter |
3879 | - </div> |
3880 | -</div> |
3881 | -<div class="row-fluid"> |
3882 | - <div class="span12"> |
3883 | -<form id="AddEventForm" class="XiboScheduleForm" action="index.php?p=schedule&q=AddEvent" method="post"> |
3884 | - $token |
3885 | - <table style="width:100%;"> |
3886 | - <tr> |
3887 | - <td colspan="4"><center><h3>Event Schedule</h3></center></td> |
3888 | - </tr> |
3889 | - <tr> |
3890 | - <td><label for="starttime" title="Select the start time for this event">Start Time</label></td> |
3891 | - <td> |
3892 | - <div class="date-pick input-append date"> |
3893 | - <input data-format="dd/MM/yyyy hh:mm" type="text" class="input-medium" name="starttime" id="starttime" value="$dateText"></input> |
3894 | - <span class="add-on"> |
3895 | - <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i> |
3896 | - </span> |
3897 | - </div> |
3898 | - </td> |
3899 | - <td><label for="endtime" title="Select the end time for this event">End Time</label></td> |
3900 | - <td> |
3901 | - <div class="date-pick input-append date"> |
3902 | - <input data-format="dd/MM/yyyy hh:mm" type="text" class="input-medium" name="endtime" id="endtime" value="$toDateText"></input> |
3903 | - <span class="add-on"> |
3904 | - <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i> |
3905 | - </span> |
3906 | - </div> |
3907 | - </td> |
3908 | - </tr> |
3909 | - <tr> |
3910 | - <td><label for="DisplayOrder" title="Select the Order for this Event">Display Order</label></td> |
3911 | - <td><input type=text" name="DisplayOrder" value="0" /> |
3912 | - <td><label title="Sets whether or not this event has priority. If set the event will be show in preference to other events." for="cb_is_priority">Priority</label></td> |
3913 | - <td><input type="checkbox" id="cb_is_priority" name="is_priority" value="1" title="Sets whether or not this event has priority. If set the event will be show in preference to other events."></td> |
3914 | - </tr> |
3915 | -END; |
3916 | - |
3917 | - //recurrance part of the form |
3918 | - $rec_type = listcontent("null|None,Hour|Hourly,Day|Daily,Week|Weekly,Month|Monthly,Year|Yearly", "rec_type"); |
3919 | - |
3920 | - $form .= <<<END |
3921 | - <tr> |
3922 | - <td colspan="4"><center><h3>Recurring Event</h3></center></td> |
3923 | - </tr> |
3924 | - <tr> |
3925 | - <td><label for="rec_type" title="What type of repeating is required">Repeats</label></td> |
3926 | - <td>$rec_type</td> |
3927 | - <td><label for="rec_detail" title="How often does this event repeat">Repeat every</label></td> |
3928 | - <td><input class="number" type="text" name="rec_detail" value="1" /></td> |
3929 | - </tr> |
3930 | - <tr> |
3931 | - <td><label for="rec_range" title="When should this event stop repeating?">Until</label></td> |
3932 | - <td> |
3933 | - <div class="date-pick input-append date"> |
3934 | - <input data-format="dd/MM/yyyy hh:mm" type="text" class="input-medium" name="rec_range" id="rec_range"></input> |
3935 | - <span class="add-on"> |
3936 | - <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i> |
3937 | - </span> |
3938 | - </div> |
3939 | - </td> |
3940 | - </tr> |
3941 | -END; |
3942 | - |
3943 | - $form .= <<<END |
3944 | - </table> |
3945 | - </form> |
3946 | - </div> |
3947 | -</div> |
3948 | -</div> |
3949 | -END; |
3950 | - |
3951 | - $response->SetFormRequestResponse($form, __('Schedule Event'), '800px', '600px'); |
3952 | + $token_id = uniqid(); |
3953 | + $token_field = '<input type="hidden" name="token_id" value="' . $token_id . '" />'; |
3954 | + $token = Kit::Token($token_id); |
3955 | + |
3956 | + Theme::Set('form_id', 'AddEventForm'); |
3957 | + Theme::Set('form_action', 'index.php?p=schedule&q=AddEvent'); |
3958 | + Theme::Set('form_meta', $token_field . $token); |
3959 | + |
3960 | + // Filter forms |
3961 | + Theme::Set('layout_filter', $layoutFilter); |
3962 | + Theme::Set('display_filter', $displayFilter); |
3963 | + |
3964 | + Theme::Set('recurrence_field_list', array( |
3965 | + array('id' => 'null', 'name' => __('None')), |
3966 | + array('id' => 'Hour', 'name' => __('Hourly')), |
3967 | + array('id' => 'Day', 'name' => __('Daily')), |
3968 | + array('id' => 'Week', 'name' => __('Weekly')), |
3969 | + array('id' => 'Month', 'name' => __('Monthly')), |
3970 | + array('id' => 'Year', 'name' => __('Yearly')) |
3971 | + )); |
3972 | + |
3973 | + $response->SetFormRequestResponse(Theme::RenderReturn('schedule_form_add_event'), __('Schedule Event'), '800px', '600px'); |
3974 | $response->AddButton(__('Help'), "XiboHelpRender('index.php?p=help&q=Display&Topic=Schedule&Category=Add')"); |
3975 | $response->AddButton(__('Cancel'), 'XiboDialogClose()'); |
3976 | $response->AddButton(__('Next'), '$("#AddEventForm").attr("action", $("#AddEventForm").attr("action") + "&next=1").submit()'); |
3977 | @@ -1530,89 +1474,37 @@ |
3978 | $layoutFilter = $this->EventFormLayoutFilter($campaignId); |
3979 | $displayFilter = $this->EventFormDisplayFilter($displayGroupIds); |
3980 | |
3981 | - $token = Kit::Token(); |
3982 | - |
3983 | - $form = <<<END |
3984 | -<div class="container-fluid"> |
3985 | -<div class="row-fluid"> |
3986 | - <div class="span6"> |
3987 | - $layoutFilter |
3988 | - </div> |
3989 | - <div class="span6"> |
3990 | - $displayFilter |
3991 | - </div> |
3992 | -</div> |
3993 | -<div class="row-fluid"> |
3994 | - <div class="span12"> |
3995 | -<form id="EditEventForm" class="XiboScheduleForm" action="index.php?p=schedule&q=EditEvent" method="post"> |
3996 | - $token |
3997 | - <input type="hidden" id="EventID" name="EventID" value="$eventID" /> |
3998 | - <input type="hidden" id="EventDetailID" name="EventDetailID" value="$eventDetailID" /> |
3999 | - <table style="width:100%;"> |
4000 | - <tr> |
4001 | - <td colspan="4"><center><h3>Event Schedule</h3></center></td> |
4002 | - </tr> |
4003 | - <tr> |
4004 | - <td><label for="starttime" title="Select the start time for this event">Start Time</label></td> |
4005 | - <td> |
4006 | - <div class="date-pick input-append date"> |
4007 | - <input data-format="dd/MM/yyyy hh:mm" type="text" class="input-medium" name="starttime" id="starttime" value="$fromDtText"></input> |
4008 | - <span class="add-on"> |
4009 | - <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i> |
4010 | - </span> |
4011 | - </div> |
4012 | - </td> |
4013 | - <td><label for="endtime" title="Select the end time for this event">End Time</label></td> |
4014 | - <td> |
4015 | - <div class="date-pick input-append date"> |
4016 | - <input data-format="dd/MM/yyyy hh:mm" type="text" class="input-medium" name="endtime" id="endtime" value="$toDtText"></input> |
4017 | - <span class="add-on"> |
4018 | - <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i> |
4019 | - </span> |
4020 | - </div> |
4021 | - </td> |
4022 | - </tr> |
4023 | - <tr> |
4024 | - <td><label for="DisplayOrder" title="Select the Order for this Event">Display Order</label></td> |
4025 | - <td><input type=text" name="DisplayOrder" value="$displayOrder" /> |
4026 | - <td><label title="Sets whether or not this event has priority. If set the event will be show in preference to other events." for="cb_is_priority">Priority</label></td> |
4027 | - <td><input type="checkbox" id="cb_is_priority" name="is_priority" $isPriority title="Sets whether or not this event has priority. If set the event will be show in preference to other events."></td> |
4028 | - </tr> |
4029 | -END; |
4030 | - |
4031 | - //recurrance part of the form |
4032 | - $rec_type = listcontent("null|None,Hour|Hourly,Day|Daily,Week|Weekly,Month|Monthly,Year|Yearly", "rec_type", $recType); |
4033 | - |
4034 | - $form .= <<<END |
4035 | - <tr> |
4036 | - <td colspan="4"><center><h3>Recurring Event</h3></center></td> |
4037 | - </tr> |
4038 | - <tr> |
4039 | - <td><label for="rec_type" title="What type of repeating is required">Repeats</label></td> |
4040 | - <td>$rec_type</td> |
4041 | - <td><label for="rec_detail" title="How often does this event repeat">Repeat every</label></td> |
4042 | - <td><input class="number" type="text" name="rec_detail" value="$recDetail" /></td> |
4043 | - </tr> |
4044 | - <tr> |
4045 | - <td><label for="rec_range" title="When should this event stop repeating?">Until</label></td> |
4046 | - <td><div class="date-pick input-append date"> |
4047 | - <input data-format="dd/MM/yyyy hh:mm" type="text" class="input-medium" name="rec_range" id="rec_range" value="$recToDtText"></input> |
4048 | - <span class="add-on"> |
4049 | - <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i> |
4050 | - </span> |
4051 | - </div></td> |
4052 | - </tr> |
4053 | -END; |
4054 | - |
4055 | - $form .= <<<END |
4056 | - </table> |
4057 | - </form> |
4058 | - </div> |
4059 | -</div> |
4060 | -</div> |
4061 | -END; |
4062 | - |
4063 | - $response->SetFormRequestResponse($form, __('Edit Event'), '800px', '600px'); |
4064 | + $token_id = uniqid(); |
4065 | + $token_field = '<input type="hidden" name="token_id" value="' . $token_id . '" />'; |
4066 | + $token = Kit::Token($token_id); |
4067 | + |
4068 | + Theme::Set('form_id', 'EditEventForm'); |
4069 | + Theme::Set('form_action', 'index.php?p=schedule&q=EditEvent'); |
4070 | + Theme::Set('form_meta', $token_field . $token . '<input type="hidden" id="EventID" name="EventID" value="' . $eventID . '" /><input type="hidden" id="EventDetailID" name="EventDetailID" value="' . $eventDetailID . '" />'); |
4071 | + |
4072 | + // Filter forms |
4073 | + Theme::Set('layout_filter', $layoutFilter); |
4074 | + Theme::Set('display_filter', $displayFilter); |
4075 | + |
4076 | + // Values |
4077 | + Theme::Set('starttime', $fromDtText); |
4078 | + Theme::Set('endtime', $toDtText); |
4079 | + Theme::Set('display_order', $displayOrder); |
4080 | + Theme::Set('is_priority', $isPriority); |
4081 | + |
4082 | + Theme::Set('recurrence_field_list', array( |
4083 | + array('id' => 'null', 'name' => __('None')), |
4084 | + array('id' => 'Hour', 'name' => __('Hourly')), |
4085 | + array('id' => 'Day', 'name' => __('Daily')), |
4086 | + array('id' => 'Week', 'name' => __('Weekly')), |
4087 | + array('id' => 'Month', 'name' => __('Monthly')), |
4088 | + array('id' => 'Year', 'name' => __('Yearly')) |
4089 | + )); |
4090 | + Theme::Set('rec_type', $recType); |
4091 | + Theme::Set('rec_detail', $recDetail); |
4092 | + Theme::Set('rec_range', $recToDtText); |
4093 | + |
4094 | + $response->SetFormRequestResponse(Theme::RenderReturn('schedule_form_edit_event'), __('Edit Event'), '800px', '600px'); |
4095 | $response->AddButton(__('Help'), "XiboHelpRender('index.php?p=help&q=Display&Topic=Schedule&Category=Edit')"); |
4096 | $response->AddButton(__('Delete'), 'XiboFormRender("index.php?p=schedule&q=DeleteForm&EventID=' . $eventID . '")'); |
4097 | $response->AddButton(__('Cancel'), 'XiboDialogClose()'); |
4098 | @@ -1629,8 +1521,8 @@ |
4099 | public function AddEvent() |
4100 | { |
4101 | // Check the token |
4102 | - if (!Kit::CheckToken()) |
4103 | - trigger_error('Token does not match', E_USER_ERROR); |
4104 | + if (!Kit::CheckToken(Kit::GetParam('token_id', _POST, _STRING))) |
4105 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
4106 | |
4107 | $db =& $this->db; |
4108 | $user =& $this->user; |
4109 | @@ -1711,8 +1603,8 @@ |
4110 | public function EditEvent() |
4111 | { |
4112 | // Check the token |
4113 | - if (!Kit::CheckToken()) |
4114 | - trigger_error('Token does not match', E_USER_ERROR); |
4115 | + if (!Kit::CheckToken(Kit::GetParam('token_id', _POST, _STRING))) |
4116 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
4117 | |
4118 | $db =& $this->db; |
4119 | $user =& $this->user; |
4120 | @@ -1796,7 +1688,8 @@ |
4121 | $eventID = Kit::GetParam('EventID', _GET, _INT, 0); |
4122 | $eventDetailID = Kit::GetParam('EventDetailID', _GET, _INT, 0); |
4123 | |
4124 | - if ($eventID == 0) trigger_error('No event selected.', E_USER_ERROR); |
4125 | + if ($eventID == 0) |
4126 | + trigger_error(__('No event selected.'), E_USER_ERROR); |
4127 | |
4128 | $strQuestion = __('Are you sure you want to delete this event from <b>all</b> displays?'); |
4129 | $strAdvice = __('If you only want to delete this item from certain displays, please deselect the displays in the edit dialogue and click Save.'); |
4130 | @@ -1834,7 +1727,7 @@ |
4131 | { |
4132 | // Check the token |
4133 | if (!Kit::CheckToken()) |
4134 | - trigger_error('Token does not match', E_USER_ERROR); |
4135 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
4136 | |
4137 | $db =& $this->db; |
4138 | $user =& $this->user; |
4139 | @@ -1843,7 +1736,8 @@ |
4140 | $eventID = Kit::GetParam('EventID', _POST, _INT, 0); |
4141 | $eventDetailID = Kit::GetParam('EventDetailID', _POST, _INT, 0); |
4142 | |
4143 | - if ($eventID == 0) trigger_error('No event selected.', E_USER_ERROR); |
4144 | + if ($eventID == 0) |
4145 | + trigger_error(__('No event selected.'), E_USER_ERROR); |
4146 | |
4147 | // Create an object to use for the delete |
4148 | $scheduleObject = new Schedule($db); |
4149 | @@ -1903,42 +1797,19 @@ |
4150 | |
4151 | $outputForm = false; |
4152 | $displayList = $this->UnorderedListofDisplays($outputForm, $displayGroupIds); |
4153 | + |
4154 | $token = Kit::Token(); |
4155 | |
4156 | - $form = <<<END |
4157 | - <form id="ScheduleNowForm" class="XiboForm" action="index.php?p=schedule&q=ScheduleNow" method="post"> |
4158 | - $token |
4159 | - <table style="width:100%;"> |
4160 | - <tr> |
4161 | - <td><label for="duration" title="How long should this event be scheduled for">Duration<span class="required">*</span></label></td> |
4162 | - <td>H: <input type="text" name="hours" id="hours" size="2" class="number span1"> |
4163 | - M: <input type="text" name="minutes" id="minutes" size="2" class="number span1"> |
4164 | - S: <input type="text" name="seconds" id="seconds" size="2" class="number span1"></td> |
4165 | - </tr> |
4166 | - <tr> |
4167 | - <td><label for="CampaignID" title="Select which layout this event will show.">Campaign/Layout<span class="required">*</span></label></td> |
4168 | - <td>$layoutList</td> |
4169 | - </tr> |
4170 | - <tr> |
4171 | - <td><label for="DisplayOrder" title="Select the Order for this Event">Display Order</label></td> |
4172 | - <td><input type=text" name="DisplayOrder" value="0" /> |
4173 | - </tr> |
4174 | - <tr> |
4175 | - <td><label title="Sets whether or not this event has priority. If set the event will be show in preference to other events." for="cb_is_priority">Priority</label></td> |
4176 | - <td><input type="checkbox" id="cb_is_priority" name="is_priority" value="1" title="Sets whether or not this event has priority. If set the event will be show in preference to other events."></td> |
4177 | - </tr> |
4178 | - <tr> |
4179 | - <td> |
4180 | - <div class="FormDisplayList"> |
4181 | - $displayList |
4182 | - </div> |
4183 | - </td> |
4184 | - </tr> |
4185 | - </table> |
4186 | - </form> |
4187 | -END; |
4188 | - |
4189 | - $response->SetFormRequestResponse($form, __('Schedule Now'), '700px', '400px'); |
4190 | + Theme::Set('form_id', 'ScheduleNowForm'); |
4191 | + Theme::Set('form_action', 'index.php?p=schedule&q=ScheduleNow'); |
4192 | + Theme::Set('form_meta', $token); |
4193 | + |
4194 | + // Filter forms |
4195 | + Theme::Set('display_list', $displayList); |
4196 | + Theme::Set('layout_list', $layoutList); |
4197 | + |
4198 | + |
4199 | + $response->SetFormRequestResponse(Theme::RenderReturn('schedule_form_schedule_now'), __('Schedule Now'), '700px', '400px'); |
4200 | $response->AddButton(__('Help'), "XiboHelpRender('index.php?p=help&q=Display&Topic=Schedule&Category=ScheduleNow')"); |
4201 | $response->AddButton(__('Cancel'), 'XiboDialogClose()'); |
4202 | $response->AddButton(__('Save'), '$("#ScheduleNowForm").submit()'); |
4203 | @@ -1949,7 +1820,7 @@ |
4204 | { |
4205 | // Check the token |
4206 | if (!Kit::CheckToken()) |
4207 | - trigger_error('Token does not match', E_USER_ERROR); |
4208 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
4209 | |
4210 | $db =& $this->db; |
4211 | $user =& $this->user; |
4212 | @@ -2040,7 +1911,7 @@ |
4213 | { |
4214 | // Check the token |
4215 | if (!Kit::CheckToken()) |
4216 | - trigger_error('Token does not match', E_USER_ERROR); |
4217 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
4218 | |
4219 | $db =& $this->db; |
4220 | $user =& $this->user; |
4221 | |
4222 | === modified file 'server/lib/pages/sessions.class.php' |
4223 | --- server/lib/pages/sessions.class.php 2014-01-18 15:42:59 +0000 |
4224 | +++ server/lib/pages/sessions.class.php 2014-07-15 15:37:36 +0000 |
4225 | @@ -45,8 +45,8 @@ |
4226 | // Construct Filter Form |
4227 | if (Kit::IsFilterPinned('sessions', 'Filter')) { |
4228 | Theme::Set('filter_pinned', 'checked'); |
4229 | - Theme::Set('filter_type', Session::Get('user', 'filter_type')); |
4230 | - Theme::Set('filter_fromdt', Session::Get('user', 'filter_fromdt')); |
4231 | + Theme::Set('filter_type', Session::Get('sessions', 'filter_type')); |
4232 | + Theme::Set('filter_fromdt', Session::Get('sessions', 'filter_fromdt')); |
4233 | } |
4234 | else { |
4235 | Theme::Set('filter_type', 0); |
4236 | @@ -84,7 +84,7 @@ |
4237 | $SQL .= "WHERE 1 = 1 "; |
4238 | |
4239 | if ($fromdt != '') |
4240 | - $SQL .= sprintf(" AND session_expiration < '%s' ", $starttime_timestamp); |
4241 | + $SQL .= sprintf(" AND session.LastAccessed < '%s' ", date("Y-m-d h:i:s", $starttime_timestamp)); |
4242 | |
4243 | if ($type == "active") |
4244 | $SQL .= " AND IsExpired = 0 "; |
4245 | @@ -98,6 +98,8 @@ |
4246 | // Load results into an array |
4247 | $log = $db->GetArray($SQL); |
4248 | |
4249 | + Debug::LogEntry('audit', $SQL); |
4250 | + |
4251 | if (!is_array($log)) |
4252 | { |
4253 | trigger_error($db->error()); |
4254 | @@ -163,7 +165,7 @@ |
4255 | { |
4256 | // Check the token |
4257 | if (!Kit::CheckToken()) |
4258 | - trigger_error('Token does not match', E_USER_ERROR); |
4259 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
4260 | |
4261 | $db =& $this->db; |
4262 | |
4263 | |
4264 | === modified file 'server/lib/pages/stats.class.php' |
4265 | --- server/lib/pages/stats.class.php 2014-05-25 12:26:12 +0000 |
4266 | +++ server/lib/pages/stats.class.php 2014-07-15 15:37:36 +0000 |
4267 | @@ -1,7 +1,7 @@ |
4268 | <?php |
4269 | /* |
4270 | * Xibo - Digital Signage - http://www.xibo.org.uk |
4271 | - * Copyright (C) 2009-2013 Daniel Garner |
4272 | + * Copyright (C) 2009-2014 Daniel Garner |
4273 | * |
4274 | * This file is part of Xibo. |
4275 | * |
4276 | @@ -236,9 +236,9 @@ |
4277 | $output = ''; |
4278 | |
4279 | // We are expecting some parameters |
4280 | - $fromdt = Kit::GetParam('fromdt', _POST, _STRING); |
4281 | - $todt = Kit::GetParam('todt', _POST, _STRING); |
4282 | - $displayID = Kit::GetParam('displayid', _POST, _INT); |
4283 | + $fromdt = Kit::GetParam('fromdt', _GET, _STRING); |
4284 | + $todt = Kit::GetParam('todt', _GET, _STRING); |
4285 | + $displayID = Kit::GetParam('displayid', _GET, _INT); |
4286 | |
4287 | if ($fromdt == $todt) { |
4288 | $todt = date("Y-m-d", strtotime($todt) + 86399); |
4289 | |
4290 | === modified file 'server/lib/pages/statusdashboard.class.php' |
4291 | --- server/lib/pages/statusdashboard.class.php 2014-05-01 20:44:09 +0000 |
4292 | +++ server/lib/pages/statusdashboard.class.php 2014-07-15 15:37:36 +0000 |
4293 | @@ -76,7 +76,7 @@ |
4294 | } |
4295 | |
4296 | // Set the data |
4297 | - Theme::Set('bandwidth-widget', json_encode($output)); |
4298 | + Theme::Set('bandwidth-widget', 'var flot_bandwidth_chart = ' . json_encode($output)); |
4299 | |
4300 | // We would also like a library usage pie chart! |
4301 | $libraryLimit = Config::GetSetting('LIBRARY_SIZE_LIMIT_KB'); |
4302 | @@ -84,22 +84,28 @@ |
4303 | // Library Size in Bytes |
4304 | $sth = $dbh->prepare('SELECT IFNULL(SUM(FileSize), 0) AS SumSize FROM media;'); |
4305 | $sth->execute(); |
4306 | - $librarySize = $sth->fetchColumn(); |
4307 | - |
4308 | - // Pie chart |
4309 | - $output = array(); |
4310 | - $output['points'][] = array('label' => 'Used', 'data' => (double)$librarySize); |
4311 | - |
4312 | - if ($libraryLimit > 0) { |
4313 | - $libraryLimit = $libraryLimit * 1024; |
4314 | - $output['points'][] = array('label' => 'Available', 'data' => ((double)$libraryLimit - $librarySize)); |
4315 | - } |
4316 | - |
4317 | - $output['config']['series']['pie']['show'] = true; |
4318 | - $output['config']['legend']['show'] = false; |
4319 | - |
4320 | - Theme::Set('library-widget', json_encode($output)); |
4321 | - |
4322 | + $librarySize = $sth->fetchColumn(); |
4323 | + |
4324 | + if ($libraryLimit == 0) { |
4325 | + |
4326 | + Theme::Set('library-widget', '<p class="bold-counter text-center">' . Kit::formatBytes($librarySize) . '</p>'); |
4327 | + } |
4328 | + else { |
4329 | + // Pie chart |
4330 | + $output = array(); |
4331 | + $output['points'][] = array('label' => 'Used', 'data' => (double)$librarySize); |
4332 | + |
4333 | + if ($libraryLimit > 0) { |
4334 | + $libraryLimit = $libraryLimit * 1024; |
4335 | + $output['points'][] = array('label' => 'Available', 'data' => ((double)$libraryLimit - $librarySize)); |
4336 | + } |
4337 | + |
4338 | + $output['config']['series']['pie']['show'] = true; |
4339 | + $output['config']['legend']['show'] = false; |
4340 | + |
4341 | + Theme::Set('library-widget', '<div id="flot_library_chart" style="height: 400px;" class="flot-chart"></div>'); |
4342 | + Theme::Set('library-widget-js', 'var flot_library_chart = ' . json_encode($output)); |
4343 | + } |
4344 | |
4345 | // Also a display widget |
4346 | $sort_order = array('display'); |
4347 | @@ -136,4 +142,4 @@ |
4348 | Theme::Render('status_dashboard'); |
4349 | } |
4350 | } |
4351 | -?> |
4352 | \ No newline at end of file |
4353 | +?> |
4354 | |
4355 | === modified file 'server/lib/pages/template.class.php' |
4356 | --- server/lib/pages/template.class.php 2014-01-18 09:47:41 +0000 |
4357 | +++ server/lib/pages/template.class.php 2014-07-15 15:37:36 +0000 |
4358 | @@ -165,7 +165,7 @@ |
4359 | { |
4360 | // Check the token |
4361 | if (!Kit::CheckToken()) |
4362 | - trigger_error('Token does not match', E_USER_ERROR); |
4363 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
4364 | |
4365 | $db =& $this->db; |
4366 | $user =& $this->user; |
4367 | @@ -196,7 +196,7 @@ |
4368 | { |
4369 | // Check the token |
4370 | if (!Kit::CheckToken()) |
4371 | - trigger_error('Token does not match', E_USER_ERROR); |
4372 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
4373 | |
4374 | $db =& $this->db; |
4375 | $user =& $this->user; |
4376 | @@ -377,7 +377,7 @@ |
4377 | { |
4378 | // Check the token |
4379 | if (!Kit::CheckToken()) |
4380 | - trigger_error('Token does not match', E_USER_ERROR); |
4381 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
4382 | |
4383 | $db =& $this->db; |
4384 | $user =& $this->user; |
4385 | |
4386 | === modified file 'server/lib/pages/timeline.class.php' |
4387 | --- server/lib/pages/timeline.class.php 2014-05-13 15:43:16 +0000 |
4388 | +++ server/lib/pages/timeline.class.php 2014-07-15 15:37:36 +0000 |
4389 | @@ -197,7 +197,7 @@ |
4390 | { |
4391 | // Check the token |
4392 | if (!Kit::CheckToken()) |
4393 | - trigger_error('Token does not match', E_USER_ERROR); |
4394 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
4395 | |
4396 | $db =& $this->db; |
4397 | $user =& $this->user; |
4398 | @@ -780,7 +780,7 @@ |
4399 | |
4400 | // Put the media name in |
4401 | $response->html .= ' <div class="timelineMediaDetails ' . $mediaBlockColouringClass . '">'; |
4402 | - $response->html .= ' <h3>' . (($mediaName == '') ? $tmpModule->displayType : $mediaName) . ' (' . $mediaDuration . ' seconds)</h3>'; |
4403 | + $response->html .= ' <h3>' . sprintf('%s (%d seconds)', (($mediaName == '') ? __($tmpModule->displayType) : $mediaName), $mediaDuration) . '</h3>'; |
4404 | $response->html .= ' </div>'; |
4405 | |
4406 | // Put the media hover preview in |
4407 | |
4408 | === modified file 'server/lib/pages/transition.class.php' |
4409 | --- server/lib/pages/transition.class.php 2014-01-18 09:47:41 +0000 |
4410 | +++ server/lib/pages/transition.class.php 2014-07-15 15:37:36 +0000 |
4411 | @@ -173,7 +173,7 @@ |
4412 | { |
4413 | // Check the token |
4414 | if (!Kit::CheckToken()) |
4415 | - trigger_error('Token does not match', E_USER_ERROR); |
4416 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
4417 | |
4418 | $db =& $this->db; |
4419 | $response = new ResponseManager(); |
4420 | |
4421 | === modified file 'server/lib/pages/user.class.php' |
4422 | --- server/lib/pages/user.class.php 2014-02-12 17:52:53 +0000 |
4423 | +++ server/lib/pages/user.class.php 2014-07-15 15:37:36 +0000 |
4424 | @@ -57,10 +57,10 @@ |
4425 | Theme::Set('user_form_add_url', 'index.php?p=user&q=DisplayForm'); |
4426 | Theme::Set('myapplications_form_add_url', 'index.php?p=user&q=MyApplications'); |
4427 | |
4428 | - if (Kit::IsFilterPinned('user', 'Filter')) { |
4429 | + if (Kit::IsFilterPinned('user_admin', 'Filter')) { |
4430 | Theme::Set('filter_pinned', 'checked'); |
4431 | - Theme::Set('filter_username', Session::Get('user', 'filter_username')); |
4432 | - Theme::Set('filter_usertypeid', Session::Get('user', 'filter_usertypeid')); |
4433 | + Theme::Set('filter_username', Session::Get('user_admin', 'filter_username')); |
4434 | + Theme::Set('filter_usertypeid', Session::Get('user_admin', 'filter_usertypeid')); |
4435 | } |
4436 | else { |
4437 | Theme::Set('filter_usertypeid', 0); |
4438 | @@ -88,14 +88,14 @@ |
4439 | // Capture the filter options |
4440 | // User ID |
4441 | $filter_username = Kit::GetParam('filter_username', _POST, _STRING); |
4442 | - setSession('user', 'filter_username', $filter_username); |
4443 | + setSession('user_admin', 'filter_username', $filter_username); |
4444 | |
4445 | // User Type ID |
4446 | $filter_usertypeid = Kit::GetParam('filter_usertypeid', _POST, _INT); |
4447 | - setSession('user', 'filter_usertypeid', $filter_usertypeid); |
4448 | + setSession('user_admin', 'filter_usertypeid', $filter_usertypeid); |
4449 | |
4450 | // Pinned option? |
4451 | - setSession('user', 'Filter', Kit::GetParam('XiboFilterPinned', _REQUEST, _CHECKBOX, 'off')); |
4452 | + setSession('user_admin', 'Filter', Kit::GetParam('XiboFilterPinned', _REQUEST, _CHECKBOX, 'off')); |
4453 | |
4454 | // Generate the results |
4455 | $sql = "SELECT user.UserID, user.UserName, user.usertypeid, user.loggedin, user.lastaccessed, user.email, user.homepage "; |
4456 | @@ -207,7 +207,7 @@ |
4457 | { |
4458 | // Check the token |
4459 | if (!Kit::CheckToken()) |
4460 | - trigger_error('Token does not match', E_USER_ERROR); |
4461 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
4462 | |
4463 | $db =& $this->db; |
4464 | $response = new ResponseManager(); |
4465 | @@ -297,7 +297,7 @@ |
4466 | { |
4467 | // Check the token |
4468 | if (!Kit::CheckToken()) |
4469 | - trigger_error('Token does not match', E_USER_ERROR); |
4470 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
4471 | |
4472 | $db =& $this->db; |
4473 | $response = new ResponseManager(); |
4474 | @@ -370,7 +370,7 @@ |
4475 | { |
4476 | // Check the token |
4477 | if (!Kit::CheckToken()) |
4478 | - trigger_error('Token does not match', E_USER_ERROR); |
4479 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
4480 | |
4481 | $db =& $this->db; |
4482 | $user =& $this->user; |
4483 | @@ -611,7 +611,7 @@ |
4484 | { |
4485 | // Check the token |
4486 | if (!Kit::CheckToken()) |
4487 | - trigger_error('Token does not match', E_USER_ERROR); |
4488 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
4489 | |
4490 | $db =& $this->db; |
4491 | $response = new ResponseManager(); |
4492 | @@ -701,7 +701,7 @@ |
4493 | { |
4494 | // Check the token |
4495 | if (!Kit::CheckToken()) |
4496 | - trigger_error('Token does not match', E_USER_ERROR); |
4497 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
4498 | |
4499 | $db =& $this->db; |
4500 | $response = new ResponseManager(); |
4501 | @@ -752,7 +752,7 @@ |
4502 | { |
4503 | // Check the token |
4504 | if (!Kit::CheckToken()) |
4505 | - trigger_error('Token does not match', E_USER_ERROR); |
4506 | + trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); |
4507 | |
4508 | $db =& $this->db; |
4509 | $response = new ResponseManager(); |
4510 | |
4511 | === modified file 'server/lib/service/rest.class.php' |
4512 | --- server/lib/service/rest.class.php 2014-01-18 09:47:41 +0000 |
4513 | +++ server/lib/service/rest.class.php 2014-07-15 15:37:36 +0000 |
4514 | @@ -257,7 +257,7 @@ |
4515 | */ |
4516 | public function LibraryMediaList() |
4517 | { |
4518 | - if (!$this->user->PageAuth('media')) |
4519 | + if (!$this->user->PageAuth('content')) |
4520 | return $this->Error(1, 'Access Denied'); |
4521 | |
4522 | $media = $this->user->MediaList(); |
4523 | @@ -276,7 +276,7 @@ |
4524 | public function LibraryMediaFileUpload() |
4525 | { |
4526 | // Does this user have permission to call this webservice method? |
4527 | - if (!$this->user->PageAuth('media')) |
4528 | + if (!$this->user->PageAuth('content')) |
4529 | return $this->Error(1, 'Access Denied'); |
4530 | |
4531 | Kit::ClassLoader('file'); |
4532 | @@ -330,7 +330,7 @@ |
4533 | public function LibraryMediaAdd() |
4534 | { |
4535 | // Does this user have permission to call this webservice method? |
4536 | - if (!$this->user->PageAuth('media')) |
4537 | + if (!$this->user->PageAuth('content')) |
4538 | return $this->Error(1, 'Access Denied'); |
4539 | |
4540 | Kit::ClassLoader('Media'); |
4541 | @@ -360,7 +360,7 @@ |
4542 | */ |
4543 | public function LibraryMediaEdit() |
4544 | { |
4545 | - if (!$this->user->PageAuth('media')) |
4546 | + if (!$this->user->PageAuth('content')) |
4547 | return $this->Error(1, 'Access Denied'); |
4548 | |
4549 | Kit::ClassLoader('Media'); |
4550 | @@ -388,7 +388,7 @@ |
4551 | */ |
4552 | public function LibraryMediaRetire() |
4553 | { |
4554 | - if (!$this->user->PageAuth('media')) |
4555 | + if (!$this->user->PageAuth('content')) |
4556 | return $this->Error(1, 'Access Denied'); |
4557 | |
4558 | Kit::ClassLoader('Media'); |
4559 | @@ -410,7 +410,7 @@ |
4560 | */ |
4561 | public function LibraryMediaDelete() |
4562 | { |
4563 | - if (!$this->user->PageAuth('media')) |
4564 | + if (!$this->user->PageAuth('content')) |
4565 | return $this->Error(1, 'Access Denied'); |
4566 | |
4567 | Kit::ClassLoader('Media'); |
4568 | @@ -434,7 +434,7 @@ |
4569 | public function LibraryMediaFileRevise() |
4570 | { |
4571 | // Does this user have permission to call this webservice method? |
4572 | - if (!$this->user->PageAuth('media')) |
4573 | + if (!$this->user->PageAuth('content')) |
4574 | return $this->Error(1, 'Access Denied'); |
4575 | |
4576 | Kit::ClassLoader('Media'); |
4577 | @@ -1164,7 +1164,7 @@ |
4578 | public function ModuleList() |
4579 | { |
4580 | // Does this user have permission to call this webservice method? |
4581 | - if (!$this->user->PageAuth('media')) |
4582 | + if (!$this->user->PageAuth('content')) |
4583 | return $this->Error(1, 'Access Denied'); |
4584 | |
4585 | Kit::ClassLoader('Media'); |
4586 | @@ -1179,6 +1179,462 @@ |
4587 | } |
4588 | |
4589 | /** |
4590 | + * DataSet List |
4591 | + * @return <XiboAPIResponse> |
4592 | + */ |
4593 | + public function DataSetList() { |
4594 | + // Auth |
4595 | + if (!$this->user->PageAuth('dataset')) |
4596 | + return $this->Error(1, 'Access Denied'); |
4597 | + |
4598 | + $dataset = $this->user->DataSetList(); |
4599 | + |
4600 | + if (!is_array($dataset)) |
4601 | + return $this->Error(2, 'No datasets'); |
4602 | + |
4603 | + return $this->Respond($this->NodeListFromArray($dataset, 'dataset')); |
4604 | + } |
4605 | + |
4606 | + /** |
4607 | + * DataSet Add |
4608 | + * @return <XiboAPIResponse> |
4609 | + */ |
4610 | + public function DataSetAdd() { |
4611 | + // Auth |
4612 | + if (!$this->user->PageAuth('dataset')) |
4613 | + return $this->Error(1, 'Access Denied'); |
4614 | + |
4615 | + $dataSet = $this->GetParam('dataset', _STRING); |
4616 | + $description = $this->GetParam('description', _STRING); |
4617 | + |
4618 | + Kit::ClassLoader('dataset'); |
4619 | + $dataSetObject = new DataSet($this->db); |
4620 | + if (!$dataSetId = $dataSetObject->Add($dataSet, $description, $this->user->userid)) |
4621 | + return $this->Error($dataSetObject->GetErrorNumber(), $dataSetObject->GetErrorMessage()); |
4622 | + |
4623 | + return $this->Respond($this->ReturnId('dataset', $dataSetId)); |
4624 | + } |
4625 | + |
4626 | + /** |
4627 | + * DataSet Edit |
4628 | + * @return <XiboAPIResponse> |
4629 | + */ |
4630 | + public function DataSetEdit() { |
4631 | + // Auth |
4632 | + if (!$this->user->PageAuth('dataset')) |
4633 | + return $this->Error(1, 'Access Denied'); |
4634 | + |
4635 | + $dataSetId = $this->GetParam('dataSetId', _INT); |
4636 | + |
4637 | + $auth = $this->user->DataSetAuth($dataSetId, true); |
4638 | + if (!$auth->edit) |
4639 | + return $this->Error(1, 'Access Denied'); |
4640 | + |
4641 | + $dataSet = $this->GetParam('dataset', _STRING); |
4642 | + $description = $this->GetParam('description', _STRING); |
4643 | + |
4644 | + Kit::ClassLoader('dataset'); |
4645 | + $dataSetObject = new DataSet($this->db); |
4646 | + if (!$dataSetObject->Edit($dataSetId, $dataSet, $description)) |
4647 | + return $this->Error($dataSetObject->GetErrorNumber(), $dataSetObject->GetErrorMessage()); |
4648 | + |
4649 | + return $this->Respond($this->ReturnId('success', true)); |
4650 | + } |
4651 | + |
4652 | + /** |
4653 | + * DataSet Delete |
4654 | + * @return <XiboAPIResponse> |
4655 | + */ |
4656 | + public function DataSetDelete() { |
4657 | + // Auth |
4658 | + if (!$this->user->PageAuth('dataset')) |
4659 | + return $this->Error(1, 'Access Denied'); |
4660 | + |
4661 | + $dataSetId = $this->GetParam('dataSetId', _INT); |
4662 | + |
4663 | + $auth = $this->user->DataSetAuth($dataSetId, true); |
4664 | + if (!$auth->delete) |
4665 | + return $this->Error(1, 'Access Denied'); |
4666 | + |
4667 | + Kit::ClassLoader('dataset'); |
4668 | + $dataSetObject = new DataSet($this->db); |
4669 | + if (!$dataSetObject->Delete($dataSetId)) |
4670 | + return $this->Error($dataSetObject->GetErrorNumber(), $dataSetObject->GetErrorMessage()); |
4671 | + |
4672 | + return $this->Respond($this->ReturnId('success', true)); |
4673 | + } |
4674 | + |
4675 | + /** |
4676 | + * DataSet Column List |
4677 | + * @return <XiboAPIResponse> |
4678 | + */ |
4679 | + public function DataSetColumnList() { |
4680 | + // Auth |
4681 | + if (!$this->user->PageAuth('dataset')) |
4682 | + return $this->Error(1, 'Access Denied'); |
4683 | + |
4684 | + $dataSetId = $this->GetParam('dataSetId', _INT); |
4685 | + |
4686 | + $auth = $this->user->DataSetAuth($dataSetId, true); |
4687 | + if (!$auth->view) |
4688 | + return $this->Error(1, 'Access Denied'); |
4689 | + |
4690 | + Kit::ClassLoader('datasetcolumn'); |
4691 | + $dataSetObject = new DataSetColumn($this->db); |
4692 | + if (!$columns = $dataSetObject->GetColumns($dataSetId)) |
4693 | + return $this->Error($dataSetObject->GetErrorNumber(), $dataSetObject->GetErrorMessage()); |
4694 | + |
4695 | + return $this->Respond($this->NodeListFromArray($columns, 'datasetcolumn')); |
4696 | + } |
4697 | + |
4698 | + /** |
4699 | + * DataSet Column Add |
4700 | + * @return <XiboAPIResponse> |
4701 | + */ |
4702 | + public function DataSetColumnAdd() { |
4703 | + // Auth |
4704 | + if (!$this->user->PageAuth('dataset')) |
4705 | + return $this->Error(1, 'Access Denied'); |
4706 | + |
4707 | + $dataSetId = $this->GetParam('dataSetId', _INT); |
4708 | + |
4709 | + $auth = $this->user->DataSetAuth($dataSetId, true); |
4710 | + if (!$auth->edit) |
4711 | + return $this->Error(1, 'Access Denied'); |
4712 | + |
4713 | + $heading = $this->GetParam('heading', _STRING); |
4714 | + $listContent = $this->GetParam('listContent', _STRING); |
4715 | + $columnOrder = $this->GetParam('columnOrder', _INT); |
4716 | + $dataTypeId = $this->GetParam('dataTypeId', _INT); |
4717 | + $dataSetColumnTypeId = $this->GetParam('datasetColumnTypeId', _INT); |
4718 | + $formula = $this->GetParam('formula', _STRING); |
4719 | + |
4720 | + Kit::ClassLoader('datasetcolumn'); |
4721 | + $dataSetColumnObject = new DataSetColumn($this->db); |
4722 | + if (!$dataSetColumnId = $dataSetColumnObject->Add($dataSetId, $heading, $dataTypeId, $listContent, $columnOrder, $dataSetColumnTypeId, $formula)) |
4723 | + return $this->Error($dataSetColumnObject->GetErrorNumber(), $dataSetColumnObject->GetErrorMessage()); |
4724 | + |
4725 | + return $this->Respond($this->ReturnId('datasetcolumn', $dataSetColumnId)); |
4726 | + } |
4727 | + |
4728 | + /** |
4729 | + * DataSet Column Edit |
4730 | + * @return <XiboAPIResponse> |
4731 | + */ |
4732 | + public function DataSetColumnEdit() { |
4733 | + // Auth |
4734 | + if (!$this->user->PageAuth('dataset')) |
4735 | + return $this->Error(1, 'Access Denied'); |
4736 | + |
4737 | + $dataSetId = $this->GetParam('dataSetId', _INT); |
4738 | + |
4739 | + $auth = $this->user->DataSetAuth($dataSetId, true); |
4740 | + if (!$auth->edit) |
4741 | + return $this->Error(1, 'Access Denied'); |
4742 | + |
4743 | + $dataSetColumnId = $this->GetParam('datasetColumnId', _POST, _INT); |
4744 | + $heading = $this->GetParam('heading', _STRING); |
4745 | + $listContent = $this->GetParam('listContent', _STRING); |
4746 | + $columnOrder = $this->GetParam('columnOrder', _INT); |
4747 | + $dataTypeId = $this->GetParam('dataTypeId', _INT); |
4748 | + $dataSetColumnTypeId = $this->GetParam('datasetColumnTypeId', _INT); |
4749 | + $formula = $this->GetParam('formula', _STRING); |
4750 | + |
4751 | + Kit::ClassLoader('datasetcolumn'); |
4752 | + $dataSetColumnObject = new DataSetColumn($this->db); |
4753 | + if (!$dataSetColumnObject->Edit($dataSetColumnId, $heading, $dataTypeId, $listContent, $columnOrder, $dataSetColumnTypeId, $formula)) |
4754 | + return $this->Error($dataSetColumnObject->GetErrorNumber(), $dataSetColumnObject->GetErrorMessage()); |
4755 | + |
4756 | + return $this->Respond($this->ReturnId('success', true)); |
4757 | + } |
4758 | + |
4759 | + /** |
4760 | + * DataSet Column Delete |
4761 | + * @return <XiboAPIResponse> |
4762 | + */ |
4763 | + public function DataSetColumnDelete() { |
4764 | + // Auth |
4765 | + if (!$this->user->PageAuth('dataset')) |
4766 | + return $this->Error(1, 'Access Denied'); |
4767 | + |
4768 | + $dataSetId = $this->GetParam('dataSetId', _INT); |
4769 | + |
4770 | + $auth = $this->user->DataSetAuth($dataSetId, true); |
4771 | + if (!$auth->edit) |
4772 | + return $this->Error(1, 'Access Denied'); |
4773 | + |
4774 | + $dataSetColumnId = $this->GetParam('datasetColumnId', _POST, _INT); |
4775 | + |
4776 | + Kit::ClassLoader('datasetcolumn'); |
4777 | + $dataSetColumnObject = new DataSetColumn($this->db); |
4778 | + if (!$dataSetColumnId = $dataSetColumnObject->Delete($dataSetColumnId)) |
4779 | + return $this->Error($dataSetColumnObject->GetErrorNumber(), $dataSetColumnObject->GetErrorMessage()); |
4780 | + |
4781 | + return $this->Respond($this->ReturnId('success', true)); |
4782 | + } |
4783 | + |
4784 | + /** |
4785 | + * DataSet Data List |
4786 | + * @return <XiboAPIResponse> |
4787 | + */ |
4788 | + public function DataSetDataList() { |
4789 | + // Auth |
4790 | + if (!$this->user->PageAuth('dataset')) |
4791 | + return $this->Error(1, 'Access Denied'); |
4792 | + |
4793 | + $dataSetId = $this->GetParam('dataSetId', _INT); |
4794 | + |
4795 | + $auth = $this->user->DataSetAuth($dataSetId, true); |
4796 | + if (!$auth->view) |
4797 | + return $this->Error(1, 'Access Denied'); |
4798 | + |
4799 | + Kit::ClassLoader('datasetdata'); |
4800 | + $dataSetObject = new DataSetData($this->db); |
4801 | + if (!$columns = $dataSetObject->GetData($dataSetId)) |
4802 | + return $this->Error($dataSetObject->GetErrorNumber(), $dataSetObject->GetErrorMessage()); |
4803 | + |
4804 | + return $this->Respond($this->NodeListFromArray($columns, 'datasetdata')); |
4805 | + } |
4806 | + |
4807 | + /** |
4808 | + * DataSet Data Add |
4809 | + * @return <XiboAPIResponse> |
4810 | + */ |
4811 | + public function DataSetDataAdd() { |
4812 | + // Auth |
4813 | + if (!$this->user->PageAuth('dataset')) |
4814 | + return $this->Error(1, 'Access Denied'); |
4815 | + |
4816 | + $dataSetId = $this->GetParam('dataSetId', _INT); |
4817 | + |
4818 | + $auth = $this->user->DataSetAuth($dataSetId, true); |
4819 | + if (!$auth->edit) |
4820 | + return $this->Error(1, 'Access Denied'); |
4821 | + |
4822 | + // Parameters |
4823 | + $dataSetColumnId = $this->GetParam('dataSetColumnId', _INT); |
4824 | + $rowNumber = $this->GetParam('rowNumber', _INT); |
4825 | + $value = $this->GetParam('value', _STRING); |
4826 | + |
4827 | + // Use the DataSetData class to do the insert |
4828 | + Kit::ClassLoader('datasetdata'); |
4829 | + $data = new DataSetData($this->db); |
4830 | + |
4831 | + if (!$id = $data->Add($dataSetColumnId, $rowNumber, $value)) |
4832 | + return $this->Error($data->GetErrorNumber(), $data->GetErrorMessage()); |
4833 | + |
4834 | + return $this->Respond($this->ReturnId('datasetdata', $id)); |
4835 | + } |
4836 | + |
4837 | + /** |
4838 | + * DataSet Data Edit |
4839 | + * @return <XiboAPIResponse> |
4840 | + */ |
4841 | + public function DataSetDataEdit() { |
4842 | + // Auth |
4843 | + if (!$this->user->PageAuth('dataset')) |
4844 | + return $this->Error(1, 'Access Denied'); |
4845 | + |
4846 | + $dataSetId = $this->GetParam('dataSetId', _INT); |
4847 | + |
4848 | + $auth = $this->user->DataSetAuth($dataSetId, true); |
4849 | + if (!$auth->edit) |
4850 | + return $this->Error(1, 'Access Denied'); |
4851 | + |
4852 | + // Parameters |
4853 | + $dataSetColumnId = $this->GetParam('dataSetColumnId', _INT); |
4854 | + $rowNumber = $this->GetParam('rowNumber', _INT); |
4855 | + $value = $this->GetParam('value', _STRING); |
4856 | + |
4857 | + // Use the DataSetData class to do the update |
4858 | + Kit::ClassLoader('datasetdata'); |
4859 | + $data = new DataSetData($this->db); |
4860 | + |
4861 | + if (!$data->Edit($dataSetColumnId, $rowNumber, $value)) |
4862 | + return $this->Error($data->GetErrorNumber(), $data->GetErrorMessage()); |
4863 | + |
4864 | + return $this->Respond($this->ReturnId('success', true)); |
4865 | + } |
4866 | + |
4867 | + /** |
4868 | + * DataSet Data Delete |
4869 | + * @return <XiboAPIResponse> |
4870 | + */ |
4871 | + public function DataSetDataDelete() { |
4872 | + // Auth |
4873 | + if (!$this->user->PageAuth('dataset')) |
4874 | + return $this->Error(1, 'Access Denied'); |
4875 | + |
4876 | + $dataSetId = $this->GetParam('dataSetId', _INT); |
4877 | + |
4878 | + $auth = $this->user->DataSetAuth($dataSetId, true); |
4879 | + if (!$auth->delete) |
4880 | + return $this->Error(1, 'Access Denied'); |
4881 | + |
4882 | + // Parameters |
4883 | + $dataSetColumnId = $this->GetParam('dataSetColumnId', _INT); |
4884 | + $rowNumber = $this->GetParam('rowNumber', _INT); |
4885 | + |
4886 | + // Use the DataSetData class to do the delete |
4887 | + Kit::ClassLoader('datasetdata'); |
4888 | + $data = new DataSetData($this->db); |
4889 | + |
4890 | + if (!$id = $data->Delete($dataSetColumnId, $rowNumber)) |
4891 | + return $this->Error($data->GetErrorNumber(), $data->GetErrorMessage()); |
4892 | + |
4893 | + return $this->Respond($this->ReturnId('datasetdata', $id)); |
4894 | + } |
4895 | + |
4896 | + /** |
4897 | + * DataSet Security List |
4898 | + * @return <XiboAPIResponse> |
4899 | + */ |
4900 | + public function DataSetSecurityList() { |
4901 | + // Auth |
4902 | + if (!$this->user->PageAuth('dataset')) |
4903 | + return $this->Error(1, 'Access Denied'); |
4904 | + |
4905 | + $dataSetId = $this->GetParam('dataSetId', _INT); |
4906 | + |
4907 | + $auth = $this->user->DataSetAuth($dataSetId, true); |
4908 | + if (!$auth->view) |
4909 | + return $this->Error(1, 'Access Denied'); |
4910 | + |
4911 | + Kit::ClassLoader('datasetgroupsecurity'); |
4912 | + $security = new DataSetGroupSecurity($this->db); |
4913 | + |
4914 | + if (!$results = $security->ListSecurity($dataSetId, $this->user->getGroupFromId($this->user->userid, true))) { |
4915 | + return $this->Error($security->GetErrorNumber(), $security->GetErrorMessage()); |
4916 | + } |
4917 | + |
4918 | + return $this->Respond($this->NodeListFromArray($results, 'datasetgroupsecurity')); |
4919 | + } |
4920 | + |
4921 | + /** |
4922 | + * DataSet Security Add |
4923 | + * @return <XiboAPIResponse> |
4924 | + */ |
4925 | + public function DataSetSecurityAdd() { |
4926 | + // Auth |
4927 | + if (!$this->user->PageAuth('dataset')) |
4928 | + return $this->Error(1, 'Access Denied'); |
4929 | + |
4930 | + $dataSetId = $this->GetParam('dataSetId', _INT); |
4931 | + |
4932 | + $auth = $this->user->DataSetAuth($dataSetId, true); |
4933 | + if (!$auth->modifyPermissions) |
4934 | + return $this->Error(1, 'Access Denied'); |
4935 | + |
4936 | + $groupId = $this->GetParam('groupId', _INT); |
4937 | + $view = $this->GetParam('view', _INT); |
4938 | + $edit = $this->GetParam('edit', _INT); |
4939 | + $del = $this->GetParam('delete', _INT); |
4940 | + |
4941 | + Kit::ClassLoader('datasetgroupsecurity'); |
4942 | + $security = new DataSetGroupSecurity($this->db); |
4943 | + |
4944 | + if (!$results = $security->Link($dataSetId, $groupId, $view, $edit, $del)) { |
4945 | + return $this->Error($security->GetErrorNumber(), $security->GetErrorMessage()); |
4946 | + } |
4947 | + |
4948 | + return $this->Respond($this->ReturnId('success', true)); |
4949 | + } |
4950 | + |
4951 | + /** |
4952 | + * DataSet Security Delete |
4953 | + * @return <XiboAPIResponse> |
4954 | + */ |
4955 | + public function DataSetSecurityDelete() { |
4956 | + // Auth |
4957 | + if (!$this->user->PageAuth('dataset')) |
4958 | + return $this->Error(1, 'Access Denied'); |
4959 | + |
4960 | + $dataSetId = $this->GetParam('dataSetId', _INT); |
4961 | + |
4962 | + $auth = $this->user->DataSetAuth($dataSetId, true); |
4963 | + if (!$auth->modifyPermissions) |
4964 | + return $this->Error(1, 'Access Denied'); |
4965 | + |
4966 | + $groupId = $this->GetParam('groupId', _INT); |
4967 | + |
4968 | + Kit::ClassLoader('datasetgroupsecurity'); |
4969 | + $security = new DataSetGroupSecurity($this->db); |
4970 | + |
4971 | + if (!$results = $security->Unlink($dataSetId, $groupId)) { |
4972 | + return $this->Error($security->GetErrorNumber(), $security->GetErrorMessage()); |
4973 | + } |
4974 | + |
4975 | + return $this->Respond($this->ReturnId('success', true)); |
4976 | + } |
4977 | + |
4978 | + /** |
4979 | + * DataSet Import CSV |
4980 | + * @return <XiboAPIResponse> |
4981 | + */ |
4982 | + public function DataSetImportCsv() { |
4983 | + // Auth |
4984 | + if (!$this->user->PageAuth('dataset')) |
4985 | + return $this->Error(1, 'Access Denied'); |
4986 | + |
4987 | + $dataSetId = $this->GetParam('dataSetId', _INT); |
4988 | + |
4989 | + $auth = $this->user->DataSetAuth($dataSetId, true); |
4990 | + if (!$auth->edit) |
4991 | + return $this->Error(1, 'Access Denied'); |
4992 | + |
4993 | + // Expect a file id |
4994 | + $fileId = $this->GetParam('fileId', _INT); |
4995 | + |
4996 | + if (!$this->user->FileAuth($fileId)) |
4997 | + return $this->Error(1, 'Access Denied'); |
4998 | + |
4999 | + Kit::ClassLoader('file'); |
5000 | + $file = new File($this->db); |
The diff has been truncated for viewing.