From 3b599a40f37fbe851d04a499961582cbf754a927 Mon Sep 17 00:00:00 2001 From: Benjamin Dalsass Date: Wed, 26 Jan 2022 08:11:16 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B04454=20-=20Measuring=20the=20use=20of=20?= =?UTF-8?q?the=20queryphrase=20book=20(code=20review=202)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/query.class.inc.php | 2 +- webservices/export.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/application/query.class.inc.php b/application/query.class.inc.php index d32448135..dd1febc25 100644 --- a/application/query.class.inc.php +++ b/application/query.class.inc.php @@ -139,7 +139,7 @@ abstract class Query extends cmdbAbstractObject * @return string|null * @since 3.1.0 */ - public abstract function GetExportUrl(array $aValues = null) : ?string; + abstract public function GetExportUrl(array $aValues = null) : ?string; /** * Update last export information. diff --git a/webservices/export.php b/webservices/export.php index b7ae5735f..b697f8fe4 100644 --- a/webservices/export.php +++ b/webservices/export.php @@ -87,6 +87,8 @@ $sExpression = utils::ReadParam('expression', '', true /* Allow CLI */, 'raw_dat $sFields = trim(utils::ReadParam('fields', '', true, 'raw_data')); // CSV field list (allows to specify link set attributes, still not taken into account for XML export) $bFieldsAdvanced = utils::ReadParam('fields_advanced', 0); +$oQuery = null; + if (strlen($sExpression) == 0) { $sQueryId = trim(utils::ReadParam('query', '', true /* Allow CLI */, 'raw_data'));