Indefero

Indefero Commit Details


Date:2008-11-15 04:47:09 (16 years 1 month ago)
Author:Loic d'Anterroches
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:8336dd6549ddb35ed94aaf84ca08c99a4f125b03
Parents: c044e99960aaa68c9ca31912ab6ed75a97a4d2a6
Message:Updated to make the timeline follow the access rules.

Changes:

File differences

src/IDF/Views/Project.php
6666
6767
6868
69
70
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
7188
7289
7390
$pag = new IDF_Timeline_Paginator(new IDF_Timeline());
$pag->class = 'recent-issues';
$pag->item_extra_props = array('request' => $request);
$pag->summary = __('This table shows the project timeline.');
$pag->forced_where = new Pluf_SQL('project=%s', array($prj->id));
$pag->summary = __('This table shows the project updates.');
// Need to check the rights
$rights = array();
if (true === IDF_Precondition::accessSource($request)) {
$rights[] = '\'IDF_Commit\'';
}
if (true === IDF_Precondition::accessIssues($request)) {
$rights[] = '\'IDF_Issue\'';
$rights[] = '\'IDF_IssueComment\'';
}
if (true === IDF_Precondition::accessDownloads($request)) {
$rights[] = '\'IDF_Upload\'';
}
if (count($rights) == 0) {
$rights[] = '\'IDF_Dummy\'';
}
$sql = sprintf('model_class IN (%s)', implode(', ', $rights));
$pag->forced_where = new Pluf_SQL('project=%s AND '.$sql,
array($prj->id));
$pag->sort_order = array('creation_dtime', 'ASC');
$pag->sort_reverse_order = array('creation_dtime');
$pag->action = array('IDF_Views_Project::timeline', array($prj->shortname));

Archive Download the corresponding diff file

Page rendered in 0.08056s using 13 queries.