From 78f61fa35b0c88582e32b323288f8babf567ab04 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Mon, 10 Jul 2006 10:39:52 +0000 Subject: [PATCH] Use link abstraction for xface git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@77 9869982d-c50d-0410-be91-f2a2ec7c7c7b --- banana/misc.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/banana/misc.inc.php b/banana/misc.inc.php index ea74181..7a782c4 100644 --- a/banana/misc.inc.php +++ b/banana/misc.inc.php @@ -48,6 +48,7 @@ function redirectInBanana($params) * - action = action to do (new, cancel, view) * - part = to show the given MIME part of the article * - pj = to get the given attachment + * - xface = to make a link to an xface * * Can be overloaded by defining a hook_makeLink function */ @@ -61,7 +62,10 @@ function makeLink($params) $host = $_SERVER['HTTP_HOST']; $file = $_SERVER['PHP_SELF']; - if (count($params) != 0) { + if (isset($params['xface'])) { + $file = dirname($file) . '/xface.php'; + $get = 'face=' . $params['xface']; + } else if (count($params) != 0) { $get = '?'; foreach ($params as $key=>$value) { if (strlen($get) != 1) { @@ -281,7 +285,7 @@ function formatDisplayHeader($_header,$_text) { return $rsl; case "x-face": - return 'x-face'; + return 'x-face'; default: if (function_exists('hook_formatDisplayHeader') -- 2.1.4