#87 "view all files" link does nothing

closed-fixed
nobody
None
5
2008-10-20
2008-10-13
David Carson
No

In 1.9.5, the "view all files" link on the TopicText page added a parameter fview=-1. In 1.9.6, this parameter is not there. If the switch to "view all files" mode is supposed to be achieved some other way, it does not seem to work for me. When I click this link:
- the view does not change (only one file is in view)
- the link does not go away, as it did in previous releases

Note that if I add 'fview=-1' to the URL manually, it seems to do the right thing.

Discussion

  • David Sitsky
    David Sitsky
    2008-10-16

    Strange - if the parameter is missing, it should default as if it is -1 (or what is set to $default_file_to_view in your codestriker.conf file).

    Things certainly work fine for 1.9.7-rc1, so perhaps this has been fixed by accident.

     
  • David Sitsky
    David Sitsky
    2008-10-16

    • status: open --> closed-works-for-me
     
  • Perhaps it is working as you described below -- using the setting for $default_file_to_view when no parm is specified. This does not seem correct. We set our value to 0, because we prefer, by default, to view only the first file. However, when the user clicks on "view all files" he expects this to _change_ to all files. How would the user achieve the "all files" view in 1.9.6 if $default_file_to_view is set to 0?

    Here is the config language:
    # When displaying a topic, if this value is -1, then all files in the
    # topic are displayed in the one page (default old Codestriker
    # behaviour). If the value is 0, then only the first file is shown,
    # with links to display the other files. This is useful for those
    # deployments that review a large amount of code.
    $default_file_to_view = 0;

     
  • David Sitsky
    David Sitsky
    2008-10-20

    Yep - you are right. I've fixed this with the current codebase, basically update line 180 in lib/Codestriker/Action/ViewTopic.pm from

    $vars->{'display_all_files_url'} =
    $url_builder->view_url(topicid => $topicid, projectid => $projectid, mode => $mode);

    to

    $vars->{'display_all_files_url'} =
    $url_builder->view_url(topicid => $topicid, projectid => $projectid, mode => $mode, fview => -1);

    Thanks for your report.

     
  • David Sitsky
    David Sitsky
    2008-10-20

    • status: closed-works-for-me --> closed-fixed