Skip to content

Commit

Permalink
don't unset action on labels from getSelectedLabel
Browse files Browse the repository at this point in the history
Now, that we're using objects, here we modify the reference to the object, so we
should define if we do not want $action data member on VersioncontrolLabel
object.

For example, following commitlog_operation():
    - see how operation object changes after calling theme_commitlog_operation_items():
        - which calls theme_commitlog_item():
            - which calls versioncontrol_get_url_item_log_view():
                - which calls VerisoncontrolItem::getSelectedLabel():
                    - which unset action data member
    - and then on theme_commitlog_operation_caption():
        - we use VersioncontrolLabel action data member already unset before, so
          it fail at build correctly the $labels_by_type array and then no
          branches are shown

So, this in an attempt after 2 days looking for the problem of avoiding 2
notices! :p
  • Loading branch information
marvil07 committed Jul 7, 2009
1 parent e199f0c commit 0bfc909
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/VersioncontrolItem.php
Expand Up @@ -473,7 +473,8 @@ public function getSelectedLabel() {
// Just to make sure that we only pass applicable info:
// 'action' might make sense in an operation, but not in an item array.
if (isset($selected_label->action)) {
unset($selected_label->action);
//FIXME we are returning a label here, not an item; so, is it ok to have an action on label?
// unset($selected_label->action);
}
$selected_label->ensure();
$this->selected_label->label = $selected_label;
Expand Down

0 comments on commit 0bfc909

Please sign in to comment.