gtv:
Objectif: In the list of recent changes, to skip files that have been deleted (directly from the filesystem).
Actions: Here is the suggested change to FILE dokuwiki/inc/html.php
Change 2 lines marked //Before// in the beginning of the html_recent routine, to the lines //After//
Explanation: The getRecents function can handle this, provided the flag RECENTS_SKIP_DELETED is given in as the 4th argument. Careful: the change affects
all uses of the html_recent function (it doesn't accept configuration).
1° arrange for a test case, try DW as it is before, verify results
2° implement the change to the code, try DW, verify results: see if it does what you want to the
prepared test case
function html_recent($first=0){
global $conf;
global $lang;
global $ID;
/* we need to get one additionally log entry to be able to
* decide if this is the last page or is there another one.
* This is the cheapest solution to get this information.
*/
//Before// $recents = getRecents($first,$conf['recent'] + 1,getNS($ID));
$recents = getRecents($first,$conf['recent'] + 1,getNS($ID),RECENTS_SKIP_DELETED); //After//
if(count($recents) == 0 && $first != 0){
$first=0;
//Before// $recents = getRecents($first,$conf['recent'] + 1,getNS($ID));
$recents = getRecents($first,$conf['recent'] + 1,getNS($ID),RECENTS_SKIP_DELETED); //After//
}
...
}