瀏覽代碼

Fixed untitled paste title

master
Teknikode 8 月之前
父節點
當前提交
54398fbe29
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      Teknik/Areas/Paste/Controllers/PasteController.cs

+ 1
- 1
Teknik/Areas/Paste/Controllers/PasteController.cs 查看文件

@@ -45,7 +45,7 @@ namespace Teknik.Areas.Paste.Controllers
Models.Paste paste = _dbContext.Pastes.Where(p => p.Url == url).FirstOrDefault();
if (paste != null)
{
ViewBag.Title = paste.Title + " | Pastebin";
ViewBag.Title = (string.IsNullOrEmpty(paste.Title)) ? "Untitled Paste" : paste.Title + " | Pastebin";
ViewBag.Description = "Paste your code or text easily and securely. Set an expiration, set a password, or leave it open for the world to see.";
// Increment Views
paste.Views += 1;

Loading…
取消
儲存