diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index e86e84e4f3..0a7b52d72b 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -156,7 +156,7 @@ abstract class AttributeDefinition */ public function IsSearchable() { - return static::SEARCH_WIDGET_TYPE != static::SEARCH_WIDGET_TYPE_RAW; + return $this->GetSearchType() != static::SEARCH_WIDGET_TYPE_RAW; } /** @var string */ @@ -7015,6 +7015,15 @@ class AttributeExternalField extends AttributeDefinition return self::SEARCH_WIDGET_TYPE_RAW; } + function IsSearchable() + { + if ($this->IsFriendlyName()) + { + return true; + } + return parent::IsSearchable(); + } + public static function ListExpectedParams() { return array_merge(parent::ListExpectedParams(), array("extkey_attcode", "target_attcode")); diff --git a/core/backgroundprocess.inc.php b/core/backgroundprocess.inc.php index ba5c78891a..05f28ece2e 100644 --- a/core/backgroundprocess.inc.php +++ b/core/backgroundprocess.inc.php @@ -82,7 +82,8 @@ interface iScheduledProcess extends iProcess * * Other info (module name and time default value) should be provided using a method that needs to be implemented. * - * @since 2.7.0 + * @since 2.7.0 PR #89 + * @since 2.7.0-2 N°2580 Fix {@link GetNextOccurrence} returning wrong value */ abstract class AbstractWeeklyScheduledProcess implements iScheduledProcess { @@ -191,7 +192,8 @@ abstract class AbstractWeeklyScheduledProcess implements iScheduledProcess } $oNow = new DateTime(); $iNextPos = false; - for ($iDay = $oNow->format('N'); $iDay <= 7; $iDay++) + $sDay = $oNow->format('N'); + for ($iDay = (int) $sDay; $iDay <= 7; $iDay++) { $iNextPos = array_search($iDay, $aDays, true); if ($iNextPos !== false)