From: <am...@us...> - 2005-12-15 22:41:40
|
Update of /cvsroot/tikiwiki/tiki In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1922 Modified Files: tiki-browse_freetags.php Log Message: If no tag specified, focus on a random tag Index: tiki-browse_freetags.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/tiki-browse_freetags.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- tiki-browse_freetags.php 15 Dec 2005 20:52:10 -0000 1.3 +++ tiki-browse_freetags.php 15 Dec 2005 22:41:29 -0000 1.4 @@ -23,10 +23,14 @@ } if (!isset($_REQUEST['tag'])) { - $smarty->assign('msg', tra("No tag specified")); - - $smarty->display("error.tpl"); - die; + $tag = $freetaglib->get_tag_suggestion('', 1); + if ($tag) { + header("Location: tiki-browse_freetags.php?tag=$tag[0]"); + } else { + $smarty->assign('msg', tra("Nothing tagged yet").'.'); + $smarty->display("error.tpl"); + die; + } } if (!isset($_REQUEST["sort_mode"])) { |