patch warning in download classification
This commit is contained in:
parent
0f6cabe3ee
commit
20d9ea66e5
@ -44,7 +44,7 @@ class CProject {
|
||||
$this->longdesc = file_get_contents($this->dir.'README.txt');
|
||||
$this->longdesc = str_replace("\r", "", $this->longdesc); // filter windows CR
|
||||
$this->longdesc = preg_replace("~[\s\t]*$~s", "", $this->longdesc); // filter trailing spaces at line endings
|
||||
|
||||
|
||||
// Guess 'last update' time
|
||||
if (preg_match('~\n(\d\d\d\d-\d\d-\d\d)~', $this->longdesc, $matches)) {
|
||||
// Use first date entry (assumed to be a CHANGELOG)
|
||||
@ -176,14 +176,14 @@ class CProject {
|
||||
// be assigned to the newest (topmost) entry
|
||||
$found_idx = [];
|
||||
$render_per_tag = [];
|
||||
foreach(array_keys($known_tags) as $tagname) {
|
||||
$render_per_tag[$tagname] = [];
|
||||
}
|
||||
foreach($this->downloads as $idx => $filename) {
|
||||
foreach(array_keys($known_tags) as $tagname) {
|
||||
if (stripos($filename, $tagname) !== false) {
|
||||
$found_idx[$idx] = $tagname;
|
||||
|
||||
if (! isset($render_per_tag[$tagname])) {
|
||||
$render_per_tag[$tagname] = [];
|
||||
}
|
||||
$render_per_tag[$tagname][$idx] = $filename;
|
||||
break; // next file
|
||||
}
|
||||
|
Reference in New Issue
Block a user