Use Arguments->getCommand() where it makes more sense than getQueryString()

- Remove a couple of intermediary query string variables
This commit is contained in:
Hypolite Petovan 2020-09-09 00:15:25 -04:00
parent e23f3a645a
commit bbefc61a0c
4 changed files with 10 additions and 17 deletions

View file

@ -42,13 +42,13 @@ class BaseApi extends BaseModule
{
$arguments = DI::args();
if (substr($arguments->getQueryString(), -4) === '.xml') {
if (substr($arguments->getCommand(), -4) === '.xml') {
self::$format = 'xml';
}
if (substr($arguments->getQueryString(), -4) === '.rss') {
if (substr($arguments->getCommand(), -4) === '.rss') {
self::$format = 'rss';
}
if (substr($arguments->getQueryString(), -4) === '.atom') {
if (substr($arguments->getCommand(), -4) === '.atom') {
self::$format = 'atom';
}
}