<?php
/**
 * $Horde: mnemo/lib/prefs.php,v 1.2.10.1 2005/01/03 12:25:42 jan Exp $
 *
 * Copyright 2002-2005 Chuck Hagenbuch <chuck@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_notepadselect($updated)
{
    global $prefs;

    $default_notepad = Util::getFormData('default_notepad');
    if (!is_null($default_notepad)) {
        $notepads = Mnemo::listNotepads();
        if (is_array($notepads) && array_key_exists($default_notepad, $notepads)) {
            $prefs->setValue('default_notepad', $default_notepad);
            $updated = true;
        }
    }
    return $updated;
}

function handle_showsummaryselect($updated)
{
    global $prefs;

    $summary_categories = Util::getFormData('summary_categories');
    $prefs->setValue('summary_categories', $summary_categories);
    return true;
}
