contao/import — Issue #3021: add indexProtectedModules as an option like indexProtected
Author: computino
Created: 2011-11-29 20:43:21+00:00
State: open
Labels: Feature, framework

Currently you can select to build the search index with FE-users logged in, but protected content elements and/or modules are completely excluded from the search via indexer::stop and therefore never in search index, not even when "indexProtected" is active.

In Controller ~ 273ff

```
// Disable indexing if protected
if ($objModule->protected && (

![]($GLOBALS['TL_CONFIG']['indexProtectedModules']) && )preg_match('/^\s*". $strBuffer ."\n";
}
```

With **&& (

![]($GLOBALS['TL_CONFIG']['indexProtectedModules'])** added in the code above.

Of cause the same would be nice around line 427ff, same file:

```
// Disable indexing if protected
if ($objElement->protected && ()$GLOBALS['TL_CONFIG']['indexProtectedElements']) &&

![](preg_match('/^\s*<)-- indexer::stop/i', $strBuffer))
{
$strBuffer = "\n". $strBuffer ."\n";
}
```

With **&& (!$GLOBALS['TL_CONFIG']['indexProtectedElements'])** added in the code above.
Both could be used as a single option like above, or in combination with the existing indexProtected. Standalone would make more sense in my opinion, to have the clear separation with indexProtected only being applied to page access protections.

Related issues: #2931

--- _Originally created on April 21st, 2011, at 01:10am (ID 3021)_