Skip to content

Commit

Permalink
4.0.5 issues pt2 (#2193)
Browse files Browse the repository at this point in the history
* SAML: php8 support and fix dynamic property declaration. xibosignage/xibo#3184
* RSS: fix date sorting. xibosignage/xibo#3214
* Display: map should only get initialised when first clicked. We should only filter the map when visible. xibosignage/xibo#3133
* Widget: HLS widget fix, add mute setting to the XLF xibosignage/xibo#3213
* Display: add a supported column to highlight old players. xibosignageltd/xibo-private#535
  • Loading branch information
dasgarner committed Nov 3, 2023
1 parent b88c3be commit 69be1b4
Show file tree
Hide file tree
Showing 11 changed files with 276 additions and 226 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -66,7 +66,7 @@
"guzzlehttp/guzzle": "7.5.*",
"league/oauth2-client": "^2.4",
"james-heinrich/getid3": "^1.9",
"onelogin/php-saml": "3.3.x",
"onelogin/php-saml": "4.1.*",
"infostars/picofeed": "dev-westphal/php8",
"xibosignage/xibo-xmr": "0.*",
"tedivm/stash": "^v0.17.6",
Expand Down
33 changes: 17 additions & 16 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions lib/Controller/Display.php
Expand Up @@ -504,6 +504,7 @@ public function getFilters(SanitizerInterface $parsedQueryParams): array
'syncGroupId' => $parsedQueryParams->getInt('syncGroupId'),
'syncGroupIdMembers' => $parsedQueryParams->getInt('syncGroupIdMembers'),
'xmrRegistered' => $parsedQueryParams->getInt('xmrRegistered'),
'isPlayerSupported' => $parsedQueryParams->getInt('isPlayerSupported'),
];
}

Expand Down Expand Up @@ -649,6 +650,13 @@ public function getFilters(SanitizerInterface $parsedQueryParams): array
* type="integer",
* required=false
* ),
* @SWG\Parameter(
* name="isPlayerSupported",
* in="query",
* description="Filter by whether the player is supported (1 or 0)",
* type="integer",
* required=false
* ),
* @SWG\Response(
* response=200,
* description="successful operation",
Expand Down
12 changes: 12 additions & 0 deletions lib/Factory/DisplayFactory.php
Expand Up @@ -25,6 +25,7 @@

use Xibo\Entity\Display;
use Xibo\Entity\User;
use Xibo\Helper\Environment;
use Xibo\Service\ConfigServiceInterface;
use Xibo\Service\DisplayNotifyServiceInterface;
use Xibo\Support\Exception\NotFoundException;
Expand Down Expand Up @@ -685,6 +686,17 @@ public function query($sortOrder = null, $filterBy = [])
$body .= ' AND `display`.xmrChannel IS NULL ';
}

// Player version supported
if ($parsedBody->getInt('isPlayerSupported') !== null) {
if ($parsedBody->getInt('isPlayerSupported') === 1) {
$body .= ' AND `display`.client_code >= :playerSupport ';
} else {
$body .= ' AND `display`.client_code < :playerSupport ';
}

$params['playerSupport'] = Environment::$PLAYER_SUPPORT;
}

$this->viewPermissionSql(
'Xibo\Entity\DisplayGroup',
$body,
Expand Down
1 change: 1 addition & 0 deletions lib/Helper/Environment.php
Expand Up @@ -35,6 +35,7 @@ class Environment
public static $XLF_VERSION = 4;
public static $VERSION_REQUIRED = '8.1.0';
public static $VERSION_UNSUPPORTED = '9.0';
public static $PLAYER_SUPPORT = 300;

/** @var null cache migration status for the whole request */
private static $migrationStatus = null;
Expand Down
2 changes: 1 addition & 1 deletion lib/Middleware/CASAuthentication.php
Expand Up @@ -47,7 +47,7 @@ class CASAuthentication extends AuthenticationBase
public function addRoutes()
{
$app = $this->app;
$app->getContainer()->logoutRoute = 'cas.logout';
$app->getContainer()->set('logoutRoute', 'cas.logout');

$app->map(['GET', 'POST'], '/cas/login', function (\Slim\Http\ServerRequest $request, \Slim\Http\Response $response) {

Expand Down
2 changes: 1 addition & 1 deletion lib/Middleware/SAMLAuthentication.php
Expand Up @@ -51,7 +51,7 @@ class SAMLAuthentication extends AuthenticationBase
public function addRoutes()
{
$app = $this->app;
$app->getContainer()->logoutRoute = 'saml.logout';
$app->getContainer()->set('logoutRoute', 'saml.logout');

// Route providing SAML metadata
$app->get('/saml/metadata', function (Request $request, Response $response) {
Expand Down
1 change: 1 addition & 0 deletions lib/Middleware/Theme.php
Expand Up @@ -128,6 +128,7 @@ public static function setTheme(ContainerInterface $container, Request $request,
];
$view['version'] = Environment::$WEBSITE_VERSION_NAME;
$view['revision'] = Environment::getGitCommit();
$view['playerVersion'] = Environment::$PLAYER_SUPPORT;
$view['isDevMode'] = Environment::isDevMode();
$samlSettings = $container->get('configService')->samlSettings;
if (isset($samlSettings['workflow'])
Expand Down
2 changes: 1 addition & 1 deletion lib/Widget/RssProvider.php
Expand Up @@ -122,7 +122,7 @@ public function fetchData(DataProviderInterface $dataProvider): WidgetProviderIn
usort($feedItems, function ($a, $b) {
/* @var Item $a */
/* @var Item $b */
return $a->getDate()->getTimestamp() - $b->getDate()->getTimestamp();
return $b->getDate()->getTimestamp() - $a->getDate()->getTimestamp();
});
}

Expand Down
2 changes: 1 addition & 1 deletion modules/hls.xml
Expand Up @@ -50,7 +50,7 @@
</test>
</rule>
</property>
<property id="mute" type="checkbox">
<property id="mute" type="checkbox" includeInXlf="true">
<title>Mute?</title>
<helpText>Should the video be muted?</helpText>
<default>%defaultMute%</default>
Expand Down

0 comments on commit 69be1b4

Please sign in to comment.