Add documentation

This commit is contained in:
Molkobain
2021-08-11 10:12:02 +02:00
parent cd1ba097cb
commit c475e66176
4 changed files with 28 additions and 6 deletions

View File

@@ -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

View File

@@ -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,]);

View File

@@ -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: ');

View File

@@ -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': {