| 1 | // -------------------------------------------------------
|
| 2 | // ORIGINAL CODE
|
| 3 | // Typo3 4.2.12 + Typo3 4.3.0, 4.3.1, 4.3.2
|
| 4 | // -------------------------------------------------------
|
| 5 | // Wrong php code in the typo3 core.
|
| 6 | // -------------------------------------------------------
|
| 7 | // File:
|
| 8 | // /typo3/sysext/belog/class.tx_belog_webinfo.php
|
| 9 | // -------------------------------------------------------
|
| 10 | // Lines:
|
| 11 | // 219 - 225
|
| 12 | // -------------------------------------------------------
|
| 13 | /*
|
| 14 | if (is_array($this->pObj->be_user_Array)) {
|
| 15 |
|
| 16 | // -------------------------------------------------------
|
| 17 | // Bugreport-Comment:
|
| 18 | // 1. This doesn't work
|
| 19 | // Thus, $selectUsers[] will remain empty
|
| 20 | // -------------------------------------------------------
|
| 21 | while(list(,$val)=each($this->pObj->be_user_Array)) {
|
| 22 | $selectUsers[]=$val['uid'];
|
| 23 | }
|
| 24 | }
|
| 25 |
|
| 26 | // -------------------------------------------------------
|
| 27 | // Bugreport-Comment:
|
| 28 | // 2. Doesn't make sense in combination with the above while loop.
|
| 29 | // Why fill the $selectUsers[] array with any values,
|
| 30 | // when it is overwritten with the id of the current
|
| 31 | // be_user, here, anyway?
|
| 32 | // 3. This is the main reason for this bug report.
|
| 33 | // -------------------------------------------------------
|
| 34 | $selectUsers[] = $GLOBALS['BE_USER']->user['uid'];
|
| 35 | */
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 | // -------------------------------------------------------
|
| 41 | // Replace the above commented out code with this one.
|
| 42 | // Then web > info > log will work as expected.
|
| 43 | // -------------------------------------------------------
|
| 44 | // -------------------------------------------------------
|
| 45 | // Start of replacement
|
| 46 | // -------------------------------------------------------
|
| 47 | if ( count( $this->pObj->be_user_Array ) ) {
|
| 48 |
|
| 49 | // -------------------------------------------------------
|
| 50 | // Patch for point 1.
|
| 51 | // Array holds some be user id's
|
| 52 | // Write them to the $selectUsers array
|
| 53 | // -------------------------------------------------------
|
| 54 | foreach ( $this->pObj->be_user_Array as $key => $value ) {
|
| 55 | $selectUsers[]=$value['uid'];
|
| 56 | }
|
| 57 |
|
| 58 | } else {
|
| 59 | // -------------------------------------------------------
|
| 60 | // No user id's available
|
| 61 | // Fall back to the uid of the current be user
|
| 62 | // -------------------------------------------------------
|
| 63 | $selectUsers[] = $GLOBALS['BE_USER']->user['uid'];
|
| 64 |
|
| 65 | }
|
| 66 | // -------------------------------------------------------
|
| 67 | // End of replacement
|
| 68 | // -------------------------------------------------------
|
| 69 |
|