diff options
| author | Nick Palmer <nick@sluggardy.net> | 2007-06-07 20:50:17 +0000 |
|---|---|---|
| committer | Nick Palmer <nick@sluggardy.net> | 2007-06-07 20:50:17 +0000 |
| commit | 5eeeeaf64c689c42757546b4fe30b267d5bb08e1 (patch) | |
| tree | e8ae9ee6025cccbca4dffa10b8448cd1bfb9b3f1 /content_history_inc.php | |
| parent | 859e03c127f35c83296a496a657e4a6072e296d7 (diff) | |
| download | liberty-5eeeeaf64c689c42757546b4fe30b267d5bb08e1.tar.gz liberty-5eeeeaf64c689c42757546b4fe30b267d5bb08e1.tar.bz2 liberty-5eeeeaf64c689c42757546b4fe30b267d5bb08e1.zip | |
Modified new inline diff to use PEAR installed Text_Diff instead of util version.
Diffstat (limited to 'content_history_inc.php')
| -rw-r--r-- | content_history_inc.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/content_history_inc.php b/content_history_inc.php index 49e1049..45d397a 100644 --- a/content_history_inc.php +++ b/content_history_inc.php @@ -30,13 +30,17 @@ if (isset($_REQUEST["delete"]) && isset($_REQUEST["hist"])) { $to_version = $gContent->mInfo["version"]; $to_lines = explode("\n",$gContent->mInfo["data"]); - if ( $gBitSystem->isFeatureActive('liberty_inline_diff') ) { - include_once( UTIL_PKG_PATH.'pear/Text/Diff/Diff.php' ); - include_once( UTIL_PKG_PATH.'pear/Text/Diff/Diff/Renderer.php' ); - include_once( UTIL_PKG_PATH.'pear/Text/Diff/Diff/Renderer/inline.php' ); - $diff = &new Text_Diff($from_lines,$to_lines); - $renderer = &new Text_Diff_Renderer_inline(); - $html = $renderer->render($diff); + /** + * run 'pear install Text_Diff' to install the library, + */ + require_once('PEAR.php'); + + 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'); |
