Skip to content

Commit 61910bc

Browse files
committed
Add composer depdenency for geshi and update phpdoc to pull in geshi
from composer vendor branch when it exists
1 parent 3eb646e commit 61910bc

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
],
1313
"require": {
1414
"php": ">=5.2.0",
15-
"michelf/php-markdown": "1.3"
15+
"michelf/php-markdown": "1.3",
16+
"easybook/geshi" : "*"
1617
},
1718
"require-dev": {
1819
"lastcraft/simpletest": "1.1.*"

phpdoc.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// check we are running from the command line
2525
if (!isset($argv[0])) {
2626
die('This program must be run from the command line using the CLI version of PHP');
27-
27+
2828
// check we are using the correct version of PHP
2929
} elseif (!defined('T_COMMENT') || !extension_loaded('tokenizer') || version_compare(phpversion(), '5', '<')) {
3030
error('You need PHP version 5 or greater with the "tokenizer" extension to run this script, please upgrade');
@@ -35,6 +35,12 @@
3535
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__));
3636
require('classes'.DIRECTORY_SEPARATOR.'phpDoctor.php');
3737

38+
// include geshi from composer if it exists
39+
$phpg = 'vendor'.DIRECTORY_SEPARATOR.'easybook'.DIRECTORY_SEPARATOR.'geshi'.DIRECTORY_SEPARATOR.'geshi.php';
40+
if (is_readable($phpg)) {
41+
include($phpg);
42+
}
43+
3844
// get name of config file to use
3945
if (!isset($argv[1])) {
4046
if (isset($_ENV['PHPDoctor'])) {

0 commit comments

Comments
 (0)