wojtha/ctools_automodal — pull request #4 by jlbellido (2014-07-23 17:16:43+00:00)
Title: Fix ctools_automodal_get_modal_options function in paths with wildcards

Hi! Few days ago a found out a bug in ctools_automodal when we are using paths with wildcards as modal paths.

If we define a modal path with wildcards like:
```php
function my_module_modal_paths() {
$paths = array();

$paths['my_module/share/%node/%'] = array(
'style' => 'example-style',
'close' => TRUE,
);

return $paths;
}
```
When we are showing links with these wildcards replaced like 'my_module/share/1/2' ctools_automodal_get_modal_options don't get the modal options defined properly because there isn't a key 'my_module/share/1/2' at $ctools_modal_paths.

To Fix this foreach $ctools_modal_paths i get the regexp and match with the current path, like this we can get the modal options properly and all works fine.

Thanks a lot for this fork.

Regards!