Merge lp:~dangarner/xibo/server-121 into lp:xibo/1.3

Proposed by Dan Garner
Status: Merged
Merged at revision: 209
Proposed branch: lp:~dangarner/xibo/server-121
Merge into: lp:xibo/1.3
Diff against target: 950 lines (+273/-106)
20 files modified
client/dotNET/FileCollector.cs (+9/-1)
client/dotNET/MainForm.cs (+43/-40)
client/dotNET/Properties/Resources.Designer.cs (+1/-1)
client/dotNET/Properties/Settings.Designer.cs (+1/-1)
client/dotNET/Properties/Settings.settings (+1/-1)
client/dotNET/Region.cs (+8/-0)
client/dotNET/RssReader.cs (+1/-1)
client/dotNET/Web References/xmds/Reference.cs (+19/-19)
client/dotNET/Web References/xmds/Reference.map (+1/-1)
client/dotNET/Web References/xmds/xmds.wsdl (+1/-1)
client/dotNET/XiboClient.csproj (+6/-5)
client/dotNET/app.config (+1/-1)
server/lib/data/display.data.class.php (+39/-5)
server/lib/data/displaygroup.data.class.php (+9/-0)
server/lib/data/schedule.data.class.php (+5/-5)
server/lib/pages/display.class.php (+95/-15)
server/lib/pages/layout.class.php (+2/-2)
server/lib/pages/module.class.php (+16/-0)
server/lib/pages/schedule.class.php (+14/-6)
server/lib/service/xmdssoap.class.php (+1/-1)
To merge this branch: bzr merge lp:~dangarner/xibo/server-121
Reviewer Review Type Date Requested Status
Xibo Maintainters Pending
Review via email: mp+49296@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'client/dotNET/FileCollector.cs'
2--- client/dotNET/FileCollector.cs 2010-04-19 21:45:10 +0000
3+++ client/dotNET/FileCollector.cs 2011-02-10 21:08:07 +0000
4@@ -234,7 +234,15 @@
5 }
6 }
7
8- System.Diagnostics.Debug.WriteLine(String.Format("There are {0} files to get", files.Count.ToString()));
9+ Debug.WriteLine(String.Format("There are {0} files to get", files.Count.ToString()));
10+
11+ // Output a list of the files we need to get
12+ string debugMessage = "";
13+
14+ foreach (FileList fileToGet in files)
15+ debugMessage += string.Format("File: {0}, Type: {1}, MD5: {2}. ", fileToGet.path, fileToGet.type, fileToGet.md5);
16+
17+ Debug.WriteLine(debugMessage);
18
19 // Is there anything to get?
20 if (files.Count == 0)
21
22=== modified file 'client/dotNET/MainForm.cs'
23--- client/dotNET/MainForm.cs 2010-08-26 20:15:36 +0000
24+++ client/dotNET/MainForm.cs 2011-02-10 21:08:07 +0000
25@@ -191,9 +191,29 @@
26 {
27 Debug.WriteLine(ex.Message);
28 _isExpired = true;
29+
30+ ShowSplashScreen();
31+
32+ // In 10 seconds fire the next layout?
33+ Timer timer = new Timer();
34+ timer.Interval = 10000;
35+ timer.Tick += new EventHandler(splashScreenTimer_Tick);
36+
37+ // Start the timer
38+ timer.Start();
39 }
40 }
41
42+ void splashScreenTimer_Tick(object sender, EventArgs e)
43+ {
44+ Debug.WriteLine(new LogMessage("timer_Tick", "Loading next layout after splashscreen"));
45+
46+ Timer timer = (Timer)sender;
47+ timer.Stop();
48+ timer.Dispose();
49+
50+ _schedule.NextLayout();
51+ }
52
53 /// <summary>
54 /// Prepares the Layout.. rendering all the necessary controls
55@@ -213,8 +233,7 @@
56 // Default or not
57 if (layoutPath == Properties.Settings.Default.LibraryPath + @"\Default.xml" || String.IsNullOrEmpty(layoutPath))
58 {
59- ShowSplashScreen();
60- return;
61+ throw new Exception("Default layout");
62 }
63 else
64 {
65@@ -232,33 +251,16 @@
66 }
67 catch (Exception ex)
68 {
69- // couldnt open the layout file, so use the embedded one
70- System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
71- Stream resourceStream = assembly.GetManifestResourceStream("XiboClient.Resources.splash.jpg");
72-
73- // Load into a stream and then into an Image
74- try
75- {
76- Image bgSplash = Image.FromStream(resourceStream);
77-
78- Bitmap bmpSplash = new Bitmap(bgSplash, _clientSize);
79- this.BackgroundImage = bmpSplash;
80- }
81- catch
82- {
83- // Log
84- System.Diagnostics.Debug.WriteLine(ex.Message);
85- System.Diagnostics.Trace.WriteLine("Could not find the layout file {0}", layoutPath);
86- }
87- return;
88+ Trace.WriteLine(string.Format("Could not find the layout file {0}: {1}", layoutPath, ex.Message));
89+ throw;
90 }
91 }
92
93 // Attributes of the main layout node
94 XmlNode layoutNode = layoutXml.SelectSingleNode("/layout");
95-
96- XmlAttributeCollection layoutAttributes = layoutNode.Attributes;
97-
98+
99+ XmlAttributeCollection layoutAttributes = layoutNode.Attributes;
100+
101 // Set the background and size of the form
102 _layoutWidth = int.Parse(layoutAttributes["width"].Value);
103 _layoutHeight = int.Parse(layoutAttributes["height"].Value);
104@@ -266,7 +268,7 @@
105
106 // Scaling factor, will be applied to all regions
107 _scaleFactor = Math.Min(_clientSize.Width / _layoutWidth, _clientSize.Height / _layoutHeight);
108-
109+
110 // Want to be able to center this shiv - therefore work out which one of these is going to have left overs
111 int backgroundWidth = (int)(_layoutWidth * _scaleFactor);
112 int backgroundHeight = (int)(_layoutHeight * _scaleFactor);
113@@ -282,7 +284,7 @@
114 if (leftOverX != 0) leftOverX = leftOverX / 2;
115 if (leftOverY != 0) leftOverY = leftOverY / 2;
116 }
117- catch
118+ catch
119 {
120 leftOverX = 0;
121 leftOverY = 0;
122@@ -361,25 +363,24 @@
123 // Check to see if there are any regions on this layout.
124 if (listRegions.Count == 0 || listMedia.Count == 0)
125 {
126- Trace.WriteLine(new LogMessage("PrepareLayout",
127- string.Format("A layout with {0} regions and {1} media has been detected.", listRegions.Count.ToString(), listMedia.Count.ToString())),
128+ Trace.WriteLine(new LogMessage("PrepareLayout",
129+ string.Format("A layout with {0} regions and {1} media has been detected.", listRegions.Count.ToString(), listMedia.Count.ToString())),
130 LogType.Info.ToString());
131
132 if (_schedule.ActiveLayouts == 1)
133 {
134 Trace.WriteLine(new LogMessage("PrepareLayout", "Only 1 layout scheduled and it has nothing to show."), LogType.Info.ToString());
135
136- // Fall back to the splash screen (will only shift from here once a new schedule is detected)
137- ShowSplashScreen();
138+ throw new Exception("Only 1 layout schduled and it has nothing to show");
139 }
140 else
141 {
142- Trace.WriteLine(new LogMessage("PrepareLayout",
143+ Trace.WriteLine(new LogMessage("PrepareLayout",
144 string.Format(string.Format("An empty layout detected, will show for {0} seconds.", Properties.Settings.Default.emptyLayoutDuration.ToString()))), LogType.Info.ToString());
145
146 // Put a small dummy region in place, with a small dummy media node - which expires in 10 seconds.
147 XmlDocument dummyXml = new XmlDocument();
148- dummyXml.LoadXml(string.Format("<region id='blah' width='1' height='1' top='1' left='1'><media id='blah' type='text' duration='{0}'><raw><text></text></raw></media></region>",
149+ dummyXml.LoadXml(string.Format("<region id='blah' width='1' height='1' top='1' left='1'><media id='blah' type='text' duration='{0}'><raw><text></text></raw></media></region>",
150 Properties.Settings.Default.emptyLayoutDuration.ToString()));
151
152 // Replace the list of regions (they mean nothing as they are empty)
153@@ -400,10 +401,10 @@
154
155 options.scheduleId = _scheduleId;
156 options.layoutId = _layoutId;
157- options.width = (int) (double.Parse(nodeAttibutes["width"].Value) * _scaleFactor);
158- options.height = (int) (double.Parse(nodeAttibutes["height"].Value) * _scaleFactor);
159- options.left = (int) (double.Parse(nodeAttibutes["left"].Value) * _scaleFactor);
160- options.top = (int) (double.Parse(nodeAttibutes["top"].Value) * _scaleFactor);
161+ options.width = (int)(double.Parse(nodeAttibutes["width"].Value) * _scaleFactor);
162+ options.height = (int)(double.Parse(nodeAttibutes["height"].Value) * _scaleFactor);
163+ options.left = (int)(double.Parse(nodeAttibutes["left"].Value) * _scaleFactor);
164+ options.top = (int)(double.Parse(nodeAttibutes["top"].Value) * _scaleFactor);
165 options.scaleFactor = _scaleFactor;
166
167 // Set the backgrounds (used for Web content offsets)
168@@ -411,9 +412,9 @@
169 options.backgroundTop = options.top * -1;
170
171 //Account for scaling
172- options.left = options.left + (int) leftOverX;
173- options.top = options.top + (int) leftOverY;
174-
175+ options.left = options.left + (int)leftOverX;
176+ options.top = options.top + (int)leftOverY;
177+
178 // All the media nodes for this region / layout combination
179 options.mediaNodes = region.ChildNodes;
180
181@@ -421,7 +422,7 @@
182 temp.DurationElapsedEvent += new Region.DurationElapsedDelegate(temp_DurationElapsedEvent);
183
184 Debug.WriteLine("Created new region", "MainForm - Prepare Layout");
185-
186+
187 // Dont be fooled, this innocent little statement kicks everything off
188 temp.regionOptions = options;
189
190@@ -456,6 +457,8 @@
191
192 Bitmap bmpSplash = new Bitmap(bgSplash, _clientSize);
193 this.BackgroundImage = bmpSplash;
194+
195+ bgSplash.Dispose();
196 }
197 catch (Exception ex)
198 {
199
200=== modified file 'client/dotNET/Properties/Resources.Designer.cs'
201--- client/dotNET/Properties/Resources.Designer.cs 2009-12-31 11:38:50 +0000
202+++ client/dotNET/Properties/Resources.Designer.cs 2011-02-10 21:08:07 +0000
203@@ -1,7 +1,7 @@
204 //------------------------------------------------------------------------------
205 // <auto-generated>
206 // This code was generated by a tool.
207-// Runtime Version:2.0.50727.4927
208+// Runtime Version:2.0.50727.4952
209 //
210 // Changes to this file may cause incorrect behavior and will be lost if
211 // the code is regenerated.
212
213=== modified file 'client/dotNET/Properties/Settings.Designer.cs'
214--- client/dotNET/Properties/Settings.Designer.cs 2010-09-26 14:33:38 +0000
215+++ client/dotNET/Properties/Settings.Designer.cs 2011-02-10 21:08:07 +0000
216@@ -47,7 +47,7 @@
217 [global::System.Configuration.UserScopedSettingAttribute()]
218 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
219 [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
220- [global::System.Configuration.DefaultSettingValueAttribute("http://localhost/xibo/xmds.php")]
221+ [global::System.Configuration.DefaultSettingValueAttribute("http://localhost/Series%201.2/server-121-soap-wsdl/server/xmds.php")]
222 public string XiboClient_xmds_xmds {
223 get {
224 return ((string)(this["XiboClient_xmds_xmds"]));
225
226=== modified file 'client/dotNET/Properties/Settings.settings'
227--- client/dotNET/Properties/Settings.settings 2010-09-26 14:33:38 +0000
228+++ client/dotNET/Properties/Settings.settings 2011-02-10 21:08:07 +0000
229@@ -9,7 +9,7 @@
230 <Value Profile="(Default)">schedule.xml</Value>
231 </Setting>
232 <Setting Name="XiboClient_xmds_xmds" Type="(Web Service URL)" Scope="User">
233- <Value Profile="(Default)">http://localhost/xibo/xmds.php</Value>
234+ <Value Profile="(Default)">http://localhost/Series%201.2/server-121-soap-wsdl/server/xmds.php</Value>
235 </Setting>
236 <Setting Name="ServerKey" Type="System.String" Scope="User">
237 <Value Profile="(Default)">yourserverkey</Value>
238
239=== modified file 'client/dotNET/Region.cs'
240--- client/dotNET/Region.cs 2010-08-26 19:23:14 +0000
241+++ client/dotNET/Region.cs 2011-02-10 21:08:07 +0000
242@@ -309,6 +309,14 @@
243 System.Diagnostics.Trace.WriteLine("Duration is Empty, using a default of 60.", "Region - SetNextMediaNode");
244 }
245
246+ // We cannot have a 0 duration here... not sure why we would... but
247+ if (options.duration == 0)
248+ options.duration = int.Parse(Properties.Settings.Default.emptyLayoutDuration.ToString());
249+
250+ // Fail safe
251+ if (options.duration == 0)
252+ options.duration = 10;
253+
254 // There will be some stuff on option nodes
255 XmlNode optionNode = mediaNode.FirstChild;
256
257
258=== modified file 'client/dotNET/Resources/splash.jpg'
259Binary files client/dotNET/Resources/splash.jpg 2008-12-19 23:34:13 +0000 and client/dotNET/Resources/splash.jpg 2011-02-10 21:08:07 +0000 differ
260=== modified file 'client/dotNET/RssReader.cs'
261--- client/dotNET/RssReader.cs 2010-09-26 17:37:39 +0000
262+++ client/dotNET/RssReader.cs 2011-02-10 21:08:07 +0000
263@@ -120,7 +120,7 @@
264 item.DateString = date;
265
266 // Fudge the date...
267- if (date.Contains("+"))
268+ if (date.Contains("+") || date.Contains("-"))
269 DateTime.TryParse(date, out item.Date);
270 else
271 DateTime.TryParse(date.Substring(0, date.Length - 4), out item.Date);
272
273=== modified file 'client/dotNET/Web References/xmds/Reference.cs'
274--- client/dotNET/Web References/xmds/Reference.cs 2009-12-31 11:38:50 +0000
275+++ client/dotNET/Web References/xmds/Reference.cs 2011-02-10 21:08:07 +0000
276@@ -1,7 +1,7 @@
277 //------------------------------------------------------------------------------
278 // <auto-generated>
279 // This code was generated by a tool.
280-// Runtime Version:2.0.50727.4927
281+// Runtime Version:2.0.50727.4952
282 //
283 // Changes to this file may cause incorrect behavior and will be lost if
284 // the code is regenerated.
285@@ -9,7 +9,7 @@
286 //------------------------------------------------------------------------------
287
288 //
289-// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.4927.
290+// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.4952.
291 //
292 #pragma warning disable 1591
293
294@@ -23,7 +23,7 @@
295
296
297 /// <remarks/>
298- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]
299+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
300 [System.Diagnostics.DebuggerStepThroughAttribute()]
301 [System.ComponentModel.DesignerCategoryAttribute("code")]
302 [System.Web.Services.WebServiceBindingAttribute(Name="xmdsBinding", Namespace="urn:xmds")]
303@@ -421,11 +421,11 @@
304 }
305
306 /// <remarks/>
307- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]
308+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
309 public delegate void RegisterDisplayCompletedEventHandler(object sender, RegisterDisplayCompletedEventArgs e);
310
311 /// <remarks/>
312- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]
313+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
314 [System.Diagnostics.DebuggerStepThroughAttribute()]
315 [System.ComponentModel.DesignerCategoryAttribute("code")]
316 public partial class RegisterDisplayCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
317@@ -447,11 +447,11 @@
318 }
319
320 /// <remarks/>
321- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]
322+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
323 public delegate void RequiredFilesCompletedEventHandler(object sender, RequiredFilesCompletedEventArgs e);
324
325 /// <remarks/>
326- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]
327+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
328 [System.Diagnostics.DebuggerStepThroughAttribute()]
329 [System.ComponentModel.DesignerCategoryAttribute("code")]
330 public partial class RequiredFilesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
331@@ -473,11 +473,11 @@
332 }
333
334 /// <remarks/>
335- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]
336+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
337 public delegate void GetFileCompletedEventHandler(object sender, GetFileCompletedEventArgs e);
338
339 /// <remarks/>
340- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]
341+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
342 [System.Diagnostics.DebuggerStepThroughAttribute()]
343 [System.ComponentModel.DesignerCategoryAttribute("code")]
344 public partial class GetFileCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
345@@ -499,11 +499,11 @@
346 }
347
348 /// <remarks/>
349- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]
350+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
351 public delegate void ScheduleCompletedEventHandler(object sender, ScheduleCompletedEventArgs e);
352
353 /// <remarks/>
354- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]
355+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
356 [System.Diagnostics.DebuggerStepThroughAttribute()]
357 [System.ComponentModel.DesignerCategoryAttribute("code")]
358 public partial class ScheduleCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
359@@ -525,11 +525,11 @@
360 }
361
362 /// <remarks/>
363- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]
364+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
365 public delegate void RecieveXmlLogCompletedEventHandler(object sender, RecieveXmlLogCompletedEventArgs e);
366
367 /// <remarks/>
368- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]
369+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
370 [System.Diagnostics.DebuggerStepThroughAttribute()]
371 [System.ComponentModel.DesignerCategoryAttribute("code")]
372 public partial class RecieveXmlLogCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
373@@ -551,11 +551,11 @@
374 }
375
376 /// <remarks/>
377- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]
378+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
379 public delegate void BlackListCompletedEventHandler(object sender, BlackListCompletedEventArgs e);
380
381 /// <remarks/>
382- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]
383+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
384 [System.Diagnostics.DebuggerStepThroughAttribute()]
385 [System.ComponentModel.DesignerCategoryAttribute("code")]
386 public partial class BlackListCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
387@@ -577,11 +577,11 @@
388 }
389
390 /// <remarks/>
391- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]
392+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
393 public delegate void SubmitLogCompletedEventHandler(object sender, SubmitLogCompletedEventArgs e);
394
395 /// <remarks/>
396- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]
397+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
398 [System.Diagnostics.DebuggerStepThroughAttribute()]
399 [System.ComponentModel.DesignerCategoryAttribute("code")]
400 public partial class SubmitLogCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
401@@ -603,11 +603,11 @@
402 }
403
404 /// <remarks/>
405- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]
406+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
407 public delegate void SubmitStatsCompletedEventHandler(object sender, SubmitStatsCompletedEventArgs e);
408
409 /// <remarks/>
410- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]
411+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
412 [System.Diagnostics.DebuggerStepThroughAttribute()]
413 [System.ComponentModel.DesignerCategoryAttribute("code")]
414 public partial class SubmitStatsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
415
416=== modified file 'client/dotNET/Web References/xmds/Reference.map'
417--- client/dotNET/Web References/xmds/Reference.map 2009-12-31 11:38:50 +0000
418+++ client/dotNET/Web References/xmds/Reference.map 2011-02-10 21:08:07 +0000
419@@ -1,6 +1,6 @@
420 <?xml version="1.0" encoding="utf-8"?>
421 <DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
422 <Results>
423- <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://localhost/1.0.0/server/xmds.php?wsdl" filename="xmds.wsdl" />
424+ <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://localhost/Series 1.2/server-121-soap-wsdl/server/xmds.php?wsdl" filename="xmds.wsdl" />
425 </Results>
426 </DiscoveryClientResultsFile>
427\ No newline at end of file
428
429=== modified file 'client/dotNET/Web References/xmds/xmds.wsdl'
430--- client/dotNET/Web References/xmds/xmds.wsdl 2009-12-31 11:38:50 +0000
431+++ client/dotNET/Web References/xmds/xmds.wsdl 2011-02-10 21:08:07 +0000
432@@ -200,7 +200,7 @@
433 </wsdl:binding>
434 <wsdl:service name="xmds">
435 <wsdl:port name="xmdsPort" binding="tns:xmdsBinding">
436- <soap:address location="http://localhost/1.0.0/server/xmds.php" />
437+ <soap:address location="http://localhost/Series%201.2/server-121-soap-wsdl/server/xmds.php" />
438 </wsdl:port>
439 </wsdl:service>
440 </wsdl:definitions>
441\ No newline at end of file
442
443=== modified file 'client/dotNET/XiboClient.csproj'
444--- client/dotNET/XiboClient.csproj 2010-08-22 12:42:36 +0000
445+++ client/dotNET/XiboClient.csproj 2011-02-10 21:08:07 +0000
446@@ -267,10 +267,10 @@
447 <WebReferences Include="Web References\" />
448 </ItemGroup>
449 <ItemGroup>
450- <WebReferenceUrl Include="http://localhost/1.0.0/server/xmds.php%3fwsdl">
451+ <WebReferenceUrl Include="http://localhost/Series%25201.2/server-121-soap-wsdl/server/xmds.php%3fwsdl">
452 <UrlBehavior>Dynamic</UrlBehavior>
453 <RelPath>Web References\xmds\</RelPath>
454- <UpdateFromURL>http://localhost/1.0.0/server/xmds.php%3fwsdl</UpdateFromURL>
455+ <UpdateFromURL>http://localhost/Series%25201.2/server-121-soap-wsdl/server/xmds.php%3fwsdl</UpdateFromURL>
456 <ServiceLocationURL>
457 </ServiceLocationURL>
458 <CachedDynamicPropName>
459@@ -294,11 +294,12 @@
460 </EmbeddedResource>
461 </ItemGroup>
462 <ItemGroup>
463- <EmbeddedResource Include="Resources\splash.jpg" />
464- </ItemGroup>
465- <ItemGroup>
466 <EmbeddedResource Include="Resources\HtmlTemplate.htm" />
467 </ItemGroup>
468+ <ItemGroup>
469+ <EmbeddedResource Include="Resources\splash.jpg">
470+ </EmbeddedResource>
471+ </ItemGroup>
472 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
473 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
474 Other similar extension points exist, see Microsoft.Common.targets.
475
476=== modified file 'client/dotNET/app.config'
477--- client/dotNET/app.config 2010-09-26 14:33:38 +0000
478+++ client/dotNET/app.config 2011-02-10 21:08:07 +0000
479@@ -14,7 +14,7 @@
480 <value>DEFAULT</value>
481 </setting>
482 <setting name="XiboClient_xmds_xmds" serializeAs="String">
483- <value>http://localhost/xibo/xmds.php</value>
484+ <value>http://localhost/Series%201.2/server-121-soap-wsdl/server/xmds.php</value>
485 </setting>
486 <setting name="ServerKey" serializeAs="String">
487 <value>yourserverkey</value>
488
489=== modified file 'server/lib/data/display.data.class.php'
490--- server/lib/data/display.data.class.php 2010-09-18 15:40:51 +0000
491+++ server/lib/data/display.data.class.php 2011-02-10 21:08:07 +0000
492@@ -61,10 +61,10 @@
493 $SQL .= " ) ";
494 $SQL .= " VALUES ";
495 $SQL .= " ( ";
496- $SQL .= sprintf(" '%s', ", $display);
497+ $SQL .= sprintf(" '%s', ", $db->escape_string($display));
498 $SQL .= " 0 , ";
499 $SQL .= " 1 , ";
500- $SQL .= sprintf(" '%s', ", $license);
501+ $SQL .= sprintf(" '%s', ", $db->escape_string($license));
502 $SQL .= " 0 , ";
503 $SQL .= " 0 , ";
504 $SQL .= " 1 , ";
505@@ -166,9 +166,7 @@
506
507 Debug::LogEntry($db, 'audit', 'IN', 'DisplayGroup', 'Delete');
508
509- //TODO: Need to put some logic in here that tests whether or not we ought to be able to delete this display.
510-
511- // Pass over to the DisplayGroup data class so that it can try and delete the
512+ // Pass over to the DisplayGroup data class so that it can try and delete the
513 // display specific group first (it is that group which is linked to schedules)
514 $displayGroupObject = new DisplayGroup($db);
515
516@@ -179,6 +177,14 @@
517
518 return false;
519 }
520+
521+ // Delete the blacklist
522+ $SQL = sprintf("DELETE FROM blacklist WHERE DisplayID = %d", $displayID);
523+
524+ Debug::LogEntry($db, 'audit', $SQL);
525+
526+ if (!$db->query($SQL))
527+ return $this->SetError(25016,__('Unable to delete blacklist records.'));
528
529 // Now we know the Display Group is gone - and so are any links
530 // delete the display
531@@ -276,5 +282,33 @@
532
533 return true;
534 }
535+
536+ /**
537+ * Edits the default layout for a display
538+ * @param <type> $displayId
539+ * @param <type> $defaultLayoutId
540+ * @return <type>
541+ */
542+ public function EditDefaultLayout($displayId, $defaultLayoutId)
543+ {
544+ $db =& $this->db;
545+
546+ Debug::LogEntry($db, 'audit', 'IN', 'Display', 'EditDefaultLayout');
547+
548+ $SQL = sprintf('UPDATE display SET defaultLayoutId = %d WHERE displayID = %d ', $defaultLayoutId, $displayId);
549+
550+ if (!$db->query($SQL))
551+ {
552+ trigger_error($db->error());
553+ $this->SetError(25012, __('Error updating this displays default layout.'));
554+
555+ return false;
556+ }
557+
558+
559+ Debug::LogEntry($db, 'audit', 'OUT', 'Display', 'EditDefaultLayout');
560+
561+ return true;
562+ }
563 }
564 ?>
565
566=== modified file 'server/lib/data/displaygroup.data.class.php'
567--- server/lib/data/displaygroup.data.class.php 2010-09-18 15:40:51 +0000
568+++ server/lib/data/displaygroup.data.class.php 2011-02-10 21:08:07 +0000
569@@ -25,6 +25,7 @@
570 public function __construct(database $db)
571 {
572 include_once('lib/data/schedule.data.class.php');
573+ include_once('lib/data/displaygroupsecurity.data.class.php');
574
575 parent::__construct($db);
576 }
577@@ -189,6 +190,14 @@
578
579 return false;
580 }
581+
582+ // Delete this display groups link to any groups
583+ $SQL = sprintf("DELETE FROM lkgroupdg WHERE DisplayGroupId = %d", $displayGroupID);
584+
585+ Debug::LogEntry($db, 'audit', $SQL);
586+
587+ if (!$db->query($SQL))
588+ return $this->SetError(25016,__('Unable to delete Display Group Links.'));
589
590 // Delete the Display Group Itself
591 if (!$this->Delete($displayGroupID))
592
593=== modified file 'server/lib/data/schedule.data.class.php'
594--- server/lib/data/schedule.data.class.php 2010-09-26 14:12:22 +0000
595+++ server/lib/data/schedule.data.class.php 2011-02-10 21:08:07 +0000
596@@ -46,7 +46,7 @@
597
598
599 // Cant have a 0 increment as it creates a loop
600- if ($recDetail ==0)
601+ if ($recDetail == 0)
602 $recDetail = 1;
603
604 // make the displayid_list from the selected displays.
605@@ -138,8 +138,8 @@
606 break;
607
608 case 'Week':
609- $t_start_temp = $t_start_temp + (60 * 60 * 24 * 7);
610- $t_end_temp = $t_end_temp + (60 * 60 * 24 * 7);
611+ $t_start_temp = $t_start_temp + (60 * 60 * 24 * 7 * $recDetail);
612+ $t_end_temp = $t_end_temp + (60 * 60 * 24 * 7 * $recDetail);
613 break;
614
615 case 'Month':
616@@ -192,8 +192,8 @@
617 Debug::LogEntry($db, 'audit', 'IN', 'Schedule', 'Edit');
618
619 // Cant have a 0 increment as it creates a loop
620- if ($recDetail ==0)
621- $recDetail = 1;
622+ if ($rec_detail == 0)
623+ $rec_detail = 1;
624
625 // What we are really going to do here is delete and re-add... just because it is easier to get the logic right
626 // and it means the same logic will be applied across both functions.
627
628=== modified file 'server/lib/pages/display.class.php'
629--- server/lib/pages/display.class.php 2010-07-31 22:40:44 +0000
630+++ server/lib/pages/display.class.php 2011-02-10 21:08:07 +0000
631@@ -1,7 +1,7 @@
632 <?php
633 /*
634 * Xibo - Digitial Signage - http://www.xibo.org.uk
635- * Copyright (C) 2006,2007,2008 Daniel Garner and James Packer
636+ * Copyright (C) 2006-2010 Daniel Garner and James Packer
637 *
638 * This file is part of Xibo.
639 *
640@@ -296,6 +296,8 @@
641 $user =& $this->user;
642 $response = new ResponseManager();
643
644+ $displayGroupAuth = $user->DisplayGroupAuth();
645+
646 //display the display table
647 $SQL = <<<SQL
648 SELECT display.displayid,
649@@ -338,6 +340,7 @@
650 $msgDelete = __('Delete');
651 $msgGroupSecurity = __('Group Security');
652 $msgClientAddress = __('IP Address');
653+ $msgDefault = __('Default Layout');
654
655 $output = <<<END
656 <div class="info_table">
657@@ -361,15 +364,21 @@
658
659 while($aRow = $db->get_row($results))
660 {
661- $displayid = $aRow[0];
662- $display = $aRow[1];
663- $defaultlayoutid = $aRow[2];
664- $loggedin = $aRow[3];
665- $lastaccessed = date('Y-m-d H:i:s', $aRow[4]);
666- $inc_schedule = $aRow[5];
667- $licensed = $aRow[6];
668+ // Check that we have permission to access this display record
669+ $displayGroupID = Kit::ValidateParam($aRow[8], _INT);
670+
671+ if (!in_array($displayGroupID, $displayGroupAuth))
672+ continue;
673+
674+ $displayid = $aRow[0];
675+ $display = $aRow[1];
676+ $defaultlayoutid = $aRow[2];
677+ $loggedin = $aRow[3];
678+ $lastaccessed = date('Y-m-d H:i:s', $aRow[4]);
679+ $inc_schedule = $aRow[5];
680+ $licensed = $aRow[6];
681 $email_alert = $aRow[7];
682- $displayGroupID = $aRow[8];
683+
684 $clientAddress = Kit::ValidateParam($aRow[9], _STRING);
685 $displayName = $display;
686
687@@ -387,6 +396,22 @@
688 $display = sprintf('<a href="' . $vncTemplate . '" title="VNC to ' . $display . '" target="' . $linkTarget . '">' . $display . '</a>', $clientAddress);
689 }
690
691+ $buttons = '';
692+
693+ if ($user->usertypeid == 1)
694+ {
695+ $buttons = <<<END
696+ <button class='XiboFormButton' href='index.php?p=display&q=displayForm&displayid=$displayid'><span>$msgEdit</span></button>
697+ <button class='XiboFormButton' href='index.php?p=display&q=DeleteForm&displayid=$displayid'><span>$msgDelete</span></button>
698+ <button class="XiboFormButton" href="index.php?p=displaygroup&q=GroupSecurityForm&DisplayGroupID=$displayGroupID&DisplayGroup=$displayName"><span>$msgGroupSecurity</span></button>
699+ <button class="XiboFormButton" href="index.php?p=display&q=DefaultLayoutForm&DisplayId=$displayid"><span>$msgDefault</span></button>
700+END;
701+ }
702+ else
703+ {
704+ $buttons = '<button class="XiboFormButton" href="index.php?p=display&q=DefaultLayoutForm&DisplayId=' . $displayid . '"><span>' . $msgDefault . '</span></button>';
705+ }
706+
707 $output .= <<<END
708
709 <tr>
710@@ -399,11 +424,7 @@
711 <td>$loggedin</td>
712 <td>$lastaccessed</td>
713 <td>$clientAddress</td>
714- <td>
715- <button class='XiboFormButton' href='index.php?p=display&q=displayForm&displayid=$displayid'><span>$msgEdit</span></button>
716- <button class='XiboFormButton' href='index.php?p=display&q=DeleteForm&displayid=$displayid'><span>$msgDelete</span></button>
717- <button class="XiboFormButton" href="index.php?p=displaygroup&q=GroupSecurityForm&DisplayGroupID=$displayGroupID&DisplayGroup=$displayName"><span>$msgGroupSecurity</span></button>
718- </td>
719+ <td>$buttons</td>
720 END;
721 }
722 $output .= "</tbody></table></div>";
723@@ -598,7 +619,7 @@
724 $helpManager = new HelpManager($db, $user);
725
726 // Output the delete form
727- $msgInfo = __('You will only be able to delete this display if there is no associated information contained in Xibo.');
728+ $msgInfo = __('Deleting a display cannot be undone.');
729 $msgWarn = __('Are you sure you want to delete this display?');
730 $msgYes = __('Yes');
731 $msgNo = __('No');
732@@ -640,5 +661,64 @@
733 $response->SetFormSubmitResponse(__("The Display has been Deleted"));
734 $response->Respond();
735 }
736+
737+ /**
738+ * Form for editing the default layout of a display
739+ */
740+ public function DefaultLayoutForm()
741+ {
742+ $db =& $this->db;
743+ $response = new ResponseManager();
744+
745+ $displayId = Kit::GetParam('DisplayId', _GET, _INT);
746+
747+ if (!$defaultLayoutId = $this->db->GetSingleValue(sprintf("SELECT defaultlayoutid FROM display WHERE displayid = %d", $displayId),
748+ 'defaultlayoutid', _INT))
749+ {
750+ trigger_error($db->error());
751+ trigger_error(__('Unable to get the default layout'), E_USER_ERROR);
752+ }
753+
754+ $msgDefault = __('Default Layout');
755+ $layoutList = dropdownlist('SELECT layoutid, layout FROM layout WHERE retired = 0 ORDER by layout', 'defaultlayoutid', $defaultLayoutId);
756+
757+ $form = <<<END
758+ <form id="DefaultLayoutForm" class="XiboForm" method="post" action="index.php?p=display&q=DefaultLayout&DisplayId=$displayId">
759+ <input type="hidden" name="DisplayId" value="$displayId">
760+ <table>
761+ <tr>
762+ <td>$msgDefault<span class="required">*</span></td>
763+ <td>$layoutList</td>
764+ </tr>
765+ </table>
766+ </form>
767+END;
768+
769+ $response->SetFormRequestResponse($form, __('Edit Default Layout'), '300px', '150px');
770+ $response->AddButton(__('Cancel'), 'XiboDialogClose()');
771+ $response->AddButton(__('Save'), '$("#DefaultLayoutForm").submit()');
772+ $response->Respond();
773+ }
774+
775+ /**
776+ * Edit the default layout for a display
777+ */
778+ public function DefaultLayout()
779+ {
780+ $db =& $this->db;
781+ $response = new ResponseManager();
782+ $displayObject = new Display($db);
783+
784+ $displayId = Kit::GetParam('DisplayId', _POST, _INT);
785+ $defaultLayoutId = Kit::GetParam('defaultlayoutid', _POST, _INT);
786+
787+ if (!$displayObject->EditDefaultLayout($displayId, $defaultLayoutId))
788+ {
789+ trigger_error(__('Cannot Edit this Display'), E_USER_ERROR);
790+ }
791+
792+ $response->SetFormSubmitResponse(__('Display Saved.'));
793+ $response->Respond();
794+ }
795 }
796 ?>
797
798=== modified file 'server/lib/pages/layout.class.php'
799--- server/lib/pages/layout.class.php 2010-08-01 10:55:53 +0000
800+++ server/lib/pages/layout.class.php 2011-02-10 21:08:07 +0000
801@@ -1508,10 +1508,10 @@
802 Debug::LogEntry($db, 'audit', sprintf('Module name returned for MediaID: %s is %s', $mediaid, $mediaName), 'layout', 'RegionOptions');
803
804 //Do we have a thumbnail for this media?
805- if ($mediaType == "image" && file_exists($libraryLocation."tn_$mediaFileName"))
806+ if ($mediaType == 'image')
807 {
808 //make up a list of the media, with an image showing the media type
809- $mediaList = "<img alt='$mediaFileName' src='index.php?p=module&q=GetImage&file=tn_$mediaFileName'>";
810+ $mediaList = "<img alt='$mediaFileName' src='index.php?p=module&q=GetImage&id=$mediaid&thumb=true'>";
811 }
812 else
813 {
814
815=== modified file 'server/lib/pages/module.class.php'
816--- server/lib/pages/module.class.php 2010-06-13 21:03:38 +0000
817+++ server/lib/pages/module.class.php 2011-02-10 21:08:07 +0000
818@@ -118,6 +118,7 @@
819
820 $mediaID = Kit::GetParam('id', _GET, _INT, 0);
821 $proportional = Kit::GetParam('proportional', _GET, _BOOL, true);
822+ $thumb = Kit::GetParam('thumb', _GET, _BOOL, false);
823 $dynamic = isset($_REQUEST['dynamic']);
824
825 if ($mediaID == 0)
826@@ -133,6 +134,21 @@
827 $library = Config::GetSetting($db, "LIBRARY_LOCATION");
828 $fileName = $library . $file;
829
830+ // If we are a thumb request then output the cached thumbnail
831+ if ($thumb)
832+ $fileName = $library . 'tn_' . $file;
833+
834+ // If the thumbnail doesnt exist then create one
835+ if (!file_exists($fileName))
836+ {
837+ Debug::LogEntry($db, 'audit', 'File doesnt exist, creating a thumbnail for ' . $fileName);
838+
839+ if (!$info = getimagesize($library . $file))
840+ die($library . $file . ' is not an image');
841+
842+ ResizeImage($library . $file, $fileName, 80, 80, $proportional, 'file');
843+ }
844+
845 // Get the info for this new temporary file
846 if (!$info = getimagesize($fileName))
847 {
848
849=== modified file 'server/lib/pages/schedule.class.php'
850--- server/lib/pages/schedule.class.php 2010-09-19 13:24:33 +0000
851+++ server/lib/pages/schedule.class.php 2011-02-10 21:08:07 +0000
852@@ -1148,7 +1148,7 @@
853 $days = 60*60*24;
854 $rec_type = listcontent("null|None,Hour|Hourly,Day|Daily,Week|Weekly,Month|Monthly,Year|Yearly", "rec_type");
855 $rec_detail = listcontent("1|1,2|2,3|3,4|4,5|5,6|6,7|7,8|8,9|9,10|10,11|11,12|12,13|13,14|14", "rec_detail");
856- $rec_range = '<input class="date-pick" type="text" id="rec_range" name="rec_range" />';
857+ $rec_range = '<input class="date-pick" type="text" id="rec_range" name="rec_range" size="12" />';
858
859 $form .= <<<END
860 <tr>
861@@ -1166,7 +1166,9 @@
862 </tr>
863 <tr>
864 <td><label for="rec_range" title="When should this event stop repeating?">Until</label></td>
865- <td>$rec_range</td>
866+ <td>$rec_range
867+ <input id="repeatTime" type="text" size="12" name="repeatTime" value="00:00" />
868+ </td>
869 </tr>
870 </table>
871 </fieldset>
872@@ -1257,10 +1259,12 @@
873 $toDtText = date("d/m/Y", $toDT);
874 $toTimeText = date("H:i", $toDT);
875 $recToDtText = '';
876+ $recToTimeText = '';
877
878 if ($recType != '')
879 {
880 $recToDtText = date("d/m/Y", $recToDT);
881+ $recToTimeText = date("H:i", $recToDT);
882 }
883
884 // Check that we have permission to edit this event.
885@@ -1317,7 +1321,7 @@
886 // Recurrance part of the form
887 $days = 60*60*24;
888 $rec_type = listcontent("null|None,Hour|Hourly,Day|Daily,Week|Weekly,Month|Monthly,Year|Yearly", "rec_type", $recType);
889- $rec_range = '<input class="date-pick" type="text" id="rec_range" name="rec_range" value="' . $recToDtText . '" />';
890+ $rec_range = '<input class="date-pick" type="text" id="rec_range" name="rec_range" value="' . $recToDtText . '" size="12" />';
891
892 $form .= <<<END
893 <tr>
894@@ -1335,7 +1339,9 @@
895 </tr>
896 <tr>
897 <td><label for="rec_range" title="When should this event stop repeating?">Until</label></td>
898- <td>$rec_range</td>
899+ <td>$rec_range
900+ <input id="repeatTime" type="text" size="12" name="repeatTime" value="$recToTimeText" />
901+ </td>
902 </tr>
903 </table>
904 </fieldset>
905@@ -1377,6 +1383,7 @@
906 $rec_type = Kit::GetParam('rec_type', _POST, _STRING);
907 $rec_detail = Kit::GetParam('rec_detail', _POST, _INT);
908 $recToDT = Kit::GetParam('rec_range', _POST, _STRING);
909+ $repeatTime = Kit::GetParam('repeatTime', _POST, _STRING, '00:00');
910
911 $userid = Kit::GetParam('userid', _SESSION, _INT);
912
913@@ -1391,7 +1398,7 @@
914
915 $fromDT = $datemanager->GetDateFromUS($fromDT, $fromTime);
916 $toDT = $datemanager->GetDateFromUS($toDT, $toTime);
917- $recToDT = $datemanager->GetDateFromUS($recToDT, '');
918+ $recToDT = $datemanager->GetDateFromUS($recToDT, $repeatTime);
919
920 // Validate layout
921 if ($layoutid == 0)
922@@ -1458,6 +1465,7 @@
923 $rec_type = Kit::GetParam('rec_type', _POST, _STRING);
924 $rec_detail = Kit::GetParam('rec_detail', _POST, _INT);
925 $recToDT = Kit::GetParam('rec_range', _POST, _STRING);
926+ $repeatTime = Kit::GetParam('repeatTime', _POST, _STRING, '00:00');
927
928 $userid = Kit::GetParam('userid', _SESSION, _INT);
929
930@@ -1474,7 +1482,7 @@
931
932 $fromDT = $datemanager->GetDateFromUS($fromDT, $fromTime);
933 $toDT = $datemanager->GetDateFromUS($toDT, $toTime);
934- $recToDT = $datemanager->GetDateFromUS($recToDT, '');
935+ $recToDT = $datemanager->GetDateFromUS($recToDT, $repeatTime);
936
937 // Validate layout
938 if ($layoutid == 0)
939
940=== modified file 'server/lib/service/xmdssoap.class.php'
941--- server/lib/service/xmdssoap.class.php 2010-12-10 23:28:31 +0000
942+++ server/lib/service/xmdssoap.class.php 2011-02-10 21:08:07 +0000
943@@ -200,7 +200,7 @@
944 $SQL .= " INNER JOIN layout ";
945 $SQL .= " ON layout.LayoutID = lklayoutmedia.LayoutID";
946 $SQL .= sprintf(" WHERE layout.layoutid IN (%s) ", $layoutIdList);
947- $SQL .= " ORDER BY RecordType";
948+ $SQL .= " ORDER BY RecordType DESC";
949
950 if ($this->isAuditing == 1) Debug::LogEntry($db, "audit", $SQL, "xmds", "RequiredFiles");
951

Subscribers

People subscribed via source and target branches

to status/vote changes: