Changeset 1804

Show
Ignore:
Timestamp:
09/05/2011 09:14:46 AM (22 months ago)
Author:
BrianKoontz
Message:

Link function now assumes that page to be linked exists by default.
Refs #1075.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/libs/Wakka.class.php

    r1792 r1804  
    26292629         * @param       string  $title          optional: 
    26302630         * @param       string  $class          optional: 
     2631         * @param   boolean $assumePageExists   optional: 
    26312632         * @return      string  an HTML hyperlink (a href) element 
    26322633         * @todo        move regexps to regexp-library          #34 
    26332634         */ 
    2634         function Link($tag, $handler='', $text='', $track=TRUE, $escapeText=TRUE, $title='', $class='') 
     2635        function Link($tag, $handler='', $text='', $track=TRUE, $escapeText=TRUE, $title='', $class='', $assumePageExists=TRUE) 
    26352636        { 
    26362637                // init 
     
    26892690                                $this->TrackLinkTo($tag); 
    26902691                        } 
    2691                         if (!$this->existsPage($tag)) 
     2692                        if (!$assumePageExists && !$this->existsPage($tag)) 
    26922693                        { 
    26932694                                $link = '<a class="missingpage" href="'.$this->Href('edit', $tag).'" title="'.T_("Create this page").'">'.$text.'</a>';