Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

config.php

00001 <?php
00002 
00007 // Common prefix used for all database table names, e.g. xar_workflow_
00008 if (!defined('GALAXIA_TABLE_PREFIX')) {
00009     define('GALAXIA_TABLE_PREFIX', xarDBGetSiteTablePrefix() . '_workflow_');
00010 }
00011 
00012 // Directory containing the Galaxia library, e.g. lib/Galaxia
00013 if (!defined('GALAXIA_LIBRARY')) {
00014     define('GALAXIA_LIBRARY', dirname(__FILE__));
00015 }
00016 
00017 // Directory where the Galaxia processes will be stored, e.g. lib/Galaxia/processes
00018 if (!defined('GALAXIA_PROCESSES')) {
00019     // Note: this directory must be writeable by the webserver !
00020     //define('GALAXIA_PROCESSES', GALAXIA_LIBRARY . '/processes');
00021     define('GALAXIA_PROCESSES', 'var/processes');
00022 }
00023 
00024 // Directory where a *copy* of the Galaxia activity templates will be stored, e.g. templates
00025 // Define as '' if you don't want to copy templates elsewhere
00026 if (!defined('GALAXIA_TEMPLATES')) {
00027     // Note: this directory must be writeable by the webserver !
00028     //define('GALAXIA_TEMPLATES', 'templates');
00029     define('GALAXIA_TEMPLATES', '');
00030 }
00031 
00032 // Default header to be added to new activity templates
00033 if (!defined('GALAXIA_TEMPLATE_HEADER')) {
00034     //define('GALAXIA_TEMPLATE_HEADER', '{*Smarty template*}');
00035     define('GALAXIA_TEMPLATE_HEADER', '');
00036 }
00037 
00038 // File where the ProcessManager logs for Galaxia will be saved, e.g. lib/Galaxia/log/pm.log
00039 // Define as '' if you don't want to use logging
00040 if (!defined('GALAXIA_LOGFILE')) {
00041     // Note: this file must be writeable by the webserver !
00042     //define('GALAXIA_LOGFILE', GALAXIA_LIBRARY . '/log/pm.log');
00043     define('GALAXIA_LOGFILE', '');
00044 }
00045 
00046 // Directory containing the GraphViz 'dot' and 'neato' programs, in case
00047 // your webserver can't find them via its PATH environment variable
00048 if (!defined('GRAPHVIZ_BIN_DIR')) {
00049     define('GRAPHVIZ_BIN_DIR', '');
00050     //define('GRAPHVIZ_BIN_DIR', 'd:/wintools/ATT/GraphViz/bin');
00051 }
00052 
00057 // Database handler
00058 global $dbGalaxia;
00059 if (!isset($dbGalaxia)) {
00060     // Galaxia needs its own connection for the associative fetch mode.
00061     $dbGalaxia =& xarDBNewConn();
00062 
00063     // Set the fetch mode to assoc by default (needed by lib/Galaxia)
00064     $oldmode = $dbGalaxia->SetFetchMode(ADODB_FETCH_ASSOC);
00065 }
00066 
00067 // Specify how error messages should be shown (for use in compiler and activity code)
00068 if (!function_exists('galaxia_show_error')) {
00069     function galaxia_show_error($msg)
00070     {
00071         // TODO: clean this up
00072         trigger_error(xarML($msg),E_USER_ERROR);
00073     }
00074 }
00075 
00076 // Specify how to execute a non-interactive activity (for use in src/API/Instance.php)
00077 if (!function_exists('galaxia_execute_activity')) {
00078     function galaxia_execute_activity($activityId = 0, $iid = 0, $auto = 1)
00079     {
00080         $result = xarModAPIFunc('workflow','user','run_activity',
00081                                 array('activityId' => $activityId,
00082                                       'iid' => $iid,
00083                                       'auto' => $auto));
00084         if (empty($result)) {
00085         // TODO: clean this up
00086             echo xarExceptionRender('html');
00087             die;
00088         }
00089     }
00090 }
00091 
00092 // Translate strings and variables
00093 if (!function_exists('tra')) {
00094     function tra($what)
00095     {
00096         return xarML($what);
00097     }
00098 }
00099 
00100 ?>

Generated on Mon Jun 7 16:37:37 2004 for Galaxia by doxygen 1.3.4