# This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. --- administrator/components/com_comprofiler/plugin.foundation.php +++ administrator/components/com_comprofiler/plugin.foundation.php @@ -339,6 +339,8 @@ if ( ( $_CB_framework->getCfg( 'debug' ) > 0 ) && ( ob_get_length() || ( $_CB_framework->getCfg( 'debug' ) > 1 ) ) ) { $outputBufferLength = ob_get_length(); + $ticker = ( checkJversion() == 2 ? $_CB_database->_db->getTicker() : $_CB_database->_db->_ticker ); + $log = ( checkJversion() == 2 ? $_CB_database->_db->getLog() : $_CB_database->_db->_log ); echo '

Site Debug mode: CB redirection'; if ( $message ) { echo ' with ' . $messageType . ' "' . $message . '"'; @@ -352,9 +354,9 @@ . 'Click this link to proceed with the next page (in non-debug mode this is automatic): '; echo '' . htmlspecialchars( $url ) . '


'; - echo $_CB_database->_db->_ticker . ' queries executed' + echo $ticker . ' queries executed' . '
';
- 		foreach ( $_CB_database->_db->_log as $k => $sql ) {
+ 		foreach ( $log as $k => $sql ) {
  			echo $k + 1 . "\n" . htmlspecialchars( $sql ) . '
'; } echo '' @@ -1931,9 +1933,15 @@ $response->username = $username; $response->fullname = $row->name; // now we attempt user login and check results: - $login = $dispatcher->trigger( 'onLoginUser', array( (array) $response, array() ) ); + if ( checkJversion() == 2 ) { + $login = $dispatcher->trigger( 'onUserLogin', array( (array) $response, array( 'action' => 'core.login.site' ) ) ); + } else { + $login = $dispatcher->trigger( 'onLoginUser', array( (array) $response, array() ) ); + } if ( ! in_array( false, $login, true ) ) { $result = true; + } else { + $result = false; } } if ( $result ) { @@ -1977,6 +1985,7 @@ $session->userid = (int) $row->id; $session->usertype = $row->usertype; $session->gid = (int) $row->gid; + $session->gids = ( is_array( $row->gids ) ? $row->gids : array( $row->gid ) ); // attempt to login user: if ( $session->update() ) { @@ -2094,14 +2103,14 @@ break; case 'hits': case 'vote': - if ( checkJversion() == 1 ) { + if ( checkJversion() >= 1 ) { $contentConfig = &JComponentHelper::getParams( 'com_content' ); return $contentConfig->get( 'show_' . $config ); } break; case 'dirperms': case 'fileperms': - if ( checkJversion() == 1 ) { + if ( checkJversion() >= 1 ) { return ''; //TBD: these two missing configs should one day go to CB } break; @@ -3004,7 +3013,18 @@ $tmpDatabase =& JFactory::getDBO(); $my =& JFactory::getUser(); $acl =& JFactory::getACL(); - $myAid = end( array_keys( $my->groups ) ); + $myAid = array_values( $my->groups ); + + if ( in_array( 8, $myAid ) ) { + $myAid = 8; + } elseif ( in_array( 7, $myAid ) ) { + $myAid = 7; + } elseif ( in_array( 6, $myAid ) ) { + $myAid = 6; + } else { + $myAid = end( $myAid ); + } + $sefFunc = array( 'JRoute', '_' ); $sefFuncHtmlEnt = false; $cmsUser = 'JUser';