Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lupo49 committed Apr 7, 2013
1 parent 5b46258 commit 7105e8e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions action.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ class action_plugin_singlesearchresult extends DokuWiki_Action_Plugin {

public function register(Doku_Event_Handler &$controller) {
$controller->register_hook('SEARCH_QUERY_FULLPAGE', 'AFTER', $this, 'handle_search_query_pagelookup');
//$controller->register_hook('ACTION_ACT_PREPROCESS', 'AFTER', $this, 'handle_search_query_pagelookup1');
}

// Bei einem Ergebnis ein trigger_event (ACTION_ACT_PREPROCESS) ausl�sen, dass ein redirect macht.?
public function handle_search_query_pagelookup(Doku_Event &$event, $param) {
global $conf;
$result = $event->result;
Expand All @@ -40,7 +37,7 @@ public function handle_search_query_pagelookup(Doku_Event &$event, $param) {

if($perm > AUTH_NONE) {
if($conf['allowdebug']) {
msg("Only one page found, skipping result overview. Redirect to: " . $pageid);
msg("Only one page found, skipping result overview. Redirect to: ".$pageid);
}
$link = wl($pageid, '', true);
print "<script type='text/javascript'>window.location.href='$link'</script>";
Expand Down

0 comments on commit 7105e8e

Please sign in to comment.