Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -185,6 +185,8 @@ |
186 | 186 | * (bug 32414) Empty page get a empty bytes attribute in Export/Dump. |
187 | 187 | * (bug 33101) Viewing a User or User talk of username resembling IP ending |
188 | 188 | with .xxx causes Internal error |
| 189 | +* Warning about undefined index in certain situations when $wgLogRestrictions |
| 190 | + causes the first log type requested to be removed but not the others |
189 | 191 | |
190 | 192 | === API changes in 1.19 === |
191 | 193 | * (bug 19838) siprop=interwikimap can now use the interwiki cache. |
Index: trunk/phase3/includes/logging/LogEventsList.php |
— | — | @@ -826,13 +826,20 @@ |
827 | 827 | // If $types is not an array, make it an array |
828 | 828 | $types = ($types === '') ? array() : (array)$types; |
829 | 829 | // Don't even show header for private logs; don't recognize it... |
| 830 | + $needReindex = false; |
830 | 831 | foreach ( $types as $type ) { |
831 | 832 | if( isset( $wgLogRestrictions[$type] ) |
832 | 833 | && !$this->getUser()->isAllowed($wgLogRestrictions[$type]) |
833 | 834 | ) { |
| 835 | + $needReindex = true; |
834 | 836 | $types = array_diff( $types, array( $type ) ); |
835 | 837 | } |
836 | 838 | } |
| 839 | + if ( $needReindex ) { |
| 840 | + // Lots of this code makes assumptions that |
| 841 | + // the first entry in the array is $types[0]. |
| 842 | + $types = array_values( $types ); |
| 843 | + } |
837 | 844 | $this->types = $types; |
838 | 845 | // Don't show private logs to unprivileged users. |
839 | 846 | // Also, only show them upon specific request to avoid suprises. |