Subversion Repositories Applications.bazar

Compare Revisions

Ignore whitespace Rev 386 → Rev 387

/branches/livraison_aha/bibliotheque/bazar.class.php
19,7 → 19,7
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bazar.class.php,v 1.9 2007-10-10 13:27:06 alexandre_tb Exp $
// CVS : $Id: bazar.class.php,v 1.9.2.1 2008-04-16 12:36:27 alexandre_tb Exp $
/**
*
*@package bazar
27,7 → 27,7
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
*@author Florian Schmitt <florian@ecole-et-nature.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.9 $
*@version $Revision: 1.9.2.1 $
// +------------------------------------------------------------------------------------------------------+
*/
 
216,9 → 216,37
}
}
 
class Bazar_element {
function &factory($type, $options = false)
{
if (file_exists (BAZ_CHEMIN_APPLI."bibliotheque/elements/{$type}.php")) include_once BAZ_CHEMIN_APPLI."bibliotheque/elements/{$type}.php";
else return PEAR::raiseError("Impossible d inclure le fichier /{$type}.php", "Impossible d inclure le fichier ".
BAZ_CHEMIN_APPLI."bibliotheque/elements/{$type}.php<br />", null, null,
"Impossible d inclure le fichier /{$type}.php"
, 'PEAR_Error', true);;
$classname = "Bazar_{$type}";
 
if (!class_exists($classname)) {
$tmp = PEAR::raiseError(null, -2, null, null,
"la classe $classname n'existe pas"
, 'PEAR_Error', true);
return $tmp;
}
 
@$obj =& new $classname($options);
 
return $obj;
}
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.9 2007-10-10 13:27:06 alexandre_tb
* encodage et remplacement de die en return
*
* Revision 1.8 2007-10-01 10:35:14 alexandre_tb
* petit hack pour tester la presence de $GLOBALS['droit_depot'] qui indique le niveau de droit minimum pour pouvoir deposer une fiche.
*