Project

General

Profile

Bug #2971 ยป 2971.patch

krileon, 30 January 2012 20:52

View differences:

/administrator/components/com_comprofiler/plugin.class.php
$group = trim( $group );
if ( ( $group && ! isset( $this->_pluginGroups[$group] ) ) || ( ! $this->all_in_array_key( $ids, $this->_plugins ) ) ) {
$cmsAccess = $_CB_framework->myCmsGid();
$cmsAccess = $_CB_framework->acl->get_object_access( $_CB_framework->myId(), true );
if ( $cmsAccess ) {
cbArrayToInts( $cmsAccess );
if ( checkJversion() == 2 ) for ( $i = 0, $n = count( $cmsAccess ); $i < $n; $i++ ) {
if ( in_array( $cmsAccess[$i], array( 1, 2, 3 ) ) ) {
--$cmsAccess[$i]; // J1.6's 1 is CB's 0, 2 is 1, 3 is 2.
}
}
$cmsAccess = implode( ',', array_unique( $cmsAccess ) );
} else {
$cmsAccess = 0;
}
if ( ! isset( $dbCache[$publishedStatus][$cmsAccess][$group] ) ) {
$where = array();
......
$where[] = 'published >= ' . (int) $publishedStatus;
}
$where[] = 'access <= '. (int) $cmsAccess;
$where[] = 'access IN ( ' . $cmsAccess . ' )';
if ( $group ) {
$where[] = 'type = ' . $_CB_database->Quote( trim ( $group ) );
    (1-1/1)