Пример #1
0
function url_for_page_action($page, $action_name, $in_attr = false, $fragment = null)
{
    $link = link_for_page_action($page, $action_name);
    $link->set_page($page);
    if (!empty($fragment)) {
        $link->set_fragment($fragment);
    }
    return $link->to_url($in_attr);
}
Пример #2
0
 function wiki_fn_noredir_link($args, $renderer_state)
 {
     $page_name = array_shift($args);
     $page = new_page($page_name, MW_REVISION_HEAD);
     $link = link_for_page_action($page, MW_ACTION_VIEW);
     $link->set_redirect(false);
     return $link->to_url();
 }