On the main page, wikis newer than the last I created have missing cells
Created by: tacsipacsi
If I’ve created at least one wiki, there’s an extra Actions column containing the Delete link. In rows below it that belong to other people’s wikis, this cell is empty. However, in rows above it, the cell doesn’t exist at all.
This is because index.php
loops over the data only once. Instead, it should loop once to read from the database and preprocess the data (including setting $anyCanDelete
), and a second time actually create the HTML, reading $anyCanDelete
only this second time. (The second run could be placed after printing the table header, so that instead of assembling a string, it could write directly on stdout.)