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 { ...@@ -341,18 +341,24 @@ class FrxReport {
// check if we have // check if we have
$l = ''; $l = '';
if (strpos($path, ':')===FALSE) { if (strpos($path, ':')===FALSE) {
$valid = drupal_valid_path($path,FALSE);
switch ($this->link_mode) { switch ($this->link_mode) {
case 'remove': case 'remove':
$l = ''; $l = '';
break; break;
case 'no-link': case 'no-link':
case 'text': case 'text':
$valid = drupal_valid_path($path,FALSE);
$l = $valid ? l($title, $path, $options) : $title; $l = $valid ? l($title, $path, $options) : $title;
break; break;
case 'disable': case 'disable':
$options['attributes']['class'][] = 'disabled'; $valid = drupal_valid_path($path,FALSE);
$l = '<a '. drupal_attributes($options['attributes']) . '>' . check_plain($title) . '</a>'; if (!$valid) {
$options['attributes']['class'][] = 'disabled';
$l = '<a '. drupal_attributes($options['attributes']) . '>' . check_plain($title) . '</a>';
}
else {
$l = l($title, $path, $options);
}
break; break;
default: default:
$l = l($title, $path, $options); $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