[moodle] / moodle / lib / weblib.php Repository:

Diff of /moodle/lib/weblib.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1344, Tue Oct 13 14:45:38 2009 WST revision 1.1345, Fri Oct 30 14:20:59 2009 WST

By samhemelryk:

moodle_url MDL-20674 Added a method to allow the dev to set the anchor attribute of a moodle_url

# Line 548  Line 548 
548    
549          return true;          return true;
550      }      }
551    
552        /**
553         * Sets the anchor for the URI (the bit after the hash)
554         * @param string $anchor
555         */
556        public function set_anchor($anchor) {
557            // Match the anchor against the NMTOKEN spec
558            if (preg_match('#[a-zA-Z\_\:][a-zA-Z0-9\_\-\.\:]*#', $anchor)) {
559                $this->fragment = $anchor;
560            }
561        }
562  }  }
563    
564  /**  /**

Legend:
Removed from v.1.1344  
changed lines
  Added in v.1.1345

Moodle CVS Admin
ViewVC Help
Powered by ViewVC 1.0.7