mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-20 17:18:51 +02:00
N°1381 - Search on string with index -> operator = (Fixed for derived classes)
SVN:trunk[5906]
This commit is contained in:
@@ -329,7 +329,7 @@ class SearchForm
|
||||
*/
|
||||
protected function PopulateFieldList($sClass, $sAlias, &$aZList, &$aOthers)
|
||||
{
|
||||
$aDBIndexes = MetaModel::DBGetIndexes($sClass);
|
||||
$aDBIndexes = self::DBGetIndexes($sClass);
|
||||
$aIndexes = array();
|
||||
foreach($aDBIndexes as $aIndexGroup)
|
||||
{
|
||||
@@ -381,6 +381,23 @@ class SearchForm
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Search indexes for class and parents
|
||||
* @param $sClass
|
||||
*
|
||||
* @return array
|
||||
* @throws \CoreException
|
||||
*/
|
||||
protected static function DBGetIndexes($sClass)
|
||||
{
|
||||
$aDBIndexes = MetaModel::DBGetIndexes($sClass);
|
||||
while ($sClass = MetaModel::GetParentClass($sClass))
|
||||
{
|
||||
$aDBIndexes = array_merge($aDBIndexes, MetaModel::DBGetIndexes($sClass));
|
||||
}
|
||||
return $aDBIndexes;
|
||||
}
|
||||
|
||||
protected function IsSubAttribute($oAttDef)
|
||||
{
|
||||
return (($oAttDef instanceof AttributeFriendlyName) || ($oAttDef instanceof AttributeExternalField) || ($oAttDef instanceof AttributeSubItem));
|
||||
|
||||
Reference in New Issue
Block a user