public function addContentLock($page, $unlockConditions = '')
{
+ $this->config->hasContentLock = true;
$unlockConditions = Text::explodeNewLines($unlockConditions);
$conditions = [];
foreach ($unlockConditions as $unlockCondition) {
$conditions[] = $e;
}
- if(!$conditions){
- return;
+ if (!$conditions) {
+ $conditions = ['custom,custom'];
}
- $this->config->hasContentLock = true;
+
$page = max(1, $page);
if (!isset($this->content_lock[$page])) {
$this->content_lock[$page] = ['page' => $page, 'unlocked' => 0, 'conditions' => []];