File: prefs.php

package info (click to toggle)
nag2 2.3.4%2Bdebian0-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 6,256 kB
  • ctags: 1,719
  • sloc: php: 6,797; xml: 589; sql: 335; makefile: 75; sh: 26
file content (35 lines) | stat: -rw-r--r-- 1,027 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
31
32
33
34
35
<?php
/**
 * $Horde: nag/lib/prefs.php,v 1.3.10.7 2009-01-06 15:25:05 jan Exp $
 *
 * Copyright 2001-2009 The Horde Project (http://www.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)
{
    $GLOBAL['prefs']->setValue('summary_categories', Util::getFormData('summary_categories'));
    return true;
}

function handle_defaultduetimeselect($updated)
{
    $GLOBALS['prefs']->setValue('default_due_time', Util::getFormData('default_due_time'));
    return true;
}