Indefero

Indefero Commit Details


Date:2011-03-15 16:54:35 (13 years 9 months ago)
Author:Thomas Keller
Branch: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, release-1.1, release-1.2, release-1.3
Commit:8631529268407e16fad6725caa009a196077d7c3
Parents: 867c3d3382d474fb2f7fae4362c774f2e1b59341
Message:Re-enable v1.0 URI compatibility wrt update feeds.

The additional filter token introduced 404's for bookmarked feeds;
now the old URLs are re-added and their actions forward the requests
to the new handlers.
Another small change removes a double assignment and puts the
"All Updates" link in the template on top to separate it clearly
from the other filters.

This commit closes issue 605.
Changes:

File differences

src/IDF/Views/Project.php
122122
123123
124124
125
126
127
128
129
130
131
132
133
134
135
125136
126137
127138
......
179190
180191
181192
193
194
195
196
197
198
199
200
201
202
203
182204
183205
184206
......
192214
193215
194216
195
196217
197218
198219
}
/**
* This action serves as URI compatibility layer for v1.0.
*
* @deprecated
*/
public function timelineCompat($request, $match)
{
$match[2] = 'all';
return $this->timeline($request, $match);
}
/**
* Timeline of the project.
*/
public $timeline_precond = array('IDF_Precondition::baseAccess');
}
/**
* This action serves as URI compatibility layer for v1.0.
*
* @deprecated
*/
public function timelineFeedCompat($request, $match)
{
$match[2] = 'all';
return $this->timelineFeed($request, $match);
}
/**
* Timeline feed.
*
* A custom view to have a bit more control on the way to handle
$prj = $request->project;
$model_filter = @$match[2];
$model_filter = @$match[2];
$all_model_filters = self::getAvailableModelFilters();
if (!array_key_exists($model_filter, $all_model_filters)) {
$model_filter = 'all';
src/IDF/conf/urls.php
9191
9292
9393
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
94111
95112
96113
......
145162
146163
147164
148
165
149166
150167
151168
152169
153
170
154171
155172
156173
'method' => 'timelineFeed',
'name' => 'idf_project_timeline_feed_auth');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/timeline/$#',
'base' => $base,
'model' => 'IDF_Views_Project',
'method' => 'timelineCompat');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/feed/timeline/$#',
'base' => $base,
'model' => 'IDF_Views_Project',
'method' => 'timelineFeedCompat',
'name' => 'idf_project_timeline_feed');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/feed/timeline/token/(.*)/$#',
'base' => $base,
'model' => 'IDF_Views_Project',
'method' => 'timelineFeedCompat',
'name' => 'idf_project_timeline_feed_auth');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/$#',
'base' => $base,
'model' => 'IDF_Views_Issue',
'base' => $base,
'model' => 'IDF_Views_Issue',
'method' => 'watchList');
$ctl[] = array('regex' => '#^/watchlist/(\w+)$#',
'base' => $base,
'model' => 'IDF_Views_Issue',
'method' => 'forgeWatchList');
// ---------- SCM ----------------------------------------
$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/help/$#',
src/IDF/templates/idf/project/timeline.html
1313
1414
1515
16
1617
1718
19
1820
21
1922
2023
2124
{/block}
{block context}
<p><span class="label{if 'all' == $model_filter} active{/if}"><a href="{url 'IDF_Views_Project::timeline', array($project.shortname, 'all')}">{trans 'All Updates'}</a></span></p>
<p><strong>{trans 'Filter by type'}</strong><br />
{foreach $all_model_filters as $filter_key => $filter_name}
{if $filter_key != 'all'}
<span class="label{if $filter_key == $model_filter} active{/if}"><a href="{url 'IDF_Views_Project::timeline', array($project.shortname, $filter_key)}">{$filter_name}</a></span><br />
{/if}
{/foreach}
</p>
{/block}

Archive Download the corresponding diff file

Page rendered in 0.08923s using 14 queries.