Extension:Restrict access by category and group/with img auth support

This version is identical to the one listed in the main extension (parent) page except for the additional of a single line at the end that revoke the read permission for all users (e.g. regardless of who they are visiting this page on this client session). This effectively extends the functionality of this extension to the img_auth.php script (if used) making direct access links to uploaded media files inaccessible as well.

Here is the part I updated: Here is the full code: