1: <?php
2: 3: 4: 5:
6: class Horde_Core_Factory_History extends Horde_Core_Factory_Injector
7: {
8: public function create(Horde_Injector $injector)
9: {
10: if (empty($GLOBALS['conf']['sql']['phptype']) ||
11: ($GLOBALS['conf']['sql']['phptype'] == 'none')) {
12: throw new Horde_Exception(Horde_Core_Translation::t("The History system is disabled."));
13: }
14:
15: return new Horde_History_Sql(
16: $injector->getInstance('Horde_Registry')->getAuth(),
17: $injector->getInstance('Horde_Core_Factory_Db')->create('horde', 'history')
18: );
19: }
20: }
21: