Bug #2725 ยป cb_2725.patch
| administrator/components/com_comprofiler/library/cb/cb.lists.php (working copy) | ||
|---|---|---|
| 
     			} 
   | 
||
| 
     			$_CB_database->setQuery( $query, (int) $limitstart, (int) $limit ); 
   | 
||
| 
     			$users				=	$_CB_database->loadObjectList( null, 'moscomprofilerUser', array( &$_CB_database ) ); 
   | 
||
| 
     			foreach ( $users as $k => $v ) { 
   | 
||
| 
     				$users[$k]->afterBindFromDatabase();		// load gids and fix CMS database storage bugs 
   | 
||
| 
     			} 
   | 
||
| 
     | 
||
| 
     			if ( ! $_CB_database->getErrorNum() ) { 
   | 
||
| 
     				// creates the CBUsers in cache corresponding to the $users: 
   | 
||
| administrator/components/com_comprofiler/library/cb/cb.tables.php (working copy) | ||
|---|---|---|
| 
     			$k					=	$this->_tbl_key;
 
   | 
||
| 
     			$this->$k			=	(int) $oid;
 
   | 
||
| 
     		}
 
   | 
||
| 
     		$this->gids			=	array( $this->gid );
 
   | 
||
| 
     		$this->afterBindFromDatabase();
 
   | 
||
| 
     	}
 
   | 
||
| 
     	/**
 
   | 
||
| 
     	 * This function should be called just after binding the moscomprofilerUser object from database
 
   | 
||
| 
     	 * to load the gids
 
   | 
||
| 
     	 * and to fix the CMS database storage bugs.
 
   | 
||
| 
     	 * It should be avoided externally, but is used by cb.lists.php
 
   | 
||
| 
     	 */
 
   | 
||
| 
     	function afterBindFromDatabase( ) {
 
   | 
||
| 
     		if ( checkJversion() == 2 ) {
 
   | 
||
| 
     			global $_CB_framework;
 
   | 
||
| 
     | 
||
| 
     			$this->gids		=	array_values( (array) JFactory::getUser( $this->id )->groups );
 
   | 
||
| 
     			$this->gid		=	(int) $_CB_framework->acl->getBackwardsCompatibleGid( $this->gids );
 
   | 
||
| 
     		} elseif ( checkJversion() == 0 ) {
 
   | 
||
| 
     			if ( checkJversion( 'dev_level' ) < 11 ) {
 
   | 
||
| 
     		} else {
 
   | 
||
| 
     			$this->gids		=	array( $this->gid );
 
   | 
||
| 
     			if ( ( checkJversion() == 0 ) && ( checkJversion( 'dev_level' ) < 11 ) ) {
 
   | 
||
| 
     				// revert effect of _cbMakeHtmlSafe on user save in older joomla/mambo versions:
 
   | 
||
| 
     				$this->name	=	cbUnHtmlspecialchars( $this->name );
 
   | 
||
| 
     			}
 
   | 
||