Skip to content

Commit

Permalink
Fixed problems with sitesearch regular expression and error when call…
Browse files Browse the repository at this point in the history
…ing from scheduler
  • Loading branch information
Semias committed Nov 4, 2011
1 parent 47300c5 commit 8bc1438
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions inc/app/scheduler/tasks/sitesearch/index.php
Expand Up @@ -68,6 +68,12 @@
$item->sitellite_team = 'none';
}

if (! isset ($rex->body)) {
$rex->body = 'body';
}
if (! isset ($item->{$rex->body})) {
$item->{$rex->body} = '';
}
if ($collection != 'sitellite_filesystem') {
$item->{$rex->body} = extractor_run ($item->{$rex->body}, 'HTML');
}
Expand Down
2 changes: 1 addition & 1 deletion inc/app/sitesearch/lib/SiteSearch.php
Expand Up @@ -54,7 +54,7 @@ function _sanitize ($val) {
function _prepare ($val) {
//$val = iconv ($val);
//$val = strtolower (htmlentities_compat (strip_tags ($val)));
return preg_replace ('/([&\|\+!\(\)\[\]\{}~\*:\^"\?\-\\])/', '\\\\\1', strtolower ($val));
return preg_replace ('/([&\|\+!\(\)\[\]\{}~\*:\^"\?\\\-])/', '\\\\\1', strtolower ($val));
}

/**
Expand Down

0 comments on commit 8bc1438

Please sign in to comment.