Indefero

Indefero Commit Details


Date:2008-12-05 07:55:11 (16 years 17 days 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:e208a3e1eb50d0f1bf24b6ecaf23e237029fe447
Parents: 6c5da013193a225966443bc077bbbf61c0659aff
Message:Fixed to be usable outside of a request context.

Changes:

File differences

src/IDF/Scm.php
8787
8888
8989
90
90
9191
9292
93
93
9494
95
95
9696
9797
98
98
9999
100100
101101
* Sync the changes in the repository with the timeline.
*
*/
public static function syncTimeline($request)
public static function syncTimeline($project)
{
$cache = Pluf_Cache::factory();
$key = 'IDF_Scm:'.$request->project->shortname.':lastsync';
$key = 'IDF_Scm:'.$project->shortname.':lastsync';
if (null === ($res=$cache->get($key))) {
$scm = IDF_Scm::get($request->project);
$scm = IDF_Scm::get($project);
foreach ($scm->getBranches() as $branche) {
foreach ($scm->getChangeLog($branche, 25) as $change) {
IDF_Commit::getOrAdd($change, $request->project);
IDF_Commit::getOrAdd($change, $project);
}
}
$cache->set($key, true, (int)(Pluf::f('cache_timeout', 300)/2));
src/IDF/Views/Project.php
7979
8080
8181
82
82
8383
8484
8585
......
156156
157157
158158
159
159
160160
161161
162162
$rights = array();
if (true === IDF_Precondition::accessSource($request)) {
$rights[] = '\'IDF_Commit\'';
IDF_Scm::syncTimeline($request);
IDF_Scm::syncTimeline($request->project);
}
if (true === IDF_Precondition::accessIssues($request)) {
$rights[] = '\'IDF_Issue\'';
$rights = array();
if (true === IDF_Precondition::accessSource($request)) {
$rights[] = '\'IDF_Commit\'';
IDF_Scm::syncTimeline($request);
IDF_Scm::syncTimeline($request->project);
}
if (true === IDF_Precondition::accessIssues($request)) {
$rights[] = '\'IDF_Issue\'';

Archive Download the corresponding diff file

Page rendered in 0.08160s using 13 queries.