Project

General

Profile

Bug #2240 » plugin.foundation.patch

krileon, 24 January 2011 16:36

View differences:

administrator/components/com_comprofiler/plugin.foundation.php
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 '<br /><br /><strong>Site Debug mode: CB redirection';
if ( $message ) {
echo ' with ' . $messageType . ' "' . $message . '"';
......
. '</strong>Click this link to proceed with the next page (in non-debug mode this is automatic): ';
echo '<a href="' . $url . '">' . htmlspecialchars( $url ) . '</a><br /><br /><hr />';
echo $_CB_database->_db->_ticker . ' queries executed'
echo $ticker . ' queries executed'
. '<pre>';
foreach ( $_CB_database->_db->_log as $k => $sql ) {
foreach ( $log as $k => $sql ) {
echo $k + 1 . "\n" . htmlspecialchars( $sql ) . '<hr />';
}
echo '</hr>'
......
$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 ) {
......
$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() ) {
......
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;
......
$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';
(4-4/5)