Skip to content

Commit

Permalink
Merge branch 'hotfix/tl-file-table'
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanheimes committed Aug 15, 2016
2 parents 5bf65d9 + 842a533 commit eefc221
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions system/modules/syncCto/SyncCtoModuleClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -2477,8 +2477,10 @@ private function pageSyncToShowStep4()
break;

case 2:
// Check user
if (\BackendUser::getInstance()->isAdmin || \BackendUser::getInstance()->syncCto_tables != null)
$isAdmin = \BackendUser::getInstance()->isAdmin;
$userTables = \BackendUser::getInstance()->syncCto_tables;

if ($isAdmin || !empty($userTables))
{
// Load allowed tables for this user
if (\BackendUser::getInstance()->isAdmin)
Expand Down Expand Up @@ -2631,15 +2633,17 @@ private function pageSyncToShowStep4()
}

// Set the tl_files if we have the automode or the checkbox is activate.
if ($this->arrSyncSettings['automode'] || $this->arrSyncSettings['syncCto_SyncTlFiles'])
{
if ($this->arrSyncSettings['automode'] || $this->arrSyncSettings['syncCto_SyncTlFiles']) {
$this->arrSyncSettings['syncCto_SyncTables']['tl_files'] = 'tl_files';
}

$this->objStepPool->step++;
}
else
{
} elseif (empty($userTables) && ($this->arrSyncSettings['syncCto_SyncTlFiles'] || $this->arrSyncSettings['automode'])) {
$this->arrSyncSettings['syncCto_SyncTables']['tl_files'] = 'tl_files';
$this->objStepPool->step = ($this->objStepPool->step + 2);

break;
} else {
$this->objData->setState(SyncCtoEnum::WORK_SKIPPED);
$this->objData->setHtml("");
$this->intStep++;
Expand Down

0 comments on commit eefc221

Please sign in to comment.