Fixed to correctly update the git daemon export flag as needed.

This commit is contained in:
Loic d'Anterroches
2009-01-20 17:31:55 +01:00
parent 8cfc5ec026
commit 5d3ce34c4b
3 changed files with 20 additions and 0 deletions

View File

@@ -57,6 +57,17 @@ class IDF_Plugin_SyncGit_Cron
file_put_contents($authorized_keys, $out, LOCK_EX);
}
/**
* Mark export of git repositories for the daemon.
*/
public static function markExport()
{
foreach (Pluf::factory('IDF_Project')->getList() as $project) {
$rep = sprintf(Pluf::f('git_repositories'), $project->shortname);
IDF_Plugin_SyncGit_Serve::setGitExport($project->shortname, $rep);
}
}
/**
* Check if a sync is needed.
*
@@ -66,6 +77,7 @@ class IDF_Plugin_SyncGit_Cron
if (file_exists(Pluf::f('idf_plugin_syncgit_sync_file'))) {
@unlink(Pluf::f('idf_plugin_syncgit_sync_file'));
self::sync();
self::markExport();
}
}
}