[Home]GetReferer

UseModWiki | RecentChanges | Preferences

sub GetReferer {				# returns the referer pagename if it is a wiki page but not an action page
	use CGI qw/:standard/;
	my $ref=referer();
	 if ( !($ref =~ /action=/)  ) {
		if ( $ref =~ /$ScriptName\?/ )  {
           	$ref= $';  # $' means whatever came after  
            if ( $ref ne $OpenPageName ) {	#don't want to include reloads
				return $ref; #
            }        
   		}
	}
	else {   # is this necessary?
	    return '';
	}
}


Back to GetReferersBar

UseModWiki | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited May 13, 2004 11:09 am by 62.213.86.109 (diff)
Search: