diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2005-08-01 18:42:06 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2005-08-01 18:42:06 +0000 |
| commit | aa1fc688af3a1b78a73369d378b0c5b3cdbd9bee (patch) | |
| tree | 096ac1d919c8fea068b59334c67457f636289121 /page_history.php | |
| parent | cb5983c245afe264915abf248d87fb7a6498751c (diff) | |
| download | wiki-aa1fc688af3a1b78a73369d378b0c5b3cdbd9bee.tar.gz wiki-aa1fc688af3a1b78a73369d378b0c5b3cdbd9bee.tar.bz2 wiki-aa1fc688af3a1b78a73369d378b0c5b3cdbd9bee.zip | |
merge recent changes with HEAD - R1 and HEAD are identical now
Diffstat (limited to 'page_history.php')
| -rw-r--r-- | page_history.php | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/page_history.php b/page_history.php index 3db5ac8..504b39d 100644 --- a/page_history.php +++ b/page_history.php @@ -1,6 +1,6 @@ <?php /** - * $Header: /cvsroot/bitweaver/_bit_wiki/page_history.php,v 1.3 2005/06/28 07:46:27 spiderr Exp $ + * $Header: /cvsroot/bitweaver/_bit_wiki/page_history.php,v 1.4 2005/08/01 18:42:04 squareing Exp $ * * Copyright (c) 2004 bitweaver.org * Copyright (c) 2003 tikwiki.org @@ -8,7 +8,7 @@ * All Rights Reserved. See copyright.txt for details and a complete list of authors. * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details * - * $Id: page_history.php,v 1.3 2005/06/28 07:46:27 spiderr Exp $ + * $Id: page_history.php,v 1.4 2005/08/01 18:42:04 squareing Exp $ * @package wiki * @subpackage functions */ @@ -21,7 +21,7 @@ include_once( WIKI_PKG_PATH.'BitPage.php'); $gBitSystem->verifyPackage( 'wiki' ); if ($feature_history != 'y') { - $smarty->assign('msg', tra("This feature is disabled").": feature_history"); + $gBitSmarty->assign('msg', tra("This feature is disabled").": feature_history"); $gBitSystem->display( 'error.tpl' ); exit; } @@ -37,31 +37,31 @@ if( !$gContent->isValid() || empty( $gContent->mInfo ) ) { // Now check permissions to access this page if (!$gBitUser->hasPermission( 'bit_p_view' )) { - $smarty->assign('msg', tra("Permission denied you cannot browse this page history")); + $gBitSmarty->assign('msg', tra("Permission denied you cannot browse this page history")); $gBitSystem->display( 'error.tpl' ); exit; } -$smarty->assign('source', 0); +$gBitSmarty->assign('source', 0); // If we have to include a preview please show it -$smarty->assign('preview', false); -$smarty->assign('compare', 'n'); -$smarty->assign('diff2', 'n'); +$gBitSmarty->assign('preview', false); +$gBitSmarty->assign('compare', 'n'); +$gBitSmarty->assign('diff2', 'n'); if (isset($_REQUEST["delete"]) && isset($_REQUEST["hist"])) { foreach (array_keys($_REQUEST["hist"])as $version) { $gContent->expungeVersion( $version ); } } elseif (isset($_REQUEST['source'])) { - $smarty->assign('source', $_REQUEST['source']); + $gBitSmarty->assign('source', $_REQUEST['source']); if ($_REQUEST['source'] == 'current') { - $smarty->assign('sourcev', nl2br(htmlentities($gContent->mInfo['data']))); + $gBitSmarty->assign('sourcev', nl2br(htmlentities($gContent->mInfo['data']))); } else { $version = $gContent->getHistory($_REQUEST["source"]); - $smarty->assign('sourcev', nl2br(htmlentities($version[0]["data"]))); + $gBitSmarty->assign('sourcev', nl2br(htmlentities($version[0]["data"]))); } } elseif (isset($_REQUEST["preview"])) { if( $version = $gContent->getHistory( $_REQUEST["preview"] ) ) { - $smarty->assign_by_ref('parsed', $gContent->parseData( $version[0]["data"], $version[0]["format_guid"] ) ); - $smarty->assign_by_ref('version', $_REQUEST["preview"]); + $gBitSmarty->assign_by_ref('parsed', $gContent->parseData( $version[0]["data"], $version[0]["format_guid"] ) ); + $gBitSmarty->assign_by_ref('version', $_REQUEST["preview"]); } } elseif( isset( $_REQUEST["diff2"] ) ) { $from_version = $_REQUEST["diff2"]; @@ -74,39 +74,39 @@ if (isset($_REQUEST["delete"]) && isset($_REQUEST["hist"])) { $diffx = new WikiDiff($from_lines,$to_lines); $fmt = new WikiUnifiedDiffFormatter; $html = $fmt->format($diffx, $from_lines); - $smarty->assign('diffdata', $html); - $smarty->assign('diff2', 'y'); - $smarty->assign('version_from', $from_version); - $smarty->assign('version_to', $to_version); + $gBitSmarty->assign('diffdata', $html); + $gBitSmarty->assign('diff2', 'y'); + $gBitSmarty->assign('version_from', $from_version); + $gBitSmarty->assign('version_to', $to_version); } elseif( isset( $_REQUEST["compare"] ) ) { $from_version = $_REQUEST["compare"]; $from_page = $gContent->getHistory($from_version); - $smarty->assign('compare', 'y'); - $smarty->assign_by_ref('diff_from', $gContent->parseData( $from_page[0]["data"], $from_page[0]["format_guid"] ) ); - $smarty->assign_by_ref('diff_to', $gContent->parseData() ); - $smarty->assign_by_ref('version_from', $from_version); + $gBitSmarty->assign('compare', 'y'); + $gBitSmarty->assign_by_ref('diff_from', $gContent->parseData( $from_page[0]["data"], $from_page[0]["format_guid"] ) ); + $gBitSmarty->assign_by_ref('diff_to', $gContent->parseData() ); + $gBitSmarty->assign_by_ref('version_from', $from_version); } elseif (isset($_REQUEST["rollback"])) { if( $version = $gContent->getHistory( $_REQUEST["preview"] ) ) { - $smarty->assign_by_ref('parsed', $gContent->parseData( $version[0]["data"], $version[0]["format_guid"] ) ); - $smarty->assign_by_ref('version', $_REQUEST["preview"]); + $gBitSmarty->assign_by_ref('parsed', $gContent->parseData( $version[0]["data"], $version[0]["format_guid"] ) ); + $gBitSmarty->assign_by_ref('version', $_REQUEST["preview"]); } } // pagination stuff -$smarty->assign( 'page', $page = !empty( $_REQUEST['page'] ) ? $_REQUEST['page'] : 1 ); +$gBitSmarty->assign( 'page', $page = !empty( $_REQUEST['page'] ) ? $_REQUEST['page'] : 1 ); $offset = ( $page - 1 ) * $gBitSystem->mPrefs['maxRecords']; $history = $gContent->getHistory( NULL, NULL, $offset, $gBitSystem->mPrefs['maxRecords'] ); -$smarty->assign_by_ref( 'history', $history ); +$gBitSmarty->assign_by_ref( 'history', $history ); //vd($gContent->getHistoryCount()); // calculate page number $numPages = ceil( $gContent->getHistoryCount() / $gBitSystem->mPrefs['maxRecords'] ); -$smarty->assign( 'numPages', $numPages ); +$gBitSmarty->assign( 'numPages', $numPages ); // Display the template -$smarty->assign_by_ref( 'gContent', $gContent ); +$gBitSmarty->assign_by_ref( 'gContent', $gContent ); $gBitSystem->display( 'bitpackage:wiki/page_history.tpl'); ?> |
