From: Greg Sabino Mullane Date: Thu, 6 Sep 2007 16:32:00 +0000 (+0000) Subject: Since slashes in page titles have special meaning, force them to delimit words. X-Git-Tag: 1.31.0-rc.0~51494 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=b3ab7a1b3eb32b1c4042f6d5b03bae484eeac622;p=lhc%2Fweb%2Fwiklou.git Since slashes in page titles have special meaning, force them to delimit words. --- diff --git a/maintenance/postgres/tables.sql b/maintenance/postgres/tables.sql index 360dd9cbac..694c253de6 100644 --- a/maintenance/postgres/tables.sql +++ b/maintenance/postgres/tables.sql @@ -457,9 +457,9 @@ CREATE FUNCTION ts2_page_title() RETURNS TRIGGER LANGUAGE plpgsql AS $mw$ BEGIN IF TG_OP = 'INSERT' THEN - NEW.titlevector = to_tsvector('default',NEW.page_title); + NEW.titlevector = to_tsvector('default',REPLACE(NEW.page_title,'/',' ')); ELSIF NEW.page_title != OLD.page_title THEN - NEW.titlevector := to_tsvector('default',NEW.page_title); + NEW.titlevector := to_tsvector('default',REPLACE(NEW.page_title,'/',' ')); END IF; RETURN NEW; END;