Closed (won't fix)
Project:
Localization server
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
12 Aug 2009 at 05:34 UTC
Updated:
15 Jan 2010 at 16:19 UTC
Gabor,
function l10n_drupalorg_scan($automated = FALSE) (l10n_drupalorg.admin.inc, line 44) scan the last release of a given project. but not only the release might not be the lastest one (it should prioritize D6 than scan D5 right?) but also the release might be already scanned. This slightly modified version corrects these 2 mistakes. Its +- 7 lines changed.
function l10n_drupalorg_scan($automated = FALSE) {
include_once 'projects.inc';
include_once drupal_get_path('module', 'l10n_community') .'/extractor.inc';
// Always update full project list.
l10n_drupalorg_sync_projects();
// Pick the projects we did not update for the longest period and sync fresh release list.
$scanned = variable_get('l10n_drupalorg_limit', 1);
$result1 = db_query("SELECT * FROM {l10n_community_project} WHERE connector_module = 'l10n_drupalorg' AND status = 1 ORDER BY last_parsed ASC");
while ($project = db_fetch_object($result1) and $scanned) {
l10n_drupalorg_sync_releases($project);
// Pick the release we did not update for the longest period, and sync the tarball.
// We should only look for releases with downloads. Placeholder releases for later
// versions should not be considered.
if ($release = db_fetch_object(db_query_range("SELECT r.* FROM {l10n_community_project} p LEFT JOIN {l10n_community_release} r ON p.pid = r.pid WHERE r.last_parsed = 0 AND p.pid = %d AND r.download_link != '' ORDER BY r.title DESC", $project->pid, 0, 1))) {
$scanned--;
$result = l10n_drupalorg_sync_files($release);
if (!$automated) {
// User feedback, if not automated. Log messages are already done.
if (isset($result['error'])) {
drupal_set_message($result['error'], 'error');
}
if (isset($result['message'])) {
drupal_set_message($result['message']);
}
}
}
}
// Ensure that a Drupal page will be displayed with the messages.
return '';
}
regards,
massa
Comments
Comment #1
brmassa commentedNote: it includes thefix presented on #546754: fetch_object frequent error
Comment #2
meba commentedMassa,
please include a patch, not a changed function.
Comment #3
gábor hojtsyl10n_drupalorg is discontinued.