Skip to content

Commit

Permalink
fixed bug #10761: jpgraph code must be copied into mantis tree
Browse files Browse the repository at this point in the history
If the jpgraph_path global is set, this path is added to the
include path. This allows the jpgraph components to be accessed.
  • Loading branch information
thraxisp committed Jul 24, 2009
1 parent 05487d5 commit 96988ad
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions plugins/MantisGraph/core/graph_api.php
Expand Up @@ -28,12 +28,24 @@
if( $t_font_path !== '' && !defined('TTF_DIR') ) {
define( 'TTF_DIR', $t_font_path );
}
require_once( 'jpgraph/jpgraph.php' );
require_once( 'jpgraph/jpgraph_line.php' );
require_once( 'jpgraph/jpgraph_bar.php' );
require_once( 'jpgraph/jpgraph_pie.php' );
require_once( 'jpgraph/jpgraph_pie3d.php' );
require_once( 'jpgraph/jpgraph_canvas.php' );
$t_jpgraph_path = config_get( 'jpgraph_path', '' );
if( $t_jpgraph_path !== '' ) {
set_include_path(get_include_path() . PATH_SEPARATOR . $t_jpgraph_path );
$ip = get_include_path();
require_once( 'jpgraph.php' );
require_once( 'jpgraph_line.php' );
require_once( 'jpgraph_bar.php' );
require_once( 'jpgraph_pie.php' );
require_once( 'jpgraph_pie3d.php' );
require_once( 'jpgraph_canvas.php' );
} else {
require_once( 'jpgraph/jpgraph.php' );
require_once( 'jpgraph/jpgraph_line.php' );
require_once( 'jpgraph/jpgraph_bar.php' );
require_once( 'jpgraph/jpgraph_pie.php' );
require_once( 'jpgraph/jpgraph_pie3d.php' );
require_once( 'jpgraph/jpgraph_canvas.php' );
}
} else {
require_once( 'ezc/Base/src/base.php' );
}
Expand Down

0 comments on commit 96988ad

Please sign in to comment.