* Initialization function.
*
* Global variables defined:
+ * $chora_conf
* $sourceroots
*/
protected function _init()
{
- global $conf;
- global $acts, $defaultActs, $where, $atdir, $fullname, $sourceroot;
+ global $acts, $conf, $defaultActs, $where, $atdir, $fullname, $sourceroot;
try {
$GLOBALS['sourceroots'] = Horde::loadConfiguration('backends.php', 'sourceroots');
? null
: $GLOBALS['injector']->getInstance('Horde_Cache');
- $conf['paths']['temp'] = Horde::getTempDir();
-
- $GLOBALS['VC'] = Horde_Vcs::factory(Horde_String::ucfirst($sourcerootopts['type']),
- array('cache' => $cache,
- 'sourceroot' => $sourcerootopts['location'],
- 'paths' => $conf['paths'],
- 'username' => isset($sourcerootopts['username']) ? $sourcerootopts['username'] : '',
- 'password' => isset($sourcerootopts['password']) ? $sourcerootopts['password'] : ''));
-
- $conf['paths']['sourceroot'] = $sourcerootopts['location'];
- $conf['paths']['cvsusers'] = $sourcerootopts['location'] . '/' . (isset($sourcerootopts['cvsusers']) ? $sourcerootopts['cvsusers'] : '');
- $conf['paths']['introText'] = CHORA_BASE . '/config/' . (isset($sourcerootopts['intro']) ? $sourcerootopts['intro'] : '');
- $conf['options']['introTitle'] = isset($sourcerootopts['title']) ? $sourcerootopts['title'] : '';
- $conf['options']['sourceRootName'] = $sourcerootopts['name'];
+ $GLOBALS['chora_conf'] = array(
+ 'cvsusers' => $sourcerootopts['location'] . '/' . (isset($sourcerootopts['cvsusers']) ? $sourcerootopts['cvsusers'] : ''),
+ 'introText' => CHORA_BASE . '/config/' . (isset($sourcerootopts['intro']) ? $sourcerootopts['intro'] : ''),
+ 'introTitle' => (isset($sourcerootopts['title']) ? $sourcerootopts['title'] : ''),
+ 'sourceRootName' => $sourcerootopts['name']
+ );
+ $chora_conf = &$GLOBALS['chora_conf'];
+
+ $GLOBALS['VC'] = Horde_Vcs::factory(Horde_String::ucfirst($sourcerootopts['type']), array(
+ 'cache' => $cache,
+ 'sourceroot' => $sourcerootopts['location'],
+ 'paths' => array_merge($conf['paths'], array('temp' => Horde::getTempDir())),
+ 'username' => isset($sourcerootopts['username']) ? $sourcerootopts['username'] : '',
+ 'password' => isset($sourcerootopts['password']) ? $sourcerootopts['password'] : ''
+ ));
$where = Horde_Util::getFormData('f', '/');
static public function showAuthorName($name, $fullname = false)
{
try {
- $users = $GLOBALS['VC']->getUsers($GLOBALS['conf']['paths']['cvsusers']);
+ $users = $GLOBALS['VC']->getUsers($GLOBALS['chora_conf']['cvsusers']);
if (isset($users[$name])) {
return '<a href="mailto:' . htmlspecialchars($users[$name]['mail']) . '">' .
htmlspecialchars($fullname ? $users[$name]['name'] : $name) .
static public function getAuthorEmail($name)
{
try {
- $users = $GLOBALS['VC']->getUsers($GLOBALS['conf']['paths']['cvsusers']);
+ $users = $GLOBALS['VC']->getUsers($GLOBALS['chora_conf']['cvsusers']);
if (isset($users[$name])) {
return $users[$name]['mail'];
}
<tr>
<td class="browseLocation">
<?php echo _("Location:") ?>
- <strong>[ <a href="<?php echo Chora::url('browsedir') ?>"><?php echo $conf['options']['sourceRootName'] ?></a> ]
+ <strong>[ <a href="<?php echo Chora::url('browsedir') ?>"><?php echo $chora_conf['sourceRootName'] ?></a> ]
<?php echo Chora::whereMenu($where, isset($onb) ? $onb : null) ?></strong>
<?php if (!empty($onb)): ?>
<em><?php echo _("Tracking Branch") ?>: <strong><?php echo $onb ?></strong></em>
<?php endif; ?>
</tr>
-<?php if (!$where && @is_file($conf['paths']['introText'])): ?>
+<?php if (!$where && @is_file($chora_conf['introText'])): ?>
<tr>
- <td class="text" colspan="2"><?php @readfile($conf['paths']['introText']) ?></td>
+ <td class="text" colspan="2"><?php @readfile($chora_conf['introText']) ?></td>
</tr>
<?php endif; ?>