Skip to content

Commit

Permalink
Load the bundled Text_Wiki.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Sep 6, 2017
1 parent 37ffba5 commit b3958ba
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
17 changes: 17 additions & 0 deletions wicked/lib/Application.php
Expand Up @@ -47,6 +47,23 @@ class Wicked_Application extends Horde_Registry_Application

protected function _bootstrap()
{
set_include_path(
__DIR__ . DIRECTORY_SEPARATOR . 'Text_Wiki'
. PATH_SEPARATOR . get_include_path()
);
$autoloader = $GLOBALS['injector']->getInstance('Horde_Autoloader');
$autoloader->addClassPathMapper(
new Horde_Autoloader_ClassPathMapper_Prefix(
'/^Text_Wiki/',
WICKED_BASE . '/lib/Text_Wiki/Text/Wiki'
)
);
$autoloader->addClassPathMapper(
new Horde_Autoloader_ClassPathMapper_Prefix(
'/^Text_Wiki$/',
WICKED_BASE . '/lib/Text_Wiki/Text/Wiki.php'
)
);
$GLOBALS['injector']->bindFactory('Wicked_Driver', 'Wicked_Factory_Driver', 'create');
}

Expand Down
14 changes: 0 additions & 14 deletions wicked/lib/Page.php
Expand Up @@ -532,20 +532,6 @@ public function getProcessor($output_format = 'Xhtml')
break;
}

$autoloader = $GLOBALS['injector']->getInstance('Horde_Autoloader');
$autoloader->addClassPathMapper(
new Horde_Autoloader_ClassPathMapper_Prefix(
'/^Text_Wiki_Render_' . $output_format . '/',
WICKED_BASE . '/lib/Text_Wiki/Render/' . $output_format
)
);
$autoloader->addClassPathMapper(
new Horde_Autoloader_ClassPathMapper_Prefix(
'/^Text_Wiki_Parse/',
WICKED_BASE . '/lib/Text_Wiki/Parse/' . $GLOBALS['conf']['wicked']['format']
)
);

return $this->_proc;
}

Expand Down

0 comments on commit b3958ba

Please sign in to comment.