Merge conflict fixes
This commit is contained in:
@@ -7,19 +7,18 @@ using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Xml.Linq;
|
||||
using Umbraco.Core.Auditing;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Events;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Media;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
using Umbraco.Core.Persistence.Querying;
|
||||
using Umbraco.Core.Persistence.Repositories;
|
||||
using Umbraco.Core.Persistence.SqlSyntax;
|
||||
using Umbraco.Core.Persistence.UnitOfWork;
|
||||
using Umbraco.Core.Publishing;
|
||||
|
||||
namespace Umbraco.Core.Services
|
||||
{
|
||||
@@ -36,6 +35,7 @@ namespace Umbraco.Core.Services
|
||||
private readonly EntityXmlSerializer _entitySerializer = new EntityXmlSerializer();
|
||||
private readonly IDataTypeService _dataTypeService;
|
||||
private readonly IUserService _userService;
|
||||
private readonly MediaFileSystem _mediaFileSystem = FileSystemProviderManager.Current.MediaFileSystem;
|
||||
|
||||
public MediaService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory, IDataTypeService dataTypeService, IUserService userService)
|
||||
: base(provider, repositoryFactory, logger, eventMessagesFactory)
|
||||
@@ -1325,6 +1325,38 @@ namespace Umbraco.Core.Services
|
||||
}
|
||||
}
|
||||
|
||||
public Stream GetMediaFileContentStream(string filepath)
|
||||
{
|
||||
if (_mediaFileSystem.FileExists(filepath) == false)
|
||||
return null;
|
||||
try
|
||||
{
|
||||
return _mediaFileSystem.OpenFile(filepath);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null; // deal with race conds
|
||||
}
|
||||
}
|
||||
|
||||
public void SetMediaFileContent(string filepath, Stream stream)
|
||||
{
|
||||
_mediaFileSystem.AddFile(filepath, stream, true);
|
||||
}
|
||||
|
||||
public void DeleteMediaFile(string filepath)
|
||||
{
|
||||
_mediaFileSystem.DeleteFile(filepath, true);
|
||||
}
|
||||
|
||||
public void GenerateThumbnails(string filepath, PropertyType propertyType)
|
||||
{
|
||||
using (var filestream = _mediaFileSystem.OpenFile(filepath))
|
||||
{
|
||||
_mediaFileSystem.GenerateThumbnails(filestream, filepath, propertyType);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hack: This is used to fix some data if an entity's properties are invalid/corrupt
|
||||
/// </summary>
|
||||
|
||||
@@ -332,6 +332,10 @@ namespace Umbraco.Web.Editors
|
||||
"tagApiBaseUrl", Url.GetUmbracoApiServiceBaseUrl<TagsController>(
|
||||
controller => controller.GetAllTags(null))
|
||||
},
|
||||
{
|
||||
"templateApiBaseUrl", Url.GetUmbracoApiServiceBaseUrl<TemplateController>(
|
||||
controller => controller.GetById(0))
|
||||
},
|
||||
{
|
||||
"memberTreeBaseUrl", Url.GetUmbracoApiServiceBaseUrl<MemberTreeController>(
|
||||
controller => controller.GetNodes("-1", null))
|
||||
@@ -360,6 +364,10 @@ namespace Umbraco.Web.Editors
|
||||
"healthCheckBaseUrl", Url.GetUmbracoApiServiceBaseUrl<HealthCheckController>(
|
||||
controller => controller.GetAllHealthChecks())
|
||||
},
|
||||
{
|
||||
"templateQueryApiBaseUrl", Url.GetUmbracoApiServiceBaseUrl<TemplateQueryController>(
|
||||
controller => controller.PostTemplateQuery(null))
|
||||
},
|
||||
{
|
||||
"codeFileApiBaseUrl", Url.GetUmbracoApiServiceBaseUrl<CodeFileController>(
|
||||
controller => controller.GetByPath("", ""))
|
||||
|
||||
@@ -97,6 +97,13 @@ namespace Umbraco.Web.Editors
|
||||
var dictionary = new Dictionary<string, object>();
|
||||
//add the files if any
|
||||
var files = contentItem.UploadedFiles.Where(x => x.PropertyAlias == property.Alias).ToArray();
|
||||
if (files.Length > 0)
|
||||
{
|
||||
dictionary.Add("files", files);
|
||||
// add extra things needed to figure out where to put the files
|
||||
dictionary.Add("cuid", contentItem.PersistedContent.Key);
|
||||
dictionary.Add("puid", dboProperty.PropertyType.Key);
|
||||
}
|
||||
|
||||
foreach (var file in files)
|
||||
file.FileName = file.FileName.ToSafeFileName();
|
||||
|
||||
@@ -133,6 +133,10 @@
|
||||
<Reference Include="Microsoft.AspNet.Identity.Owin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Identity.Owin.2.2.1\lib\net45\Microsoft.AspNet.Identity.Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNet.SignalR.Core, Version=2.2.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.SignalR.Core.2.2.1\lib\net45\Microsoft.AspNet.SignalR.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
|
||||
@@ -186,6 +190,10 @@
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Threading.Tasks.Dataflow, Version=4.6.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Dataflow.4.6.0\lib\netstandard1.1\System.Threading.Tasks.Dataflow.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Abstractions">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
@@ -277,6 +285,7 @@
|
||||
<Compile Include="Editors\EditorValidationResolver.cs" />
|
||||
<Compile Include="Editors\EditorValidator.cs" />
|
||||
<Compile Include="Editors\GravatarController.cs" />
|
||||
<Compile Include="Editors\TemplateController.cs" />
|
||||
<Compile Include="Editors\CodeFileController.cs" />
|
||||
<Compile Include="HealthCheck\Checks\Config\AbstractConfigCheck.cs" />
|
||||
<Compile Include="HealthCheck\Checks\Config\AcceptableConfiguration.cs" />
|
||||
@@ -328,11 +337,13 @@
|
||||
<Compile Include="Models\ContentEditing\PropertyGroupBasic.cs" />
|
||||
<Compile Include="Models\ContentEditing\PropertyTypeBasic.cs" />
|
||||
<Compile Include="Models\ContentEditing\SimpleNotificationModel.cs" />
|
||||
<Compile Include="Models\ContentEditing\TemplateDisplay.cs" />
|
||||
<Compile Include="Models\LocalPackageInstallModel.cs" />
|
||||
<Compile Include="Models\Mapping\CodeFileDisplayMapper.cs" />
|
||||
<Compile Include="Models\Mapping\ContentTypeModelMapperExtensions.cs" />
|
||||
<Compile Include="Models\Mapping\LockedCompositionsResolver.cs" />
|
||||
<Compile Include="Models\Mapping\PropertyGroupDisplayResolver.cs" />
|
||||
<Compile Include="Models\Mapping\TemplateModelMapper.cs" />
|
||||
<Compile Include="Models\PackageInstallResult.cs" />
|
||||
<Compile Include="Models\ContentEditing\CodeFileDisplay.cs" />
|
||||
<Compile Include="Models\SetPasswordModel.cs" />
|
||||
@@ -504,7 +515,6 @@
|
||||
<Compile Include="Install\Controllers\InstallApiController.cs" />
|
||||
<Compile Include="Install\Controllers\InstallController.cs" />
|
||||
<Compile Include="Install\InstallAuthorizeAttribute.cs" />
|
||||
<Compile Include="MediaPropertyExtensions.cs" />
|
||||
<Compile Include="Models\ContentEditing\EntityTypeSearchResult.cs" />
|
||||
<Compile Include="Models\ContentEditing\ListViewAwareContentItemDisplayBase.cs" />
|
||||
<Compile Include="Models\ContentEditing\PropertyTypeValidation.cs" />
|
||||
@@ -2208,6 +2218,7 @@
|
||||
<CachedSettingsPropName>umbraco_org_umbraco_update_CheckForUpgrade</CachedSettingsPropName>
|
||||
</WebReferenceUrl>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets')">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v11.0</VSToolsPath>
|
||||
|
||||
Reference in New Issue
Block a user