function ctools_automodal_fix_get_q in CTools Auto-modal 7
Dirty, dirty function to fix the 'current path' global on modal pages.
2 calls to ctools_automodal_fix_get_q()
- ctools_automodal_get_form in ./
ctools_automodal.module - Display a Drupal form using CTools modal or normal page display.
- ctools_automodal_get_page in ./
ctools_automodal.module - Display a normal Drupal page using CTools modal.
File
- ./
ctools_automodal.module, line 101
Code
function ctools_automodal_fix_get_q() {
$path = current_path();
// Pop off the /js or /nojs suffix to the path.
$path = substr($path, 0, strrpos($path, '/'));
// @todo Shower multiple times after modifing global variables.
$_GET['q'] = $path;
}