mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 10:54:50 +08:00
Merge
--HG-- branch : 1.x
This commit is contained in:
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
@@ -93,6 +93,8 @@
|
|||||||
<Compile Include="ViewModels\PackagingSourcesViewModel.cs" />
|
<Compile Include="ViewModels\PackagingSourcesViewModel.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Content Include="Content\Images\imagePlaceholder.png" />
|
||||||
|
<Content Include="Content\Images\moduleDefaultIcon.png" />
|
||||||
<Content Include="Module.txt" />
|
<Content Include="Module.txt" />
|
||||||
<Content Include="Service References\GalleryServer\Reference.datasvcmap">
|
<Content Include="Service References\GalleryServer\Reference.datasvcmap">
|
||||||
<Generator>DataServiceClientGenerator</Generator>
|
<Generator>DataServiceClientGenerator</Generator>
|
||||||
@@ -145,9 +147,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Service References\GalleryServer\service.edmx" />
|
<Content Include="Service References\GalleryServer\service.edmx" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="Content\Images\" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
@@ -65,6 +65,19 @@ namespace Orchard.Packaging.Services {
|
|||||||
private static PackagingEntry CreatePackageEntry(PublishedPackage package, PackagingSource source, Uri downloadUri) {
|
private static PackagingEntry CreatePackageEntry(PublishedPackage package, PackagingSource source, Uri downloadUri) {
|
||||||
PublishedScreenshot firstScreenshot = package.Screenshots.FirstOrDefault();
|
PublishedScreenshot firstScreenshot = package.Screenshots.FirstOrDefault();
|
||||||
|
|
||||||
|
Uri iconUrl = null;
|
||||||
|
if (!string.IsNullOrEmpty(package.IconUrl)) {
|
||||||
|
if (!Uri.TryCreate(package.IconUrl, UriKind.Absolute, out iconUrl)) {
|
||||||
|
Uri.TryCreate(
|
||||||
|
new Uri(string.Format("{0}://{1}:{2}/",
|
||||||
|
downloadUri.Scheme,
|
||||||
|
downloadUri.Host,
|
||||||
|
downloadUri.Port)),
|
||||||
|
package.IconUrl,
|
||||||
|
out iconUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return new PackagingEntry {
|
return new PackagingEntry {
|
||||||
Title = string.IsNullOrWhiteSpace(package.Title) ? package.Id : package.Title,
|
Title = string.IsNullOrWhiteSpace(package.Title) ? package.Id : package.Title,
|
||||||
PackageId = package.Id,
|
PackageId = package.Id,
|
||||||
@@ -75,7 +88,7 @@ namespace Orchard.Packaging.Services {
|
|||||||
Description = package.Description,
|
Description = package.Description,
|
||||||
Authors = package.Authors,
|
Authors = package.Authors,
|
||||||
LastUpdated = package.LastUpdated,
|
LastUpdated = package.LastUpdated,
|
||||||
IconUrl = package.IconUrl,
|
IconUrl = iconUrl != null ? iconUrl.ToString() : string.Empty,
|
||||||
FirstScreenshot = firstScreenshot != null ? firstScreenshot.ScreenshotUri : string.Empty,
|
FirstScreenshot = firstScreenshot != null ? firstScreenshot.ScreenshotUri : string.Empty,
|
||||||
Rating = package.Rating,
|
Rating = package.Rating,
|
||||||
RatingsCount = package.RatingsCount
|
RatingsCount = package.RatingsCount
|
||||||
|
Reference in New Issue
Block a user