Commit 14b69f4f authored by michael_davey's avatar michael_davey

Instant-Auto-Merge from BRANCH-1-9 to HEAD

parent 0cd0ffb4
......@@ -38,13 +38,20 @@
{/section}
</ul>
<br />
{* include file="tiki-include-horizsearch.tpl" *}
{include
file="tiki-searchindex.tpl"
searchNoResults="true"
searchStyle="menu"
searchOrientation="horiz"
words="$page"
}
<br />
{else}
{$msg}
<br /><br />
{/if}
{if $page and !$nocreate and ($tiki_p_admin eq 'y' or $tiki_p_admin_wiki eq 'y')}<a href="tiki-editpage.php?page={$page}" class="linkmenu">{tr}Click here to create it{/tr}</a><br />{/if}
<a href="javascript:history.back()" class="linkmenu">{tr}Go back{/tr}</a><br />
{if $page and !$nocreate and ($tiki_p_admin eq 'y' or $tiki_p_admin_wiki eq 'y' or $tiki_p_edit eq 'y')}<a href="tiki-editpage.php?page={$page}" class="linkmenu">{tr}Create this page{/tr}</a> {tr}(page will be orphaned){/tr}<br /><br />{/if}
<a href="javascript:history.back()" class="linkmenu">{tr}Go back{/tr}</a><br /><br />
<a href="{$tikiIndex}" class="linkmenu">{tr}Return to home page{/tr}</a>
</div>
</div>
......
<h2>{tr}Pages like{/tr}: <a href="tiki-index.php?page={$page|escape:"url"}" class="wiki">{$page}</a></h2>
<h2>{tr}Pages like{/tr}:
{if $page_exists eq 'n'}
'{$page}'
{else}
<a href="tiki-index.php?page={$page|escape:"url"}" class="wiki">{$page}</a>
{/if}</h2>
{section name=back loop=$likepages}
<a href="tiki-index.php?page={$likepages[back]|escape:"url"}" class="wiki">{$likepages[back]}</a><br />
{sectionelse}
......
......@@ -30,8 +30,9 @@
{if $feature_articles eq 'y'}
<a class="linkbut" href="tiki-searchindex.php?highlight={$words}&amp;where=articles">{tr}articles{/tr}</a>
<br /><br />
{/if}
<br /><br />
{tr}Found{/tr} "{$words}" {tr}in{/tr} {$cant_results} {$where2}
{/if}
<form class="forms" method="get" action="tiki-searchindex.php">
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/tiki-error.php,v 1.12 2005-03-12 16:48:59 mose Exp $
// $Header: /cvsroot/tikiwiki/tiki/tiki-error.php,v 1.13 2005-04-02 16:52:02 michael_davey Exp $
// Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
......@@ -12,13 +12,19 @@ include_once('lib/wiki/wikilib.php');
ask_ticket('error');
$page='';
$type='';
if (isset( $feature_usability ) && $feature_usability == 'y' ) {
if (!isset($_REQUEST["error"])) {
/*
if ( !empty($_REQUEST['page'])) {
$page = $_REQUEST['page'];
$_REQUEST["error"] = tra("Page") . " '".$page."' ".tra("cannot be found");
$type="404";
} elseif ( ($_SERVER["REQUEST_URI"] && !(preg_match('/tiki-error.php/',$_SERVER["REQUEST_URI"])) ) ) {
} else
*/
if ( ($_SERVER["REQUEST_URI"] && !(preg_match('/tiki-error.php/',$_SERVER["REQUEST_URI"])) ) ) {
$page = $_SERVER["REQUEST_URI"];
$page = substr($page,strrpos($page,'/')+1);
$_REQUEST["error"] = tra("Page") . " '".$page."' ".tra("cannot be found");
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/tiki-install.php,v 1.69 2005-01-22 22:54:55 mose Exp $
// $Header: /cvsroot/tikiwiki/tiki/tiki-install.php,v 1.70 2005-04-02 16:52:02 michael_davey Exp $
// Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
......@@ -8,6 +8,8 @@
// To re-enable this script comment the following two lines with two / and stopinstall: making sure there are no spaces inbetween // and stopinstall:
//stopinstall: header ("Status: 410 Gone"); /* PHP3 */
//stopinstall: header ("HTTP/1.0 410 Gone"); /* PHP4 */
//stopinstall: header ('location: index.php');
//stopinstall: die('gone');
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/tiki-likepages.php,v 1.10 2005-01-01 00:16:33 damosoft Exp $
// $Header: /cvsroot/tikiwiki/tiki/tiki-likepages.php,v 1.11 2005-04-02 16:52:02 michael_davey Exp $
// Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
......@@ -47,15 +47,28 @@ if ($tiki_p_view != 'y') {
die;
}
$likepages = $wikilib->get_like_pages($page);
// If the page doesn't exist then display an error
if (!$tikilib->page_exists($page)) {
$smarty->assign('msg', tra("Page cannot be found"));
$smarty->display("error.tpl");
die;
if(count($likepages) == 1 ) {
header ("Status: 402 Found"); /* PHP3 */
header ("HTTP/1.0 402 Found"); /* PHP4 */
header("Location: tiki-index.php?page=$likepages[0]");
die;
}
$smarty->assign('page_exists', 'n');
if( count($likepages) <1 ) {
header ("Status: 404 Not Found"); /* PHP3 */
header ("HTTP/1.0 404 Not Found"); /* PHP4 */
$smarty->assign('headtitle',tra("Page cannot be found"));
$smarty->assign('errortitle',tra("Page cannot be found")." (404)");
$smarty->assign('errortype', '404');
$smarty->display("error.tpl");
die;
}
}
$likepages = $wikilib->get_like_pages($page);
$smarty->assign_by_ref('likepages', $likepages);
ask_ticket('likepages');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment