Recent Changes - Search:

PITS main list

edit sidebar

Main sidebar

PmWiki

pmwiki.org

00919

Summary: Add a quiet option in redirect markup
Created: 2007-05-06 09:15
Status: Closed (Added to core for 2.2.1)
Category: Feature
From: isidor
Assigned:
Priority: 55555 55544
Version: All
OS: N/A

Description: Hi,

We are using the redirect markup in our Wiki for when a user decide to change a page or group name, or simply define a Shortname. Sometime it's useful to display the redirect from, but it would be a good idea to have an option to avoid to display the words redirected from page xxxx on the target page

Exemple on http://cluny.gadz.org/GB where GB is a shortcut to http://cluny.gadz.org/GrandBastringue/GrandBastringue

Could it be possible to have an option like (:redirect PageName status=301 mode=quiet:)

It would be sufficient to change the function RedirectMarkup from

Redirect($to, "{\$PageUrl}?from=$pagename$anchor");

to

if (preg_match('/quiet/', @$opt['mode'])) Redirect($to, "{\$PageUrl}");
else Redirect($to, "{\$PageUrl}?from=$pagename$anchor");

Thanks


  • A must have feature. --Aga
  • I agree that a silent mode is needed -- Simon
  • I agree and would like this feature. I also would like to be able to suppress the ?from=pagename in the url as well --Ian MacGregor

isidor Hi Pm, could you please accept/reject this feature ?


See also:

Hi Simon could it be considered to incorporate in the 2.2 the "quiet/silent" function of those Cookbooks isidor?

Agreed Simon

I support this feature request, instead of mode=quiet we can use quiet=1. This way we could have: Redirect($to,"{\$PageUrl}".IsEnabled($opt['quiet'],0)?"?from=$pagename$anchor":''); Very small change to the current code, but allows to not have to rewrite/replace the whole function from a recipe. Petko


IMHO, the previous code should merely be something like:

Redirect($to, "{\$PageUrl}"
              . (IsEnabled($opt['quiet'], 0) ? "?from=$pagename" : '')
              . $anchor);

in order to preserve the anchor in all the cases. Anyway, I would love to have it available soon. --Dfaure October 10, 2007, at 02:04 AM


In the past I have not provided a quiet= option by default because it then becomes possible for malicious authors to redirect pages without the viewer having any obvious indication that a redirection has taken place, or where they have been redirected from, or an easy way to fix the page containing the redirect when it occurs.

However, given the high number of 5 priorities on this issue, I think I'll add in an $EnableRedirectQuiet configuration option and the admin can set it to allow a quiet= option in the redirect markup.

Comments?

Pm November 14, 2007, at 08:57 AM

Ok for me. Publicly editable wikis will not risk problems, other will have flexibility. --Petko November 14, 2007, at 09:38 AM
Ditto -- Simon
Edit - History - Print - Recent Changes - Search
Page last modified on September 10, 2011, at 11:56 AM