diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2007-07-11 19:47:54 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2007-07-11 19:47:54 +0000 |
| commit | 66f1e24818cea0637aea5457fd54887a8efa3d50 (patch) | |
| tree | 3e83fa8c726b211b0eb77817f968b74b0b228c4e /content_history_inc.php | |
| parent | 8c1d349251d5df1ce534dbbb663398857d557d41 (diff) | |
| download | liberty-66f1e24818cea0637aea5457fd54887a8efa3d50.tar.gz liberty-66f1e24818cea0637aea5457fd54887a8efa3d50.tar.bz2 liberty-66f1e24818cea0637aea5457fd54887a8efa3d50.zip | |
fall back to internal diff tools when pear isn't available but set
Diffstat (limited to 'content_history_inc.php')
| -rw-r--r-- | content_history_inc.php | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/content_history_inc.php b/content_history_inc.php index 6efcba7..b3c5c48 100644 --- a/content_history_inc.php +++ b/content_history_inc.php @@ -1,6 +1,6 @@ <?php /** - * @version $Revision: 1.8 $ + * @version $Revision: 1.9 $ * @package liberty * @subpackage functions */ @@ -39,15 +39,12 @@ if (isset($_REQUEST["delete"]) && isset($_REQUEST["hist"])) { /** * run 'pear install Text_Diff' to install the library, */ - if( $gBitSystem->isFeatureActive('liberty_inline_diff') ) { - if( @include_once( 'PEAR.php') && @@include_once( 'Text/Diff.php' ) ) { - include_once( 'Text/Diff/Renderer/inline.php' ); - $diff = &new Text_Diff($from_lines,$to_lines); - $renderer = &new Text_Diff_Renderer_inline(); - $html = $renderer->render($diff); - } - } - else { + if( $gBitSystem->isFeatureActive( 'liberty_inline_diff' ) && @include_once( 'Text/Diff.php' )) { + include_once( 'Text/Diff/Renderer/inline.php' ); + $diff = &new Text_Diff($from_lines,$to_lines); + $renderer = &new Text_Diff_Renderer_inline(); + $html = $renderer->render($diff); + } else { include_once( UTIL_PKG_PATH.'diff.php'); $diffx = new WikiDiff($from_lines,$to_lines); $fmt = new WikiUnifiedDiffFormatter; @@ -72,4 +69,4 @@ if (isset($_REQUEST["delete"]) && isset($_REQUEST["hist"])) { } } -?>
\ No newline at end of file +?> |
