Project

General

Profile

Bug #2752 » cb.tables.patch

krileon, 15 September 2011 15:53

View differences:

administrator/components/com_comprofiler/library/cb/cb.tables.php
if ( checkJversion() == 2 ) {
global $_CB_framework;
$this->gids = array_values( (array) JFactory::getUser( $this->id )->groups );
$gids = array_values( (array) JFactory::getAcl()->getGroupsByUser( $this->id, false ) );
foreach ( $gids as $k => $v ) {
$gids[$k] = (string) $v;
}
$this->gids = $gids;
$this->gid = (int) $_CB_framework->acl->getBackwardsCompatibleGid( $this->gids );
} else {
$this->gids = array( $this->gid );
......
if ( checkJversion() == 2 ) {
global $_CB_framework;
$this->gids = array_values( (array) JFactory::getUser( $this->id )->groups );
$gids = array_values( (array) JFactory::getAcl()->getGroupsByUser( $this->id, false ) );
foreach ( $gids as $k => $v ) {
$gids[$k] = (string) $v;
}
$this->gids = $gids;
$this->gid = (int) $_CB_framework->acl->getBackwardsCompatibleGid( $this->gids );
} else {
$this->gids = array( $this->gid );
......
if ( $_CB_database->loadObject( $oldEntry ) ) {
$oldUsername = $oldEntry->username;
if ( checkJversion() == 2 ) {
$oldGids = array_values( (array) JFactory::getUser( $this->id )->groups );
$gids = array_values( (array) JFactory::getAcl()->getGroupsByUser( $this->id, false ) );
foreach ( $gids as $k => $v ) {
$gids[$k] = (string) $v;
}
$oldGids = $gids;
$oldGid = (int) $_CB_framework->acl->getBackwardsCompatibleGid( $oldGids );
} else {
$oldGid = (int) $oldEntry->gid;
(1-1/2)