Project

General

Profile

Bug #22292 » patch_class.tx_belog_webinfo.php.txt

Administrator Admin, 2010-03-18 01:20

 
// -------------------------------------------------------
// ORIGINAL CODE
// Typo3 4.2.12 + Typo3 4.3.0, 4.3.1, 4.3.2
// -------------------------------------------------------
// Wrong php code in the typo3 core.
// -------------------------------------------------------
// File:
// /typo3/sysext/belog/class.tx_belog_webinfo.php
// -------------------------------------------------------
// Lines:
// 219 - 225
// -------------------------------------------------------
/*
if (is_array($this->pObj->be_user_Array)) {

// -------------------------------------------------------
// Bugreport-Comment:
// 1. This doesn't work
// Thus, $selectUsers[] will remain empty
// -------------------------------------------------------
while(list(,$val)=each($this->pObj->be_user_Array)) {
$selectUsers[]=$val['uid'];
}
}

// -------------------------------------------------------
// Bugreport-Comment:
// 2. Doesn't make sense in combination with the above while loop.
// Why fill the $selectUsers[] array with any values,
// when it is overwritten with the id of the current
// be_user, here, anyway?
// 3. This is the main reason for this bug report.
// -------------------------------------------------------
$selectUsers[] = $GLOBALS['BE_USER']->user['uid'];
*/




// -------------------------------------------------------
// Replace the above commented out code with this one.
// Then web > info > log will work as expected.
// -------------------------------------------------------
// -------------------------------------------------------
// Start of replacement
// -------------------------------------------------------
if ( count( $this->pObj->be_user_Array ) ) {

// -------------------------------------------------------
// Patch for point 1.
// Array holds some be user id's
// Write them to the $selectUsers array
// -------------------------------------------------------
foreach ( $this->pObj->be_user_Array as $key => $value ) {
$selectUsers[]=$value['uid'];
}

} else {
// -------------------------------------------------------
// No user id's available
// Fall back to the uid of the current be user
// -------------------------------------------------------
$selectUsers[] = $GLOBALS['BE_USER']->user['uid'];

}
// -------------------------------------------------------
// End of replacement
// -------------------------------------------------------
(1-1/3)