*/
require_once dirname(__FILE__) . '/lib/Application.php';
-Horde_Registry::appInit('chora');
+try {
+ Horde_Registry::appInit('chora');
+} catch (Exception $e) {
+ Chora::fatal($e);
+}
/* Spawn the file object. */
try {
*/
require_once dirname(__FILE__) . '/lib/Application.php';
-Horde_Registry::appInit('chora');
+try {
+ Horde_Registry::appInit('chora');
+} catch (Exception $e) {
+ Chora::fatal($e);
+}
if (!$atdir) {
require CHORA_BASE . '/browsefile.php';
*/
require_once dirname(__FILE__) . '/lib/Application.php';
-Horde_Registry::appInit('chora');
+try {
+ Horde_Registry::appInit('chora');
+} catch (Exception $e) {
+ Chora::fatal($e);
+}
if ($atdir) {
require CHORA_BASE . '/browsedir.php';
*/
require_once dirname(__FILE__) . '/lib/Application.php';
-Horde_Registry::appInit('chora');
+try {
+ Horde_Registry::appInit('chora');
+} catch (Exception $e) {
+ Chora::fatal($e);
+}
/* If we know we're at a directory, just go to browsedir.php. */
if ($atdir) {
*/
require_once dirname(__FILE__) . '/lib/Application.php';
-Horde_Registry::appInit('chora');
+try {
+ Horde_Registry::appInit('chora');
+} catch (Exception $e) {
+ Chora::fatal($e);
+}
// Exit if patchset feature is not available.
if (!$GLOBALS['VC']->hasFeature('patchsets')) {
*/
require_once dirname(__FILE__) . '/lib/Application.php';
-Horde_Registry::appInit('chora');
+try {
+ Horde_Registry::appInit('chora');
+} catch (Exception $e) {
+ Chora::fatal($e);
+}
// Exit if cvsgraph isn't active or it's not supported.
if (empty($conf['paths']['cvsgraph']) || !$VC->hasFeature('branches')) {
*/
require_once dirname(__FILE__) . '/lib/Application.php';
-Horde_Registry::appInit('chora');
+try {
+ Horde_Registry::appInit('chora');
+} catch (Exception $e) {
+ Chora::fatal($e);
+}
/* Spawn the repository and file objects */
try {
*/
require_once dirname(__FILE__) . '/lib/Application.php';
-Horde_Registry::appInit('chora');
+try {
+ Horde_Registry::appInit('chora');
+} catch (Exception $e) {
+ Chora::fatal($e);
+}
// TODO - This currently doesn't work.
Chora::fatal('History display is currently broken', '500 Internal Server Error');
public function sidebarCreate(Horde_Tree_Base $tree, $parent = null,
array $params = array())
{
- define('CHORA_ERROR_HANDLER', true);
-
- $arr = array();
asort($GLOBALS['sourceroots']);
foreach ($GLOBALS['sourceroots'] as $key => $val) {
*/
static public function fatal($message, $code = null)
{
- if (defined('CHORA_ERROR_HANDLER') && constant('CHORA_ERROR_HANDLER')) {
- return;
- }
+ global $notification, $registry;
if (is_a($message, 'Horde_Vcs_Exception')) {
$message = $message->getMessage();
header('HTTP/1.0 ' . $code);
}
- $GLOBALS['notification']->push($message, 'horde.error');
- require $GLOBALS['registry']->get('templates', 'horde') . '/common-header.inc';
+ // Make sure we are in Chora scope.
+ $registry->pushApp('chora');
+
+ $notification->push($message, 'horde.error');
+ require $registry->get('templates', 'horde') . '/common-header.inc';
require CHORA_TEMPLATES . '/menu.inc';
- require $GLOBALS['registry']->get('templates', 'horde') . '/common-footer.inc';
+ require $registry->get('templates', 'horde') . '/common-footer.inc';
exit;
}
*/
require_once dirname(__FILE__) . '/lib/Application.php';
-Horde_Registry::appInit('chora');
+try {
+ Horde_Registry::appInit('chora');
+} catch (Exception $e) {
+ Chora::fatal($e);
+}
// Exit if patchset feature is not available.
if (!$GLOBALS['VC']->hasFeature('patchsets')) {
*/
require_once dirname(__FILE__) . '/lib/Application.php';
-Horde_Registry::appInit('chora');
+try {
+ Horde_Registry::appInit('chora');
+} catch (Exception $e) {
+ Chora::fatal($e);
+}
try {
$fl = $VC->getFileObject($where);