Changeset View
Changeset View
Standalone View
Standalone View
core/units/admin/admin_tag_processor.php
Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Line(s) | |||||
} | } | ||||
else { | else { | ||||
$module = '#session#'; | $module = '#session#'; | ||||
} | } | ||||
$res = $this->ModulePath(array('module' => $module)); | $res = $this->ModulePath(array('module' => $module)); | ||||
break; | break; | ||||
case 'perm_section': | case 'perm_section': | ||||
$res = $sections_helper->getPermSection($section); | $res = $sections_helper->getPermSection($section, $params['prefix']); | ||||
break; | break; | ||||
case 'label': | case 'label': | ||||
$res = ''; | $res = ''; | ||||
if ( $section ) { | if ( $section ) { | ||||
if ( $section == 'in-portal:root' ) { | if ( $section == 'in-portal:root' ) { | ||||
// don't translate label for top section, because it's already translated | // don't translate label for top section, because it's already translated | ||||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Line(s) | |||||
if (isset($section_data['tabs_only']) && $section_data['tabs_only']) { | if (isset($section_data['tabs_only']) && $section_data['tabs_only']) { | ||||
$perm_status = false; | $perm_status = false; | ||||
$folder_label = $section_data['label']; | $folder_label = $section_data['label']; | ||||
ksort($section_data['children'], SORT_NUMERIC); | ksort($section_data['children'], SORT_NUMERIC); | ||||
foreach ($section_data['children'] as $priority => $section_name) { | foreach ($section_data['children'] as $priority => $section_name) { | ||||
// if only tabs in this section & none of them have permission, then skip section too | // if only tabs in this section & none of them have permission, then skip section too | ||||
$section_name = $sections_helper->getPermSection($section_name); | $section_name = $sections_helper->getPermSection($section_name, $section_data['SectionPrefix']); | ||||
$perm_status = $this->Application->CheckPermission($section_name.'.view', 1); | $perm_status = $this->Application->CheckPermission($section_name.'.view', 1); | ||||
Lint: CodingStandard.Strings.ConcatenationSpacing.NoSpaceBefore: Expected 1 space before concat operator; 0 found | |||||
Expected 1 space after concat operator; 0 found Lint: CodingStandard.Strings.ConcatenationSpacing.NoSpaceAfter: Expected 1 space after concat operator; 0 found | |||||
if ($perm_status) { | if ($perm_status) { | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
if (!$perm_status) { | if (!$perm_status) { | ||||
// no permission for all tabs -> don't display tree node either | // no permission for all tabs -> don't display tree node either | ||||
continue; | continue; | ||||
} | } | ||||
$params['section_name'] = $section_name; | $params['section_name'] = $section_name; | ||||
$section_data =& $sections_helper->getSectionData($section_name); | $section_data =& $sections_helper->getSectionData($section_name); | ||||
$section_data['label'] = $folder_label; // use folder label in tree | $section_data['label'] = $folder_label; // use folder label in tree | ||||
$section_data['is_tab'] = 1; | $section_data['is_tab'] = 1; | ||||
} | } | ||||
else { | else { | ||||
Expected "}\nelse {\n"; found "} else {\n" Lint: CodingStandard.ControlStructures.ControlSignature.Found: Expected "}\nelse {\n"; found "} else {\n" | |||||
$section_name = $sections_helper->getPermSection($section_name); | $section_name = $sections_helper->getPermSection($section_name, $section_data['SectionPrefix']); | ||||
if (!$this->Application->CheckPermission($section_name.'.view', 1)) continue; | if (!$this->Application->CheckPermission($section_name.'.view', 1)) continue; | ||||
Expected 1 spaces before "if" closing bracket; 0 found Lint: CodingStandard.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBrace: Expected 1 spaces before "if" closing bracket; 0 found | |||||
Expected 1 space before concat operator; 0 found Lint: CodingStandard.Strings.ConcatenationSpacing.NoSpaceBefore: Expected 1 space before concat operator; 0 found | |||||
Expected 1 space after concat operator; 0 found Lint: CodingStandard.Strings.ConcatenationSpacing.NoSpaceAfter: Expected 1 space after concat operator; 0 found | |||||
Inline control structures are not allowed Lint: Generic.ControlStructures.InlineControlStructure.NotAllowed: Inline control structures are not allowed | |||||
Expected 1 spaces after "if" opening bracket; 0 found Lint: CodingStandard.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBrace: Expected 1 spaces after "if" opening bracket; 0 found | |||||
} | } | ||||
$params['children_count'] = isset($section_data['children']) ? count($section_data['children']) : 0; | $params['children_count'] = isset($section_data['children']) ? count($section_data['children']) : 0; | ||||
// remove template, so it doesn't appear as additional parameter in url | // remove template, so it doesn't appear as additional parameter in url | ||||
$template = $section_data['url']['t']; | $template = $section_data['url']['t']; | ||||
unset($section_data['url']['t']); | unset($section_data['url']['t']); | ||||
▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Line(s) | |||||
/** @var kSectionsHelper $sections_helper */ | /** @var kSectionsHelper $sections_helper */ | ||||
$sections_helper = $this->Application->recallObject('SectionsHelper'); | $sections_helper = $this->Application->recallObject('SectionsHelper'); | ||||
$section_data =& $sections_helper->getSectionData($params['section_name']); | $section_data =& $sections_helper->getSectionData($params['section_name']); | ||||
$ret = ''; | $ret = ''; | ||||
$block_params = Array('name' => $params['render_as']); | $block_params = Array('name' => $params['render_as']); | ||||
ksort($section_data['children'], SORT_NUMERIC); | ksort($section_data['children'], SORT_NUMERIC); | ||||
foreach ($section_data['children'] as $priority => $section_name) { | foreach ($section_data['children'] as $priority => $section_name) { | ||||
No blank line found before "foreach" control structure Lint: CodingStandard.WhiteSpace.ControlStructureSpacing.NoLineBeforeOpen: No blank line found before "foreach" control structure | |||||
Expected 1 spaces after "foreach" opening bracket; 0 found Lint: CodingStandard.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBrace: Expected 1 spaces after "foreach" opening bracket; 0 found | |||||
Expected 1 spaces before "foreach" closing bracket; 0 found Lint: CodingStandard.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBrace: Expected 1 spaces before "foreach" closing bracket; 0 found | |||||
$perm_section = $sections_helper->getPermSection($section_name); | $perm_section = $sections_helper->getPermSection($section_name, $section_data['SectionPrefix']); | ||||
if ( !$this->Application->CheckPermission($perm_section.'.view') ) { | if ( !$this->Application->CheckPermission($perm_section.'.view') ) { | ||||
continue; | continue; | ||||
} | } | ||||
$tab_data =& $sections_helper->getSectionData($section_name); | $tab_data =& $sections_helper->getSectionData($section_name); | ||||
$block_params['t'] = $tab_data['url']['t']; | $block_params['t'] = $tab_data['url']['t']; | ||||
$block_params['pass'] = $tab_data['url']['pass']; | $block_params['pass'] = $tab_data['url']['pass']; | ||||
▲ Show 20 Lines • Show All 754 Lines • Show Last 20 Lines |
Expected 1 space before concat operator; 0 found