<?php
        /* Check first variable (of any name), if it not exists use current page. */
        if ( $vars[0] )
                $backlinks_tag = $this->UnwrapLink ( $vars[0] );
        else
                $backlinks_tag = $this->getPageTag ();

        if ( $pages = $this->LoadPagesLinkingTo ( $backlinks_tag ) )
        {
                print ( "<fieldset><legend>".$this->GetResourceValue ( "ReferringPages" ).":</legend>\n" );
                foreach ( $pages as $page )
                {
                        if ( $this->config["hide_locked"] )
                                $backlinks_access = $this->HasAccess ( "read", $page["tag"] );
                        else
                                $backlinks_access = true;

                        if ( $backlinks_access )
                                echo ($this->ComposeLinkToPage ( $page["tag"] )."<br/>\n" );
                }
                echo "</fieldset>\n";
        } else {
                echo $this->GetResourceValue ( "NoReferringPages" );
        }
?>