+ /**
+ * Determine what the RPC template set is.
+ *
+ * NOTE that if the default setting cannot be found in the
+ * main SquirrelMail configuration settings that the value
+ * of $default is returned.
+ *
+ * @param string $default The template set ID to use if
+ * the default setting cannot be
+ * found in SM config (optional;
+ * defaults to "default_rpc").
+ *
+ * @return string The ID of the RPC template set.
+ *
+ * @static
+ *
+ */
+ function get_rpc_template_set($default='default_rpc') {
+
+// FIXME: do we want to place any restrictions on the ID such as
+// making sure no slashes included?
+
+ // values are in main SM config file
+ //
+ global $rpc_templateset;
+ $rpc_templateset = (!isset($rpc_templateset)
+ ? $default : $rpc_templateset);
+
+ // FIXME: note that it is possible for this to
+ // point to an invalid (nonexistent) template set
+ // and that error will not be caught here
+ //
+ return $rpc_templateset;
+
+ }
+