Skip to content

Commit

Permalink
MDL-21235 minor docs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Jan 14, 2010
1 parent 4871a23 commit 11820ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/outputcomponents.php
Expand Up @@ -303,7 +303,7 @@ class action_link implements renderable {
* @param string|moodle_url $url
* @param string $text HTML fragment
* @param component_action $action
* @param array $options associative array form attributes + {disabled, title}
* @param array $attributes associative array of html link attributes + disabled
*/
public function __construct(moodle_url $url, $text, component_action $action=null, array $attributes=null) {
$this->url = clone($url);
Expand Down
7 changes: 4 additions & 3 deletions lib/outputrenderers.php
Expand Up @@ -923,7 +923,7 @@ public function link($link_or_url, $text = null, array $options = null) {
* @param string|moodle_url $url
* @param string $text HTML fragment
* @param component_action $action
* @param array $options associative array form attributes + {disabled, title}
* @param array $attributes associative array of html link attributes + disabled
* @return HTML fragment
*/
public function action_link($url, $text, component_action $action, array $attributes=null) {
Expand All @@ -948,6 +948,7 @@ protected function render_action_link(action_link $link) {
// do not use div here due to nesting restriction in xhtml strict
return html_writer::tag('span', $link->text, array('class'=>'currentlink'));
}

$attributes = $link->attributes;
unset($link->attributes['disabled']);
$attributes['href'] = $link->url;
Expand Down Expand Up @@ -986,7 +987,7 @@ protected function render_action_link(action_link $link) {
*/
public function confirm($message, $continue, $cancel) {
if ($continue instanceof single_button) {
$continue = clone($continue);
// ok
} else if (is_string($continue)) {
$continue = new single_button(new moodle_url($continue), get_string('continue'), 'post');
} else if ($continue instanceof moodle_url) {
Expand All @@ -996,7 +997,7 @@ public function confirm($message, $continue, $cancel) {
}

if ($cancel instanceof single_button) {
$cancel = clone($cancel);
// ok
} else if (is_string($cancel)) {
$cancel = new single_button(new moodle_url($cancel), get_string('cancel'), 'get');
} else if ($cancel instanceof moodle_url) {
Expand Down

0 comments on commit 11820ba

Please sign in to comment.