The "scan for releases" featuer should scan releases for all artifacts types (not just *.zip and *.tar.gz) but others, for example *.pdf (for document based projects) etc. Please see patch for DRUPAL-4-6 branch attached.

Comments

rgladwell’s picture

StatusFileSize
new1.12 KB

Please ignore last patch: it includes debugging code. Please use latest patch (attached).

rgladwell’s picture

StatusFileSize
new2.6 KB

Added cumulative patch (attached) to display all new releases discovered during release scan process for clarity.

rgladwell’s picture

StatusFileSize
new2.62 KB

Updated code style as per IRC chat:

killes_ + if(!$projects) { <== should have a space before (
killes_ + } else { <== we write }\nelse {
killes_ + $output = $output." - no releases found."; <== we'd use single quotes, but also the text must be translatable.
rgladwell’s picture

StatusFileSize
new2.62 KB

Latest update with all strings translated.

pfaocle’s picture

Title: Scan releases for all artifacts types (not just *.zip and *.tar.gz) » Scan releases for all file types, or have optional list?
Version: 4.6.x-1.x-dev » x.y.z

Should a list of support release file types be configurable?

pfaocle’s picture

Status: Needs review » Needs work

Lines:

+    $output .= theme('item_list', $releases, t('Releases found'));
+  }
+  print theme('page', $output);
 }

should be:

+    $output .= theme('item_list', $releases, t('Releases found'));
+  }
+  return $output;
 }
jorditr’s picture

Category: feature » bug
Priority: Normal » Critical

Hi. I've manually (and carefully) added that patch to my release.inc file and I got some troubles. It detects other files other than *.zip and *.tar.gz (*.pdf for example), so it works, but the /admin/settings/project/reload drops a white screen, no menus, nothing. Back to the project page it lists as last released file the proper one, so the process of scanning the release directory and that produced the white screen is right, it has been done.

Probably as a side effect the "View older releases" links drops a white screen instead of listing the files as properly done on the drupal.org site. Any ideas?

PS.: I'm working on drupal 4.6.6

jorditr’s picture

After digging for a while on some posts I've manage to correct it with this small change on the release.inc file:

@@ about line 260

$output .= theme('box', l(t('%project %version', array('%project' => $project->title, '%version' => $release->version)), 'node/'. $project->nid .'/release', array('id' => 'version-'. $release->version), NULL, 'version-'. $release->version), project_release_view($release, $project));
}
- return $output;
+ print theme('page', form($output));
}
}

jorditr’s picture

After digging for a while on some posts I've manage to correct it with this small change on the release.inc file:

@@ about line 260

      $output .= theme('box', l(t('%project %version', array('%project' => $project->title, '%version' => $release->version)), 'node/'. $project->nid .'/release', array('id' => 'version-'. $release->version), NULL, 'version-'. $release->version), project_release_view($release, $project)); 
    }
-  return $output;
+    print theme('page', form($output));
  }
}
pfaocle’s picture

 -  return $output;
+    print theme('page', form($output));

Careful now - to me that looks like you're using a CVS version of the project module with Drupal 4.6.x: 4.6 callbacks print the page output directly, whilst 4.7 callbacks return the output.

If you want the new features/fixes in project module, I'd upgrade the site base to 4.7.0-beta6.

jorditr’s picture

Hi paul and thanks for your advise. Nevertheless the project module had small details that didn't worked for me. One was that one and I solved it with that. Now works and that's good. I've customized other small details since I sincerely doubt that the project.module made public here was properly tested, is difficult to believe that was the same one working on the drupal site.

Regarding to go to 4.7 it's completelly impossible by now, there are no enough modules translated to 4.7 among the ones I'm using. I can't bypass those functionallities, but what is certain is that I'm eager to go 4.7 so I'll do it as soon as I can :-)

dww’s picture

Version: x.y.z » 4.7.x-2.x-dev
Assigned: Unassigned » dww
Status: Needs work » Fixed

now fixed by the new release system and releases-as-nodes with arbitrary file upload.

Anonymous’s picture

Status: Fixed » Closed (fixed)