From c475e66176a35a63528914d7c7ae6a3dfc07e302 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Wed, 11 Aug 2021 10:12:02 +0200 Subject: [PATCH] Add documentation --- core/log.class.inc.php | 14 +++++++++----- core/metamodel.class.php | 16 ++++++++++++++++ .../portal/src/Controller/ObjectController.php | 2 +- js/search/search_form_handler.js | 2 ++ 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/core/log.class.inc.php b/core/log.class.inc.php index ee13c404d..be8bde80c 100644 --- a/core/log.class.inc.php +++ b/core/log.class.inc.php @@ -853,11 +853,9 @@ class DeprecatedCallsLog extends LogAPI /** * @param string|null $sTargetFile * - * @throws \ConfigException + *@uses \set_error_handler() to catch deprecated notices * - * @uses \set_error_handler() to catch deprecated notices - * - * @since 3.0.0-beta4 N°3002 logs deprecated notices in called code + * @since 3.0.0 N°3002 logs deprecated notices in called code */ public static function Enable($sTargetFile = null): void { @@ -881,7 +879,13 @@ class DeprecatedCallsLog extends LogAPI * This will catch a message for all E_DEPRECATED and E_USER_DEPRECATED errors. * This handler is set in DeprecatedCallsLog::Enable * - * @since 3.0.0-beta4 N°3002 + * @param int $errno + * @param string $errstr + * @param string $errfile + * @param int $errline + * + * @return bool + * @since 3.0.0 N°3002 * @noinspection SpellCheckingInspection */ public static function DeprecatedNoticesErrorHandler(int $errno, string $errstr, string $errfile, int $errline): bool diff --git a/core/metamodel.class.php b/core/metamodel.class.php index 8018d93ae..e02f21c44 100644 --- a/core/metamodel.class.php +++ b/core/metamodel.class.php @@ -6986,6 +6986,22 @@ abstract class MetaModel return $oObject; } + /** + * @param string $sClass + * @param int $iKey + * + * @return bool True if the object of $sClass and $iKey exists in the DB, false otherwise meaning: + * - It could be in memory for now and is not persisted yet + * - It is neither in memory nor DB + * + * @throws \CoreException + * @throws \MissingQueryArgument + * @throws \MySQLException + * @throws \MySQLHasGoneAwayException + * @throws \OQLException + * + * @since 3.0.0 N°4173 + */ public static function IsObjectExistsInDb(string $sClass, int $iKey): bool { $oFilter = DBObjectSearch::FromOQL('SELECT '.$sClass.' WHERE id = :id', ['id' => $iKey,]); diff --git a/datamodels/2.x/itop-portal-base/portal/src/Controller/ObjectController.php b/datamodels/2.x/itop-portal-base/portal/src/Controller/ObjectController.php index e86ca308c..daa4535e1 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/Controller/ObjectController.php +++ b/datamodels/2.x/itop-portal-base/portal/src/Controller/ObjectController.php @@ -1083,7 +1083,7 @@ class ObjectController extends BrickController // Reset the value set previously $aHeaders['Pragma'] = 'cache'; - // Fix bug in Symphony 3x in Response::sendHeaders() : don't replace header of page except Content-Type + // N°3423 Fix bug in Symphony 3.x in Response::sendHeaders(): Headers need to send directly as SF doesn't replace header of page except for Content-Type header('Cache-Control: no-transform, public,max-age='.$iCacheSec.',s-maxage='.$iCacheSec); header('Pragma: cache'); header('Expires: '); diff --git a/js/search/search_form_handler.js b/js/search/search_form_handler.js index 7828e84c7..c99188d07 100644 --- a/js/search/search_form_handler.js +++ b/js/search/search_form_handler.js @@ -14,7 +14,9 @@ $(function() 'data_config_list_selector': null, 'endpoint': null, 'init_opened': false, + /* Submit the search form automatically on criteria change */ 'auto_submit': true, + /* Submit the search form when the page is first loaded */ 'submit_on_load': false, 'show_obsolete_data' : true, 'search': {