Index: openacs-4/packages/project-manager/tcl/role-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/tcl/role-procs.tcl,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/project-manager/tcl/role-procs.tcl 30 Apr 2005 06:59:33 -0000 1.2 +++ openacs-4/packages/project-manager/tcl/role-procs.tcl 30 Nov 2005 06:47:37 -0000 1.2.2.1 @@ -25,7 +25,7 @@ @error -1 if there is an error. } { - set returnval [db_string get_default "select role_id from pm_roles limit 1" -default "-1"] + set returnval [db_string get_default {} -default "-1"] return $returnval } @@ -54,14 +54,7 @@ @error } { - return [db_list_of_lists get_roles " - SELECT - one_line || ' (' || substring(one_line from 1 for 1) || ')' as one_line, - role_id - FROM - pm_roles - ORDER BY - role_id"] + return [db_list_of_lists get_roles ""] } @@ -131,22 +124,7 @@ @error } { - return [db_list_of_lists get_roles " - SELECT - one_line || ' (' || substring(one_line from 1 for 1) || ')' as one_line, - role_id - FROM - pm_roles as r - WHERE NOT EXISTS - (SELECT 1 - FROM - pm_project_assignment as pa - WHERE - r.role_id = pa.role_id and - pa.project_id = :project_item_id and - pa.party_id = :party_id) - ORDER BY - role_id"] + return [db_list_of_lists get_roles ""] } @@ -218,22 +196,7 @@ @error } { - return [db_list_of_lists get_roles " - SELECT - one_line || ' (' || substring(one_line from 1 for 1) || ')' as one_line, - role_id - FROM - pm_roles as r - WHERE NOT EXISTS - (SELECT 1 - FROM - pm_task_assignment as ta - WHERE - r.role_id = ta.role_id and - ta.task_id = :task_item_id and - ta.party_id = :party_id) - ORDER BY - role_id"] + return [db_list_of_lists get_roles ""] } @@ -299,12 +262,5 @@ @error } { - return [db_string get_one_line { - SELECT - one_line - FROM - pm_roles - WHERE - role_id = :role_id - } -default "error"] + return [db_string get_one_line {} -default "error"] }