notification::get_intervals (public)

 notification::get_intervals [ -localized ] -type_id type_id

Defined in packages/notifications/tcl/notification-procs.tcl

return a list of intervals that are associated with a given notification type (not all intervals are available to all notification types). The fields for each interval is: name, interval_id, n_seconds. If the localized flag is set, then the name of the interval will be localized.

Switches:
-localized (optional, boolean)
-type_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/forums/www/admin/subscribe-others.tcl packages/forums/ www/admin/subscribe-others.tcl notification::get_intervals notification::get_intervals packages/forums/www/admin/subscribe-others.tcl->notification::get_intervals packages/notifications/www/request-change-frequency.tcl packages/notifications/ www/request-change-frequency.tcl packages/notifications/www/request-change-frequency.tcl->notification::get_intervals packages/notifications/www/request-new.tcl packages/notifications/ www/request-new.tcl packages/notifications/www/request-new.tcl->notification::get_intervals packages/notifications/www/request-notification.tcl packages/notifications/ www/request-notification.tcl packages/notifications/www/request-notification.tcl->notification::get_intervals db_list_of_lists db_list_of_lists (public) notification::get_intervals->db_list_of_lists lang::util::localize lang::util::localize (public) notification::get_intervals->lang::util::localize

Testcases:
No testcase defined.
Source code:
        set intervals [db_list_of_lists select_intervals {}]
        if { $localized_p } {
            # build pretty names for intervals
            set intervals_pretty [list]
            foreach elm $intervals {
                lassign $elm elm_name elm_id
                lappend intervals_pretty [list [lang::util::localize ${elm_name}$elm_id]
            }
            return $intervals_pretty
        } else {
            return $intervals
        }
Generic XQL file:
<fullquery name="notification::get_intervals.select_intervals">
    <querytext>
            select name,
                   notification_intervals.interval_id
            from notification_intervals,
                 notification_types_intervals
            where notification_intervals.interval_id = notification_types_intervals.interval_id
            and type_id = :type_id
            order by n_seconds
        </querytext>
</fullquery>
packages/notifications/tcl/notification-procs.xql

PostgreSQL XQL file:
packages/notifications/tcl/notification-procs-postgresql.xql

Oracle XQL file:
packages/notifications/tcl/notification-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: