Browse Source

Fixed summing of file sizes in transparency

tags/2.0.3
Teknikode 4 years ago
parent
commit
862ccf987e

+ 4
- 0
Teknik/Areas/About/Views/About/Index.cshtml View File

@@ -49,6 +49,10 @@
<input type="text" class="form-control" name="bitcoin_address" value="@Model.Config.BitcoinAddress" readonly>
</div>
<br />
<a href="https://www.bountysource.com/teams/teknik">
<button type="button" class="btn btn-default">Support us on Bounty Source</button>
</a>
<br />
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MBG93VKQ343P4">
<button type="button" class="btn btn-default">Paypal Donation</button>
</a>

+ 1
- 1
Teknik/Areas/Transparency/Controllers/TransparencyController.cs View File

@@ -21,7 +21,7 @@ namespace Teknik.Areas.Transparency.Controllers

Upload.Models.Upload upload = db.Uploads.OrderByDescending(u => u.UploadId).FirstOrDefault();
model.UploadCount = (upload != null) ? upload.UploadId : 0;
model.UploadSize = (upload != null) ? db.Uploads.Sum(u => u.ContentLength) : 0;
model.UploadSize = (upload != null) ? db.Uploads.Sum(u => (long)u.ContentLength) : 0;

Paste.Models.Paste paste = db.Pastes.OrderByDescending(p => p.PasteId).FirstOrDefault();
model.PasteCount = (paste != null) ? paste.PasteId : 0;

+ 1
- 1
Teknik/Areas/Transparency/ViewModels/TransparencyViewModel.cs View File

@@ -12,7 +12,7 @@ namespace Teknik.Areas.Transparency.ViewModels
{
public int UploadCount { get; set; }

public int UploadSize { get; set; }
public long UploadSize { get; set; }

public int PasteCount { get; set; }


+ 3
- 0
Teknik/Teknik.csproj View File

@@ -562,6 +562,9 @@
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Service References\" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>

Loading…
Cancel
Save