Source for file class.servooconf.php
Documentation is available at class.servooconf.php
* Logique des options du servOO
* LODEL - Logiciel d'Edition ELectronique.
* Home page: http://www.lodel.org
* E-Mail: lodel@lodel.org
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* @author Ghislain Picard
* @copyright 2001-2002, Ghislain Picard, Marin Dacos
* @copyright 2003, Ghislain Picard, Marin Dacos, Luc Santeramo, Nicolas Nutten, Anne Gentil-Beccot
* @copyright 2004, Ghislain Picard, Marin Dacos, Luc Santeramo, Anne Gentil-Beccot, Bruno Cénou
* @copyright 2005, Ghislain Picard, Marin Dacos, Luc Santeramo, Gautier Poupeau, Jean Lamy, Bruno Cénou
* @copyright 2006, Marin Dacos, Luc Santeramo, Bruno Cénou, Jean Lamy, Mikaël Cixous, Sophie Malafosse
* @copyright 2007, Marin Dacos, Bruno Cénou, Sophie Malafosse, Pierre-Alain Mignot
* @licence http://www.gnu.org/copyleft/gpl.html
* @since Fichier ajouté depuis la version 0.8
* @version CVS:$Id: class.servooconf.php 4006 2007-10-05 11:53:41Z malafosse $
require ("logic/class.useroptiongroups.php");
* Classe de logique de la configuration de ServOO
* @author Ghislain Picard
* @copyright 2001-2002, Ghislain Picard, Marin Dacos
* @copyright 2003, Ghislain Picard, Marin Dacos, Luc Santeramo, Nicolas Nutten, Anne Gentil-Beccot
* @copyright 2004, Ghislain Picard, Marin Dacos, Luc Santeramo, Anne Gentil-Beccot, Bruno Cénou
* @copyright 2005, Ghislain Picard, Marin Dacos, Luc Santeramo, Gautier Poupeau, Jean Lamy, Bruno Cénou
* @copyright 2006, Marin Dacos, Luc Santeramo, Bruno Cénou, Jean Lamy, Mikaël Cixous, Sophie Malafosse
* @copyright 2007, Marin Dacos, Bruno Cénou, Sophie Malafosse, Pierre-Alain Mignot
* @licence http://www.gnu.org/copyleft/gpl.html
* @since Classe ajouté depuis la version 0.8
if ($ret== "_error") return $ret;
require ("servoofunc.php");
if ($client->error_message) {
if ($context['url']) $error['url']= '+';
if ($context['username'])$error['username']= '+';
if ($context['passwd']) $error['passwd']= '+';
$servoover= $client->version();
if (preg_match("/^ERROR:/i",$servoover) || $client->error_message) {
$error['servoo']= $client->error_message;
return $ret== "_ok" ? "edit_options" : $ret;
/*---------------------------------------------------------------*/
//! Private or protected from this point
$vo= $dao->find("name='servoo'");
# // little hack... should be in the model anyway
# $db->execute(lq("INSERT INTO #_TP_optiongroups (name,title,logic,status,exportpolicy) VALUES ('servoo','Servoo','servooconf',1,1)")) or dberror();
# $context['id']=$db->Insert_ID();
# $db->execute(lq("INSERT INTO #_TP_options (name,title,type,userrights,idgroup,status,rank) VALUES ('url','url','url',40,".$context['id'].",32,1),('username','username','tinytext',40,".$context['id'].",32,2),(3,1,'passwd','password','passwd',40,".$context['id'].",32,3)")) or dberror();
// begin{publicfields} automatic generation //
return array("name"=> array("text","+"),
"title"=> array("text","+"),
"idgroup"=> array("int","+"),
"type"=> array("select",""),
"userrights"=> array("select","+"),
"defaultvalue"=> array("text",""),
"comment"=> array("longtext",""));
// end{publicfields} automatic generation //
// begin{uniquefields} automatic generation //
function _uniqueFields() { return array(array("name","idgroup"),); }
// end{uniquefields} automatic generation //
/*-----------------------------------*/
|