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