From: <sy...@us...> - 2008-03-07 16:32:42
|
Update of /cvsroot/tikiwiki/tiki/lib/wiki In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv15008/lib/wiki Modified Files: Tag: BRANCH-1-10 histlib.php Log Message: notice Index: histlib.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/lib/wiki/histlib.php,v retrieving revision 1.37.2.6 retrieving revision 1.37.2.7 diff -u -d -r1.37.2.6 -r1.37.2.7 --- histlib.php 12 Feb 2008 18:08:02 -0000 1.37.2.6 +++ histlib.php 7 Mar 2008 16:32:46 -0000 1.37.2.7 @@ -187,14 +187,14 @@ $ret[] = $aux; } - return $ret[0]; + return empty($ret)?$ret: $ret[0]; } // note that this function returns the latest version in the // history db table, which is one less than the current version - function get_page_latest_version($page) { + function get_page_latest_version($page, $sort_mode='version_desc') { - $query = "select `version` from `tiki_history` where `pageName`=? order by `version` desc"; + $query = "select `version` from `tiki_history` where `pageName`=? order by ".$this->convert_sortmode($sort_mode); $result = $this->query($query,array($page),1); $ret = array(); |