diff options
| author | Jams H Thompson <jht001@users.sourceforge.net> | 2007-09-27 08:43:35 +0000 |
|---|---|---|
| committer | Jams H Thompson <jht001@users.sourceforge.net> | 2007-09-27 08:43:35 +0000 |
| commit | 5f9a1cb4d4d8bda849896230b9ebbbaca922806c (patch) | |
| tree | 66c4a49b10a3257e47a3c6813095b7951e0ed848 /content_history_inc.php | |
| parent | 02df01d043b2b7618ad9e5795a1cc39638246edf (diff) | |
| download | liberty-5f9a1cb4d4d8bda849896230b9ebbbaca922806c.tar.gz liberty-5f9a1cb4d4d8bda849896230b9ebbbaca922806c.tar.bz2 liberty-5f9a1cb4d4d8bda849896230b9ebbbaca922806c.zip | |
add capability to diff between any two versions
Diffstat (limited to 'content_history_inc.php')
| -rw-r--r-- | content_history_inc.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/content_history_inc.php b/content_history_inc.php index b3c5c48..bfda9c0 100644 --- a/content_history_inc.php +++ b/content_history_inc.php @@ -1,6 +1,6 @@ <?php /** - * @version $Revision: 1.9 $ + * @version $Revision: 1.10 $ * @package liberty * @subpackage functions */ @@ -33,9 +33,15 @@ if (isset($_REQUEST["delete"]) && isset($_REQUEST["hist"])) { $from_version = $_REQUEST["diff2"]; $from_page = $gContent->getHistory( $from_version ); $from_lines = explode("\n",$from_page["data"][0]["data"]); - $to_version = $gContent->mInfo["version"]; - $to_lines = explode("\n",$gContent->mInfo["data"]); - + if ( isset($_REQUEST["diff_to"]) && $_REQUEST["diff_to"] != $gContent->mInfo["version"] ) { + $to_version = $_REQUEST["diff_to"]; + $to_page = $gContent->getHistory( $to_version ); + $to_lines = explode("\n",$to_page["data"][0]["data"]); + } + else { + $to_version = $gContent->mInfo["version"]; + $to_lines = explode("\n",$gContent->mInfo["data"]); + } /** * run 'pear install Text_Diff' to install the library, */ |
