From: Joseph W. <zo...@us...> - 2002-10-15 18:42:25
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory usw-pr-cvs1:/tmp/cvs-serv2755/lib Modified Files: main.php Log Message: Added functionality to WikiRequest->getPage to be able to pull different page names but will pull current by default Index: main.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/main.php,v retrieving revision 1.85 retrieving revision 1.86 diff -u -2 -b -p -d -r1.85 -r1.86 --- main.php 18 Sep 2002 22:11:21 -0000 1.85 +++ main.php 15 Oct 2002 18:42:21 -0000 1.86 @@ -140,11 +140,17 @@ class WikiRequest extends Request { /** * Get requested page from the page database. + * By default it will grab the page requested via the URL * * This is a convenience function. + * @param string $pagename Name of page to get. + * @return WikiDB_Page Object with methods to pull data from + * database for the page requested. */ - function getPage () { + function getPage ($pagename = false) { if (!isset($this->_dbi)) $this->getDbh(); - return $this->_dbi->getPage($this->getArg('pagename')); + if (!$pagename) + $pagename = $this->getArg('pagename'); + return $this->_dbi->getPage($pagename); } |