MDL-21235 new action_link fixed

This commit is contained in:
Petr Skoda
2010-01-15 09:01:59 +00:00
parent 99eaca9d3d
commit f14b641b91
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -308,7 +308,7 @@ class action_link implements renderable {
public function __construct(moodle_url $url, $text, component_action $action=null, array $attributes=null) {
$this->url = clone($url);
$this->text = $text;
if ($actions) {
if ($action) {
$this->add_action($action);
}
}
+2 -2
View File
@@ -932,7 +932,7 @@ class core_renderer extends renderer_base {
}
$link = new action_link($url, $text, $action, $attributes);
$this->render($link);
return $this->render($link);
}
/**
@@ -954,7 +954,7 @@ class core_renderer extends renderer_base {
$attributes['href'] = $link->url;
if ($link->actions) {
if (empty($attributes[$id])) {
if (empty($attributes['id'])) {
$id = html_writer::random_id('action_link');
$attributes['id'] = $id;
} else {