File: prefs.php

package info (click to toggle)
nag2 2.1.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,120 kB
  • ctags: 766
  • sloc: php: 3,066; xml: 304; sql: 132; makefile: 64; sh: 39
file content (30 lines) | stat: -rw-r--r-- 899 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/**
 * $Horde: nag/lib/prefs.php,v 1.3.10.3 2006/01/01 21:29:07 jan Exp $
 *
 * Copyright 2001-2006 Jon Parise <jon@horde.org>
 *
 * See the enclosed file COPYING for license information (GPL).  If you
 * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
 */

function handle_tasklistselect($updated)
{
    $default_tasklist = Util::getFormData('default_tasklist');
    if (!is_null($default_tasklist)) {
        $tasklists = Nag::listTasklists();
        if (is_array($tasklists) && isset($tasklists[$default_tasklist])) {
            $GLOBALS['prefs']->setValue('default_tasklist', $default_tasklist);
            return true;
        }
    }

    return false;
}

function handle_showsummaryselect($updated)
{
    $summary_categories = Util::getFormData('summary_categories');
    $GLOBAL['prefs']->setValue('summary_categories', $summary_categories);
    return true;
}