Skip to content

Commit

Permalink
Dataset Advanced Filter: Text based display tag is not replaced at ru…
Browse files Browse the repository at this point in the history
…ntime on the player (#3463)

relates to xibosignage/xibo#3463

- Addressed phpcs warnings.
  • Loading branch information
nadzpogi committed Aug 9, 2024
1 parent a29c037 commit 45ddaec
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/Entity/DataSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ class DataSet implements \JsonSerializable
public $isRealTime = 0;

/**
* @SWG\Property(description="Indicates the source of the data connector. Requires the Real time flag. Can be null, user-defined, or a connector.")
* @SWG\Property(description="Indicates the source of the data connector. Requires the Real time flag. Can be null,
* user-defined, or a connector.")
* @var string
*/
public $dataConnectorSource;
Expand Down Expand Up @@ -504,7 +505,6 @@ public function getData($filterBy = [], $options = [], $extraParams = [])

// Fetch display tag value/s
if ($filter != '' && $displayId != 0) {

// Define the regular expression to match [Tag:...]
$pattern = '/\[Tag:[^]]+\]/';

Expand Down Expand Up @@ -544,9 +544,11 @@ public function getData($filterBy = [], $options = [], $extraParams = [])

$query = 'SELECT `lktagdisplaygroup`.`value` AS tagValue
FROM `lkdisplaydg`
INNER JOIN `displaygroup` ON `displaygroup`.displayGroupId = `lkdisplaydg`.displayGroupId
INNER JOIN `displaygroup`
ON `displaygroup`.displayGroupId = `lkdisplaydg`.displayGroupId
AND `displaygroup`.isDisplaySpecific = 1
INNER JOIN `lktagdisplaygroup` ON `lktagdisplaygroup`.displayGroupId = `lkdisplaydg`.displayGroupId
INNER JOIN `lktagdisplaygroup`
ON `lktagdisplaygroup`.displayGroupId = `lkdisplaydg`.displayGroupId
INNER JOIN `tag` ON `lktagdisplaygroup`.tagId = `tag`.tagId
WHERE `lkdisplaydg`.displayId = :displayId
AND `tag`.`tag` = :tagName
Expand Down Expand Up @@ -1099,8 +1101,8 @@ public function deleteData()
*/
private function add()
{
$columns = 'DataSet, Description, UserID, `code`, `isLookup`, `isRemote`,';
$columns .= '`lastDataEdit`, `lastClear`, `folderId`, `permissionsFolderId`, `isRealTime`, `dataConnectorSource`';
$columns = 'DataSet, Description, UserID, `code`, `isLookup`, `isRemote`, `lastDataEdit`,';
$columns .= '`lastClear`, `folderId`, `permissionsFolderId`, `isRealTime`, `dataConnectorSource`';
$values = ':dataSet, :description, :userId, :code, :isLookup, :isRemote,';
$values .= ':lastDataEdit, :lastClear, :folderId, :permissionsFolderId, :isRealTime, :dataConnectorSource';

Expand Down

0 comments on commit 45ddaec

Please sign in to comment.