2
# IRM - The Information Resource Manager
3
# Copyright (C) 2005 Martin Stevens
5
# This program is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 2 of the License, or
8
# (at your option) any later version.
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License (in file COPYING) for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with this program; if not, write to the Free Software
17
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
function prefsUpdate()
21
$DB = Config::Database();
22
$user = $DB->getTextValue($_POST['user']);
24
$user_obj = new User();
25
$user_obj->setName($_POST['user']);
26
$user_obj->initPrefs();
28
$DB->UpdateQuery('prefs', $_POST, "user=$user");
31
function setupLookup()
34
$lookupId = $_POST['lookupId'];
35
$value = $_POST['value'];
36
$action = $_POST['action'];
38
$lookup = new Lookup($lookupId);
43
$lookup->addValue($value);
46
$lookup->deleteValue($value);
49
$lookup->addLookup($_REQUEST['lookupId'],$_REQUEST['lookupName'],$_REQUEST['lookupDescription']);
52
logevent(-1, _("IRM"), 5, _("setup"), sprintf(_("%s %s entry %s from %s."),$IRMName,$action,$value,$lookupId));