|
@@ -529,7 +529,8 @@ unlock("$rU");
|
|
<section id="cfgutils.f.check_route_exists">
|
|
<section id="cfgutils.f.check_route_exists">
|
|
<title><function moreinfo="none">check_route_exists(route)</function></title>
|
|
<title><function moreinfo="none">check_route_exists(route)</function></title>
|
|
<para>
|
|
<para>
|
|
- Check if a route block exists
|
|
|
|
|
|
+ Check if a route block exists. It returns true (1) on found and false on
|
|
|
|
+ not found or error.
|
|
</para>
|
|
</para>
|
|
<para>Parameters:</para>
|
|
<para>Parameters:</para>
|
|
<para>
|
|
<para>
|
|
@@ -543,7 +544,7 @@ unlock("$rU");
|
|
<title><function moreinfo="none">check_route_exists()</function> usage</title>
|
|
<title><function moreinfo="none">check_route_exists()</function> usage</title>
|
|
<programlisting format="linespecific">
|
|
<programlisting format="linespecific">
|
|
...
|
|
...
|
|
-if(check_route_exists("FROGJUMP") {
|
|
|
|
|
|
+if(check_route_exists("JUMP") {
|
|
$var(jumping_frogs) = 1;
|
|
$var(jumping_frogs) = 1;
|
|
};
|
|
};
|
|
...
|
|
...
|
|
@@ -556,6 +557,10 @@ if(check_route_exists("FROGJUMP") {
|
|
Execute a routing block only if it is defined. If it's not defined, silently
|
|
Execute a routing block only if it is defined. If it's not defined, silently
|
|
move to the next action in the configuration script.
|
|
move to the next action in the configuration script.
|
|
</para>
|
|
</para>
|
|
|
|
+ <para>
|
|
|
|
+ It returns the code of last action in the route block, if that exists, or
|
|
|
|
+ false if the route doesn't exists or was an error executing it.
|
|
|
|
+ </para>
|
|
<para>Parameters:</para>
|
|
<para>Parameters:</para>
|
|
<para>
|
|
<para>
|
|
<quote>name</quote> of a route block in the config file, like <quote>route[FROGJUMP]</quote>
|
|
<quote>name</quote> of a route block in the config file, like <quote>route[FROGJUMP]</quote>
|
|
@@ -568,7 +573,9 @@ if(check_route_exists("FROGJUMP") {
|
|
<title><function moreinfo="none">route_if_exists()</function> usage</title>
|
|
<title><function moreinfo="none">route_if_exists()</function> usage</title>
|
|
<programlisting format="linespecific">
|
|
<programlisting format="linespecific">
|
|
...
|
|
...
|
|
-route_if_exists("PRESENCE_SANTA_CLAUS");
|
|
|
|
|
|
+if(route_if_exists("JUMP")) {
|
|
|
|
+ exit;
|
|
|
|
+}
|
|
...
|
|
...
|
|
</programlisting>
|
|
</programlisting>
|
|
</example>
|
|
</example>
|