# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: Joomla root # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. --- /administrator/components/com_comprofiler/plugin.class.php +++ /administrator/components/com_comprofiler/plugin.class.php @@ -88,8 +88,22 @@ $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(); @@ -99,7 +113,7 @@ $where[] = 'published >= ' . (int) $publishedStatus; } - $where[] = 'access <= '. (int) $cmsAccess; + $where[] = 'access IN ( ' . $cmsAccess . ' )'; if ( $group ) { $where[] = 'type = ' . $_CB_database->Quote( trim ( $group ) );