From 9fd0cced2698f7c20c49dcd709d9dd32e119ad0d Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Thu, 30 Jun 2005 05:27:03 +0000 Subject: [PATCH] Committing a cardinal sin (heh, didn't he just pass on?) index.php is BROKEN. I'm going to try to change it into the old master-switch mechanism using Horde::Form stuff. Examples are in whups/tickets git-svn-id: https://svn.alkaloid.net/gpl/shout/trunk@36 06cd67b6-e706-0410-b29e-9de616bca6e9 --- index.php | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--- shout.webprj | 2 +- 2 files changed, 56 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 14f1cfc30..02724d748 100644 --- a/index.php +++ b/index.php @@ -8,14 +8,66 @@ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. */ -define('SHOUT_BASE', dirname(__FILE__)); +@define('SHOUT_BASE', dirname(__FILE__)); $shout_configured = (@is_readable(SHOUT_BASE . '/config/conf.php'));# && #@is_readable(SHOUT_BASE . '/config/prefs.php')); - if (!$shout_configured) { require SHOUT_BASE . '/../lib/Test.php'; Horde_Test::configFilesMissing('Shout', SHOUT_BASE, array('conf.php', 'prefs.php')); } -require SHOUT_BASE . '/contexts.php'; \ No newline at end of file +require_once SHOUT_BASE . '/lib/base.php'; +require_once SHOUT_BASE . '/lib/Shout.php'; +#require_once SHOUT_TEMPLATES . '/comment.inc'; +require_once 'Horde/Variables.php'; +require_once 'Horde/Text/Filter.php'; + +$contexts = $shout->getContexts(); +$vars = &Variables::getDefaultVariables(); +#$ticket->setDetails($vars); + +$title = '[#' . $ticket->getId() . '] ' . $ticket->get('summary'); +require WHUPS_TEMPLATES . '/common-header.inc'; +require WHUPS_TEMPLATES . '/menu.inc'; +require WHUPS_TEMPLATES . '/prevnext.inc'; + +$tabs = &Whups::getTicketTabs($vars); +$tabs->preserve('id', $ticket->getId()); +echo $tabs->render(); + +$form = &new TicketDetailsForm($vars); +$form->addAttributes($whups->getAllTicketAttributesWithNames($ticket->getId())); + +$RENDERER = &new Horde_Form_Renderer(); +$RENDERER->beginInactive($title); +$RENDERER->renderFormInactive($form, $vars); +$RENDERER->end(); + +echo '
'; + +$COMMENT = &new Comment(); +$COMMENT->begin(_("History")); +$history = Whups::permissionsFilter($whups->getHistory($ticket->getId()), + 'comment', PERMS_READ); +$chtml = array(); +foreach ($history as $comment_values) { + $chtml[] = $COMMENT->render(new Variables($comment_values)); +} +if ($prefs->getValue('comment_sort_dir')) { + $chtml = array_reverse($chtml); +} +echo implode('', $chtml); +$COMMENT->end(); + +require $registry->get('templates', 'horde') . '/common-footer.inc'; + + + + + + + + + +#require SHOUT_BASE . '/contexts.php'; \ No newline at end of file diff --git a/shout.webprj b/shout.webprj index 22b596d25..82bd6235d 100644 --- a/shout.webprj +++ b/shout.webprj @@ -66,7 +66,7 @@ - + -- 2.11.0