send to wiki"; $ielink = "send to wiki"; return FmtPageName("This page is \$PageUrl.
$mozlink (Moz.)
$ielink (IE)", $pagename); } # Use the site's default edit page. # (I noticed in both addlink and kob-addlink that they set the $action variable, but then neglected to use it # in the subsequent two statement - TT Tue May 31 20:42:31 CDT 2011) if ($action=='addlink') { $action = 'edit'; $OldEditHandler = $HandleActions[$action]; $HandleActions[$action] = 'HandleAddLink'; } # Function to handle ?action=addlink (prepends the url to the page and # then passes control to the edit function). function HandleAddLink($pagename) { global $OldEditHandler, $EnableAddLinkToEnd, $AddLinkPrefixText, $AddLinkSuffixText; $posttime = date("Y-n-j G:i"); Lock(2); $page = RetrieveAuthPage($pagename, 'edit'); if (!$page) Abort("?cannot edit $pagename"); $text = addslashes($page['text']); /* (this was part of kob-addlink.php for creating a blog entry. I went back to the original form somewhat adding in the space for selected text and tags - TT 2011-05-31) if (@$_REQUEST['url']) { if (IsEnabled($EnableAddLinkToEnd,0)) $text .= "\n\n(:blogentry title=\"{$_REQUEST['title']}\" time=\"$posttime\" permalink=\"$pagename\":)\n(:tags {$_REQUEST['tags']}:)\n\n{$_REQUEST['selected']} -> [[{$_REQUEST['url']}|link]]\n\n(:blogentryend:)\n\n"; else $text = "\n(:blogentry title=\"{$_REQUEST['title']}\" time=\"$posttime\" permalink=\"$pagename\":)\n(:tags {$_REQUEST['tags']}:)\n\n{$_REQUEST['selected']} -> [[{$_REQUEST['url']}|link]]\n\n(:blogentryend:)\n\n" . $text; } */ if (@$_REQUEST['url']) { if (@$_REQUEST['title']) { $newtext = "[[{$_REQUEST['title']} -> {$_REQUEST['url']}]]"; } else { $newtext = $_REQUEST['url']; } if (@$_REQUEST['selected']) { $newtext .= "\n{$_REQUEST['selected']}"; } if (@$_REQUEST['tags']) { // tags comes in URI encoded, but we need the spaces and the commas $tags=str_replace("%20", ' ', $tags); $tags=str_replace("%2C", ',', $tags); $newtext .= "\nTags: (:tags {$_REQUEST['tags']} :)\n"; } if (IsEnabled($EnableAddLinkToEnd,0)) $text .= $AddLinkPrefixText . "* $newtext" . $AddLinkSuffixText; else $text = $AddLinkPrefixText . "* $newtext" . $AddLinkSuffixText . $text; } $action = 'edit'; $_POST['text'] = $text; $OldEditHandler($pagename); }