Project

General

Profile

Bug #3262 ยป 3262.patch

krileon, 13 February 2012 18:49

View differences:

administrator/components/com_comprofiler/plugin.foundation.php
if ( ! isset( $cacheItemids[$task] ) ) {
if ( class_exists( 'moscomprofilerUser', false ) ) {
$viewLevels = CBuser::getMyInstance()->getAuthorisedViewLevelsIds();
$viewLevels = CBuser::getMyInstance()->getAuthorisedViewLevelsIds( ( checkJversion() >= 2 ? false : true ) );
} else {
// Compute View Level using CMS without loading cb.table and cb.database if they are not already loaded (e.g. when using this function in modules):
switch ( checkJversion() ) {
......
$viewLevels = JUser::getInstance()->getAuthorisedViewLevels();
break;
case 1:
$viewLevels = array( JUser::getInstance()->get( 'aid' ) );
$viewLevel = JFactory::getUser()->get( 'aid' );
$viewLevels = ( $viewLevel == 2 ? array( 0, 1, 2 ) : ( $viewLevel == 1 ? array( 0, 1 ) : array( 0 ) ) );
break;
case 0:
case -1:
    (1-1/1)