Diff of /moodle/lib/weblib.php
Parent Directory
|
Revision Log
|
Patch
|
By samhemelryk:
moodle_url MDL-20674 Added a method to allow the dev to set the anchor attribute of a moodle_url
|
| 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 |
|
|