Thread:Extension talk:DynamicPageList (Wikimedia)/Redirect to another page on the wiki

I've included the diff of the changes I made to DynamicPageList.php for our wiki, where we wanted to have canonical links that would always point to the newest page in a category (for example.)

This adds a mode, 'redirect', to DynamicPageList.php which will cause PHP to do a header redirect to the first result it gets back. It's a little ghetto, but it works very well and doesn't add any kind of weird overhead.