123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- $PBExportHeader$f_plugins_array.srf
- global type f_plugins_array from function_object
- end type
- forward prototypes
- global subroutine f_plugins_array (string arg_pluginsstr)
- end prototypes
- global subroutine f_plugins_array (string arg_pluginsstr);Long ll_cnt,cnt
- String ls_pluginsstr
- Long ll_plugins
- Long local_plugins[]
- ll_cnt = 0
- ls_pluginsstr = arg_pluginsstr
- IF Trim(arg_pluginsstr) = '' OR Trim(arg_pluginsstr) = '-1' THEN
- local_plugins[1] = 0
- ELSE
- IF sys_power_issuper OR arg_pluginsstr = '0' THEN
-
- SELECT count(*) INTO :cnt
- FROM u_plugins;
- IF sqlca.SQLCode <> 0 OR cnt = 0 THEN
- ll_cnt++
- local_plugins[ll_cnt] = 0
- ELSE
- DECLARE cur_plugins CURSOR FOR
- SELECT u_plugins.fileid
- FROM u_plugins
- Order By u_plugins.fileid Desc;
-
- OPEN cur_plugins;
- FETCH cur_plugins INTO :ll_plugins;
- DO WHILE sqlca.SQLCode = 0
- ll_cnt++
- local_plugins[ll_cnt] = ll_plugins
- FETCH cur_plugins INTO :ll_plugins;
- LOOP
-
- CLOSE cur_plugins;
- END IF
- ELSE
- DO WHILE Len(ls_pluginsstr) <> 1
- ls_pluginsstr = Replace( ls_pluginsstr, 1, 1, '' )
- ll_plugins = Long(Left(ls_pluginsstr,Pos(ls_pluginsstr,',',1) - 1))
- ll_cnt++
- local_plugins[ll_cnt] = ll_plugins
-
- ls_pluginsstr = Replace ( ls_pluginsstr, 1, Pos(ls_pluginsstr,',',1) - 1, '' )
- LOOP
- END IF
- END IF
- sys_user_plugins = local_plugins
- end subroutine
|