I administer a site where the web root serves the production version of the site and a pre-production version of the site resides in a sub-directory of the web root. I have noticed that if I'm in the pre-production version of the site and I click on the Admin link to "Configure Brilliant Gallery Permissions" I am always taken to the production version's permissions page. I was recently troubleshooting the Brilliant Gallery code for a different issue (#621196: Upgrading to 6.x-3.6 broke all galleries) and noticed how the author has implemented the "Configure Permissions" link. The code is below:

brilliant_gallery.module ~ line 286

# Probably not the right way of doing it but it works...
function brilliant_gallery_perms() {
  header("HTTP/1.1 301 Moved Permanently");
  header("Location: /?q=admin/user/permissions#module-brilliant_gallery");
  exit();
}

Since the path is hard-coded, the additional sub-directory level of my pre-production site was always being stripped away. The author himself notes that his method is probably not technically correct. Looking in the Drupal API I found a different way to do it which respects a site that resides in a sub-directory. The new code for the function is below:

function brilliant_gallery_perms() {
  drupal_goto('','q=admin/user/permissions','module-brilliant_gallery');
}

The drupal_goto function automatically sets the headers and exits. Leaving the first argument of the function null means it uses the site's base path for the url, then the second argument is appended as a query and finally the third argument is used as an anchor. In testing on my site this solution seems to work as one would expect.

I apologize, but I don't know how to roll a patch for this to help complete the process. Thanks to the author for a great module and please let me know if this solution is also wrong for some reason.