Merge lp:~dangarner/xibo/server-164 into lp:xibo/1.6

Proposed by Dan Garner
Status: Merged
Merged at revision: 350
Proposed branch: lp:~dangarner/xibo/server-164
Merge into: lp:xibo/1.6
Diff against target: 570 lines (+153/-94)
12 files modified
server/install/database/72.sql (+6/-0)
server/install/master/data.sql (+1/-1)
server/install/master/structure.sql (+2/-1)
server/lib/data/datasetdata.data.class.php (+1/-1)
server/lib/modules/module.class.php (+16/-4)
server/lib/pages/schedule.class.php (+15/-6)
server/lib/service/xmdssoap.class.php (+68/-38)
server/maintenance.php (+2/-2)
server/modules/module_user_general.php (+1/-1)
server/modules/preview/HtmlTemplateForGetResource.html (+1/-1)
server/modules/preview/HtmlTemplateSimple.html (+1/-1)
server/theme/default/html/status_dashboard.php (+39/-38)
To merge this branch: bzr merge lp:~dangarner/xibo/server-164
Reviewer Review Type Date Requested Status
Xibo Maintainters Pending
Review via email: mp+237073@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=== added file 'server/install/database/72.sql'
2--- server/install/database/72.sql 1970-01-01 00:00:00 +0000
3+++ server/install/database/72.sql 2014-10-03 14:12:49 +0000
4@@ -0,0 +1,6 @@
5+
6+ALTER TABLE `schedule_detail` ADD INDEX ( `FromDT` , `ToDT` ) ;
7+
8+UPDATE `version` SET `app_ver` = '1.6.4', `XmdsVersion` = 3;
9+UPDATE `setting` SET `value` = 0 WHERE `setting` = 'PHONE_HOME_DATE';
10+UPDATE `version` SET `DBVersion` = '72';
11
12=== modified file 'server/install/master/data.sql'
13--- server/install/master/data.sql 2014-08-15 14:50:45 +0000
14+++ server/install/master/data.sql 2014-10-03 14:12:49 +0000
15@@ -1,5 +1,5 @@
16 INSERT INTO `version` (`app_ver`, `XmdsVersion`, `XlfVersion`, `DBVersion`) VALUES
17-('1.6.3', 3, 1, 71);
18+('1.6.4', 3, 1, 72);
19
20 INSERT INTO `group` (`groupID`, `group`, `IsUserSpecific`, `IsEveryone`) VALUES
21 (1, 'Users', 0, 0),
22
23=== modified file 'server/install/master/structure.sql'
24--- server/install/master/structure.sql 2014-07-18 22:43:48 +0000
25+++ server/install/master/structure.sql 2014-10-03 14:12:49 +0000
26@@ -484,7 +484,8 @@
27 PRIMARY KEY (`schedule_detailID`),
28 KEY `layoutID` (`CampaignID`),
29 KEY `scheduleID` (`eventID`),
30- KEY `DisplayGroupID` (`DisplayGroupID`)
31+ KEY `DisplayGroupID` (`DisplayGroupID`),
32+ KEY `FromDT` (`FromDT`,`ToDT`)
33 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Replicated schedule across displays and recurrence' AUTO_INCREMENT=6 ;
34
35 CREATE TABLE IF NOT EXISTS `session` (
36
37=== modified file 'server/lib/data/datasetdata.data.class.php'
38--- server/lib/data/datasetdata.data.class.php 2014-08-06 11:57:27 +0000
39+++ server/lib/data/datasetdata.data.class.php 2014-10-03 14:12:49 +0000
40@@ -361,7 +361,7 @@
41 @unlink($csvFile);
42
43 // TODO: Update list content definitions
44-
45+ $this->updateWatermark = true;
46 $this->UpdateWatermark($dataSetId);
47
48 return true;
49
50=== modified file 'server/lib/modules/module.class.php'
51--- server/lib/modules/module.class.php 2014-08-08 08:58:09 +0000
52+++ server/lib/modules/module.class.php 2014-10-03 14:12:49 +0000
53@@ -1153,10 +1153,22 @@
54 $this->mediaid = $new_mediaid;
55
56 // Find out what we stored this item as
57- $storedAs = $db->GetSingleValue(sprintf("SELECT StoredAs FROM `media` WHERE mediaid = %d", $new_mediaid), 'StoredAs', _STRING);
58- $this->SetOption('uri', $storedAs);
59-
60- Debug::LogEntry('audit', 'New revision uploaded: ' . $storedAs, 'module', 'EditLibraryMedia');
61+ try {
62+ $dbh = PDOConnect::init();
63+
64+ $sth = $dbh->prepare('SELECT StoredAs FROM `media` WHERE mediaid = :mediaId');
65+ $sth->execute(array('mediaId' => $new_mediaid));
66+
67+ $storedAs = Kit::ValidateParam($sth->fetchColumn(0), _FILENAME);
68+ $this->SetOption('uri', $storedAs);
69+ }
70+ catch (Exception $e) {
71+ Debug::LogEntry('error', $e->getMessage(), get_class(), __FUNCTION__);
72+
73+ trigger_error(__('Unable to find uploaded file.'), E_USER_ERROR);
74+ }
75+
76+ Debug::LogEntry('audit', 'New revision uploaded: ' . $storedAs, 'module', 'EditLibraryMedia');
77 }
78
79 // Edit the media record
80
81=== modified file 'server/lib/pages/schedule.class.php'
82--- server/lib/pages/schedule.class.php 2014-08-06 12:15:31 +0000
83+++ server/lib/pages/schedule.class.php 2014-10-03 14:12:49 +0000
84@@ -1089,6 +1089,7 @@
85 $output .= __('Groups');
86 $output .= '<ul class="DisplayList">';
87 $nested = false;
88+ $scheduleWithView = (Config::GetSetting('SCHEDULE_WITH_VIEW_PERMISSION') == 'Yes');
89
90 while($row = $db->get_assoc_row($results))
91 {
92@@ -1100,8 +1101,12 @@
93 // Determine if we are authed against this group.
94 $auth = $this->user->DisplayGroupAuth($displayGroupID, true);
95
96- // We should only be able to schedule if we have edit permission or if the SCHEDULE_WITH_VIEW permission is ON
97- if (!$auth->edit && Config::GetSetting('SCHEDULE_WITH_VIEW_PERMISSION') == 'No')
98+ // Can schedule with view, but no view permissions
99+ if ($scheduleWithView && $auth->view != 1)
100+ continue;
101+
102+ // Can't schedule with view, but no edit permissions
103+ if (!$scheduleWithView && $auth->edit != 1)
104 continue;
105
106 // Do we need to nest yet? We only nest display specific groups
107@@ -1207,9 +1212,6 @@
108 $found = false;
109 foreach($layouts as $layout)
110 {
111- if (!$layout['edit'] == 1)
112- continue;
113-
114 // We have permission to edit this layout
115 $output .= '<tr>';
116 $output .= ' <td>' . $layout['campaign'] . '</td>';
117@@ -1327,9 +1329,16 @@
118 $output .= ' </thead>';
119 $output .= ' <tbody>';
120
121+ $scheduleWithView = (Config::GetSetting('SCHEDULE_WITH_VIEW_PERMISSION') == 'Yes');
122+
123 foreach($displays as $display)
124 {
125- if ($display['edit'] != 1 && Config::GetSetting('SCHEDULE_WITH_VIEW_PERMISSION') == 'No')
126+ // Can schedule with view, but no view permissions
127+ if ($scheduleWithView && $display['view'] != 1)
128+ continue;
129+
130+ // Can't schedule with view, but no edit permissions
131+ if (!$scheduleWithView && $display['edit'] != 1)
132 continue;
133
134 // We have permission to edit this layout
135
136=== modified file 'server/lib/service/xmdssoap.class.php'
137--- server/lib/service/xmdssoap.class.php 2014-07-22 15:08:23 +0000
138+++ server/lib/service/xmdssoap.class.php 2014-10-03 14:12:49 +0000
139@@ -1,7 +1,7 @@
140 <?php
141 /*
142 * Xibo - Digital Signage - http://www.xibo.org.uk
143- * Copyright (C) 2009-2013 Daniel Garner
144+ * Copyright (C) 2009-2014 Daniel Garner
145 *
146 * This file is part of Xibo.
147 *
148@@ -49,8 +49,7 @@
149 public function RegisterDisplay($serverKey, $hardwareKey, $displayName, $version)
150 {
151 $db =& $this->db;
152- define('SERVER_KEY', Config::GetSetting('SERVER_KEY'));
153-
154+
155 // Sanitize
156 $serverKey = Kit::ValidateParam($serverKey, _STRING);
157 $hardwareKey = Kit::ValidateParam($hardwareKey, _STRING);
158@@ -66,8 +65,8 @@
159 Debug::LogEntry("audit", "serverKey [$serverKey], hardwareKey [$hardwareKey], displayName [$displayName]", "xmds", "RegisterDisplay");
160
161 // Check the serverKey matches the one we have stored in this servers lic.txt file
162- if ($serverKey != SERVER_KEY)
163- throw new SoapFault('Sender', 'The Server key you entered does not match with the server key at this address');
164+ if ($serverKey != Config::GetSetting('SERVER_KEY'))
165+ throw new SoapFault('Sender', 'The Server key you entered does not match with the server key at this address');
166
167 // Check the Length of the hardwareKey
168 if (strlen($hardwareKey) > 40)
169@@ -147,6 +146,9 @@
170 if (!$this->CheckVersion($version))
171 throw new SoapFault('Sender', 'Your client is not of the correct version for communication with this server.');
172
173+ if ($serverKey != Config::GetSetting('SERVER_KEY'))
174+ throw new SoapFault('Sender', 'The Server key you entered does not match with the server key at this address');
175+
176 // Make sure we are sticking to our bandwidth limit
177 if (!$this->CheckBandwidth())
178 throw new SoapFault('Receiver', "Bandwidth Limit exceeded");
179@@ -158,7 +160,7 @@
180 throw new SoapFault('Sender', 'This display is not licensed.');
181
182 if ($this->isAuditing == 1)
183- Debug::LogEntry("audit", '[IN] with hardware key: ' . $hardwareKey, "xmds", "RequiredFiles");
184+ Debug::LogEntry("audit", '[IN] with hardware key: ' . $hardwareKey, 'xmds', 'RequiredFiles', '', $this->displayId);
185
186 $requiredFilesXml = new DOMDocument("1.0");
187 $fileElements = $requiredFilesXml->createElement("files");
188@@ -166,8 +168,16 @@
189
190 $requiredFilesXml->appendChild($fileElements);
191
192- $currentdate = time();
193- $rfLookahead = $currentdate + $rfLookahead;
194+ // Hour to hour time bands for the query
195+ // Start at the current hour
196+ $fromFilter = time();
197+ // Move forwards an hour and the rf lookahead
198+ $rfLookahead = $fromFilter + 3600 + $rfLookahead;
199+ // Dial both items back to the top of the hour
200+ $fromFilter = $fromFilter - ($fromFilter % 3600);
201+ $toFilter = $rfLookahead - ($rfLookahead % 3600);
202+
203+ Debug::LogEntry('audit', sprintf('FromDT = %s. ToDt = %s', date('Y-m-d h:i:s', $fromFilter), date('Y-m-d h:i:s', $toFilter)), 'xmds', 'RequiredFiles', '', $this->displayId);
204
205 // Get a list of all layout ids in the schedule right now.
206 $SQL = " SELECT DISTINCT layout.layoutID ";
207@@ -176,13 +186,12 @@
208 $SQL .= " INNER JOIN `lkcampaignlayout` ON lkcampaignlayout.CampaignID = campaign.CampaignID ";
209 $SQL .= " INNER JOIN `layout` ON lkcampaignlayout.LayoutID = layout.LayoutID ";
210 $SQL .= " INNER JOIN lkdisplaydg ON lkdisplaydg.DisplayGroupID = schedule_detail.DisplayGroupID ";
211- $SQL .= " INNER JOIN display ON lkdisplaydg.DisplayID = display.displayID ";
212- $SQL .= sprintf(" WHERE display.license = '%s' ", $hardwareKey);
213- $SQL .= sprintf(" AND schedule_detail.FromDT < %d AND schedule_detail.ToDT > %d ", $rfLookahead, $currentdate - 3600);
214+ $SQL .= sprintf(" WHERE lkdisplaydg.DisplayID = %d ", $this->displayId);
215+ $SQL .= sprintf(" AND schedule_detail.FromDT < %d AND schedule_detail.ToDT > %d ", $toFilter, $fromFilter);
216 $SQL .= " AND layout.retired = 0 ";
217
218 if ($this->isAuditing == 1)
219- Debug::LogEntry("audit", $SQL, "xmds", "RequiredFiles");
220+ Debug::LogEntry("audit", $SQL, 'xmds', 'RequiredFiles', '', $this->displayId);
221
222 if (!$results = $db->query($SQL))
223 {
224@@ -221,13 +230,12 @@
225 ON lkmediadisplaygroup.mediaid = media.MediaID
226 INNER JOIN lkdisplaydg
227 ON lkdisplaydg.DisplayGroupID = lkmediadisplaygroup.DisplayGroupID
228- INNER JOIN display
229- ON lkdisplaydg.DisplayID = display.displayID
230 ";
231- $SQL .= sprintf(" WHERE display.license = '%s' ", $hardwareKey);
232+ $SQL .= sprintf(" WHERE lkdisplaydg.DisplayID = %d ", $this->displayId);
233 $SQL .= " ORDER BY RecordType DESC";
234
235- if ($this->isAuditing == 1) Debug::LogEntry("audit", $SQL, "xmds", "RequiredFiles");
236+ if ($this->isAuditing == 1)
237+ Debug::LogEntry("audit", $SQL, 'xmds', 'RequiredFiles', '', $this->displayId);
238
239 if (!$results = $db->query($SQL))
240 {
241@@ -254,7 +262,7 @@
242 $fileSize = strlen($xml);
243
244 if ($this->isAuditing == 1)
245- Debug::LogEntry("audit", 'MD5 for layoutid ' . $id . ' is: [' . $md5 . ']', "xmds", "RequiredFiles");
246+ Debug::LogEntry("audit", 'MD5 for layoutid ' . $id . ' is: [' . $md5 . ']', 'xmds', 'RequiredFiles', '', $this->displayId);
247 }
248 else if ($recordType == 'media')
249 {
250@@ -367,11 +375,8 @@
251 $this->PhoneHome();
252
253 if ($this->isAuditing == 1)
254- {
255- Debug::LogEntry("audit", $requiredFilesXml->saveXML(), "xmds", "RequiredFiles");
256- Debug::LogEntry("audit", "[OUT]", "xmds", "RequiredFiles");
257- }
258-
259+ Debug::LogEntry("audit", $requiredFilesXml->saveXML(), 'xmds', 'RequiredFiles', '', $this->displayId);
260+
261 // Return the results of requiredFiles()
262 $requiredFilesXml->formatOutput = true;
263 $output = $requiredFilesXml->saveXML();
264@@ -409,6 +414,9 @@
265 throw new SoapFault('Receiver', "Your client is not of the correct version for communication with this server.");
266 }
267
268+ if ($serverKey != Config::GetSetting('SERVER_KEY'))
269+ throw new SoapFault('Sender', 'The Server key you entered does not match with the server key at this address');
270+
271 // Make sure we are sticking to our bandwidth limit
272 if (!$this->CheckBandwidth())
273 throw new SoapFault('Receiver', "Bandwidth Limit exceeded");
274@@ -484,12 +492,15 @@
275 $serverKey = Kit::ValidateParam($serverKey, _STRING);
276 $hardwareKey = Kit::ValidateParam($hardwareKey, _STRING);
277 $version = Kit::ValidateParam($version, _STRING);
278- $sLookahead = Kit::ValidateParam(Config::GetSetting('REQUIRED_FILES_LOOKAHEAD'), _INT);
279+ $rfLookahead = Kit::ValidateParam(Config::GetSetting('REQUIRED_FILES_LOOKAHEAD'), _INT);
280
281 // Make sure we are talking the same language
282 if (!$this->CheckVersion($version))
283 throw new SoapFault('Sender', "Your client is not of the correct version for communication with this server.");
284
285+ if ($serverKey != Config::GetSetting('SERVER_KEY'))
286+ throw new SoapFault('Sender', 'The Server key you entered does not match with the server key at this address');
287+
288 // Make sure we are sticking to our bandwidth limit
289 if (!$this->CheckBandwidth())
290 throw new SoapFault('Receiver', "Bandwidth Limit exceeded");
291@@ -499,23 +510,28 @@
292 throw new SoapFault('Sender', "This display client is not licensed");
293
294 if ($this->isAuditing == 1)
295- Debug::LogEntry("audit", "[IN] $hardwareKey", "xmds", "Schedule");
296+ Debug::LogEntry("audit", "[IN] $hardwareKey", 'xmds', 'Schedule', '', $this->displayId);
297
298 $scheduleXml = new DOMDocument("1.0");
299 $layoutElements = $scheduleXml->createElement("schedule");
300
301 $scheduleXml->appendChild($layoutElements);
302
303- $currentdate = time();
304+ // Hour to hour time bands for the query
305+ // Start at the current hour
306+ $fromFilter = time();
307+ // Move forwards an hour and the rf lookahead
308+ $rfLookahead = $fromFilter + 3600 + $rfLookahead;
309+ // Dial both items back to the top of the hour
310+ $fromFilter = $fromFilter - ($fromFilter % 3600);
311
312 if (Config::GetSetting('SCHEDULE_LOOKAHEAD') == 'On')
313- {
314- $sLookahead = $currentdate + $sLookahead;
315- }
316- else
317- {
318- $sLookahead = $currentdate;
319- }
320+ $toFilter = $rfLookahead - ($rfLookahead % 3600);
321+ else
322+ $toFilter = ($fromFilter + 3600) - (($fromFilter + 3600) % 3600);
323+
324+ if ($this->isAuditing == 1)
325+ Debug::LogEntry('audit', sprintf('FromDT = %s. ToDt = %s', date('Y-m-d h:i:s', $fromFilter), date('Y-m-d h:i:s', $toFilter)), 'xmds', 'Schedule', '', $this->displayId);
326
327 // Add file nodes to the $fileElements
328 // Firstly get all the scheduled layouts
329@@ -526,14 +542,13 @@
330 $SQL .= " INNER JOIN `lkcampaignlayout` ON lkcampaignlayout.CampaignID = campaign.CampaignID ";
331 $SQL .= " INNER JOIN `layout` ON lkcampaignlayout.LayoutID = layout.LayoutID ";
332 $SQL .= " INNER JOIN lkdisplaydg ON lkdisplaydg.DisplayGroupID = schedule_detail.DisplayGroupID ";
333- $SQL .= " INNER JOIN display ON lkdisplaydg.DisplayID = display.displayID ";
334- $SQL .= sprintf(" WHERE display.license = '%s' ", $hardwareKey);
335- $SQL .= sprintf(" AND (schedule_detail.FromDT < %d AND schedule_detail.ToDT > %d )", $sLookahead, $currentdate - 3600);
336+ $SQL .= sprintf(" WHERE lkdisplaydg.DisplayID = %d ", $this->displayId);
337+ $SQL .= sprintf(" AND (schedule_detail.FromDT < %d AND schedule_detail.ToDT > %d )", $toFilter, $fromFilter);
338 $SQL .= " AND layout.retired = 0 ";
339 $SQL .= " ORDER BY schedule_detail.DisplayOrder, lkcampaignlayout.DisplayOrder, schedule_detail.eventID ";
340
341 if ($this->isAuditing == 1)
342- Debug::LogEntry("audit", $SQL, "xmds", "Schedule");
343+ Debug::LogEntry("audit", $SQL, 'xmds', 'Schedule', '', $this->displayId);
344
345 // Run the query
346 if (!$results = $db->query($SQL))
347@@ -589,7 +604,7 @@
348 $scheduleXml->formatOutput = true;
349
350 if ($this->isAuditing == 1)
351- Debug::LogEntry("audit", $scheduleXml->saveXML(), "xmds", "Schedule");
352+ Debug::LogEntry("audit", $scheduleXml->saveXML(), 'xmds', 'Schedule', '', $this->displayId);
353
354 $output = $scheduleXml->saveXML();
355
356@@ -624,6 +639,9 @@
357 throw new SoapFault('Receiver', "Your client is not of the correct version for communication with this server.", $serverKey);
358 }
359
360+ if ($serverKey != Config::GetSetting('SERVER_KEY'))
361+ throw new SoapFault('Sender', 'The Server key you entered does not match with the server key at this address');
362+
363 // Make sure we are sticking to our bandwidth limit
364 if (!$this->CheckBandwidth())
365 throw new SoapFault('Receiver', "Bandwidth Limit exceeded");
366@@ -708,6 +726,9 @@
367 throw new SoapFault('Sender', "Your client is not of the correct version for communication with this server.");
368 }
369
370+ if ($serverKey != Config::GetSetting('SERVER_KEY'))
371+ throw new SoapFault('Sender', 'The Server key you entered does not match with the server key at this address');
372+
373 // Make sure we are sticking to our bandwidth limit
374 if (!$this->CheckBandwidth())
375 throw new SoapFault('Receiver', "Bandwidth Limit exceeded");
376@@ -833,6 +854,9 @@
377 throw new SoapFault('Receiver', "Your client is not of the correct version for communication with this server.");
378 }
379
380+ if ($serverKey != Config::GetSetting('SERVER_KEY'))
381+ throw new SoapFault('Sender', 'The Server key you entered does not match with the server key at this address');
382+
383 // Make sure we are sticking to our bandwidth limit
384 if (!$this->CheckBandwidth())
385 throw new SoapFault('Receiver', "Bandwidth Limit exceeded");
386@@ -926,6 +950,9 @@
387 if (!$this->CheckVersion($version))
388 throw new SoapFault('Receiver', "Your client is not of the correct version for communication with this server.");
389
390+ if ($serverKey != Config::GetSetting('SERVER_KEY'))
391+ throw new SoapFault('Sender', 'The Server key you entered does not match with the server key at this address');
392+
393 // Make sure we are sticking to our bandwidth limit
394 if (!$this->CheckBandwidth())
395 throw new SoapFault('Receiver', "Bandwidth Limit exceeded");
396@@ -1002,6 +1029,9 @@
397 if (!$this->CheckVersion($version))
398 throw new SoapFault('Receiver', "Your client is not of the correct version for communication with this server.");
399
400+ if ($serverKey != Config::GetSetting('SERVER_KEY'))
401+ throw new SoapFault('Sender', 'The Server key you entered does not match with the server key at this address');
402+
403 // Make sure we are sticking to our bandwidth limit
404 if (!$this->CheckBandwidth())
405 throw new SoapFault('Receiver', "Bandwidth Limit exceeded");
406@@ -1188,7 +1218,7 @@
407 return true;
408
409 // Test bandwidth for the current month
410- $startOfMonth = strtotime(date('m').'/01/'.date('Y').' 00:00:00');
411+ $startOfMonth = strtotime(date('m').'/02/'.date('Y').' 00:00:00');
412
413 $sql = sprintf('SELECT IFNULL(SUM(Size), 0) AS BandwidthUsage FROM `bandwidth` WHERE Month = %d', $startOfMonth);
414 $bandwidthUsage = $this->db->GetSingleValue($sql, 'BandwidthUsage', _INT);
415
416=== modified file 'server/maintenance.php'
417--- server/maintenance.php 2014-01-18 09:47:41 +0000
418+++ server/maintenance.php 2014-10-03 14:12:49 +0000
419@@ -243,7 +243,7 @@
420
421 // Log Tidy
422 print "<h1>" . __("Tidy Logs") . "</h1>";
423- if(Config::GetSetting("MAINTENANCE_LOG_MAXAGE")!=0)
424+ if(Config::GetSetting("MAINTENANCE_LOG_MAXAGE")!=0 && Kit::GetParam('quick', _REQUEST, _INT) != 1)
425 {
426 $maxage = date("Y-m-d H:i:s",time() - (86400 * Kit::ValidateParam(Config::GetSetting("MAINTENANCE_LOG_MAXAGE"),_INT)));
427
428@@ -265,7 +265,7 @@
429
430 // Stats Tidy
431 print "<h1>" . __("Tidy Stats") . "</h1>";
432- if(Config::GetSetting("MAINTENANCE_STAT_MAXAGE")!=0)
433+ if(Config::GetSetting("MAINTENANCE_STAT_MAXAGE")!=0 && Kit::GetParam('quick', _REQUEST, _INT) != 1)
434 {
435 $maxage = date("Y-m-d H:i:s",time() - (86400 * Kit::ValidateParam(Config::GetSetting("MAINTENANCE_STAT_MAXAGE"),_INT)));
436
437
438=== modified file 'server/modules/module_user_general.php'
439--- server/modules/module_user_general.php 2014-07-09 17:27:29 +0000
440+++ server/modules/module_user_general.php 2014-10-03 14:12:49 +0000
441@@ -505,7 +505,7 @@
442
443 $results = $sth->fetchAll();
444
445- return (count($results > 0));
446+ return (count($results) > 0);
447 }
448 catch (Exception $e) {
449
450
451=== modified file 'server/modules/preview/HtmlTemplateForGetResource.html'
452--- server/modules/preview/HtmlTemplateForGetResource.html 2014-07-17 13:38:38 +0000
453+++ server/modules/preview/HtmlTemplateForGetResource.html 2014-10-03 14:12:49 +0000
454@@ -3,7 +3,7 @@
455 <head>
456 <title>Xibo Open Source Digital Signage</title>
457 <meta http-equiv="X-UA-Compatible" content="IE=edge" />
458- <meta name="viewport" content="width=[[ViewPortWidth]], user-scalable=no, initial-scale=1.0, target-densitydpi=device-dpi" />
459+ <meta name="viewport" content="width=[[ViewPortWidth]]" />
460 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
461 <!-- Copyright 2006-2014 Daniel Garner. Part of the Xibo Open Source Digital Signage Solution. Released under the AGPLv3 or later. -->
462 <style type="text/css">
463
464=== modified file 'server/modules/preview/HtmlTemplateSimple.html'
465--- server/modules/preview/HtmlTemplateSimple.html 2014-07-15 11:42:14 +0000
466+++ server/modules/preview/HtmlTemplateSimple.html 2014-10-03 14:12:49 +0000
467@@ -7,7 +7,7 @@
468 <head>
469 <title>Xibo Open Source Digital Signage</title>
470 <meta http-equiv="X-UA-Compatible" content="IE=edge" />
471- <meta name="viewport" content="width=[[ViewPortWidth]], user-scalable=no, initial-scale=1.0, target-densitydpi=device-dpi" />
472+ <meta name="viewport" content="width=[[ViewPortWidth]]" />
473 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
474 <!-- Copyright 2006-2014 Daniel Garner. Part of the Xibo Open Source Digital Signage Solution. Released under the AGPLv3 or later. -->
475 <style type="text/css">
476
477=== modified file 'server/theme/default/html/status_dashboard.php'
478--- server/theme/default/html/status_dashboard.php 2014-07-21 11:02:21 +0000
479+++ server/theme/default/html/status_dashboard.php 2014-10-03 14:12:49 +0000
480@@ -19,50 +19,51 @@
481 * along with Xibo. If not, see <http://www.gnu.org/licenses/>.
482 *
483 * Theme variables:
484- * id = The GridID for rendering AJAX layout table return
485- * filter_id = The Filter Form ID
486- * form_meta = Extra form meta that needs to be sent to the CMS to return the list of layouts
487- * pager = A paging control for this Xibo Grid
488+ * id = The GridID for rendering AJAX layout table return
489+ * filter_id = The Filter Form ID
490+ * form_meta = Extra form meta that needs to be sent to the CMS to return the list of layouts
491+ * pager = A paging control for this Xibo Grid
492 */
493 defined('XIBO') or die("Sorry, you are not allowed to directly access this page.<br /> Please press the back button in your browser.");
494 ?>
495 <div class="row">
496- <div class="span6">
497- <h3 class="text-center"><?php echo Theme::Translate('Bandwidth Usage'); ?></h3>
498- <div id="flot_bandwidth_chart" style="height: 400px;" class="flot-chart"></div>
499- </div>
500- <div class="span6">
501- <h3 class="text-center"><?php echo Theme::Translate('Library Usage'); ?></h3>
502- <?php echo Theme::Get('library-widget'); ?>
503- </div>
504+ <div class="span6">
505+ <h3 class="text-center"><?php echo Theme::Translate('Bandwidth Usage'); ?></h3>
506+ <div id="flot_bandwidth_chart" style="height: 400px;" class="flot-chart"></div>
507+ </div>
508+ <div class="span6">
509+ <h3 class="text-center"><?php echo Theme::Translate('Library Usage'); ?></h3>
510+ <?php echo Theme::Get('library-widget'); ?>
511+ </div>
512 </div>
513 <div class="row">
514- <div class="span6">
515- <h3 class="text-center"><?php echo Theme::Translate('Display Activity'); ?></h3>
516- <table class="table">
517- <thead>
518- <tr>
519- <th><?php echo Theme::Translate('Display'); ?></th>
520- <th><?php echo Theme::Translate('Logged In'); ?></th>
521- <th><?php echo Theme::Translate('Licence'); ?></th>
522- </tr>
523- </thead>
524- <tbody>
525- <?php foreach(Theme::Get('display-widget-rows') as $row) { ?>
526- <tr class="<?php echo $row['mediainventorystatus']; ?>">
527- <td><?php echo $row['display']; ?></td>
528- <td><span class="<?php echo $row['loggedin']; ?>"></span></td>
529- <td><span class="<?php echo $row['licensed']; ?>"></span></td>
530- </tr>
531- <?php } ?>
532- </tbody>
533- </table>
534- </div>
535- <div class="span6">
536- <?php echo Theme::Get('embedded-widget'); ?>
537- </div>
538+ <div class="span6">
539+ <h3 class="text-center"><?php echo Theme::Translate('Display Activity'); ?></h3>
540+ <table class="table">
541+ <thead>
542+ <tr>
543+ <th><?php echo Theme::Translate('Display'); ?></th>
544+ <th><?php echo Theme::Translate('Logged In'); ?></th>
545+ <th><?php echo Theme::Translate('Licence'); ?></th>
546+ </tr>
547+ </thead>
548+ <tbody>
549+ <?php foreach(Theme::Get('display-widget-rows') as $row) { ?>
550+ <tr class="<?php echo $row['mediainventorystatus']; ?>">
551+ <td><?php echo $row['display']; ?></td>
552+ <td><span class="<?php echo $row['loggedin']; ?>"></span></td>
553+ <td><span class="<?php echo $row['licensed']; ?>"></span></td>
554+ </tr>
555+ <?php } ?>
556+ </tbody>
557+ </table>
558+ </div>
559+ <div class="span6">
560+ <?php echo Theme::Get('embedded-widget'); ?>
561+ </div>
562 </div>
563 <script type="text/javascript">
564- <?php echo Theme::Get('bandwidth-widget'); ?>
565- <?php echo Theme::Get('library-widget-js'); ?>
566+ <?php echo Theme::Get('bandwidth-widget'); ?>
567+
568+ <?php echo Theme::Get('library-widget-js'); ?>
569 </script>
570\ No newline at end of file

Subscribers

People subscribed via source and target branches

to all changes: