Index: openacs.org-dev/packages/forums/sql/oracle/forums-search-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs.org-dev/packages/forums/sql/oracle/forums-search-create.sql,v
diff -u -r1.1.1.1 -r1.1.1.2
--- openacs.org-dev/packages/forums/sql/oracle/forums-search-create.sql	9 Jul 2002 17:35:09 -0000	1.1.1.1
+++ openacs.org-dev/packages/forums/sql/oracle/forums-search-create.sql	25 Jul 2002 18:47:15 -0000	1.1.1.2
@@ -71,6 +71,7 @@
 show errors
 
 grant execute on s_index_message to yon;
+grant execute on ctx_ddl to yon;
 
 -- as normal user
 connect yon/yon;
@@ -88,13 +89,16 @@
 begin
     dbms_job.submit(
         job => v_job,
-        what => 'ctx_ddl.sync_index(''forums_content_idx'');',
+        what => 'ctxsys.ctx_ddl.sync_index(''forums_content_idx'');',
         interval => 'sysdate + 1/24'
     );
 end;
 /
 show errors
 
+-- as normal user
+connect yon/yon;
+
 -- ripped off from site-wide-search
 
 -- if we pass in a very long string to im_convert, we will end up with internal 
@@ -106,47 +110,48 @@
 --    2. increase the max length from 256 to 1024
 -- mbryzek@arsdigita.com, 7/6/2000
 create or replace procedure im_convert_length_check ( 
-    p_string IN varchar2,
-    p_number_chars_to_append IN number,
-    p_max_length IN number, 
-    p_variable_name IN varchar2 
+    p_string in varchar2,
+    p_number_chars_to_append in number,
+    p_max_length in number, 
+    p_variable_name in varchar2 
 )
 is
 begin
-    if nvl(length(p_string),0) + p_number_chars_to_append > p_max_length then
+    if nvl(length(p_string),0) + p_number_chars_to_append > p_max_length
+    then
 	raise_application_error(-20000, 'Variable "' || p_variable_name || '" exceeds ' || p_max_length || ' character declaration');
     end if;
 end;
 /
 show errors;
 
--- Query to take free text user entered query and from it into something
--- that will make interMedia happy. Provided by Oracle.
+-- this proc takes user supplied free text and transforms it into an interMedia
+-- friendly query string. (provided by oracle).
 create or replace function im_convert (
     query in varchar2 default null
 ) return varchar2
 is
-    i   number :=0;
-    len number :=0;
+    i number := 0;
+    len number := 0;
     char varchar2(1);
     minusString varchar2(256) := '';
     plusString varchar2(256) := ''; 
     mainString varchar2(256) := ''; 
     mainAboutString varchar2(500) := ''; 
     finalString varchar2(500) := ''; 
-    hasMain number :=0;
-    hasPlus number :=0;
-    hasMinus number :=0;
+    hasMain number := 0;
+    hasPlus number := 0;
+    hasMinus number := 0;
     token varchar2(256);
-    tokenStart number :=1;
-    tokenFinish number :=0;
-    inPhrase number :=0;
-    inPlus number :=0;
-    inWord number :=0;
-    inMinus number :=0;
-    completePhrase number :=0;
-    completeWord number :=0;
-    code number :=0;  
+    tokenStart number := 1;
+    tokenFinish number := 0;
+    inPhrase number := 0;
+    inPlus number := 0;
+    inWord number := 0;
+    inMinus number := 0;
+    completePhrase number := 0;
+    completeWord number := 0;
+    code number := 0;  
 begin
   
     len := length(query);
