Commit f133d562 authored by metzlerd's avatar metzlerd
Browse files

Fixing to not call valid url if we don't need to validate it.

parent 3a84d0a8
......@@ -341,18 +341,24 @@ class FrxReport {
// check if we have
$l = '';
if (strpos($path, ':')===FALSE) {
$valid = drupal_valid_path($path,FALSE);
switch ($this->link_mode) {
case 'remove':
$l = '';
break;
case 'no-link':
case 'text':
$valid = drupal_valid_path($path,FALSE);
$l = $valid ? l($title, $path, $options) : $title;
break;
case 'disable':
$valid = drupal_valid_path($path,FALSE);
if (!$valid) {
$options['attributes']['class'][] = 'disabled';
$l = '<a '. drupal_attributes($options['attributes']) . '>' . check_plain($title) . '</a>';
}
else {
$l = l($title, $path, $options);
}
break;
default:
$l = l($title, $path, $options);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment