egroupware/preferences/inc/class.ajaxpreferences.inc.php
Ralf Becker 232252475f patch fixing many depricated functions (eg. posix regular expressions) and features, which fill up the error_log under php5.3 (and will no longer be available under php6).
Patch is mostly created by script in egroupware/doc/fix_depricated.php in separate commit.
I do NOT advice to apply this patch to a production system (it's commited to trunk!), as the automatic modified regular expressions have a good change to break something ...
2009-06-08 16:21:14 +00:00

36 lines
1009 B
PHP

<?php
/**
* ajaxpreferences
*
* @package preferences
* @abstract script which is called to store prefs using AJAX
* @copyright Lingewoud B.V.
* @link http://www.egroupware.org
* @author Pim Snel <pim-AT-lingewoud-DOT-nl>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
class ajaxpreferences
{
function ajaxpreferences(){}
/**
* storeEGWPref
*
* @param mixed $repository egroupware preferences repository
* @param mixed $key key to preference
* @param mixed $value new value
* @access public
* @return mixed returns null when no erro, else return error message.
*/
function storeEGWPref($repository,$key,$value)
{
$response = new xajaxResponse();
$GLOBALS['egw']->preferences->read_repository();
$GLOBALS['egw']->preferences->change($repository,$key,$value);
$GLOBALS['egw']->preferences->save_repository(True);
return $response->getXML();
}
}
?>