Update of /cvsroot/phpwiki/phpwiki/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28089
Modified Files:
WikiDB.php
Log Message:
allow emtpy WikiDB::getRevisionBefore(), for simplier templates (revert)
Index: WikiDB.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/WikiDB.php,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -2 -b -p -d -r1.130 -r1.131
--- WikiDB.php 6 Apr 2005 06:19:30 -0000 1.130
+++ WikiDB.php 23 Apr 2005 11:30:12 -0000 1.131
@@ -1139,8 +1139,10 @@ class WikiDB_Page
* the default revision) will always be found.
*/
- function getRevisionBefore($version, $need_content=true) {
+ function getRevisionBefore($version=false, $need_content=true) {
$backend = &$this->_wikidb->_backend;
$pagename = &$this->_pagename;
-
+ if ($version === false)
+ $version = $this->_wikidb->_cache->get_latest_version($pagename);
+ else
$version = $this->_coerce_to_version($version);
@@ -2136,4 +2138,7 @@ function _sql_debuglog_shutdown_function
// $Log$
+// Revision 1.131 2005/04/23 11:30:12 rurban
+// allow emtpy WikiDB::getRevisionBefore(), for simplier templates (revert)
+//
// Revision 1.130 2005/04/06 06:19:30 rurban
// Revert the previous wrong bugfix #1175761: USECACHE was mixed with WIKIDB_NOCACHE_MARKUP.
|