Great idea for a module! I needed this specifically to handle subpathauto urls.
I'm attempting to use preg_match to evaluate url patterns, however I was never able to get them to pass even though I could get them to pass through preg_match() locally in php. After debugging I noticed that the following logic is never evaluating to true.
if ($evaluationtype == 'preg_match') {
The reason for that is $evaluationtype is an array with the way it's being populated. So I changed
$evaluationtype = explode("\n", isset($options['evaluationtype']) ? $options['evaluationtype'] : 1);
to
$evaluationtype = isset($options['evaluationtype']) ? $options['evaluationtype'] : 'fnmatch';
which seemed to do the trick.
I'll attach a patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | contexturl-never_evaluating_preg_match-2136983-1.patch | 687 bytes | caschbre |
Comments
Comment #1
caschbre commentedComment #2
gianfrasoft commentedThank you caschbre.
I put your PATCH in the module release 7.x-1.1.
Bye.