3131using Telerik . Web . Mvc ;
3232using SmartStore . Services . Common ;
3333using SmartStore . Core . Domain . Common ;
34+ using System . Reflection ;
3435
3536namespace SmartStore . Admin . Controllers
3637{
@@ -54,14 +55,14 @@ public class CommonController : AdminControllerBase
5455 private readonly IStoreContext _storeContext ;
5556 private readonly IPermissionService _permissionService ;
5657 private readonly ILocalizationService _localizationService ;
57- private readonly IImageCache _imageCache ; // codehint: sm-add
58- private readonly SecuritySettings _securitySettings ; // codehint: sm-add
59- private readonly ITypeFinder _typeFinder ; // codehint: sm-add
60- private readonly IPluginFinder _pluginFinder ; // codehint: sm-add
61- private readonly IGenericAttributeService _genericAttributeService ; // codehint: sm-add
62- private readonly IDbContext _dbContext ; // codehint: sm-add
58+ private readonly IImageCache _imageCache ;
59+ private readonly SecuritySettings _securitySettings ;
60+ private readonly ITypeFinder _typeFinder ;
61+ private readonly IPluginFinder _pluginFinder ;
62+ private readonly IGenericAttributeService _genericAttributeService ;
63+ private readonly IDbContext _dbContext ;
6364
64- private readonly static object _lock = new object ( ) ; // codehint: sm-add
65+ private readonly static object _lock = new object ( ) ;
6566
6667 #endregion
6768
@@ -104,12 +105,12 @@ public CommonController(IPaymentService paymentService,
104105 this . _storeContext = storeContext ;
105106 this . _permissionService = permissionService ;
106107 this . _localizationService = localizationService ;
107- this . _imageCache = imageCache ; // codehint: sm-add
108- this . _securitySettings = securitySettings ; // codehint: sm-add
109- this . _typeFinder = typeFinder ; // codehint: sm-add
110- this . _pluginFinder = pluginFinder ; // codehint: sm-add
111- this . _genericAttributeService = genericAttributeService ; // codehint: sm-add
112- this . _dbContext = dbContext ; // codehint: sm-add
108+ this . _imageCache = imageCache ;
109+ this . _securitySettings = securitySettings ;
110+ this . _typeFinder = typeFinder ;
111+ this . _pluginFinder = pluginFinder ;
112+ this . _genericAttributeService = genericAttributeService ;
113+ this . _dbContext = dbContext ;
113114 }
114115
115116 #endregion
@@ -283,6 +284,7 @@ public ActionResult SystemInfo()
283284 {
284285 var model = new SystemInfoModel ( ) ;
285286 model . AppVersion = SmartStoreVersion . CurrentFullVersion ;
287+
286288 try
287289 {
288290 model . OperatingSystem = Environment . OSVersion . VersionString ;
@@ -298,6 +300,7 @@ public ActionResult SystemInfo()
298300 model . IsFullTrust = AppDomain . CurrentDomain . IsFullyTrusted . ToString ( ) ;
299301 }
300302 catch ( Exception ) { }
303+
301304 model . ServerTimeZone = TimeZone . CurrentTimeZone . StandardName ;
302305 model . ServerLocalTime = DateTime . Now ;
303306 model . UtcTime = DateTime . UtcNow ;
@@ -307,11 +310,25 @@ public ActionResult SystemInfo()
307310 try
308311 {
309312 var mbSize = _dbContext . SqlQuery < decimal > ( "Select Sum(size)/128.0 From sysfiles" ) . FirstOrDefault ( ) ;
310-
311313 model . DatabaseSize = Convert . ToDouble ( mbSize ) ;
312314 }
313315 catch ( Exception ) { }
314316
317+ try
318+ {
319+ if ( DataSettings . Current . IsValid ( ) )
320+ model . DataProviderFriendlyName = DataSettings . Current . ProviderFriendlyName ;
321+ }
322+ catch ( Exception ) { }
323+
324+ try
325+ {
326+ var assembly = Assembly . GetExecutingAssembly ( ) ;
327+ var fi = new FileInfo ( assembly . Location ) ;
328+ model . AppDate = fi . LastWriteTime . ToLocalTime ( ) ;
329+ }
330+ catch ( Exception ) { }
331+
315332 foreach ( var assembly in AppDomain . CurrentDomain . GetAssemblies ( ) )
316333 {
317334 model . LoadedAssemblies . Add ( new SystemInfoModel . LoadedAssembly ( )
@@ -534,7 +551,7 @@ public ActionResult Maintenance()
534551 model . DeleteGuests . EndDate = DateTime . UtcNow . AddDays ( - 7 ) ;
535552 model . DeleteGuests . OnlyWithoutShoppingCart = true ;
536553
537- // image cache stats (codehint: sm-add)
554+ // image cache stats
538555 long imageCacheFileCount = 0 ;
539556 long imageCacheTotalSize = 0 ;
540557 _imageCache . CacheStatistics ( out imageCacheFileCount , out imageCacheTotalSize ) ;
0 commit comments