From aa060746d7449602c95f00e27a2723d14ae52177 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Thu, 12 Dec 2019 09:50:13 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B02009=20-=20Fix=20non=20editable=20dashbo?= =?UTF-8?q?ard=20when=20wrong=20attribute=20code=20used=20in=20its=20defin?= =?UTF-8?q?ition?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/dbsearch.class.php | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/core/dbsearch.class.php b/core/dbsearch.class.php index 197787aa9..46f92416d 100644 --- a/core/dbsearch.class.php +++ b/core/dbsearch.class.php @@ -1,20 +1,21 @@ +/** + * Copyright (C) 2013-2019 Combodo SARL + * + * This file is part of iTop. + * + * iTop is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * iTop is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + */ $bUseLegacyDBSearch = utils::GetConfig()->Get('use_legacy_dbsearch'); @@ -978,7 +979,9 @@ abstract class DBSearch $bBeautifulSQL = self::$m_bTraceQueries || self::$m_bDebugQuery || self::$m_bIndentQueries; $sRes = $oSQLQuery->RenderGroupBy($aScalarArgs, $bBeautifulSQL, $aOrderBy, $iLimitCount, $iLimitStart); } - catch (Exception $e) + // Catch CoreException to add info before throwing again + // Other exceptions will be thrown directly + catch (CoreException $e) { // Add some information... $e->addInfo('OQL', $this->ToOQL());