19 Commits

Author SHA1 Message Date
Stephan ec45bfb1d5 Fix the build script so it works! 2016-12-07 17:46:02 +01:00
Sebastiaan Janssen 1e5a959f25 7.5.5 upgrade was OK after all 2016-12-07 13:48:36 +01:00
Sebastiaan Janssen e1529e7f8f Html Agility Pack binding redirect missing 2016-12-07 13:31:04 +01:00
Sebastiaan Janssen 47123a7d0a Revert "Upgrade to Umbraco 7.5.5"
This reverts commit a0f27739b7.
2016-12-07 12:59:03 +01:00
Sebastiaan Janssen a0f27739b7 Upgrade to Umbraco 7.5.5 2016-12-07 11:57:20 +01:00
Sebastiaan Janssen 93474811f1 Replace all UmbracoContext.Current.Application with ApplicationContext.Current
UmbracoContext.Current == is based on a web request, if any code executes on a background thread or non-request thread then UmbracoContext.Current is null!
2016-11-25 21:04:49 +01:00
Sebastiaan Janssen 6f50fad596 Update all SqlHelper instanced to use the umbraco.Businesslogic version and wrapped them all in usings where necessary 2016-11-25 20:54:32 +01:00
Sebastiaan Janssen 538834dcc3 Update all SqlHelper instanced to use the umbraco.Businesslogic version and wrapped them all in usings where necessary 2016-11-25 20:49:30 +01:00
Sebastiaan Janssen 389ddaabb7 Disable Hangfire to see if that's causing the memory issues 2016-11-08 11:35:48 +01:00
Sebastiaan Janssen c7d2d53902 Get the email and name differently 2016-11-07 22:38:45 +01:00
Sebastiaan Janssen 367a98be56 Hangfire wasn't too happy with System.Net.MailAddress 2016-11-07 15:35:00 +01:00
Sebastiaan Janssen 2128fb883a Refactor MarkAsSolutionReminder to be a bit more efficient 2016-11-07 12:36:28 +01:00
Sebastiaan Janssen 729da39c87 Enable sending of mail 2016-10-31 13:39:14 +01:00
Sebastiaan Janssen 7e82ea86ec Little refactor and bugfix 2016-10-30 12:47:41 +01:00
Sebastiaan Janssen ddac31b8bc Ignore Hangfire route so Umbraco doesn't pick it up 2016-10-30 12:13:27 +01:00
Sebastiaan Janssen 491b5527ae Test solution reminder notification 2016-10-30 11:57:19 +01:00
Sebastiaan Janssen e63a9d4b16 Move docs from UaaS to UCloud 2016-10-27 21:11:00 +02:00
Sebastiaan Janssen 6dac0ad4e8 OUR-426 Rename Umbraco as a Service forum to Umbraco Cloud forum
#OUR-426 Fixed
2016-10-27 21:01:52 +02:00
Sebastiaan Janssen 19a737a770 OUR-424 Update "works on UaaS" to "works on Umbraco Cloud"
#OUR-424 Fixed
2016-10-27 20:42:21 +02:00
177 changed files with 72998 additions and 71606 deletions
+1
View File
@@ -63,3 +63,4 @@ OurUmbraco.Site/[Aa]ssets/js/app.min.js
OurUmbraco.Site/App_Data/migrations/*.txt OurUmbraco.Site/App_Data/migrations/*.txt
OurUmbraco.Site/apidocs/ OurUmbraco.Site/apidocs/
OurUmbraco.Site/App_Data/Documentation/ OurUmbraco.Site/App_Data/Documentation/
OurUmbraco.Site/App_Data/NotificationTest/
+3 -3
View File
@@ -1,4 +1,4 @@
<!doctype html> <!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]--> <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]--> <!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]--> <!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
@@ -1104,8 +1104,8 @@ namespace TestProject.Controllers
<option class="features" value="1150">our.umb dev forum - Features</option> <option class="features" value="1150">our.umb dev forum - Features</option>
<option class="general" value="5668">Core - General</option> <option class="general" value="5668">Core - General</option>
<option class="4.1feedback" value="5669">Core - 4.1 feedback</option> <option class="4.1feedback" value="5669">Core - 4.1 feedback</option>
<option class="generalquestions" value="73967">Umbraco as a Service - General Questions</option> <option class="generalquestions" value="73967">Umbraco Cloud - General Questions</option>
<option class="issues" value="73968">Umbraco as a Service - Issues</option> <option class="issues" value="73968">Umbraco Cloud - Issues</option>
</select> </select>
</div> </div>
+3 -3
View File
@@ -1,4 +1,4 @@
<!doctype html> <!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]--> <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]--> <!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]--> <!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
@@ -624,8 +624,8 @@ grunt</pre>
<div class="package-compatibility-versions"> <div class="package-compatibility-versions">
<div class="versions"> <div class="versions">
<span class="smiley joyous">Umbraco as a Service (Works)</span> <span class="smiley joyous">Umbraco Cloud (Works)</span>
<span class="smiley untested">Umbraco as a Service (Not working yet)</span> <span class="smiley untested">Umbraco Cloud (Not working yet)</span>
<span class="smiley untested"> 7.2.x (untested)</span> <span class="smiley untested"> 7.2.x (untested)</span>
<span class="smiley happy"> 7.1.x (91%)</span> <span class="smiley happy"> 7.1.x (91%)</span>
<span class="smiley joyous"> 7.0.x (100%)</span> <span class="smiley joyous"> 7.0.x (100%)</span>
+44 -44
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\UmbracoCms.7.5.4\build\UmbracoCms.props" Condition="Exists('..\packages\UmbracoCms.7.5.4\build\UmbracoCms.props')" /> <Import Project="..\packages\UmbracoCms.7.5.5\build\UmbracoCms.props" Condition="Exists('..\packages\UmbracoCms.7.5.5\build\UmbracoCms.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -55,24 +55,24 @@
<HintPath>..\packages\AutoMapper.3.3.1\lib\net40\AutoMapper.Net4.dll</HintPath> <HintPath>..\packages\AutoMapper.3.3.1\lib\net40\AutoMapper.Net4.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="businesslogic, Version=1.0.6136.27244, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="businesslogic, Version=1.0.6183.23126, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\businesslogic.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\businesslogic.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="ClientDependency.Core, Version=1.9.1.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="ClientDependency.Core, Version=1.9.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ClientDependency.1.9.1\lib\net45\ClientDependency.Core.dll</HintPath> <HintPath>..\packages\ClientDependency.1.9.2\lib\net45\ClientDependency.Core.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="ClientDependency.Core.Mvc, Version=1.8.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="ClientDependency.Core.Mvc, Version=1.8.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ClientDependency-Mvc5.1.8.0.0\lib\net45\ClientDependency.Core.Mvc.dll</HintPath> <HintPath>..\packages\ClientDependency-Mvc5.1.8.0.0\lib\net45\ClientDependency.Core.Mvc.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="cms, Version=1.0.6136.27244, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="cms, Version=1.0.6183.23126, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\cms.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\cms.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="controls, Version=1.0.6136.27246, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="controls, Version=1.0.6183.23128, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\controls.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\controls.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="CookComputing.XmlRpcV2, Version=2.5.0.0, Culture=neutral, PublicKeyToken=a7d6e17aa302004d, processorArchitecture=MSIL"> <Reference Include="CookComputing.XmlRpcV2, Version=2.5.0.0, Culture=neutral, PublicKeyToken=a7d6e17aa302004d, processorArchitecture=MSIL">
@@ -87,8 +87,8 @@
<HintPath>..\packages\Examine.0.1.70.0\lib\Examine.dll</HintPath> <HintPath>..\packages\Examine.0.1.70.0\lib\Examine.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="HtmlAgilityPack, Version=1.4.9.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL"> <Reference Include="HtmlAgilityPack, Version=1.4.9.5, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.1.4.9\lib\Net45\HtmlAgilityPack.dll</HintPath> <HintPath>..\packages\HtmlAgilityPack.1.4.9.5\lib\Net45\HtmlAgilityPack.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL"> <Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
@@ -107,8 +107,8 @@
<HintPath>..\packages\UrlTracker.3.11\lib\InfoCaster.Umbraco.UrlTracker.dll</HintPath> <HintPath>..\packages\UrlTracker.3.11\lib\InfoCaster.Umbraco.UrlTracker.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="interfaces, Version=1.0.6136.27240, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="interfaces, Version=1.0.6183.23122, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\interfaces.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\interfaces.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="JsonFx, Version=2.0.1209.2802, Culture=neutral, PublicKeyToken=315052dd637f8a52, processorArchitecture=MSIL"> <Reference Include="JsonFx, Version=2.0.1209.2802, Culture=neutral, PublicKeyToken=315052dd637f8a52, processorArchitecture=MSIL">
@@ -116,7 +116,7 @@
<HintPath>..\packages\JsonFx.2.0.1209.2802\lib\net40\JsonFx.dll</HintPath> <HintPath>..\packages\JsonFx.2.0.1209.2802\lib\net40\JsonFx.dll</HintPath>
</Reference> </Reference>
<Reference Include="log4net, Version=1.2.11.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="log4net, Version=1.2.11.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\log4net.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\log4net.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Lucene.Net, Version=2.9.4.1, Culture=neutral, PublicKeyToken=85089178b9ac3181, processorArchitecture=MSIL"> <Reference Include="Lucene.Net, Version=2.9.4.1, Culture=neutral, PublicKeyToken=85089178b9ac3181, processorArchitecture=MSIL">
@@ -128,7 +128,7 @@
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.ApplicationBlocks.Data, Version=1.0.1559.20655, Culture=neutral"> <Reference Include="Microsoft.ApplicationBlocks.Data, Version=1.0.1559.20655, Culture=neutral">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\Microsoft.ApplicationBlocks.Data.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\Microsoft.ApplicationBlocks.Data.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -204,8 +204,8 @@
<HintPath>..\packages\semver.1.1.2\lib\net451\Semver.dll</HintPath> <HintPath>..\packages\semver.1.1.2\lib\net451\Semver.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="SQLCE4Umbraco, Version=1.0.6136.27245, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="SQLCE4Umbraco, Version=1.0.6183.23127, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\SQLCE4Umbraco.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\SQLCE4Umbraco.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System.Collections.Immutable, Version=1.1.36.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Collections.Immutable, Version=1.1.36.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
@@ -214,11 +214,11 @@
</Reference> </Reference>
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL"> <Reference Include="System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\System.Data.SqlServerCe.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\System.Data.SqlServerCe.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System.Data.SqlServerCe.Entity, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL"> <Reference Include="System.Data.SqlServerCe.Entity, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\System.Data.SqlServerCe.Entity.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\System.Data.SqlServerCe.Entity.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System.Net.Http" /> <Reference Include="System.Net.Http" />
@@ -282,47 +282,47 @@
<Reference Include="System.EnterpriseServices" /> <Reference Include="System.EnterpriseServices" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="TidyNet, Version=1.0.0.0, Culture=neutral"> <Reference Include="TidyNet, Version=1.0.0.0, Culture=neutral">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\TidyNet.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\TidyNet.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="umbraco, Version=1.0.6136.27248, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="umbraco, Version=1.0.6183.23129, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\umbraco.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\umbraco.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Umbraco.Core, Version=1.0.6136.27241, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Umbraco.Core, Version=1.0.6183.23123, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\Umbraco.Core.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\Umbraco.Core.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="umbraco.DataLayer, Version=1.0.6136.27243, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="umbraco.DataLayer, Version=1.0.6183.23126, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\umbraco.DataLayer.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\umbraco.DataLayer.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="umbraco.editorControls, Version=1.0.6136.27251, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="umbraco.editorControls, Version=1.0.6183.23131, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\umbraco.editorControls.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\umbraco.editorControls.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Umbraco.IdentityExtensions, Version=1.0.5779.34109, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Umbraco.IdentityExtensions, Version=1.0.5779.34109, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.IdentityExtensions.1.0.0\lib\net45\Umbraco.IdentityExtensions.dll</HintPath> <HintPath>..\packages\UmbracoCms.IdentityExtensions.1.0.0\lib\net45\Umbraco.IdentityExtensions.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="umbraco.MacroEngines, Version=1.0.6136.27252, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="umbraco.MacroEngines, Version=1.0.6183.23132, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\umbraco.MacroEngines.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\umbraco.MacroEngines.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Umbraco.ModelsBuilder, Version=3.0.4.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Umbraco.ModelsBuilder, Version=3.0.5.96, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Umbraco.ModelsBuilder.3.0.4\lib\Umbraco.ModelsBuilder.dll</HintPath> <HintPath>..\packages\Umbraco.ModelsBuilder.3.0.5\lib\Umbraco.ModelsBuilder.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="umbraco.providers, Version=1.0.6136.27246, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="umbraco.providers, Version=1.0.6183.23128, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\umbraco.providers.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\umbraco.providers.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Umbraco.Web.UI, Version=1.0.6136.27253, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Umbraco.Web.UI, Version=1.0.6183.23133, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\Umbraco.Web.UI.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\Umbraco.Web.UI.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="UmbracoExamine, Version=0.7.0.27245, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="UmbracoExamine, Version=0.7.0.23127, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\UmbracoExamine.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\UmbracoExamine.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="UrlRewritingNet.UrlRewriter, Version=2.0.7.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="UrlRewritingNet.UrlRewriter, Version=2.0.7.0, Culture=neutral, processorArchitecture=MSIL">
@@ -1707,7 +1707,6 @@
<Content Include="Views\MacroPartials\Navigation\TopNavigation.cshtml" /> <Content Include="Views\MacroPartials\Navigation\TopNavigation.cshtml" />
<Content Include="masterpages\ForumMaster.master" /> <Content Include="masterpages\ForumMaster.master" />
<Content Include="masterpages\DocumentationMaster.master" /> <Content Include="masterpages\DocumentationMaster.master" />
<Content Include="masterpages\AddMarkdownProp.master" />
<Content Include="masterpages\ComRepositoryFrontpage.master" /> <Content Include="masterpages\ComRepositoryFrontpage.master" />
<Content Include="Assets\css\fonts\icomoon\icomoon.eot" /> <Content Include="Assets\css\fonts\icomoon\icomoon.eot" />
<Content Include="Assets\css\fonts\icomoon\icomoon.ttf" /> <Content Include="Assets\css\fonts\icomoon\icomoon.ttf" />
@@ -4282,7 +4281,6 @@
<Content Include="masterpages\ManageSpam.master" /> <Content Include="masterpages\ManageSpam.master" />
<Content Include="macroScripts\ManageSpam.cshtml" /> <Content Include="macroScripts\ManageSpam.cshtml" />
<Content Include="masterpages\ProjectsVersioned.master" /> <Content Include="masterpages\ProjectsVersioned.master" />
<Content Include="macroScripts\ProjectsVersioned.cshtml" />
<Content Include="macroScripts\ProjectsVersionList.cshtml" /> <Content Include="macroScripts\ProjectsVersionList.cshtml" />
<Content Include="masterpages\ProjectCompatibility.master" /> <Content Include="masterpages\ProjectCompatibility.master" />
<Content Include="macroScripts\EditProjectCompatibility.cshtml" /> <Content Include="macroScripts\EditProjectCompatibility.cshtml" />
@@ -4409,7 +4407,9 @@
<Content Include="Views\Partials\Grid\Editors\Embed.cshtml" /> <Content Include="Views\Partials\Grid\Editors\Embed.cshtml" />
<Content Include="Views\Partials\Grid\Editors\Base.cshtml" /> <Content Include="Views\Partials\Grid\Editors\Base.cshtml" />
<Content Include="Views\Partials\Grid\Bootstrap3.cshtml" /> <Content Include="Views\Partials\Grid\Bootstrap3.cshtml" />
<Content Include="Views\Partials\Grid\Bootstrap3-Fluid.cshtml" />
<Content Include="Views\Partials\Grid\Bootstrap2.cshtml" /> <Content Include="Views\Partials\Grid\Bootstrap2.cshtml" />
<Content Include="Views\Partials\Grid\Bootstrap2-Fluid.cshtml" />
<None Include="web.Debug.config"> <None Include="web.Debug.config">
<DependentUpon>web.config</DependentUpon> <DependentUpon>web.config</DependentUpon>
</None> </None>
@@ -4482,15 +4482,15 @@
<!-- Only runs if the ClientFiles build folder doesn't yet exist --> <!-- Only runs if the ClientFiles build folder doesn't yet exist -->
<CallTarget Targets="ClientFilesBuild" Condition="!Exists('$(ProjectDir)\..\OurUmbraco.Client\build\assets')" /> <CallTarget Targets="ClientFilesBuild" Condition="!Exists('$(ProjectDir)\..\OurUmbraco.Client\build\assets')" />
</Target> </Target>
<Import Project="..\packages\AutoMapper.3.3.1\tools\AutoMapper.targets" Condition="Exists('..\packages\AutoMapper.3.3.1\tools\AutoMapper.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\packages\UmbracoCms.7.5.4\build\UmbracoCms.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\UmbracoCms.7.5.4\build\UmbracoCms.props'))" /> <Error Condition="!Exists('..\packages\UmbracoCms.7.5.5\build\UmbracoCms.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\UmbracoCms.7.5.5\build\UmbracoCms.props'))" />
<Error Condition="!Exists('..\packages\UmbracoCms.7.5.4\build\UmbracoCms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\UmbracoCms.7.5.4\build\UmbracoCms.targets'))" /> <Error Condition="!Exists('..\packages\UmbracoCms.7.5.5\build\UmbracoCms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\UmbracoCms.7.5.5\build\UmbracoCms.targets'))" />
</Target> </Target>
<Import Project="..\packages\UmbracoCms.7.5.4\build\UmbracoCms.targets" Condition="Exists('..\packages\UmbracoCms.7.5.4\build\UmbracoCms.targets')" /> <Import Project="..\packages\UmbracoCms.7.5.5\build\UmbracoCms.targets" Condition="Exists('..\packages\UmbracoCms.7.5.5\build\UmbracoCms.targets')" />
<Import Project="..\packages\AutoMapper.3.3.1\tools\AutoMapper.targets" Condition="Exists('..\packages\AutoMapper.3.3.1\tools\AutoMapper.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.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="AfterBuild"> <Target Name="AfterBuild">
@@ -4,7 +4,7 @@
if (string.IsNullOrWhiteSpace(memberGuid) == false) if (string.IsNullOrWhiteSpace(memberGuid) == false)
{ {
var memberService = UmbracoContext.Current.Application.Services.MemberService; var memberService = ApplicationContext.Current.Services.MemberService;
var member = memberService.GetByKey(new Guid(memberGuid)); var member = memberService.GetByKey(new Guid(memberGuid));
if (member == null) if (member == null)
@@ -10,5 +10,5 @@
<h4><a href="?category=@childPage.Name">@childPage.Name</a></h4> <h4><a href="?category=@childPage.Name">@childPage.Name</a></h4>
</li> </li>
} }
<li><h4><a href="?category=uaas">Umbraco as a Service</a></h4></li> <li><h4><a href="?category=uaas">Umbraco Cloud</a></h4></li>
</ul> </ul>
@@ -22,7 +22,7 @@
} }
if (category != null) if (category != null)
{ {
headline = category == "uaas" ? "Umbraco as a Service" : category.ToLowerInvariant(); headline = category == "uaas" ? "Umbraco Cloud" : category.ToLowerInvariant();
} }
var searchFilters = new SearchFilters(BooleanOperation.And); var searchFilters = new SearchFilters(BooleanOperation.And);
@@ -0,0 +1,92 @@
@inherits UmbracoViewPage<dynamic>
@using Umbraco.Web.Templates
@using Newtonsoft.Json.Linq
@*
Razor helpers located at the bottom of this file
*@
@if (Model != null && Model.sections != null)
{
var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1;
<div class="umb-grid">
@if (oneColumn)
{
foreach (var section in Model.sections) {
<div class="grid-section">
@foreach (var row in section.rows) {
@renderRow(row, true);
}
</div>
}
}else {
<div class="container-fluid">
<div class="row-fluid clearfix">
@foreach (var s in Model.sections) {
<div class="grid-section">
<div class="@("span" + s.grid) column">
@foreach (var row in s.rows) {
@renderRow(row, false);
}
</div>
</div>
}
</div>
</div>
}
</div>
}
@helper renderRow(dynamic row, bool singleColumn){
<div @RenderElementAttributes(row)>
@Umbraco.If(singleColumn, "<div class='container-fluid'>")
<div class="row-fluid clearfix">
@foreach ( var area in row.areas ) {
<div class="@("span" + area.grid) column">
<div @RenderElementAttributes(area)>
@foreach (var control in area.controls) {
if (control !=null && control.editor != null && control.editor.view != null ) {
<text>@Html.Partial("grid/editors/base", (object)control)</text>
}
}
</div>
</div>}
</div>
@Umbraco.If(singleColumn, "</div>")
</div>
}
@functions {
public static MvcHtmlString RenderElementAttributes(dynamic contentItem)
{
var attrs = new List<string>();
JObject cfg = contentItem.config;
if(cfg != null)
foreach (JProperty property in cfg.Properties())
{
var propertyValue = TemplateUtilities.CleanForXss(property.Value.ToString());
attrs.Add(property.Name + "=\"" + propertyValue + "\"");
}
JObject style = contentItem.styles;
if (style != null) {
var cssVals = new List<string>();
foreach (JProperty property in style.Properties())
{
var propertyValue = TemplateUtilities.CleanForXss(property.Value.ToString());
if (string.IsNullOrWhiteSpace(propertyValue) == false)
{
cssVals.Add(property.Name + ":" + propertyValue + ";");
}
}
if (cssVals.Any())
attrs.Add("style='" + string.Join(" ", cssVals) + "'");
}
return new MvcHtmlString(string.Join(" ", attrs));
}
}
@@ -64,19 +64,27 @@
JObject cfg = contentItem.config; JObject cfg = contentItem.config;
if(cfg != null) if(cfg != null)
foreach (JProperty property in cfg.Properties()) { foreach (JProperty property in cfg.Properties())
attrs.Add(property.Name + "=\"" + property.Value.ToString() + "\""); {
var propertyValue = TemplateUtilities.CleanForXss(property.Value.ToString());
attrs.Add(property.Name + "=\"" + propertyValue + "\"");
} }
JObject style = contentItem.styles; JObject style = contentItem.styles;
if (style != null) { if (style != null) {
var cssVals = new List<string>(); var cssVals = new List<string>();
foreach (JProperty property in style.Properties()) foreach (JProperty property in style.Properties())
cssVals.Add(property.Name + ":" + property.Value.ToString() + ";"); {
var propertyValue = TemplateUtilities.CleanForXss(property.Value.ToString());
if (string.IsNullOrWhiteSpace(propertyValue) == false)
{
cssVals.Add(property.Name + ":" + propertyValue + ";");
}
}
if (cssVals.Any()) if (cssVals.Any())
attrs.Add("style=\"" + string.Join(" ", cssVals) + "\""); attrs.Add("style=\"" + string.Join(" ", cssVals) + "\"");
} }
return new MvcHtmlString(string.Join(" ", attrs)); return new MvcHtmlString(string.Join(" ", attrs));
@@ -0,0 +1,88 @@
@inherits UmbracoViewPage<dynamic>
@using Umbraco.Web.Templates
@using Newtonsoft.Json.Linq
@*
Razor helpers located at the bottom of this file
*@
@if (Model != null && Model.sections != null)
{
var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1;
<div class="umb-grid">
@if (oneColumn)
{
foreach (var section in Model.sections) {
<div class="grid-section">
@foreach (var row in section.rows) {
@renderRow(row);
}
</div>
}
}else {
<div class="row clearfix">
@foreach (var s in Model.sections) {
<div class="grid-section">
<div class="col-md-@s.grid column">
@foreach (var row in s.rows) {
@renderRow(row);
}
</div>
</div>
}
</div>
}
</div>
}
@helper renderRow(dynamic row){
<div @RenderElementAttributes(row)>
<div class="row clearfix">
@foreach ( var area in row.areas ) {
<div class="col-md-@area.grid column">
<div @RenderElementAttributes(area)>
@foreach (var control in area.controls) {
if (control !=null && control.editor != null && control.editor.view != null ) {
<text>@Html.Partial("grid/editors/base", (object)control)</text>
}
}
</div>
</div>}
</div>
</div>
}
@functions {
public static MvcHtmlString RenderElementAttributes(dynamic contentItem)
{
var attrs = new List<string>();
JObject cfg = contentItem.config;
if(cfg != null)
foreach (JProperty property in cfg.Properties())
{
var propertyValue = TemplateUtilities.CleanForXss(property.Value.ToString());
attrs.Add(property.Name + "=\"" + propertyValue + "\"");
}
JObject style = contentItem.styles;
if (style != null) {
var cssVals = new List<string>();
foreach (JProperty property in style.Properties())
{
var propertyValue = TemplateUtilities.CleanForXss(property.Value.ToString());
if (string.IsNullOrWhiteSpace(propertyValue) == false)
{
cssVals.Add(property.Name + ":" + propertyValue + ";");
}
}
if (cssVals.Any())
attrs.Add("style='" + string.Join(" ", cssVals) + "'");
}
return new MvcHtmlString(string.Join(" ", attrs));
}
}
@@ -64,19 +64,27 @@
JObject cfg = contentItem.config; JObject cfg = contentItem.config;
if(cfg != null) if(cfg != null)
foreach (JProperty property in cfg.Properties()) { foreach (JProperty property in cfg.Properties())
attrs.Add(property.Name + "=\"" + property.Value.ToString() + "\""); {
var propertyValue = TemplateUtilities.CleanForXss(property.Value.ToString());
attrs.Add(property.Name + "=\"" + propertyValue + "\"");
} }
JObject style = contentItem.styles; JObject style = contentItem.styles;
if (style != null) { if (style != null) {
var cssVals = new List<string>(); var cssVals = new List<string>();
foreach (JProperty property in style.Properties()) foreach (JProperty property in style.Properties())
cssVals.Add(property.Name + ":" + property.Value.ToString() + ";"); {
var propertyValue = TemplateUtilities.CleanForXss(property.Value.ToString());
if (string.IsNullOrWhiteSpace(propertyValue) == false)
{
cssVals.Add(property.Name + ":" + propertyValue + ";");
}
}
if (cssVals.Any()) if (cssVals.Any())
attrs.Add("style=\"" + string.Join(" ", cssVals) + "\""); attrs.Add("style=\"" + string.Join(" ", cssVals) + "\"");
} }
return new MvcHtmlString(string.Join(" ", attrs)); return new MvcHtmlString(string.Join(" ", attrs));
@@ -1,5 +1,4 @@
@model dynamic @model dynamic
@using Umbraco.Web.Templates
@functions { @functions {
public static string EditorView(dynamic contentItem) public static string EditorView(dynamic contentItem)
@@ -1,3 +1,2 @@
@model dynamic @model dynamic
@using Umbraco.Web.Templates
@Html.Raw(Model.value) @Html.Raw(Model.value)
@@ -1,6 +1,4 @@
@inherits UmbracoViewPage<dynamic> @inherits UmbracoViewPage<dynamic>
@using Umbraco.Web.Templates
@if (Model.value != null) @if (Model.value != null)
{ {
@@ -1,5 +1,4 @@
@model dynamic @model dynamic
@using Umbraco.Web.Templates
@if (Model.value != null) @if (Model.value != null)
{ {
@@ -4,10 +4,9 @@
@if (Model.editor.config.markup != null) @if (Model.editor.config.markup != null)
{ {
string markup = Model.editor.config.markup.ToString(); string markup = Model.editor.config.markup.ToString();
var UmbracoHelper = new UmbracoHelper(UmbracoContext.Current); var UmbracoHelper = new UmbracoHelper(UmbracoContext.Current);
markup = markup.Replace("#value#", UmbracoHelper.ReplaceLineBreaksForHtml(Model.value.ToString())); markup = markup.Replace("#value#", UmbracoHelper.ReplaceLineBreaksForHtml(TemplateUtilities.CleanForXss(Model.value.ToString())));
markup = markup.Replace("#style#", Model.editor.config.style.ToString()); markup = markup.Replace("#style#", Model.editor.config.style.ToString());
<text> <text>
@@ -66,11 +66,11 @@
<div class="versions"> <div class="versions">
@if (Model.WorksOnUaaS) @if (Model.WorksOnUaaS)
{ {
<span class="smiley joyous">Works on Umbraco as a Service</span> <span class="smiley joyous">Works on Umbraco Cloud</span>
} }
else else
{ {
<span class="smiley untested">Untested or doesn't work on Umbraco as a Service</span> <span class="smiley untested">Untested or doesn't work on Umbraco Cloud</span>
} }
@foreach (var ver in Model.VersionCompatibilities) @foreach (var ver in Model.VersionCompatibilities)
{ {
+1
View File
@@ -20,6 +20,7 @@
<system.web.webPages.razor> <system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage"> <pages pageBaseType="System.Web.Mvc.WebViewPage">
+5 -5
View File
@@ -31,11 +31,6 @@
views/dashboard/developer/developerdashboardvideos.html views/dashboard/developer/developerdashboardvideos.html
</control> </control>
</tab> </tab>
<tab caption="Examine Management">
<control>
views/dashboard/developer/examinemanagement.html
</control>
</tab>
<tab caption="Health Check"> <tab caption="Health Check">
<control> <control>
views/dashboard/developer/healthcheck.html views/dashboard/developer/healthcheck.html
@@ -46,6 +41,11 @@
views/dashboard/developer/redirecturls.html views/dashboard/developer/redirecturls.html
</control> </control>
</tab> </tab>
<tab caption="Examine Management">
<control>
views/dashboard/developer/examinemanagement.html
</control>
</tab>
</section> </section>
<section alias="StartupMediaDashboardSection"> <section alias="StartupMediaDashboardSection">
@@ -81,6 +81,27 @@ You can unsubscribe from your profile on our.umbraco.org
</body> </body>
</notification> </notification>
<notification name="MarkAsSolutionReminderSingle"
assembly="NotificationsCore"
type="NotificationsCore.NotificationTypes.MarkAsSolutionReminderSingle">
<subject>Umbraco community: Solution Reminder</subject>
<body>
We noticed that the topic {0} you created in the Umbraco Community Forum does not have a post marked as a solution.
If one of the replies helped answer your question or resolve your issue please mark it as a solution so others can quickly find it.
You can view the topic and replies here: {1}
Thank You from the Umbraco Community!
--------------------------------------------------
You get this notification because you posted to our forum.
You can unsubscribe from your profile on our.umbraco.org
</body>
</notification>
</instant> </instant>
</configuration> </configuration>
@@ -1,304 +0,0 @@
@inherits umbraco.MacroEngines.DynamicNodeContext
@using System.Globalization
@using System.Text.RegularExpressions
@using OurUmbraco.MarketPlace.Models
@using OurUmbraco.Our
@using uForum.Businesslogic
@{
var queriedVersion = Request.QueryString["v"];
int requestedVersion;
int.TryParse(queriedVersion, out requestedVersion);
Version properVersion = null;
if (requestedVersion != 0)
{
properVersion = GetProperVersion(requestedVersion.ToString(CultureInfo.InvariantCulture));
}
var projectGroups = Model.Children.Where("nodeTypeAlias == \"ProjectGroup\"");
var projects = new List<UmbracoProject>();
foreach (var projectGroup in projectGroups)
{
foreach (var project in projectGroup.Children)
{
if (project.projectLive)
{
var versionsList = new List<int>();
var compatibleVersions = project.CompatibleVersions.Split(',');
foreach (var compatibleVersion in compatibleVersions)
{
if (string.IsNullOrWhiteSpace(compatibleVersion) == false && compatibleVersion != "saved")
{
int version;
if (int.TryParse(compatibleVersion.Substring(1), out version))
{
versionsList.Add(version);
}
}
}
var umbracoProject = new UmbracoProject
{
Id = project.Id,
Name = project.Name,
CreateDate = project.CreateDate,
CompatibleVersions = versionsList
};
projects.Add(umbracoProject);
}
}
}
if (requestedVersion == 0)
{
<div class="deliPromoBox clearfix">
@{
var vs = new List<int>();
foreach (var project in projects.OrderByDescending(x => x.CreateDate))
{
foreach (var version in project.CompatibleVersions.Where(version => vs.Contains(version) == false))
{
vs.Add(version);
}
}
foreach (var v in vs.OrderBy(x => x).Where(x => x.ToString(CultureInfo.InvariantCulture).StartsWith("3") == false && x.ToString(CultureInfo.InvariantCulture).StartsWith("5") == false).Skip(6))
{
<a href="/Projects/ProjectsVersioned?v=@v">Umbraco @(GetProperVersion(v.ToString(CultureInfo.InvariantCulture)).ToString(2)).x</a><br />
}
}
</div>
}
else
{
<h1 class="deliCatHead">Umbraco @(properVersion.ToString(2)).x compatible projects</h1>
<p><strong>Note:</strong> packages higher up in this list are more likely to actually work as they have been reported <br />to be working with Umbraco version @(properVersion.ToString(2)).x.</p>
<div class="deliPromoBox clearfix">
<div class="deliPromoArea">
<div class="deliPromoBox new clearfix">
@{
var vs = new List<int>();
foreach (var project in projects.OrderByDescending(x => x.CreateDate))
{
foreach (var version in project.CompatibleVersions.Where(version => vs.Contains(version) == false))
{
vs.Add(version);
}
}
}
<ul class="promoOptions">
@foreach (var v in vs.OrderBy(x => x).Where(x => x.ToString(CultureInfo.InvariantCulture).StartsWith("3") == false && x.ToString(CultureInfo.InvariantCulture).StartsWith("5") == false).Skip(6))
{
var itemProperVersion = GetProperVersion(v.ToString(CultureInfo.InvariantCulture)).ToString(2);
var currentProperVersion = properVersion.ToString(2);
<li><a href="?v=@v" class="newnav @(itemProperVersion == currentProperVersion ? "on": null)">@(itemProperVersion).x</a></li>
}
</ul>
@{
var projectIds = projects.Where(x => x.CompatibleVersions.Contains(requestedVersion)).Select(x => x.Id).ToArray();
var selection = string.Join(",", projectIds);
if (string.IsNullOrWhiteSpace(selection) == false)
{
var reader = Data.SqlHelper.ExecuteReader("SELECT id, nodeId, downloads FROM wikiFiles WHERE type = 'package' AND nodeId IN (" + selection + ")");
while (reader.Read())
{
var project = projects.FirstOrDefault(x => x.Id == reader.GetInt("nodeId"));
if (project != null)
{
project.TotalDownloads = project.TotalDownloads + reader.GetInt("downloads");
project.FileId = reader.GetInt("id");
}
}
reader = Data.SqlHelper.ExecuteReader("SELECT id, SUM([points]) AS Karma FROM powersProject WHERE id IN (" + selection + ") GROUP BY Id");
while (reader.Read())
{
var project = projects.FirstOrDefault(x => x.Id == reader.GetInt("id"));
if (project != null)
{
project.Karma = reader.GetInt("Karma");
}
}
var i = 1;
foreach (var project in projects.OrderBy(x => x.TotalDownloads).Where(x => x.CompatibleVersions.Contains(requestedVersion)))
{
project.TotalDownloadsRank = i + 5;
i++;
}
i = 1;
foreach (var project in projects.OrderBy(x => x.DownloadsCurrentVersion).Where(x => x.CompatibleVersions.Contains(requestedVersion)))
{
project.CurrentVersionDownloadsRank = i + 10;
i++;
}
i = 1;
foreach (var project in projects.OrderBy(x => x.Karma).Where(x => x.CompatibleVersions.Contains(requestedVersion)))
{
project.KarmaRank = i + 5;
i++;
}
foreach (var project in projects.Where(x => x.CompatibleVersions.Contains(requestedVersion)))
{
project.TotalRank = project.TotalDownloadsRank + project.CurrentVersionDownloadsRank + project.KarmaRank;
}
var fileIds = projects.Where(x => x.CompatibleVersions.Contains(requestedVersion)).Select(x => x.FileId).ToArray();
selection = string.Join(",", fileIds);
reader = Data.SqlHelper.ExecuteReader("SELECT * FROM DeliVersionCompatibility WHERE fileID IN(" + selection + ") AND version LIKE '" + GetProperVersion(requestedVersion.ToString(CultureInfo.InvariantCulture)).ToString(2) + ".%'");
while (reader.Read())
{
var project = projects.FirstOrDefault(x => x.Id == reader.GetInt("projectId"));
if (project != null)
{
project.ReportsCount++;
if (reader.GetBoolean("isCompatible"))
{
project.CompatibilityCount++;
}
}
}
var totalProjects = projects.Count(x => x.CompatibleVersions.Contains(requestedVersion));
foreach (var project in projects.Where(x => x.CompatibleVersions.Contains(requestedVersion)))
{
if (project.ReportsCount > 0 && project.CompatibilityCount == 0)
{
project.TotalRank = -30;
continue;
}
if (project.ReportsCount > 0)
{
project.TotalRank = project.TotalRank + (project.CompatibilityCount + totalProjects);
float compats = project.CompatibilityCount;
float numReps = project.ReportsCount;
var percentage = compats/numReps;
project.CompatibilityScore = percentage;
project.TotalRank = (int) (project.TotalRank*percentage);
}
}
<p class="viewAll">Showing @totalProjects projects</p>
}
}
<ul id="newest-projects">
@foreach (var project in projects.OrderByDescending(x => x.TotalRank).Where(x => x.CompatibleVersions.Contains(requestedVersion)))
{
var node = Library.NodeById(project.Id);
var description = node.Description.ToString();
var category = node.Parent.Name;
var screenshot = node.DefaultScreenshotPath.ToString();
var icon = string.IsNullOrEmpty(screenshot)
? "/css/img/package2.png"
: string.Format("image={0}?bgcolor=fff&width=50&height=50&format=png", screenshot);
<li class="clearfix">
<div class="deliPackage">
<div class="brief">
<a href="@node.Url" class="packageIcon" style="background:url(@icon) no-repeat top left;">Package</a>
<h3><a href="@node.Url">@project.Name</a></h3>
<div class="category">@category</div>
<div class="commercialIndicator @node.ListingType">@node.ListingType</div>
</div>
<div class="hiLite">
<p><a href="@node.Url">@(ShortenText(description))</a></p>
</div>
<div class="popularity">
<div class="karma">
@project.Karma <small>Karma</small>
</div>
<div class="downloads">
@project.TotalDownloads <small>Downloads</small>
</div>
</div>
</div>
</li>
}
</ul>
</div>
</div>
</div>
}
}
@functions {
public Version GetProperVersion(string version)
{
if (version == "4.1.0")
{
return new Version(version);
}
version = version.Replace(".", "");
if (version.EndsWith("x"))
{
version = version.Substring(0, version.IndexOf("x", StringComparison.Ordinal));
}
if (version == "410" || version == "4100")
{
return new Version("4.10");
}
if (version == "411" || version == "4110")
{
return new Version("4.11");
}
if (version.EndsWith("x"))
{
version = version.Substring(0, version.IndexOf("x", StringComparison.Ordinal) - 1);
}
var splitVersion = version.ToCharArray();
version = string.Join(".", splitVersion);
if (version.Length == 1)
{
version = version + ".0";
}
var tempRevision = new Version(version);
return tempRevision.Revision == -1 ? new Version(tempRevision.Major, tempRevision.Minor, 0) : tempRevision;
}
public static string ShortenText(string text)
{
text = Utils.StripHTML(text).Replace("&nbsp;", "");
if (text.Length > 210)
{
text = text.Substring(0, 210);
text = text.Substring(0, text.LastIndexOf(' '));
}
text = Regex.Replace(text, @"[^a-zA-Z0-9\s.?!&;]", ""); //strip all crap from the listing such as ======================================= !!!!
return text.Trim();
}
}
@@ -1,57 +0,0 @@
<%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
<%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
<body onload="JavaScript:timedRefresh(5000);">
<umbraco:Macro runat="server" language="cshtml">
@using System.Threading
@using System.Diagnostics
@using uForum.Businesslogic
@{
var stopwatch1 = new Stopwatch();
stopwatch1.Start();
var records = 10;
if (Request.QueryString["records"] != null)
{
records = int.Parse(Request.QueryString["records"]);
}
var sql = string.Format("SELECT TOP {0} contentNodeId, versionId FROM [our.umbraco.org.live].[dbo].[cmsPropertyData] WHERE contentNodeId IN (SELECT NodeId FROM [our.umbraco.org.live].[dbo].[cmsMember]) AND contentNodeId NOT IN (SELECT contentNodeId FROM [our.umbraco.org.live].[dbo].[cmsPropertyData] WHERE propertytypeid = 203) GROUP BY contentNodeId, versionId", records);
var reader = Data.SqlHelper.ExecuteReader(sql);
while (reader.Read())
{
var contentNodeId = reader.GetInt("contentNodeId");
var versionId = reader.GetGuid("versionId").ToString();
var stopwatch2 = new Stopwatch();
stopwatch2.Start();
Data.SqlHelper.ExecuteNonQuery("INSERT INTO [our.umbraco.org.live].[dbo].[cmsPropertyData] (contentNodeId, versionId, propertyTypeId) VALUES (@id, @versionId, 203)", Data.SqlHelper.CreateParameter("@id", contentNodeId), Data.SqlHelper.CreateParameter("@versionId", versionId));
stopwatch2.Stop();
<span style="font-size: 9px;">@contentNodeId - @stopwatch2.Elapsed.Ticks</span>
}
reader.Close();
reader.Dispose();
stopwatch1.Stop();
<hr />
<p>Updated @records records in @stopwatch1.Elapsed.Seconds seconds</p>
}
</umbraco:Macro>
<script type="text/JavaScript">
<!--
function timedRefresh(timeoutPeriod) {
setTimeout("location.reload(true);",timeoutPeriod);
}
// -->
</script>
</body>
</asp:Content>
</asp:Content>
@@ -29,10 +29,12 @@
currentMember = member.Id; currentMember = member.Id;
} }
Application.SqlHelper.ExecuteNonQuery( using (var sqlHelper = Application.SqlHelper)
@"insert into projectDownload(projectId,memberId,timestamp) values(@id, @memberId, getdate())", {
Application.SqlHelper.CreateParameter("@id", docId), sqlHelper.ExecuteNonQuery(@"insert into projectDownload(projectId,memberId,timestamp) values(@id, @memberId, getdate())",
Application.SqlHelper.CreateParameter("@memberId", currentMember)); sqlHelper.CreateParameter("@id", docId),
sqlHelper.CreateParameter("@memberId", currentMember));
}
Response.Redirect(link, false); Response.Redirect(link, false);
} }
@@ -151,30 +151,30 @@ The five people with most votes from 15 March until 15 April 2011 will become 20
<%}else{ <%}else{
// Umbraco.Forms.Data.Storage.RecordStorage s = new Umbraco.Forms.Data.Storage.RecordStorage(); // Umbraco.Forms.Data.Storage.RecordStorage s = new Umbraco.Forms.Data.Storage.RecordStorage();
//var all = s.GetAllRecords(new Guid("12c58e28-ca9e-4e05-9849-8ae8ed555109")); //var all = s.GetAllRecords(new Guid("12c58e28-ca9e-4e05-9849-8ae8ed555109"));
//var voted = all.Find(r => r.MemberKey.ToString() == umbraco.cms.businesslogic.member.Member.GetCurrentMember().Id.ToString()); //var voted = all.Find(r => r.MemberKey.ToString() == umbraco.cms.businesslogic.member.Member.GetCurrentMember().Id.ToString());
System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(System.Configuration.ConfigurationManager.AppSettings["umbracoDbDSN"]); System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(System.Configuration.ConfigurationManager.AppSettings["umbracoDbDSN"]);
System.Data.SqlClient.SqlCommand comm = new System.Data.SqlClient.SqlCommand( System.Data.SqlClient.SqlCommand comm = new System.Data.SqlClient.SqlCommand(
"SELECT 1 FROM UFRecords where form = '12C58E28-CA9E-4E05-9849-8AE8ED555109' and memberkey = @memberkey", "SELECT 1 FROM UFRecords where form = '12C58E28-CA9E-4E05-9849-8AE8ED555109' and memberkey = @memberkey",
conn); conn);
comm.Parameters.AddWithValue("@memberkey",umbraco.cms.businesslogic.member.Member.GetCurrentMember().Id); comm.Parameters.AddWithValue("@memberkey",umbraco.cms.businesslogic.member.Member.GetCurrentMember().Id);
conn.Open(); conn.Open();
bool membervoted = false; bool membervoted = false;
System.Data.SqlClient.SqlDataReader rdr = comm.ExecuteReader(); using (var reader = comm.ExecuteReader())
while (rdr.Read())
{ {
membervoted = true; while (reader.Read())
{
membervoted = true;
}
conn.Close();
} }
conn.Close();
if (membervoted == false)
if (membervoted == false) {
{
%> %>
+5 -5
View File
@@ -2,12 +2,12 @@
<packages> <packages>
<package id="AspNetMvc" version="3.0.20105.1" targetFramework="net4" /> <package id="AspNetMvc" version="3.0.20105.1" targetFramework="net4" />
<package id="AutoMapper" version="3.3.1" targetFramework="net452" /> <package id="AutoMapper" version="3.3.1" targetFramework="net452" />
<package id="ClientDependency" version="1.9.1" targetFramework="net452" /> <package id="ClientDependency" version="1.9.2" targetFramework="net452" />
<package id="ClientDependency-Mvc" version="1.8.0.0" targetFramework="net451" /> <package id="ClientDependency-Mvc" version="1.8.0.0" targetFramework="net451" />
<package id="ClientDependency-Mvc5" version="1.8.0.0" targetFramework="net452" /> <package id="ClientDependency-Mvc5" version="1.8.0.0" targetFramework="net452" />
<package id="EasyHttp" version="1.6.29.0" targetFramework="net451" /> <package id="EasyHttp" version="1.6.29.0" targetFramework="net451" />
<package id="Examine" version="0.1.70.0" targetFramework="net452" /> <package id="Examine" version="0.1.70.0" targetFramework="net452" />
<package id="HtmlAgilityPack" version="1.4.9" targetFramework="net452" /> <package id="HtmlAgilityPack" version="1.4.9.5" targetFramework="net452" />
<package id="ImageProcessor" version="2.4.5.0" targetFramework="net452" /> <package id="ImageProcessor" version="2.4.5.0" targetFramework="net452" />
<package id="ImageProcessor.Web" version="4.6.6.0" targetFramework="net452" /> <package id="ImageProcessor.Web" version="4.6.6.0" targetFramework="net452" />
<package id="jQuery" version="1.4.1" targetFramework="net451" /> <package id="jQuery" version="1.4.1" targetFramework="net451" />
@@ -50,9 +50,9 @@
<package id="SharpZipLib" version="0.86.0" targetFramework="net452" /> <package id="SharpZipLib" version="0.86.0" targetFramework="net452" />
<package id="System.Collections.Immutable" version="1.1.36" targetFramework="net452" /> <package id="System.Collections.Immutable" version="1.1.36" targetFramework="net452" />
<package id="System.Reflection.Metadata" version="1.0.21" targetFramework="net452" /> <package id="System.Reflection.Metadata" version="1.0.21" targetFramework="net452" />
<package id="Umbraco.ModelsBuilder" version="3.0.4" targetFramework="net452" /> <package id="Umbraco.ModelsBuilder" version="3.0.5" targetFramework="net452" />
<package id="UmbracoCms" version="7.5.4" targetFramework="net452" /> <package id="UmbracoCms" version="7.5.5" targetFramework="net452" />
<package id="UmbracoCms.Core" version="7.5.4" targetFramework="net452" /> <package id="UmbracoCms.Core" version="7.5.5" targetFramework="net452" />
<package id="UmbracoCms.IdentityExtensions" version="1.0.0" targetFramework="net451" /> <package id="UmbracoCms.IdentityExtensions" version="1.0.0" targetFramework="net451" />
<package id="UmbracoCms.IdentityExtensions.Google" version="1.0.0" targetFramework="net451" /> <package id="UmbracoCms.IdentityExtensions.Google" version="1.0.0" targetFramework="net451" />
<package id="UrlRewritingNet" version="2.0.7" targetFramework="net452" /> <package id="UrlRewritingNet" version="2.0.7" targetFramework="net452" />
@@ -118,6 +118,8 @@
<div class="umb-panel-body with-footer"> <div class="umb-panel-body with-footer">
<umb-file-dropzone <umb-file-dropzone
ng-if="acceptedMediatypes.length > 0"
accepted-mediatypes="acceptedMediatypes"
hide-dropzone="{{!activeDrag && images.length > 0}}" hide-dropzone="{{!activeDrag && images.length > 0}}"
parent-id="{{currentFolder.id}}" parent-id="{{currentFolder.id}}"
files-uploaded="onUploadComplete" files-uploaded="onUploadComplete"
@@ -18,18 +18,9 @@
</umb-control-group> </umb-control-group>
<umb-control-group label="@content_target"> <umb-control-group label="@content_target">
<select class="umb-editor umb-dropdown" ng-model="model.target.target"> <label class="checkbox no-indent">
<option value=""></option> <input type="checkbox" ng-model="model.target.target" ng-true-value="_blank" ng-false-value="" /> <localize key="defaultdialogs_openInNewWindow">Opens the linked document in a new window or tab</localize>
<option value="_blank"> </label>
<localize key="defaultdialogs_openInNewWindow">Opens the linked document in a new window or tab</localize>
</option>
<option value="_top">
<localize key="defaultdialogs_openInFullBody">Opens the linked document in the full body of the window</localize>
</option>
<option value="_parent">
<localize key="defaultdialogs_openInParentFrame">Opens the linked document in the parent frame</localize>
</option>
</select>
</umb-control-group> </umb-control-group>
<div class="umb-control-group"> <div class="umb-control-group">
@@ -63,6 +63,8 @@
</div> </div>
<umb-file-dropzone <umb-file-dropzone
ng-if="acceptedMediatypes.length > 0"
accepted-mediatypes="acceptedMediatypes"
parent-id="{{currentFolder.id}}" parent-id="{{currentFolder.id}}"
files-uploaded="onUploadComplete" files-uploaded="onUploadComplete"
files-queued="onFilesQueue" files-queued="onFilesQueue"
@@ -0,0 +1,15 @@
<div ng-controller="Umbraco.Overlays.MediaTypePickerController">
<ul class="umb-card-grid">
<li
ng-repeat="mediatype in model.acceptedMediatypes | orderBy:'name'"
ng-click="select(mediatype)"
class="-three-in-row">
<a class="umb-card-grid-item" href="" title="{{mediatype.name}}">
<i class="{{ mediatype.icon }}"></i>
{{ mediatype.name }}
</a>
</li>
</ul>
</div>
@@ -98,4 +98,11 @@
</ng-form> </ng-form>
<umb-overlay
ng-if="mediatypepickerOverlay.show"
model="mediatypepickerOverlay"
view="mediatypepickerOverlay.view"
position="right">
</umb-overlay>
</div> </div>
@@ -51,13 +51,14 @@
</div> </div>
<umb-pane> <umb-pane>
<umb-control-group label="Relate to original"> <umb-control-group localize="label" label="@defaultdialogs_relateToOriginalLabel">
<input type="checkbox" ng-model="$parent.$parent.relateToOriginal" /> <input type="checkbox" ng-model="$parent.$parent.relateToOriginal"/>
</umb-control-group> </umb-control-group>
</umb-pane> </umb-pane>
<umb-pane> <umb-pane>
<umb-control-group label="Include descendants"> <umb-control-group localize="label" label="@defaultdialogs_includeDescendants">
<input type="checkbox" ng-model="$parent.$parent.recursive" /> <input type="checkbox" ng-model="$parent.$parent.recursive" />
</umb-control-group> </umb-control-group>
</umb-pane> </umb-pane>
@@ -3,7 +3,9 @@
<div class="umb-pane"> <div class="umb-pane">
<p class="abstract" ng-hide="success"> <p class="abstract" ng-hide="success">
Choose where to move <strong>{{currentNode.name}}</strong>&nbsp;to in the tree structure below <localize key="actions_chooseWhereToMove">Choose where to move</localize>
<strong>{{currentNode.name}}</strong>
<localize key="actions_toInTheTreeStructureBelow">to in the tree structure below</localize>
</p> </p>
<div class="umb-loader-wrapper" ng-show="busy"> <div class="umb-loader-wrapper" ng-show="busy">
@@ -54,12 +54,12 @@
<div class="row"> <div class="row">
<div class="span4"> <div class="span4">
<a href="http://umbraco.tv/?utm_source=core&utm_medium=dashboard&utm_content=image&utm_campaign=tv" target="_blank" class="nounderline"> <a href="https://umbraco.tv/?utm_source=core&utm_medium=dashboard&utm_content=image&utm_campaign=tv" target="_blank" class="nounderline">
<img src="views/dashboard/default/umbracotv.png" alt="Umbraco.TV - Hours of Umbraco Video Tutorials" style="margin: 10px 0 10px 0" /> <img src="views/dashboard/default/umbracotv.png" alt="Umbraco.TV - Hours of Umbraco Video Tutorials" style="margin: 10px 0 10px 0" />
</a> </a>
<a href="http://umbraco.tv/?utm_source=core&utm_medium=dashboard&utm_content=header&utm_campaign=tv" target="_blank" class="btn-link -underline"> <a href="https://umbraco.tv/?utm_source=core&utm_medium=dashboard&utm_content=header&utm_campaign=tv" target="_blank" class="btn-link -underline">
<h4> <strong>Umbraco.TV - Learn from the source!</strong> </h4> <h4> <strong>Umbraco.TV - Learn from the source!</strong> </h4>
</a> </a>
@@ -73,11 +73,11 @@
<div class="span4 offset1"> <div class="span4 offset1">
<a href="http://our.umbraco.org/?utm_source=core&utm_medium=dashboard&utm_content=image&utm_campaign=our" target="_blank" class="nounderline"> <a href="https://our.umbraco.org/?utm_source=core&utm_medium=dashboard&utm_content=image&utm_campaign=our" target="_blank" class="nounderline">
<img src="views/dashboard/default/ourumbraco.png" alt="Our Umbraco" style="margin: 10px 0 10px 0" /> <img src="views/dashboard/default/ourumbraco.png" alt="Our Umbraco" style="margin: 10px 0 10px 0" />
</a> </a>
<a href="http://our.umbraco.org/?utm_source=core&utm_medium=dashboard&utm_content=header&utm_campaign=our" target="_blank" class="btn-link -underline"> <a href="https://our.umbraco.org/?utm_source=core&utm_medium=dashboard&utm_content=header&utm_campaign=our" target="_blank" class="btn-link -underline">
<h4><strong>Our Umbraco - The Friendliest Community</strong></h4> <h4><strong>Our Umbraco - The Friendliest Community</strong></h4>
</a> </a>
@@ -3,8 +3,10 @@
<div class="umb-pane"> <div class="umb-pane">
<p class="abstract" ng-hide="success"> <p class="abstract" ng-hide="success">
Choose where to move <strong>{{currentNode.name}}</strong> to in the tree structure below <localize key="actions_chooseWhereToMove">Choose where to move</localize>
</p> <strong>{{currentNode.name}}</strong>
<localize key="actions_toInTheTreeStructureBelow">to in the tree structure below</localize>
</p>
<div class="alert alert-error" ng-show="error" ng-cloak> <div class="alert alert-error" ng-show="error" ng-cloak>
<h4>{{error.errorMsg}}</h4> <h4>{{error.errorMsg}}</h4>
@@ -37,10 +37,8 @@
- <localize key="media_orClickHereToUpload">or click here to choose files</localize> - <localize key="media_orClickHereToUpload">or click here to choose files</localize>
</div> </div>
<div class="umb-info-local-item text-error" ng-if="vm.zipFile.uploadStatus === 'error'">
{{vm.zipFile.serverErrorMessage}}
</div>
</div> </div>
</div> </div>
@@ -53,6 +51,41 @@
</div> </div>
</div> </div>
<div ng-if="vm.state === 'uploading'">
<umb-editor-sub-header>
<umb-editor-sub-header-content-left>
<a class="umb-package-details__back-link" href="" ng-click="vm.state = 'upload'">&larr; Upload another package</a>
</umb-editor-sub-header-content-left>
</umb-editor-sub-header>
<div class="umb-packages-view-wrapper">
<div class="flex items-center justify-center">
<div class="umb-info-local-items">
<div class="umb-package-icon">
<i ng-if="!vm.localPackage.iconUrl" class="icon-box"></i>
</div>
<div class="umb-package-info">
<h4 class="umb-info-local-item"><strong>Uploading package</strong></h4>
<umb-progress-bar
percentage="{{vm.zipFile.uploadProgress}}">
</umb-progress-bar>
<div class="umb-info-local-item text-error mt3" ng-if="vm.zipFile.uploadStatus === 'error'">
{{ vm.zipFile.serverErrorMessage }}
</div>
</div>
</div>
</div>
</div>
</div>
<div ng-if="vm.state === 'packageDetails'"> <div ng-if="vm.state === 'packageDetails'">
<umb-editor-sub-header> <umb-editor-sub-header>
@@ -126,6 +159,19 @@
<p>{{vm.installState.status}}</p> <p>{{vm.installState.status}}</p>
</div> </div>
<div class="umb-info-local-item text-info"
ng-show="vm.installCompleted">
<button type="button"
class="btn btn-success flex-inline mt3"
ng-click="vm.reloadPage()">
Finish
</button>
</div>
</div> </div>
</form> </form>
@@ -340,6 +340,16 @@
<p>{{vm.installState.status}}</p> <p>{{vm.installState.status}}</p>
</div> </div>
<div class="umb-info-local-item text-info"
ng-show="vm.installCompleted">
<button type="button"
class="btn btn-success flex-inline mt3"
ng-click="vm.reloadPage()">
Finish
</button>
</div>
</div> </div>
</form> </form>
@@ -39,7 +39,8 @@
on-drag-enter="vm.dragEnter()"> on-drag-enter="vm.dragEnter()">
<umb-file-dropzone <umb-file-dropzone
ng-if="!vm.isRecycleBin" ng-if="!vm.isRecycleBin && vm.acceptedMediatypes.length > 0"
accepted-mediatypes="vm.acceptedMediatypes"
parent-id="{{vm.nodeId}}" parent-id="{{vm.nodeId}}"
files-uploaded="vm.onUploadComplete" files-uploaded="vm.onUploadComplete"
accept="{{vm.acceptedFileTypes}}" accept="{{vm.acceptedFileTypes}}"
@@ -9,7 +9,8 @@
on-drag-enter="vm.dragEnter()"> on-drag-enter="vm.dragEnter()">
<umb-file-dropzone <umb-file-dropzone
ng-if="!vm.isRecycleBin" ng-if="!vm.isRecycleBin && vm.acceptedMediatypes.length > 0"
accepted-mediatypes="vm.acceptedMediatypes"
parent-id="{{vm.nodeId}}" parent-id="{{vm.nodeId}}"
files-uploaded="vm.onUploadComplete" files-uploaded="vm.onUploadComplete"
accept="{{vm.acceptedFileTypes}}" accept="{{vm.acceptedFileTypes}}"
@@ -11,7 +11,7 @@
<img ng-if="image.extension === 'svg'" ng-src="{{image.file}}" alt="" /> <img ng-if="image.extension === 'svg'" ng-src="{{image.file}}" alt="" />
<!-- FILE --> <!-- FILE -->
<span class="icon-holder" ng-hide="image.thumbnail || image.metaData.umbracoExtension.Value === 'svg' || image.extension === 'svg'"> <span class="umb-icon-holder" ng-hide="image.thumbnail || image.metaData.umbracoExtension.Value === 'svg' || image.extension === 'svg'">
<i class="icon {{image.icon}} large"></i> <i class="icon {{image.icon}} large"></i>
<small>{{image.name}}</small> <small>{{image.name}}</small>
</span> </span>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+131 -89
View File
@@ -30,6 +30,9 @@
<key alias="refreshNode">Genindlæs elementer</key> <key alias="refreshNode">Genindlæs elementer</key>
<key alias="republish">Genudgiv hele sitet</key> <key alias="republish">Genudgiv hele sitet</key>
<key alias="restore" version="7.3.0">Gendan</key> <key alias="restore" version="7.3.0">Gendan</key>
<key alias="SetPermissionsForThePage">Sæt rettigheder for siden %0%</key>
<key alias="chooseWhereToMove">Hvor vil du flytte</key>
<key alias="toInTheTreeStructureBelow">hen til i træstrukturen?</key>
<key alias="rights">Rettigheder</key> <key alias="rights">Rettigheder</key>
<key alias="rollback">Fortryd ændringer</key> <key alias="rollback">Fortryd ændringer</key>
<key alias="sendtopublish">Send til udgivelse</key> <key alias="sendtopublish">Send til udgivelse</key>
@@ -274,17 +277,11 @@
<key alias="treepicker">Vælg</key> <key alias="treepicker">Vælg</key>
<key alias="viewCacheItem">Se cache element</key> <key alias="viewCacheItem">Se cache element</key>
<key alias="createFolder">Opret mappe...</key> <key alias="createFolder">Opret mappe...</key>
<key alias="relateToOriginalLabel">Relatér til original</key> <key alias="relateToOriginalLabel">Relatér til original</key>
<key alias="includeDescendants">Inkludér undersider</key>
<key alias="linkToPage">Link til side</key> <key alias="linkToPage">Link til side</key>
<key alias="openInNewWindow">Åben linket i et nyt vindue eller fane</key>
<key alias="openInNewWindow">Åbner det linket dokument i et nyt vindue eller fane</key>
<key alias="openInFullBody">Åbner det linket dokument i fuld visning af vinduet</key>
<key alias="openInParentFrame">Åbner det linket dokument i "parent frame"</key>
<key alias="linkToMedia">Link til medie</key> <key alias="linkToMedia">Link til medie</key>
<key alias="selectMedia">Vælg medie</key> <key alias="selectMedia">Vælg medie</key>
<key alias="selectIcon">Vælg ikon</key> <key alias="selectIcon">Vælg ikon</key>
<key alias="selectItem">Vælg item</key> <key alias="selectItem">Vælg item</key>
@@ -293,19 +290,25 @@
<key alias="selectContent">Vælg indhold</key> <key alias="selectContent">Vælg indhold</key>
<key alias="selectMember">Vælg medlem</key> <key alias="selectMember">Vælg medlem</key>
<key alias="selectMemberGroup">Vælg medlemsgruppe</key> <key alias="selectMemberGroup">Vælg medlemsgruppe</key>
<key alias="noMacroParams">Der er ingen parametre for denne makro</key> <key alias="noMacroParams">Der er ingen parametre for denne makro</key>
<key alias="linkYour">Link dit</key> <key alias="linkYour">Link dit</key>
<key alias="unLinkYour">Fjern link fra dit</key> <key alias="unLinkYour">Fjern link fra dit</key>
<key alias="account">konto</key> <key alias="account">konto</key>
<key alias="selectEditor">Vælg editor</key> <key alias="selectEditor">Vælg editor</key>
</area> </area>
<area alias="dictionaryItem"> <area alias="dictionaryItem">
<key alias="description">Rediger de forskellige sprogversioner for ordbogselementet '%0%' herunder. Du tilføjer flere sprog under 'sprog' i menuen til venstre </key> <key alias="description">
<![CDATA[
Rediger de forskellige sprogversioner for ordbogselementet '%0%' herunder.<br />Du tilføjer flere sprog under 'sprog' i menuen til venstre </key>
]]>
</key>
<key alias="displayName">Kulturnavn</key> <key alias="displayName">Kulturnavn</key>
<key alias="changeKey">Rediger navnet på ordbogselementet.</key>
<key alias="changeKeyError">
<![CDATA[
Navnet '%0%' eksisterer allerede.
]]>
</key>
</area> </area>
<area alias="placeholders"> <area alias="placeholders">
<key alias="username">Indtast dit brugernavn</key> <key alias="username">Indtast dit brugernavn</key>
@@ -319,17 +322,17 @@
<key alias="enterTags">Indtast nøgleord (tryk på Enter efter hvert nøgleord)...</key> <key alias="enterTags">Indtast nøgleord (tryk på Enter efter hvert nøgleord)...</key>
</area> </area>
<area alias="editcontenttype"> <area alias="editcontenttype">
<key alias="allowAtRoot" version="7.2">Tillad på rodniveau</key> <key alias="allowAtRoot" version="7.2">Tillad på rodniveau</key>
<key alias="allowAtRootDesc" version="7.2">Kun dokumenttyper med denne indstilling aktiveret oprettes i rodniveau under Inhold og Mediearkiv</key> <key alias="allowAtRootDesc" version="7.2">Kun dokumenttyper med denne indstilling aktiveret oprettes i rodniveau under Inhold og Mediearkiv</key>
<key alias="allowedchildnodetypes">Tilladte typer</key> <key alias="allowedchildnodetypes">Tilladte typer</key>
<key alias="contenttypecompositions">Sammensætning af dokumenttyper</key> <key alias="contenttypecompositions">Sammensætning af dokumenttyper</key>
<key alias="create">Opret</key> <key alias="create">Opret</key>
<key alias="deletetab">Slet fane</key> <key alias="deletetab">Slet fane</key>
<key alias="description">Beskrivelse</key> <key alias="description">Beskrivelse</key>
<key alias="newtab">Ny fane</key> <key alias="newtab">Ny fane</key>
<key alias="tab">Fane</key> <key alias="tab">Fane</key>
<key alias="thumbnail">Thumbnail</key> <key alias="thumbnail">Thumbnail</key>
<key alias="hasListView">Aktiver listevisning</key> <key alias="hasListView">Aktiver listevisning</key>
<key alias="hasListViewDesc" version="7.2">Viser undersider i en søgbar liste, undersider vises ikke i indholdstræet</key> <key alias="hasListViewDesc" version="7.2">Viser undersider i en søgbar liste, undersider vises ikke i indholdstræet</key>
<key alias="currentListView" version="7.2">Nuværende listevisning</key> <key alias="currentListView" version="7.2">Nuværende listevisning</key>
<key alias="currentListViewDesc" version="7.2">Den aktive listevisningsdatatype</key> <key alias="currentListViewDesc" version="7.2">Den aktive listevisningsdatatype</key>
@@ -364,7 +367,7 @@
</area> </area>
<area alias="errors"> <area alias="errors">
<key alias="receivedErrorFromServer">Der skete en fejl på severen</key> <key alias="receivedErrorFromServer">Der skete en fejl på severen</key>
<key alias="dissallowedMediaType">Denne filttype er blevet deaktiveret af administratoren</key> <key alias="dissallowedMediaType">Denne filttype er blevet deaktiveret af administratoren</key>
<key alias="codemirroriewarning">OBS! Selvom CodeMirror er slået til i konfigurationen, så er den deaktiveret i Internet Explorer fordi den ikke er stabil nok.</key> <key alias="codemirroriewarning">OBS! Selvom CodeMirror er slået til i konfigurationen, så er den deaktiveret i Internet Explorer fordi den ikke er stabil nok.</key>
<key alias="contentTypeAliasAndNameNotNull">Du skal udfylde både Alias &amp; Navn på den nye egenskabstype!</key> <key alias="contentTypeAliasAndNameNotNull">Du skal udfylde både Alias &amp; Navn på den nye egenskabstype!</key>
<key alias="filePermissionsError">Der mangler læse/skrive rettigheder til bestemte filer og mapper</key> <key alias="filePermissionsError">Der mangler læse/skrive rettigheder til bestemte filer og mapper</key>
@@ -380,7 +383,7 @@
<key alias="tableSplitNotSplittable">Du kan ikke opdele en celle, som ikke allerede er delt.</key> <key alias="tableSplitNotSplittable">Du kan ikke opdele en celle, som ikke allerede er delt.</key>
<key alias="xsltErrorHeader">Fejl i XSLT kode</key> <key alias="xsltErrorHeader">Fejl i XSLT kode</key>
<key alias="xsltErrorText">Din XSLT er ikke opdateret, da det indeholdt en fejl</key> <key alias="xsltErrorText">Din XSLT er ikke opdateret, da det indeholdt en fejl</key>
<key alias="missingPropertyEditorErrorMessage">Der er et problem med den datatype, der bruges til denn egenskab. Kontroller konfigurationen og prøv igen.</key> <key alias="missingPropertyEditorErrorMessage">Der er et problem med den datatype, der bruges til denn egenskab. Kontroller konfigurationen og prøv igen.</key>
</area> </area>
<area alias="general"> <area alias="general">
<key alias="about">Om</key> <key alias="about">Om</key>
@@ -466,7 +469,8 @@
<key alias="showPageOnSend">Hvilken side skal vises efter at formularen er sendt</key> <key alias="showPageOnSend">Hvilken side skal vises efter at formularen er sendt</key>
<key alias="size">Størrelse</key> <key alias="size">Størrelse</key>
<key alias="sort">Sortér</key> <key alias="sort">Sortér</key>
<key alias="submit">Indsend</key> <!-- TODO: Translate this --> <key alias="submit">Indsend</key>
<!-- TODO: Translate this -->
<key alias="type">Type</key> <key alias="type">Type</key>
<key alias="typeToSearch">Skriv for at søge...</key> <key alias="typeToSearch">Skriv for at søge...</key>
<key alias="up">Op</key> <key alias="up">Op</key>
@@ -505,22 +509,22 @@
</area> </area>
<area alias="shortcuts"> <area alias="shortcuts">
<key alias="addTab">Tilføj fane</key> <key alias="addTab">Tilføj fane</key>
<key alias="addProperty">Tilføj egenskab</key> <key alias="addProperty">Tilføj egenskab</key>
<key alias="addEditor">Tilføj editor</key> <key alias="addEditor">Tilføj editor</key>
<key alias="addTemplate">Tilføj skabelon</key> <key alias="addTemplate">Tilføj skabelon</key>
<key alias="addChildNode">Tilføj child node</key> <key alias="addChildNode">Tilføj child node</key>
<key alias="addChild">Tilføj child</key> <key alias="addChild">Tilføj child</key>
<key alias="editDataType">Rediger datatype</key> <key alias="editDataType">Rediger datatype</key>
<key alias="navigateSections">Naviger sektioner</key> <key alias="navigateSections">Naviger sektioner</key>
<key alias="shortcut">Genveje</key> <key alias="shortcut">Genveje</key>
<key alias="showShortcuts">Vis genveje</key> <key alias="showShortcuts">Vis genveje</key>
<key alias="toggleListView">Brug listevisning</key> <key alias="toggleListView">Brug listevisning</key>
<key alias="toggleAllowAsRoot">Tillad på rodniveau</key> <key alias="toggleAllowAsRoot">Tillad på rodniveau</key>
</area> </area>
<area alias="graphicheadline"> <area alias="graphicheadline">
@@ -538,13 +542,17 @@
<key alias="databaseErrorWebConfig">Kunne ikke gemme web.config filen. Du bedes venligst manuelt ændre database forbindelses strengen.</key> <key alias="databaseErrorWebConfig">Kunne ikke gemme web.config filen. Du bedes venligst manuelt ændre database forbindelses strengen.</key>
<key alias="databaseFound">Din database er blevet fundet og identificeret som</key> <key alias="databaseFound">Din database er blevet fundet og identificeret som</key>
<key alias="databaseHeader">Database konfiguration</key> <key alias="databaseHeader">Database konfiguration</key>
<key alias="databaseInstall"><![CDATA[ <key alias="databaseInstall">
<![CDATA[
Klik på <strong>installér</strong> knappen for at installere Umbraco %0% databasen Klik på <strong>installér</strong> knappen for at installere Umbraco %0% databasen
]]></key> ]]>
</key>
<key alias="databaseInstall"><![CDATA[Tryk på <strong>installér</strong> knappen for at installere Umbraco %0% databasen]]></key> <key alias="databaseInstall"><![CDATA[Tryk på <strong>installér</strong> knappen for at installere Umbraco %0% databasen]]></key>
<key alias="databaseInstallDone"><![CDATA[Umbraco %0% er nu blevet kopieret til din database. Tryk på <string>Næste</strong> for at fortsætte.]]></key> <key alias="databaseInstallDone"><![CDATA[Umbraco %0% er nu blevet kopieret til din database. Tryk på <string>Næste</strong> for at fortsætte.]]></key>
<key alias="databaseNotFound"><![CDATA[<p>Databasen er ikke fundet. Kontrollér venligst at informationen i database forbindelsesstrengen i "web.config" filen er korrekt.</p> <key alias="databaseNotFound">
<p>For at fortsætte bedes du venligst rette "web.config" filen (ved at bruge Visual Studio eller dit favoritprogram), scroll til bunden, tilføj forbindelsesstrengen til din database i feltet som hedder "umbracoDbDSN" og gem filen.</p><p>Klik på <strong>Forsøg igen</strong> knappen når du er færdig.<br/><a href="http://our.umbraco.org/documentation/Using-Umbraco/Config-files/webconfig7" target="_blank">Mere information om at redigere web.config her.</a></p>]]></key> <![CDATA[<p>Databasen er ikke fundet. Kontrollér venligst at informationen i database forbindelsesstrengen i "web.config" filen er korrekt.</p>
<p>For at fortsætte bedes du venligst rette "web.config" filen (ved at bruge Visual Studio eller dit favoritprogram), scroll til bunden, tilføj forbindelsesstrengen til din database i feltet som hedder "umbracoDbDSN" og gem filen.</p><p>Klik på <strong>Forsøg igen</strong> knappen når du er færdig.<br/><a href="http://our.umbraco.org/documentation/Using-Umbraco/Config-files/webconfig7" target="_blank">Mere information om at redigere web.config her.</a></p>]]>
</key>
<key alias="databaseText"><![CDATA[For at afslutte dette skridt er du nødt til at have nogle informationer om din database parat ("database forbindelsesstrengen").<br/>Kontakt venligst din ISP hvis det er nødvendigt. Hvis du installerer på en lokal maskine eller server kan du muligvis få informationerne fra din systemadministrator.]]></key> <key alias="databaseText"><![CDATA[For at afslutte dette skridt er du nødt til at have nogle informationer om din database parat ("database forbindelsesstrengen").<br/>Kontakt venligst din ISP hvis det er nødvendigt. Hvis du installerer på en lokal maskine eller server kan du muligvis få informationerne fra din systemadministrator.]]></key>
<key alias="databaseUpgrade"><![CDATA[<p>Tryk på <strong>Opgradér</strong> knappen for at opgradere din database til Umbraco %0%</p><p>Bare rolig - intet indhold vil blive slettet og alt vil stadig fungere bagefter!</p>]]></key> <key alias="databaseUpgrade"><![CDATA[<p>Tryk på <strong>Opgradér</strong> knappen for at opgradere din database til Umbraco %0%</p><p>Bare rolig - intet indhold vil blive slettet og alt vil stadig fungere bagefter!</p>]]></key>
<key alias="databaseUpgradeDone"><![CDATA[Din database er blevet opgraderet til den endelige version %0%.<br/>Tryk på <strong>Næste</strong> for at fortsætte.]]></key> <key alias="databaseUpgradeDone"><![CDATA[Din database er blevet opgraderet til den endelige version %0%.<br/>Tryk på <strong>Næste</strong> for at fortsætte.]]></key>
@@ -590,8 +598,10 @@
<key alias="theEndFurtherHelp"><![CDATA[<h3>Yderligere hjælpe og informationer</h3> Få hjælp fra vores prisvindende fællesskab, gennemse dokumentationen eller se nogle gratis videoer om hvordan du opsætter et simpelt site, hvordan du bruger pakker og en 'quick guide' til Umbraco terminologier]]></key> <key alias="theEndFurtherHelp"><![CDATA[<h3>Yderligere hjælpe og informationer</h3> Få hjælp fra vores prisvindende fællesskab, gennemse dokumentationen eller se nogle gratis videoer om hvordan du opsætter et simpelt site, hvordan du bruger pakker og en 'quick guide' til Umbraco terminologier]]></key>
<key alias="theEndHeader">Umbraco %0% er installeret og klar til brug</key> <key alias="theEndHeader">Umbraco %0% er installeret og klar til brug</key>
<key alias="theEndInstallFailed"><![CDATA[For at afslutte installationen er du nødt til manuelt at rette <strong>/web.config filen</strong> og opdatére 'AppSetting' feltet <strong>UmbracoConfigurationStatus</strong> i bunden til <strong>'%0%'</strong>.]]></key> <key alias="theEndInstallFailed"><![CDATA[For at afslutte installationen er du nødt til manuelt at rette <strong>/web.config filen</strong> og opdatére 'AppSetting' feltet <strong>UmbracoConfigurationStatus</strong> i bunden til <strong>'%0%'</strong>.]]></key>
<key alias="theEndInstallSuccess"><![CDATA[Du kan <strong>komme igang med det samme</strong> ved at klikke på "Start Umbraco" knappen nedenfor.<br/>Hvis du er <strong>ny med Umbraco</strong>, kan du finde masser af ressourcer på vores 'getting started' sider. <key alias="theEndInstallSuccess">
]]></key> <![CDATA[Du kan <strong>komme igang med det samme</strong> ved at klikke på "Start Umbraco" knappen nedenfor.<br/>Hvis du er <strong>ny med Umbraco</strong>, kan du finde masser af ressourcer på vores 'getting started' sider.
]]>
</key>
<key alias="theEndOpenUmbraco"><![CDATA[<h3>Start Umbraco</h3>For at administrere dit website skal du blot åbne Umbraco administrationen og begynde at tilføje indhold, opdatere skabelonerne og stylesheets'ene eller tilføje ny funktionalitet.]]></key> <key alias="theEndOpenUmbraco"><![CDATA[<h3>Start Umbraco</h3>For at administrere dit website skal du blot åbne Umbraco administrationen og begynde at tilføje indhold, opdatere skabelonerne og stylesheets'ene eller tilføje ny funktionalitet.]]></key>
<key alias="Unavailable">Forbindelse til databasen fejlede.</key> <key alias="Unavailable">Forbindelse til databasen fejlede.</key>
<key alias="Version3">Umbraco Version 3</key> <key alias="Version3">Umbraco Version 3</key>
@@ -666,12 +676,15 @@ Gå til http://%4%/#/content/content/edit/%5% for at redigere.
Ha' en dejlig dag! Ha' en dejlig dag!
Mange hilsner fra Umbraco robotten Mange hilsner fra Umbraco robotten
]]></key> ]]>
<key alias="mailBodyHtml"><![CDATA[<p>Hej %0%</p> </key>
<key alias="mailBodyHtml">
<![CDATA[<p>Hej %0%</p>
<p>Dette er en automatisk mail for at informere dig om at opgaven <strong>'%1%'</strong> <p>Dette er en automatisk mail for at informere dig om at opgaven <strong>'%1%'</strong>
er blevet udførtpå siden <a href="http://%4%/#/content/content/edit/%5%"><strong>'%2%'</strong></a> af brugeren <strong>'%3%'</strong> </p> er blevet udførtpå siden <a href="http://%4%/#/content/content/edit/%5%"><strong>'%2%'</strong></a> af brugeren <strong>'%3%'</strong> </p>
<div style="margin: 8px 0; padding: 8px; display: block;"> <br /> <div style="margin: 8px 0; padding: 8px; display: block;"> <br />
<a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/#/content/content/edit/%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp; <br /> </div> <p> <h3>Opdateringssammendrag:</h3> <table style="width: 100%;"> %6% </table> </p> <div style="margin: 8px 0; padding: 8px; display: block;"> <br /> <a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/actions/publish.aspx?id=%5%">&nbsp;&nbsp;PUBLISÉR&nbsp;&nbsp;</a> &nbsp; <a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/#/content/content/edit/%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp; <a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;SLET&nbsp;&nbsp;&nbsp;&nbsp;</a> <br /> </div> <p>Hav en fortsat god dag!<br /><br /> De bedste hilsner fra umbraco robotten </p>]]></key> <a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/#/content/content/edit/%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp; <br /> </div> <p> <h3>Opdateringssammendrag:</h3> <table style="width: 100%;"> %6% </table> </p> <div style="margin: 8px 0; padding: 8px; display: block;"> <br /> <a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/actions/publish.aspx?id=%5%">&nbsp;&nbsp;PUBLISÉR&nbsp;&nbsp;</a> &nbsp; <a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/#/content/content/edit/%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp; <a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;SLET&nbsp;&nbsp;&nbsp;&nbsp;</a> <br /> </div> <p>Hav en fortsat god dag!<br /><br /> De bedste hilsner fra umbraco robotten </p>]]>
</key>
<key alias="mailSubject">[%0%] Notificering om %1% udført på %2%</key> <key alias="mailSubject">[%0%] Notificering om %1% udført på %2%</key>
<key alias="notifications">Notificeringer</key> <key alias="notifications">Notificeringer</key>
</area> </area>
@@ -692,8 +705,10 @@ Mange hilsner fra Umbraco robotten
<key alias="packageUninstalledHeader">Pakken blev fjernet</key> <key alias="packageUninstalledHeader">Pakken blev fjernet</key>
<key alias="packageUninstalledText">Pakken er på succefuld vis blevet fjernet</key> <key alias="packageUninstalledText">Pakken er på succefuld vis blevet fjernet</key>
<key alias="packageUninstallHeader">Afinstallér pakke</key> <key alias="packageUninstallHeader">Afinstallér pakke</key>
<key alias="packageUninstallText"><![CDATA[Du kan fjerne markeringen på elementer du ikke ønsker at fjerne, på dette tidspunkt, nedenfor. Når du klikker 'bekræft' vil alle afkrydsede elemenet blive fjernet <br/> <key alias="packageUninstallText">
<span style="color: Red; font-weight: bold;">Bemærk:</span> at dokumenter og medier som afhænger af denne pakke vil muligvis holde op med at virke, så vær forsigtig. Hvis i tvivl, kontakt personen som har udviklet pakken.]]></key> <![CDATA[Du kan fjerne markeringen på elementer du ikke ønsker at fjerne, på dette tidspunkt, nedenfor. Når du klikker 'bekræft' vil alle afkrydsede elemenet blive fjernet <br/>
<span style="color: Red; font-weight: bold;">Bemærk:</span> at dokumenter og medier som afhænger af denne pakke vil muligvis holde op med at virke, så vær forsigtig. Hvis i tvivl, kontakt personen som har udviklet pakken.]]>
</key>
<key alias="packageUpgradeDownload">Download opdatering fra opbevaringsbasen</key> <key alias="packageUpgradeDownload">Download opdatering fra opbevaringsbasen</key>
<key alias="packageUpgradeHeader">Opdatér pakke</key> <key alias="packageUpgradeHeader">Opdatér pakke</key>
<key alias="packageUpgradeInstructions">Opdateringsinstrukser</key> <key alias="packageUpgradeInstructions">Opdateringsinstrukser</key>
@@ -726,6 +741,19 @@ Mange hilsner fra Umbraco robotten
<key alias="paSimpleHelp">Hvis du blot ønsker at opsætte simpel beskyttelse ved hjælp af et enkelt login og kodeord</key> <key alias="paSimpleHelp">Hvis du blot ønsker at opsætte simpel beskyttelse ved hjælp af et enkelt login og kodeord</key>
</area> </area>
<area alias="publish"> <area alias="publish">
<key alias="contentPublishedFailedAwaitingRelease">Udgivelsen kunne ikke udgives da publiceringsdato er sat</key>
<key alias="contentPublishedFailedExpired">
<![CDATA[
%0% Udgivelsen kunne ikke blive publiceret da publiceringsdatoen er overskredet
]]>
</key>
<key alias="contentPublishedFailedInvalid">
<![CDATA[
%0% kunne ikke publiceres da følgende egenskaber : %1% ikke overholdte valderingsreglerne.
]]>
</key>
<key alias="editContentPublishedFailedByParent">Udgivelsen fejlede fordi en overordnet side ikke er publiceret</key>
<key alias="contentPublishedFailedByEvent">%0% kunne ikke udgives, fordi et 3. parts modul annullerede handlingen</key> <key alias="contentPublishedFailedByEvent">%0% kunne ikke udgives, fordi et 3. parts modul annullerede handlingen</key>
<key alias="includeUnpublished">Medtag ikke-udgivede undersider</key> <key alias="includeUnpublished">Medtag ikke-udgivede undersider</key>
<key alias="inProgress">Publicerer - vent venligst...</key> <key alias="inProgress">Publicerer - vent venligst...</key>
@@ -799,58 +827,58 @@ Mange hilsner fra Umbraco robotten
<area alias="contentTypeEditor"> <area alias="contentTypeEditor">
<key alias="compositions">Kompositioner</key> <key alias="compositions">Kompositioner</key>
<key alias="noTabs">Du har ikke tilføjet nogle faner</key> <key alias="noTabs">Du har ikke tilføjet nogle faner</key>
<key alias="addNewTab">Tilføj ny fane</key> <key alias="addNewTab">Tilføj ny fane</key>
<key alias="addAnotherTab">Tilføj endnu en fane</key> <key alias="addAnotherTab">Tilføj endnu en fane</key>
<key alias="inheritedFrom">Nedarvet fra</key> <key alias="inheritedFrom">Nedarvet fra</key>
<key alias="addProperty">Tilføj property</key> <key alias="addProperty">Tilføj property</key>
<key alias="requiredLabel">Påkrævet label</key> <key alias="requiredLabel">Påkrævet label</key>
<key alias="enableListViewHeading">Aktiver listevisning</key> <key alias="enableListViewHeading">Aktiver listevisning</key>
<key alias="enableListViewDescription">Konfigurer indholdet til at blive vist i en sorterbar og søgbar liste, dens børn vil ikke blive vist i træet</key> <key alias="enableListViewDescription">Konfigurer indholdet til at blive vist i en sorterbar og søgbar liste, dens børn vil ikke blive vist i træet</key>
<key alias="allowedTemplatesHeading">Tilladte skabeloner</key> <key alias="allowedTemplatesHeading">Tilladte skabeloner</key>
<key alias="allowedTemplatesDescription">Vælg hvilke skabeloner der er tilladt at bruge på dette indhold</key> <key alias="allowedTemplatesDescription">Vælg hvilke skabeloner der er tilladt at bruge på dette indhold</key>
<key alias="allowAsRootHeading">Tillad på rodniveau</key> <key alias="allowAsRootHeading">Tillad på rodniveau</key>
<key alias="allowAsRootDescription">Kun dokumenttyper med denne indstilling aktiveret oprettes i rodniveau under inhold og mediearkiv</key> <key alias="allowAsRootDescription">Kun dokumenttyper med denne indstilling aktiveret oprettes i rodniveau under inhold og mediearkiv</key>
<key alias="allowAsRootCheckbox">Ja indhold af denne type er tilladt i roden</key> <key alias="allowAsRootCheckbox">Ja indhold af denne type er tilladt i roden</key>
<key alias="childNodesHeading">Tilladte typer</key> <key alias="childNodesHeading">Tilladte typer</key>
<key alias="childNodesDescription">Tillad at oprette indhold af en specifik type under denne</key> <key alias="childNodesDescription">Tillad at oprette indhold af en specifik type under denne</key>
<key alias="chooseChildNode">Vælg child node</key> <key alias="chooseChildNode">Vælg child node</key>
<key alias="compositionsDescription">Nedarv faner og egenskaber fra en anden dokumenttype. Nye faner vil blive tilføjet den nuværende dokumenttype eller sammenflettet hvis fanenavnene er ens.</key> <key alias="compositionsDescription">Nedarv faner og egenskaber fra en anden dokumenttype. Nye faner vil blive tilføjet den nuværende dokumenttype eller sammenflettet hvis fanenavnene er ens.</key>
<key alias="compositionInUse">Indholdstypen bliver brugt i en komposition og kan derfor ikke blive anvendt som komposition</key> <key alias="compositionInUse">Indholdstypen bliver brugt i en komposition og kan derfor ikke blive anvendt som komposition</key>
<key alias="noAvailableCompositions">Der er ingen indholdstyper tilgængelige at bruge som komposition</key> <key alias="noAvailableCompositions">Der er ingen indholdstyper tilgængelige at bruge som komposition</key>
<key alias="availableEditors">Tilgængelige editors</key> <key alias="availableEditors">Tilgængelige editors</key>
<key alias="reuse">Genbrug</key> <key alias="reuse">Genbrug</key>
<key alias="editorSettings">Editor indstillinger</key> <key alias="editorSettings">Editor indstillinger</key>
<key alias="configuration">Konfiguration</key> <key alias="configuration">Konfiguration</key>
<key alias="yesDelete">Ja, slet</key> <key alias="yesDelete">Ja, slet</key>
<key alias="movedUnderneath">blev flyttet til</key> <key alias="movedUnderneath">blev flyttet til</key>
<key alias="folderToMove">Vælg hvor</key> <key alias="folderToMove">Vælg hvor</key>
<key alias="structureBelow">skal flyttes til</key> <key alias="structureBelow">skal flyttes til</key>
<key alias="allDocumentTypes">Alle dokumenttyper</key> <key alias="allDocumentTypes">Alle dokumenttyper</key>
<key alias="allDocuments">Alle dokumenter</key> <key alias="allDocuments">Alle dokumenter</key>
<key alias="allMediaItems">Alle medier</key> <key alias="allMediaItems">Alle medier</key>
<key alias="usingThisDocument">som benytter denne dokumenttype vil blive slettet permanent. Bekræft at du også vil slette dem.</key> <key alias="usingThisDocument">som benytter denne dokumenttype vil blive slettet permanent. Bekræft at du også vil slette dem.</key>
<key alias="usingThisMedia">som benytter denne medietype vil blive slettet permanent. Bekræft at du også vil slette dem.</key> <key alias="usingThisMedia">som benytter denne medietype vil blive slettet permanent. Bekræft at du også vil slette dem.</key>
<key alias="usingThisMember">som benytter denne medlemstype vil blive slettet permanent. Bekræft at du også vil slette dem.</key> <key alias="usingThisMember">som benytter denne medlemstype vil blive slettet permanent. Bekræft at du også vil slette dem.</key>
<key alias="andAllDocuments">og alle dokumenter, som benytter denne type</key> <key alias="andAllDocuments">og alle dokumenter, som benytter denne type</key>
<key alias="andAllMediaItems">og alle medier, som benytter denne type</key> <key alias="andAllMediaItems">og alle medier, som benytter denne type</key>
<key alias="andAllMembers">og alle medlemmer, som benytter denne type</key> <key alias="andAllMembers">og alle medlemmer, som benytter denne type</key>
<key alias="thisEditorUpdateSettings">der bruger denne editor vil blive opdateret med de nye indstillinger</key> <key alias="thisEditorUpdateSettings">der bruger denne editor vil blive opdateret med de nye indstillinger</key>
</area> </area>
<area alias="rollback"> <area alias="rollback">
@@ -914,8 +942,6 @@ Mange hilsner fra Umbraco robotten
<area alias="speechBubbles"> <area alias="speechBubbles">
<key alias="operationCancelledHeader">Annulleret</key> <key alias="operationCancelledHeader">Annulleret</key>
<key alias="operationCancelledText">Handlingen blev annulleret af et 3. part tilføjelsesprogram</key> <key alias="operationCancelledText">Handlingen blev annulleret af et 3. part tilføjelsesprogram</key>
<key alias="contentPublishedFailedByEvent">Udgivelsen blev standset af et 3. parts modul</key>
<key alias="contentPublishedFailedAwaitingRelease">Udgivelsen kunne ikke udgives da publiceringsdato er sat</key>
<key alias="contentTypeDublicatePropertyType">Property type eksisterer allerede</key> <key alias="contentTypeDublicatePropertyType">Property type eksisterer allerede</key>
<key alias="contentTypePropertyTypeCreated">Egenskabstype oprettet</key> <key alias="contentTypePropertyTypeCreated">Egenskabstype oprettet</key>
<key alias="contentTypePropertyTypeCreatedText"><![CDATA[Navn: %0% <br /> DataType: %1%]]></key> <key alias="contentTypePropertyTypeCreatedText"><![CDATA[Navn: %0% <br /> DataType: %1%]]></key>
@@ -929,7 +955,6 @@ Mange hilsner fra Umbraco robotten
<key alias="cssSavedText">Stylesheet gemt uden fejl</key> <key alias="cssSavedText">Stylesheet gemt uden fejl</key>
<key alias="dataTypeSaved">Datatype gemt</key> <key alias="dataTypeSaved">Datatype gemt</key>
<key alias="dictionaryItemSaved">Ordbogsnøgle gemt</key> <key alias="dictionaryItemSaved">Ordbogsnøgle gemt</key>
<key alias="editContentPublishedFailedByParent">Udgivelsen fejlede fordi en overordnet side ikke er publiceret</key>
<key alias="editContentPublishedHeader">Indhold publiceret</key> <key alias="editContentPublishedHeader">Indhold publiceret</key>
<key alias="editContentPublishedText">og nu synligt for besøgende</key> <key alias="editContentPublishedText">og nu synligt for besøgende</key>
<key alias="editContentSavedHeader">Indhold gemt</key> <key alias="editContentSavedHeader">Indhold gemt</key>
@@ -1131,11 +1156,28 @@ Mange hilsner fra Umbraco robotten
<key alias="sessionExpires">Session udløber</key> <key alias="sessionExpires">Session udløber</key>
</area> </area>
<area alias="validation"> <area alias="validation">
<key alias="validation">Validation</key> <key alias="validation">Validation</key>
<key alias="validateAsEmail">Valider som email</key> <key alias="validateAsEmail">Valider som email</key>
<key alias="validateAsNumber">Valider som tal</key> <key alias="validateAsNumber">Valider som tal</key>
<key alias="validateAsUrl">Valider som Url</key> <key alias="validateAsUrl">Valider som Url</key>
<key alias="enterCustomValidation">...eller indtast din egen validering</key> <key alias="enterCustomValidation">...eller indtast din egen validering</key>
<key alias="fieldIsMandatory">Feltet er påkrævet</key> <key alias="fieldIsMandatory">Feltet er påkrævet</key>
</area>
<area alias="redirectUrls">
<key alias="disableUrlTracker">Slå URL tracker fra</key>
<key alias="enableUrlTracker">Slå URL tracker til</key>
<key alias="originalUrl">Original URL</key>
<key alias="redirectedTo">Viderestillet til</key>
<key alias="noRedirects">Der er ikke lavet nogen viderestillinger</key>
<key alias="noRedirectsDescription">Når en udgivet side bliver omdøbt eller flyttet, vil en viderestilling automatisk blive lavet til den nye side.</key>
<key alias="removeButton">Fjern</key>
<key alias="confirmRemove">Er du sikker på at du vil fjerne viderestillingen fra '%0%' til '%1%'?</key>
<key alias="redirectRemoved">Viderestillings URL fjernet.</key>
<key alias="redirectRemoveError">Fejl under fjernelse af viderestillings URL.</key>
<key alias="confirmDisable">Er du sikker på at du vil slå URL trackeren fra?</key>
<key alias="disabledConfirm">URL tracker er nu slået fra.</key>
<key alias="disableError">Der opstod en fejl under forsøget på at slå URL trackeren fra, der findes mere information i logfilen.</key>
<key alias="enabledConfirm">URL tracker er nu slået fra.</key>
<key alias="enableError">Der opstod en fejl under forsøget på at slå URL trackeren til, der findes mere information i logfilen.</key>
</area> </area>
</language> </language>
+15 -17
View File
@@ -28,6 +28,9 @@
<key alias="refreshNode">Reload</key> <key alias="refreshNode">Reload</key>
<key alias="republish">Republish entire site</key> <key alias="republish">Republish entire site</key>
<key alias="restore" version="7.3.0">Restore</key> <key alias="restore" version="7.3.0">Restore</key>
<key alias="SetPermissionsForThePage">Set permissions for the page %0%</key>
<key alias="chooseWhereToMove">Choose where to move</key>
<key alias="toInTheTreeStructureBelow">to in the tree structure below</key>
<key alias="rights">Permissions</key> <key alias="rights">Permissions</key>
<key alias="rollback">Rollback</key> <key alias="rollback">Rollback</key>
<key alias="sendtopublish">Send To Publish</key> <key alias="sendtopublish">Send To Publish</key>
@@ -144,7 +147,7 @@
<key alias="memberrole">Role</key> <key alias="memberrole">Role</key>
<key alias="membertype">Member Type</key> <key alias="membertype">Member Type</key>
<key alias="noDate">No date chosen</key> <key alias="noDate">No date chosen</key>
<key alias="nodeName">Page Title</key> <key alias="nodeName">Link title</key>
<key alias="otherElements">Properties</key> <key alias="otherElements">Properties</key>
<key alias="parentNotPublished">This document is published but is not visible because the parent '%0%' is unpublished</key> <key alias="parentNotPublished">This document is published but is not visible because the parent '%0%' is unpublished</key>
<key alias="parentNotPublishedAnomaly">This document is published but is not in the cache</key> <key alias="parentNotPublishedAnomaly">This document is published but is not in the cache</key>
@@ -286,18 +289,12 @@
<key alias="treepicker">Pick item</key> <key alias="treepicker">Pick item</key>
<key alias="viewCacheItem">View Cache Item</key> <key alias="viewCacheItem">View Cache Item</key>
<key alias="createFolder">Create folder...</key> <key alias="createFolder">Create folder...</key>
<key alias="relateToOriginalLabel">Relate to original</key> <key alias="relateToOriginalLabel">Relate to original</key>
<key alias="includeDescendants">Include descendants</key>
<key alias="theFriendliestCommunity">The friendliest community</key> <key alias="theFriendliestCommunity">The friendliest community</key>
<key alias="linkToPage">Link to page</key> <key alias="linkToPage">Link to page</key>
<key alias="openInNewWindow">Opens the linked document in a new window or tab</key> <key alias="openInNewWindow">Opens the linked document in a new window or tab</key>
<key alias="openInFullBody">Opens the linked document in the full body of the window</key>
<key alias="openInParentFrame">Opens the linked document in the parent frame</key>
<key alias="linkToMedia">Link to media</key> <key alias="linkToMedia">Link to media</key>
<key alias="selectMedia">Select media</key> <key alias="selectMedia">Select media</key>
<key alias="selectIcon">Select icon</key> <key alias="selectIcon">Select icon</key>
<key alias="selectItem">Select item</key> <key alias="selectItem">Select item</key>
@@ -307,19 +304,14 @@
<key alias="selectMember">Select member</key> <key alias="selectMember">Select member</key>
<key alias="selectMemberGroup">Select member group</key> <key alias="selectMemberGroup">Select member group</key>
<key alias="noIconsFound">No icons were found</key> <key alias="noIconsFound">No icons were found</key>
<key alias="noMacroParams">There are no parameters for this macro</key> <key alias="noMacroParams">There are no parameters for this macro</key>
<key alias="externalLoginProviders">External login providers</key> <key alias="externalLoginProviders">External login providers</key>
<key alias="exceptionDetail">Exception Details</key> <key alias="exceptionDetail">Exception Details</key>
<key alias="stacktrace">Stacktrace</key> <key alias="stacktrace">Stacktrace</key>
<key alias="innerException">Inner Exception</key> <key alias="innerException">Inner Exception</key>
<key alias="linkYour">Link your</key> <key alias="linkYour">Link your</key>
<key alias="unLinkYour">Un-Link your</key> <key alias="unLinkYour">Un-Link your</key>
<key alias="account">account</key> <key alias="account">account</key>
<key alias="selectEditor">Select editor</key> <key alias="selectEditor">Select editor</key>
</area> </area>
<area alias="dictionaryItem"> <area alias="dictionaryItem">
@@ -327,6 +319,12 @@
Edit the different language versions for the dictionary item '<em>%0%</em>' below<br/>You can add additional languages under the 'languages' in the menu on the left Edit the different language versions for the dictionary item '<em>%0%</em>' below<br/>You can add additional languages under the 'languages' in the menu on the left
]]></key> ]]></key>
<key alias="displayName">Culture Name</key> <key alias="displayName">Culture Name</key>
<key alias="changeKey">Edit the key of the dictionary item.</key>
<key alias="changeKeyError">
<![CDATA[
The key '%0%' already exists.
]]>
</key>
</area> </area>
<area alias="placeholders"> <area alias="placeholders">
<key alias="username">Enter your username</key> <key alias="username">Enter your username</key>
@@ -819,7 +817,7 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="installStateInstalling">Installing...</key> <key alias="installStateInstalling">Installing...</key>
<key alias="installStateRestarting">Restarting, please wait...</key> <key alias="installStateRestarting">Restarting, please wait...</key>
<key alias="installStateComplete">All done, your browser will now refresh, please wait...</key> <key alias="installStateComplete">All done, your browser will now refresh, please wait...</key>
<key alias="installStateCompleted">Please click finish to complete installation and reload page.</key>
</area> </area>
<area alias="paste"> <area alias="paste">
<key alias="doNothing">Paste with full formatting (Not recommended)</key> <key alias="doNothing">Paste with full formatting (Not recommended)</key>
@@ -1335,7 +1333,7 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="customErrorsCheckRectifySuccessMessage">Custom errors successfully set to '%0%'.</key> <key alias="customErrorsCheckRectifySuccessMessage">Custom errors successfully set to '%0%'.</key>
<key alias="macroErrorModeCheckSuccessMessage">MacroErrors are set to '%0%'.</key> <key alias="macroErrorModeCheckSuccessMessage">MacroErrors are set to '%0%'.</key>
<key alias="macroErrorModeCheckErrorMessage">MacroErrors are set to '%0%' which will prevent some or all pages in your site from loading completely when there's any errors in macros. Rectifying this will set the value to '%1%'.</key> <key alias="macroErrorModeCheckErrorMessage">MacroErrors are set to '%0%' which will prevent some or all pages in your site from loading completely if there are any errors in macros. Rectifying this will set the value to '%1%'.</key>
<key alias="macroErrorModeCheckRectifySuccessMessage">MacroErrors are now set to '%0%'.</key> <key alias="macroErrorModeCheckRectifySuccessMessage">MacroErrors are now set to '%0%'.</key>
<!-- The following keys get these tokens passed in: <!-- The following keys get these tokens passed in:
@@ -1353,8 +1351,8 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="configurationServiceError">There was an error, check log for full error: %0%.</key> <key alias="configurationServiceError">There was an error, check log for full error: %0%.</key>
<key alias="xmlDataIntegrityCheckMembers">Members - Total XML: %0%, Total: %1%, Total invalid: %2%</key> <key alias="xmlDataIntegrityCheckMembers">Members - Total XML: %0%, Total: %1%, Total invalid: %2%</key>
<key alias="xmlDataIntegrityCheckMedia">Media - Total XML: %0%, Total: %1%, Total invalid %2%</key> <key alias="xmlDataIntegrityCheckMedia">Media - Total XML: %0%, Total: %1%, Total invalid: %2%</key>
<key alias="xmlDataIntegrityCheckContent">Content - Total XML: %0%, Total published: %1%, Total invalid %2%</key> <key alias="xmlDataIntegrityCheckContent">Content - Total XML: %0%, Total published: %1%, Total invalid: %2%</key>
<key alias="httpsCheckValidCertificate">Your site certificate was marked as valid.</key> <key alias="httpsCheckValidCertificate">Your site certificate was marked as valid.</key>
<key alias="httpsCheckInvalidCertificate">Certificate validation error: '%0%'</key> <key alias="httpsCheckInvalidCertificate">Certificate validation error: '%0%'</key>
+13 -14
View File
@@ -27,6 +27,9 @@
<key alias="unpublish">Unpublish</key> <key alias="unpublish">Unpublish</key>
<key alias="refreshNode">Reload</key> <key alias="refreshNode">Reload</key>
<key alias="republish">Republish entire site</key> <key alias="republish">Republish entire site</key>
<key alias="SetPermissionsForThePage">Set permissions for the page %0%</key>
<key alias="chooseWhereToMove">Choose where to move</key>
<key alias="toInTheTreeStructureBelow">to in the tree structure below</key>
<key alias="restore" version="7.3.0">Restore</key> <key alias="restore" version="7.3.0">Restore</key>
<key alias="rights">Permissions</key> <key alias="rights">Permissions</key>
<key alias="rollback">Rollback</key> <key alias="rollback">Rollback</key>
@@ -145,7 +148,7 @@
<key alias="memberrole">Role</key> <key alias="memberrole">Role</key>
<key alias="membertype">Member Type</key> <key alias="membertype">Member Type</key>
<key alias="noDate">No date chosen</key> <key alias="noDate">No date chosen</key>
<key alias="nodeName">Page Title</key> <key alias="nodeName">Link title</key>
<key alias="otherElements">Properties</key> <key alias="otherElements">Properties</key>
<key alias="parentNotPublished">This document is published but is not visible because the parent '%0%' is unpublished</key> <key alias="parentNotPublished">This document is published but is not visible because the parent '%0%' is unpublished</key>
<key alias="parentNotPublishedAnomaly">This document is published but is not in the cache</key> <key alias="parentNotPublishedAnomaly">This document is published but is not in the cache</key>
@@ -288,18 +291,12 @@
<key alias="treepicker">Pick item</key> <key alias="treepicker">Pick item</key>
<key alias="viewCacheItem">View Cache Item</key> <key alias="viewCacheItem">View Cache Item</key>
<key alias="createFolder">Create folder...</key> <key alias="createFolder">Create folder...</key>
<key alias="relateToOriginalLabel">Relate to original</key> <key alias="relateToOriginalLabel">Relate to original</key>
<key alias="includeDescendants">Include descendants</key>
<key alias="theFriendliestCommunity">The friendliest community</key> <key alias="theFriendliestCommunity">The friendliest community</key>
<key alias="linkToPage">Link to page</key> <key alias="linkToPage">Link to page</key>
<key alias="openInNewWindow">Opens the linked document in a new window or tab</key> <key alias="openInNewWindow">Opens the linked document in a new window or tab</key>
<key alias="openInFullBody">Opens the linked document in the full body of the window</key>
<key alias="openInParentFrame">Opens the linked document in the parent frame</key>
<key alias="linkToMedia">Link to media</key> <key alias="linkToMedia">Link to media</key>
<key alias="selectMedia">Select media</key> <key alias="selectMedia">Select media</key>
<key alias="selectIcon">Select icon</key> <key alias="selectIcon">Select icon</key>
<key alias="selectItem">Select item</key> <key alias="selectItem">Select item</key>
@@ -308,19 +305,14 @@
<key alias="selectContent">Select content</key> <key alias="selectContent">Select content</key>
<key alias="selectMember">Select member</key> <key alias="selectMember">Select member</key>
<key alias="selectMemberGroup">Select member group</key> <key alias="selectMemberGroup">Select member group</key>
<key alias="noMacroParams">There are no parameters for this macro</key> <key alias="noMacroParams">There are no parameters for this macro</key>
<key alias="externalLoginProviders">External login providers</key> <key alias="externalLoginProviders">External login providers</key>
<key alias="exceptionDetail">Exception Details</key> <key alias="exceptionDetail">Exception Details</key>
<key alias="stacktrace">Stacktrace</key> <key alias="stacktrace">Stacktrace</key>
<key alias="innerException">Inner Exception</key> <key alias="innerException">Inner Exception</key>
<key alias="linkYour">Link your</key> <key alias="linkYour">Link your</key>
<key alias="unLinkYour">Un-Link your</key> <key alias="unLinkYour">Un-Link your</key>
<key alias="account">account</key> <key alias="account">account</key>
<key alias="selectEditor">Select editor</key> <key alias="selectEditor">Select editor</key>
</area> </area>
<area alias="dictionaryItem"> <area alias="dictionaryItem">
@@ -328,6 +320,12 @@
Edit the different language versions for the dictionary item '<em>%0%</em>' below<br/>You can add additional languages under the 'languages' in the menu on the left Edit the different language versions for the dictionary item '<em>%0%</em>' below<br/>You can add additional languages under the 'languages' in the menu on the left
]]></key> ]]></key>
<key alias="displayName">Culture Name</key> <key alias="displayName">Culture Name</key>
<key alias="changeKey">Edit the key of the dictionary item.</key>
<key alias="changeKeyError">
<![CDATA[
The key '%0%' already exists.
]]>
</key>
</area> </area>
<area alias="placeholders"> <area alias="placeholders">
<key alias="username">Enter your username</key> <key alias="username">Enter your username</key>
@@ -819,6 +817,7 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="installStateInstalling">Installing...</key> <key alias="installStateInstalling">Installing...</key>
<key alias="installStateRestarting">Restarting, please wait...</key> <key alias="installStateRestarting">Restarting, please wait...</key>
<key alias="installStateComplete">All done, your browser will now refresh, please wait...</key> <key alias="installStateComplete">All done, your browser will now refresh, please wait...</key>
<key alias="installStateCompleted">Please click finish to complete installation and reload page.</key>
</area> </area>
<area alias="paste"> <area alias="paste">
<key alias="doNothing">Paste with full formatting (Not recommended)</key> <key alias="doNothing">Paste with full formatting (Not recommended)</key>
@@ -1340,7 +1339,7 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="customErrorsCheckRectifySuccessMessage">Custom errors successfully set to '%0%'.</key> <key alias="customErrorsCheckRectifySuccessMessage">Custom errors successfully set to '%0%'.</key>
<key alias="macroErrorModeCheckSuccessMessage">MacroErrors are set to '%0%'.</key> <key alias="macroErrorModeCheckSuccessMessage">MacroErrors are set to '%0%'.</key>
<key alias="macroErrorModeCheckErrorMessage">MacroErrors are set to '%0%' which will prevent some or all pages in your site from loading completely when there's any errors in macros. Rectifying this will set the value to '%1%'.</key> <key alias="macroErrorModeCheckErrorMessage">MacroErrors are set to '%0%' which will prevent some or all pages in your site from loading completely if there are any errors in macros. Rectifying this will set the value to '%1%'.</key>
<key alias="macroErrorModeCheckRectifySuccessMessage">MacroErrors are now set to '%0%'.</key> <key alias="macroErrorModeCheckRectifySuccessMessage">MacroErrors are now set to '%0%'.</key>
<!-- The following keys get these tokens passed in: <!-- The following keys get these tokens passed in:
File diff suppressed because it is too large Load Diff
+1 -13
View File
@@ -275,19 +275,12 @@
<key alias="thumbnailimageclickfororiginal">クリックすると画像がフルサイズで表示されます</key> <key alias="thumbnailimageclickfororiginal">クリックすると画像がフルサイズで表示されます</key>
<key alias="treepicker">項目の選択</key> <key alias="treepicker">項目の選択</key>
<key alias="viewCacheItem">キャッシュされている項目の表示</key> <key alias="viewCacheItem">キャッシュされている項目の表示</key>
<key alias="createFolder">フォルダーの作成...</key> <key alias="createFolder">フォルダーの作成...</key>
<key alias="relateToOriginalLabel">オリジナルに関連付ける</key> <key alias="relateToOriginalLabel">オリジナルに関連付ける</key>
<key alias="theFriendliestCommunity">フレンドリーなコミュニティ</key> <key alias="theFriendliestCommunity">フレンドリーなコミュニティ</key>
<key alias="linkToPage">ページへリンク</key> <key alias="linkToPage">ページへリンク</key>
<key alias="openInNewWindow">リンク ドキュメントを新しいウィンドウまたはタブで開く</key> <key alias="openInNewWindow">リンク ドキュメントを新しいウィンドウまたはタブで開く</key>
<key alias="openInFullBody">リンク ドキュメントをウィンドウ全文表示で開く</key>
<key alias="openInParentFrame">親フレームでリンク ドキュメントを開く</key>
<key alias="linkToMedia">メディアへリンク</key> <key alias="linkToMedia">メディアへリンク</key>
<key alias="selectMedia">メディアの選択</key> <key alias="selectMedia">メディアの選択</key>
<key alias="selectIcon">アイコンの選択</key> <key alias="selectIcon">アイコンの選択</key>
<key alias="selectItem">アイテムの選択</key> <key alias="selectItem">アイテムの選択</key>
@@ -296,19 +289,14 @@
<key alias="selectContent">コンテンツの選択</key> <key alias="selectContent">コンテンツの選択</key>
<key alias="selectMember">メンバーの選択</key> <key alias="selectMember">メンバーの選択</key>
<key alias="selectMemberGroup">メンバー グループの選択</key> <key alias="selectMemberGroup">メンバー グループの選択</key>
<key alias="noMacroParams">このマクロのパラメーターはありません</key> <key alias="noMacroParams">このマクロのパラメーターはありません</key>
<key alias="externalLoginProviders">外部ログイン プロバイダー</key> <key alias="externalLoginProviders">外部ログイン プロバイダー</key>
<key alias="exceptionDetail">例外の詳細</key> <key alias="exceptionDetail">例外の詳細</key>
<key alias="stacktrace">スタックトレース</key> <key alias="stacktrace">スタックトレース</key>
<key alias="innerException">Inner Exception</key> <key alias="innerException">Inner Exception</key>
<key alias="linkYour">次をリンク:</key> <key alias="linkYour">次をリンク:</key>
<key alias="unLinkYour">次をリンク解除:</key> <key alias="unLinkYour">次をリンク解除:</key>
<key alias="account">アカウント</key> <key alias="account">アカウント</key>
<key alias="selectEditor">エディターの選択</key> <key alias="selectEditor">エディターの選択</key>
</area> </area>
<area alias="dictionaryItem"> <area alias="dictionaryItem">
+18 -18
View File
@@ -15,8 +15,8 @@
<key alias="disable">Deaktywuj</key> <key alias="disable">Deaktywuj</key>
<key alias="emptyTrashcan">Opróżnij kosz</key> <key alias="emptyTrashcan">Opróżnij kosz</key>
<key alias="exportDocumentType">Eksportuj typ dokumentu</key> <key alias="exportDocumentType">Eksportuj typ dokumentu</key>
<key alias="exportDocumentTypeAsCode">TRANSLATE ME: 'Export to .NET'</key> <key alias="exportDocumentTypeAsCode">Ekspo .NET'</key>
<key alias="exportDocumentTypeAsCode-Full">TRANSLATE ME: 'Export to .NET'</key> <key alias="exportDocumentTypeAsCode-Full">Eksportuj do .NET'</key>
<key alias="importDocumentType">Importuj typ dokumentu</key> <key alias="importDocumentType">Importuj typ dokumentu</key>
<key alias="importPackage">Importuj zbiór</key> <key alias="importPackage">Importuj zbiór</key>
<key alias="liveEdit">Edytuj na stronie</key> <key alias="liveEdit">Edytuj na stronie</key>
@@ -118,7 +118,7 @@
</area> </area>
<area alias="dashboard"> <area alias="dashboard">
<key alias="browser">Przeglądaj swoją stronę</key> <key alias="browser">Przeglądaj swoją stronę</key>
<key alias="dontShowAgain">TRANSLATE ME: '- Hide'</key> <key alias="dontShowAgain">- Ukryj</key>
<key alias="nothinghappens">Jeśli Umbraco się nie otwiera, prawdopodbnie musisz zezwolić tej stronie na otwieranie wyskakujących okienek</key> <key alias="nothinghappens">Jeśli Umbraco się nie otwiera, prawdopodbnie musisz zezwolić tej stronie na otwieranie wyskakujących okienek</key>
<key alias="openinnew">zostało otwarte w nowym oknie</key> <key alias="openinnew">zostało otwarte w nowym oknie</key>
<key alias="restart">Restartuj</key> <key alias="restart">Restartuj</key>
@@ -168,7 +168,7 @@
<key alias="confirmEmptyTrashcan">Proszę zaznaczyć, aby potwierdzić usunięcie %0% elementów.</key> <key alias="confirmEmptyTrashcan">Proszę zaznaczyć, aby potwierdzić usunięcie %0% elementów.</key>
<key alias="confirmlogout">Jesteś pewny?</key> <key alias="confirmlogout">Jesteś pewny?</key>
<key alias="confirmSure">Jesteś pewny?</key> <key alias="confirmSure">Jesteś pewny?</key>
<key alias="cut">TRANSLATE ME: 'Cut'</key> <key alias="cut">Wytnij</key>
<key alias="editdictionary">Edytuj element słownika</key> <key alias="editdictionary">Edytuj element słownika</key>
<key alias="editlanguage">Edytuj język</key> <key alias="editlanguage">Edytuj język</key>
<key alias="insertAnchor">Wstaw link wewnętrzny</key> <key alias="insertAnchor">Wstaw link wewnętrzny</key>
@@ -183,7 +183,7 @@
<key alias="linkinternal">Link wewnętrzny:</key> <key alias="linkinternal">Link wewnętrzny:</key>
<key alias="linklocaltip">Kiedy używasz odnośników lokalnych, wstaw znak "#" na początku linku</key> <key alias="linklocaltip">Kiedy używasz odnośników lokalnych, wstaw znak "#" na początku linku</key>
<key alias="linknewwindow">Otworzyć w nowym oknie?</key> <key alias="linknewwindow">Otworzyć w nowym oknie?</key>
<key alias="macroContainerSettings">TRANSLATE ME: 'Macro Settings'</key> <key alias="macroContainerSettings">Ustawienia Makra</key>
<key alias="macroDoesNotHaveProperties">To makro nie posiada żadnych właściwości, które można edytować</key> <key alias="macroDoesNotHaveProperties">To makro nie posiada żadnych właściwości, które można edytować</key>
<key alias="paste">Wklej</key> <key alias="paste">Wklej</key>
<key alias="permissionsEdit">Edytuj Uprawnienia dla</key> <key alias="permissionsEdit">Edytuj Uprawnienia dla</key>
@@ -192,7 +192,7 @@
<key alias="recycleBinWarning">Usunięcie elementów z kosza powoduje ich trwałe i nieodwracalne skasowanie</key> <key alias="recycleBinWarning">Usunięcie elementów z kosza powoduje ich trwałe i nieodwracalne skasowanie</key>
<key alias="regexSearchError"><![CDATA[Serwis <a target='_blank' href='http://regexlib.com'>regexlib.com</a> aktulanie nie jest dostępny, na co nie mamy wpływu. Bardzo przepraszamy za te utrudnienia.]]></key> <key alias="regexSearchError"><![CDATA[Serwis <a target='_blank' href='http://regexlib.com'>regexlib.com</a> aktulanie nie jest dostępny, na co nie mamy wpływu. Bardzo przepraszamy za te utrudnienia.]]></key>
<key alias="regexSearchHelp">Przeszukaj dla wyrażeń regularnych aby dodać regułę sprawdzającą do formularza. Np. 'email' 'url'</key> <key alias="regexSearchHelp">Przeszukaj dla wyrażeń regularnych aby dodać regułę sprawdzającą do formularza. Np. 'email' 'url'</key>
<key alias="removeMacro">TRANSLATE ME: 'Remove Macro'</key> <key alias="removeMacro">Usuń Makro</key>
<key alias="requiredField">Pole wymagane</key> <key alias="requiredField">Pole wymagane</key>
<key alias="sitereindexed">Strona została przeindeksowana</key> <key alias="sitereindexed">Strona została przeindeksowana</key>
<key alias="siterepublished">Cache strony zostało odświeżone. Cała opublikowana zawartość jest teraz aktualna. Natomiast cała nieopublikowana zawartość ciągle nie jest widoczna</key> <key alias="siterepublished">Cache strony zostało odświeżone. Cała opublikowana zawartość jest teraz aktualna. Natomiast cała nieopublikowana zawartość ciągle nie jest widoczna</key>
@@ -222,7 +222,7 @@ Możesz dodać dodatkowe języki w menu "Języki" po lewej stronie.]]></key>
<area alias="editdatatype"> <area alias="editdatatype">
<key alias="addPrevalue">Dodaj wartość</key> <key alias="addPrevalue">Dodaj wartość</key>
<key alias="dataBaseDatatype">Typ bazydanych</key> <key alias="dataBaseDatatype">Typ bazydanych</key>
<key alias="guid">TRANSLATE ME: 'Data Editor GUID'</key> <key alias="guid">Edytor GUID</key>
<key alias="renderControl">Renderuj kontrolkę</key> <key alias="renderControl">Renderuj kontrolkę</key>
<key alias="rteButtons">Przyciski</key> <key alias="rteButtons">Przyciski</key>
<key alias="rteEnableAdvancedSettings">Włącz ustawienia zaawansowane dla</key> <key alias="rteEnableAdvancedSettings">Włącz ustawienia zaawansowane dla</key>
@@ -235,7 +235,7 @@ Możesz dodać dodatkowe języki w menu "Języki" po lewej stronie.]]></key>
<area alias="errorHandling"> <area alias="errorHandling">
<key alias="errorButDataWasSaved">Dane zostały zapisane, lecz wystąpiły błędy które musisz poprawić przed publikacją strony:</key> <key alias="errorButDataWasSaved">Dane zostały zapisane, lecz wystąpiły błędy które musisz poprawić przed publikacją strony:</key>
<key alias="errorChangingProviderPassword">Bieżący dostawca Membership nie obsługuje zmiany hasła (EnablePasswordRetrieval musi mieć wartość true)</key> <key alias="errorChangingProviderPassword">Bieżący dostawca Membership nie obsługuje zmiany hasła (EnablePasswordRetrieval musi mieć wartość true)</key>
<key alias="errorExistsWithoutTab">TRANSLATE ME: '%0% already exists'</key> <key alias="errorExistsWithoutTab">%0% już istnieje</key>
<key alias="errorHeader">Wystąpiły błędy:</key> <key alias="errorHeader">Wystąpiły błędy:</key>
<key alias="errorHeaderWithoutTab">Wystąpiły błędy:</key> <key alias="errorHeaderWithoutTab">Wystąpiły błędy:</key>
<key alias="errorInPasswordFormat">Hasło powinno mieć minimum %0% znaków, i zawierać co najmniej %1% niealfanumeryczny znak</key> <key alias="errorInPasswordFormat">Hasło powinno mieć minimum %0% znaków, i zawierać co najmniej %1% niealfanumeryczny znak</key>
@@ -308,7 +308,7 @@ Możesz dodać dodatkowe języki w menu "Języki" po lewej stronie.]]></key>
<key alias="language">Język</key> <key alias="language">Język</key>
<key alias="layout">układ</key> <key alias="layout">układ</key>
<key alias="loading">Ładowanie</key> <key alias="loading">Ładowanie</key>
<key alias="locked">TRANSLATE ME: 'Locked'</key> <key alias="locked">Zablokowany</key>
<key alias="login">Zaloguj</key> <key alias="login">Zaloguj</key>
<key alias="logoff">Wyloguj</key> <key alias="logoff">Wyloguj</key>
<key alias="logout">Wyloguj</key> <key alias="logout">Wyloguj</key>
@@ -332,7 +332,7 @@ Możesz dodać dodatkowe języki w menu "Języki" po lewej stronie.]]></key>
<key alias="recycleBin">Kosz</key> <key alias="recycleBin">Kosz</key>
<key alias="remaining">Pozostało</key> <key alias="remaining">Pozostało</key>
<key alias="rename">Zmień nazwę</key> <key alias="rename">Zmień nazwę</key>
<key alias="renew">TRANSLATE ME: 'Renew'</key> <key alias="renew">Odnów</key>
<key alias="retry">Ponów próbę</key> <key alias="retry">Ponów próbę</key>
<key alias="rights">Uprawnienia</key> <key alias="rights">Uprawnienia</key>
<key alias="search">Szukaj</key> <key alias="search">Szukaj</key>
@@ -341,7 +341,7 @@ Możesz dodać dodatkowe języki w menu "Języki" po lewej stronie.]]></key>
<key alias="showPageOnSend">Pokaż stronę "wyślij"</key> <key alias="showPageOnSend">Pokaż stronę "wyślij"</key>
<key alias="size">Rozmiar</key> <key alias="size">Rozmiar</key>
<key alias="sort">Sortuj</key> <key alias="sort">Sortuj</key>
<key alias="submit">Submit</key> <!-- TODO: Translate this --> <key alias="submit">Zatwierdź</key>
<key alias="type">Typ</key> <key alias="type">Typ</key>
<key alias="typeToSearch">Szukaj</key> <key alias="typeToSearch">Szukaj</key>
<key alias="up">W górę</key> <key alias="up">W górę</key>
@@ -356,8 +356,8 @@ Możesz dodać dodatkowe języki w menu "Języki" po lewej stronie.]]></key>
<key alias="welcome">Witaj...</key> <key alias="welcome">Witaj...</key>
<key alias="width">Szerokość</key> <key alias="width">Szerokość</key>
<key alias="yes">Tak</key> <key alias="yes">Tak</key>
<key alias="reorder">Reorder</key> <key alias="reorder">Zmień kolejność</key>
<key alias="reorderDone">I am done reordering</key> <key alias="reorderDone">Kolejność została zmieniona</key>
</area> </area>
<area alias="graphicheadline"> <area alias="graphicheadline">
<key alias="backgroundcolor">Kolor tła</key> <key alias="backgroundcolor">Kolor tła</key>
@@ -786,7 +786,7 @@ Miłego dnia!]]></key>
<area alias="user"> <area alias="user">
<key alias="administrators">Administrator</key> <key alias="administrators">Administrator</key>
<key alias="categoryField">Pole kategorii</key> <key alias="categoryField">Pole kategorii</key>
<key alias="changePassword">TRANSLATE ME: 'Change Your Password'</key> <key alias="changePassword">Zmień hasło!</key>
<key alias="changePasswordDescription">TRANSLATE ME: 'You can change your password for accessing the Umbraco Back Office by filling out the form below and click the 'Change Password' button'</key> <key alias="changePasswordDescription">TRANSLATE ME: 'You can change your password for accessing the Umbraco Back Office by filling out the form below and click the 'Change Password' button'</key>
<key alias="contentChannel">Zawartość</key> <key alias="contentChannel">Zawartość</key>
<key alias="descriptionField">Opis</key> <key alias="descriptionField">Opis</key>
@@ -800,10 +800,10 @@ Miłego dnia!]]></key>
<key alias="modules">Sekcje</key> <key alias="modules">Sekcje</key>
<key alias="noConsole">Wyłącz dostęp do Umbraco</key> <key alias="noConsole">Wyłącz dostęp do Umbraco</key>
<key alias="password">Hasło</key> <key alias="password">Hasło</key>
<key alias="passwordChanged">TRANSLATE ME: 'Your password has been changed!'</key> <key alias="passwordChanged">Twoje hasło zostało zmienione!</key>
<key alias="passwordConfirm">TRANSLATE ME: 'Please confirm the new password'</key> <key alias="passwordConfirm">Proszę potwierdź nowe hasło!</key>
<key alias="passwordEnterNew">TRANSLATE ME: 'Enter your new password'</key> <key alias="passwordEnterNew">Wprowadź nowe hasło</key>
<key alias="passwordIsBlank">TRANSLATE ME: 'Your new password cannot be blank!'</key> <key alias="passwordIsBlank">Nowe hasło nie może byc puste!</key>
<key alias="passwordIsDifferent">TRANSLATE ME: 'There was a difference between the new password and the confirmed password. Please try again!'</key> <key alias="passwordIsDifferent">TRANSLATE ME: 'There was a difference between the new password and the confirmed password. Please try again!'</key>
<key alias="passwordMismatch">TRANSLATE ME: 'The confirmed password doesn't match the new password!'</key> <key alias="passwordMismatch">TRANSLATE ME: 'The confirmed password doesn't match the new password!'</key>
<key alias="permissionReplaceChildren">Zastąp prawa dostępu dla węzłów potomnych</key> <key alias="permissionReplaceChildren">Zastąp prawa dostępu dla węzłów potomnych</key>
+7 -13
View File
@@ -340,18 +340,11 @@
<key alias="treepicker">Выберите элемент</key> <key alias="treepicker">Выберите элемент</key>
<key alias="viewCacheItem">Просмотр элемента кэша</key> <key alias="viewCacheItem">Просмотр элемента кэша</key>
<key alias="createFolder">Создать папку...</key> <key alias="createFolder">Создать папку...</key>
<key alias="relateToOriginalLabel">Связать с оригиналом</key> <key alias="relateToOriginalLabel">Связать с оригиналом</key>
<key alias="theFriendliestCommunity">Самое дружелюбное сообщество</key> <key alias="theFriendliestCommunity">Самое дружелюбное сообщество</key>
<key alias="linkToPage">Ссылка на страницу</key> <key alias="linkToPage">Ссылка на страницу</key>
<key alias="openInNewWindow">Открывает документ по ссылке в новом окне или вкладке браузера</key> <key alias="openInNewWindow">Открывает документ по ссылке в новом окне или вкладке браузера</key>
<key alias="openInFullBody">Открывает документ по ссылке в полноэкранном режиме</key>
<key alias="openInParentFrame">Открывает документ по ссылке в родительском фрейме</key>
<key alias="linkToMedia">Ссылка на медиа-файл</key> <key alias="linkToMedia">Ссылка на медиа-файл</key>
<key alias="selectMedia">Выбрать медиа</key> <key alias="selectMedia">Выбрать медиа</key>
<key alias="selectIcon">Выбрать значок</key> <key alias="selectIcon">Выбрать значок</key>
<key alias="selectItem">Выбрать элемент</key> <key alias="selectItem">Выбрать элемент</key>
@@ -360,19 +353,14 @@
<key alias="selectContent">Выбрать содержимое</key> <key alias="selectContent">Выбрать содержимое</key>
<key alias="selectMember">Выбрать участника</key> <key alias="selectMember">Выбрать участника</key>
<key alias="selectMemberGroup">Выбрать группу участников</key> <key alias="selectMemberGroup">Выбрать группу участников</key>
<key alias="noMacroParams">Это макрос без параметров</key> <key alias="noMacroParams">Это макрос без параметров</key>
<key alias="externalLoginProviders">Провайдеры аутентификации</key> <key alias="externalLoginProviders">Провайдеры аутентификации</key>
<key alias="exceptionDetail">Подробное сообщение об ошибке</key> <key alias="exceptionDetail">Подробное сообщение об ошибке</key>
<key alias="stacktrace">Трассировка стека</key> <key alias="stacktrace">Трассировка стека</key>
<key alias="innerException">Внутренняя ошибка</key> <key alias="innerException">Внутренняя ошибка</key>
<key alias="linkYour">Связать</key> <key alias="linkYour">Связать</key>
<key alias="unLinkYour">Разорвать связь</key> <key alias="unLinkYour">Разорвать связь</key>
<key alias="account">учетную запись</key> <key alias="account">учетную запись</key>
<key alias="selectEditor">Выбрать редактор</key> <key alias="selectEditor">Выбрать редактор</key>
</area> </area>
<area alias="dictionaryItem"> <area alias="dictionaryItem">
@@ -380,6 +368,12 @@
Ниже Вы можете указать различные переводы данной статьи словаря '<em>%0%</em>'<br/>Добавить другие языки можно, воспользовавшись пунктом 'Языки' в меню слева Ниже Вы можете указать различные переводы данной статьи словаря '<em>%0%</em>'<br/>Добавить другие языки можно, воспользовавшись пунктом 'Языки' в меню слева
]]></key> ]]></key>
<key alias="displayName">Название языка (культуры)</key> <key alias="displayName">Название языка (культуры)</key>
<key alias="changeKey">Редактировать элемент (ключ) словаря</key>
<key alias="changeKeyError">
<![CDATA[
Ключ '%0%' уже существует в словаре.
]]>
</key>
</area> </area>
<area alias="editcontenttype"> <area alias="editcontenttype">
<key alias="allowAtRoot" version="7.2">Допустим как корневой</key> <key alias="allowAtRoot" version="7.2">Допустим как корневой</key>
@@ -655,7 +649,7 @@
<key alias="xmlDataIntegrityCheckMedia">Медиа - всего в XML: %0%, всего: %1%Б с ошибками: %2%</key> <key alias="xmlDataIntegrityCheckMedia">Медиа - всего в XML: %0%, всего: %1%Б с ошибками: %2%</key>
<key alias="xmlDataIntegrityCheckContent">Содержимое - всего в XML: %0%, всего опубликовано: %1%, с ошибками: %2%</key> <key alias="xmlDataIntegrityCheckContent">Содержимое - всего в XML: %0%, всего опубликовано: %1%, с ошибками: %2%</key>
<key alias="httpsCheckValidCertificate">Сертификат Вашего сайта отмечен как проверенный.</key> <key alias="httpsCheckValidCertificate">Сертификат Вашего веб-сайта отмечен как проверенный.</key>
<key alias="httpsCheckInvalidCertificate">Ошибка проверки сертификата: '%0%'</key> <key alias="httpsCheckInvalidCertificate">Ошибка проверки сертификата: '%0%'</key>
<key alias="httpsCheckInvalidUrl">Ошибка проверки адреса URL %0% - '%1%'</key> <key alias="httpsCheckInvalidUrl">Ошибка проверки адреса URL %0% - '%1%'</key>
<key alias="httpsCheckIsCurrentSchemeHttps">Сейчас Вы %0% просматриваете сайт, используя протокол HTTPS.</key> <key alias="httpsCheckIsCurrentSchemeHttps">Сейчас Вы %0% просматриваете сайт, используя протокол HTTPS.</key>
+1 -1
View File
@@ -22,7 +22,7 @@
ControlToValidate="Email" ValidateEmptyText="false" OnServerValidate="EmailExistsCheck"></asp:CustomValidator> ControlToValidate="Email" ValidateEmptyText="false" OnServerValidate="EmailExistsCheck"></asp:CustomValidator>
<asp:CustomValidator runat="server" ID="EmailValidator" OnServerValidate="EmailValidator_OnServerValidate" <asp:CustomValidator runat="server" ID="EmailValidator" OnServerValidate="EmailValidator_OnServerValidate"
ControlToValidate="Email" ControlToValidate="Email"
ErrorMessage="Invalid email address" ErrorMessage='<%#ui.Text("errorHandling", "errorRegExpWithoutTab", "E-mail", CurrentUser) %>'
Display="None" /> Display="None" />
<br /> <br />
<asp:TextBox ID="Email" runat="server" Width="350px" CssClass="bigInput"></asp:TextBox> <asp:TextBox ID="Email" runat="server" Width="350px" CssClass="bigInput"></asp:TextBox>
+214 -175
View File
@@ -1285,7 +1285,7 @@ angular.module("umbraco").controller("Umbraco.Dialogs.MacroPickerController", fu
//used for the media picker dialog //used for the media picker dialog
angular.module("umbraco") angular.module("umbraco")
.controller("Umbraco.Dialogs.MediaPickerController", .controller("Umbraco.Dialogs.MediaPickerController",
function ($scope, mediaResource, umbRequestHelper, entityResource, $log, mediaHelper, eventsService, treeService, $cookies, $element, $timeout) { function($scope, mediaResource, umbRequestHelper, entityResource, $log, mediaHelper, mediaTypeHelper, eventsService, treeService) {
var dialogOptions = $scope.dialogOptions; var dialogOptions = $scope.dialogOptions;
@@ -1295,22 +1295,27 @@ angular.module("umbraco")
$scope.startNodeId = dialogOptions.startNodeId ? dialogOptions.startNodeId : -1; $scope.startNodeId = dialogOptions.startNodeId ? dialogOptions.startNodeId : -1;
$scope.cropSize = dialogOptions.cropSize; $scope.cropSize = dialogOptions.cropSize;
//preload selected item //preload selected item
$scope.target = undefined; $scope.target = undefined;
if(dialogOptions.currentTarget){ if (dialogOptions.currentTarget) {
$scope.target = dialogOptions.currentTarget; $scope.target = dialogOptions.currentTarget;
} }
$scope.upload = function(v){ $scope.acceptedMediatypes = [];
angular.element(".umb-file-dropzone-directive .file-select").click(); mediaTypeHelper.getAllowedImagetypes($scope.startNodeId)
.then(function(types) {
$scope.acceptedMediatypes = types;
});
$scope.upload = function(v) {
angular.element(".umb-file-dropzone-directive .file-select").click();
}; };
$scope.dragLeave = function(el, event){ $scope.dragLeave = function(el, event) {
$scope.activeDrag = false; $scope.activeDrag = false;
}; };
$scope.dragEnter = function(el, event){ $scope.dragEnter = function(el, event) {
$scope.activeDrag = true; $scope.activeDrag = true;
}; };
@@ -1336,21 +1341,25 @@ angular.module("umbraco")
}; };
$scope.gotoFolder = function(folder) { $scope.gotoFolder = function(folder) {
if (!folder) {
if(!folder){ folder = { id: -1, name: "Media", icon: "icon-folder" };
folder = {id: -1, name: "Media", icon: "icon-folder"};
} }
if (folder.id > 0) { if (folder.id > 0) {
entityResource.getAncestors(folder.id, "media") entityResource.getAncestors(folder.id, "media")
.then(function(anc) { .then(function(anc) {
// anc.splice(0,1); // anc.splice(0,1);
$scope.path = _.filter(anc, function (f) { $scope.path = _.filter(anc,
return f.path.indexOf($scope.startNodeId) !== -1; function(f) {
}); return f.path.indexOf($scope.startNodeId) !== -1;
});
}); });
}
else { mediaTypeHelper.getAllowedImagetypes(folder.id)
.then(function(types) {
$scope.acceptedMediatypes = types;
});
} else {
$scope.path = []; $scope.path = [];
} }
@@ -1370,40 +1379,40 @@ angular.module("umbraco")
if (image.isFolder && !select) { if (image.isFolder && !select) {
$scope.gotoFolder(image); $scope.gotoFolder(image);
}else{ } else {
eventsService.emit("dialogs.mediaPicker.select", image); eventsService.emit("dialogs.mediaPicker.select", image);
//we have 3 options add to collection (if multi) show details, or submit it right back to the callback //we have 3 options add to collection (if multi) show details, or submit it right back to the callback
if ($scope.multiPicker) { if ($scope.multiPicker) {
$scope.select(image); $scope.select(image);
image.cssclass = ($scope.dialogData.selection.indexOf(image) > -1) ? "selected" : ""; image.cssclass = ($scope.dialogData.selection.indexOf(image) > -1) ? "selected" : "";
}else if($scope.showDetails) { } else if ($scope.showDetails) {
$scope.target= image; $scope.target = image;
$scope.target.url = mediaHelper.resolveFile(image); $scope.target.url = mediaHelper.resolveFile(image);
}else{ } else {
$scope.submit(image); $scope.submit(image);
} }
} }
}; };
$scope.exitDetails = function(){ $scope.exitDetails = function() {
if(!$scope.currentFolder){ if (!$scope.currentFolder) {
$scope.gotoFolder(); $scope.gotoFolder();
} }
$scope.target = undefined; $scope.target = undefined;
}; };
$scope.onUploadComplete = function () { $scope.onUploadComplete = function() {
$scope.gotoFolder($scope.currentFolder); $scope.gotoFolder($scope.currentFolder);
}; };
$scope.onFilesQueue = function(){ $scope.onFilesQueue = function() {
$scope.activeDrag = false; $scope.activeDrag = false;
}; };
//default root item //default root item
if(!$scope.target){ if (!$scope.target) {
$scope.gotoFolder({ id: $scope.startNodeId, name: "Media", icon: "icon-folder" }); $scope.gotoFolder({ id: $scope.startNodeId, name: "Media", icon: "icon-folder" });
} }
}); });
@@ -1895,7 +1904,7 @@ angular.module("umbraco").controller("Umbraco.Dialogs.TreePickerController",
} }
}); });
} else { } else {
var a = dialogOptions.filter.toLowerCase().split(','); var a = dialogOptions.filter.toLowerCase().replace(/\s/g, '').split(',');
angular.forEach(nodes, function (value, key) { angular.forEach(nodes, function (value, key) {
var found = a.indexOf(value.metaData.contentType.toLowerCase()) >= 0; var found = a.indexOf(value.metaData.contentType.toLowerCase()) >= 0;
@@ -3386,9 +3395,9 @@ angular.module("umbraco").controller("Umbraco.Overlays.MacroPickerController", M
//used for the media picker dialog //used for the media picker dialog
angular.module("umbraco") angular.module("umbraco")
.controller("Umbraco.Overlays.MediaPickerController", .controller("Umbraco.Overlays.MediaPickerController",
function ($scope, mediaResource, umbRequestHelper, entityResource, $log, mediaHelper, eventsService, treeService, $element, $timeout, $cookies, $cookieStore, localizationService) { function($scope, mediaResource, umbRequestHelper, entityResource, $log, mediaHelper, mediaTypeHelper, eventsService, treeService, $element, $timeout, $cookies, $cookieStore, localizationService) {
if(!$scope.model.title) { if (!$scope.model.title) {
$scope.model.title = localizationService.localize("defaultdialogs_selectMedia"); $scope.model.title = localizationService.localize("defaultdialogs_selectMedia");
} }
@@ -3401,60 +3410,59 @@ angular.module("umbraco")
$scope.startNodeId = dialogOptions.startNodeId ? dialogOptions.startNodeId : -1; $scope.startNodeId = dialogOptions.startNodeId ? dialogOptions.startNodeId : -1;
$scope.cropSize = dialogOptions.cropSize; $scope.cropSize = dialogOptions.cropSize;
$scope.lastOpenedNode = $cookieStore.get("umbLastOpenedMediaNodeId"); $scope.lastOpenedNode = $cookieStore.get("umbLastOpenedMediaNodeId");
if($scope.onlyImages){ if ($scope.onlyImages) {
$scope.acceptedFileTypes = mediaHelper.formatFileTypes(Umbraco.Sys.ServerVariables.umbracoSettings.imageFileTypes); $scope.acceptedFileTypes = mediaHelper
} .formatFileTypes(Umbraco.Sys.ServerVariables.umbracoSettings.imageFileTypes);
else { } else {
$scope.acceptedFileTypes = !mediaHelper.formatFileTypes(Umbraco.Sys.ServerVariables.umbracoSettings.disallowedUploadFiles); $scope.acceptedFileTypes = !mediaHelper
.formatFileTypes(Umbraco.Sys.ServerVariables.umbracoSettings.disallowedUploadFiles);
} }
$scope.maxFileSize = Umbraco.Sys.ServerVariables.umbracoSettings.maxFileSize + "KB"; $scope.maxFileSize = Umbraco.Sys.ServerVariables.umbracoSettings.maxFileSize + "KB";
$scope.model.selectedImages = []; $scope.model.selectedImages = [];
$scope.acceptedMediatypes = [];
mediaTypeHelper.getAllowedImagetypes($scope.startNodeId)
.then(function(types) {
$scope.acceptedMediatypes = types;
});
//preload selected item //preload selected item
$scope.target = undefined; $scope.target = undefined;
if(dialogOptions.currentTarget){ if (dialogOptions.currentTarget) {
$scope.target = dialogOptions.currentTarget; $scope.target = dialogOptions.currentTarget;
} }
$scope.upload = function(v){ $scope.upload = function(v) {
angular.element(".umb-file-dropzone-directive .file-select").click(); angular.element(".umb-file-dropzone-directive .file-select").click();
}; };
$scope.dragLeave = function(el, event){ $scope.dragLeave = function(el, event) {
$scope.activeDrag = false; $scope.activeDrag = false;
}; };
$scope.dragEnter = function(el, event){ $scope.dragEnter = function(el, event) {
$scope.activeDrag = true; $scope.activeDrag = true;
}; };
$scope.submitFolder = function() { $scope.submitFolder = function() {
if ($scope.newFolderName) {
mediaResource
.addFolder($scope.newFolderName, $scope.currentFolder.id)
.then(function(data) {
//we've added a new folder so lets clear the tree cache for that specific item
treeService.clearCache({
cacheKey: "__media", //this is the main media tree cache key
childrenOf: data.parentId //clear the children of the parent
});
if ($scope.newFolderName) { $scope.gotoFolder(data);
$scope.showFolderInput = false;
mediaResource $scope.newFolderName = "";
.addFolder($scope.newFolderName, $scope.currentFolder.id)
.then(function(data) {
//we've added a new folder so lets clear the tree cache for that specific item
treeService.clearCache({
cacheKey: "__media", //this is the main media tree cache key
childrenOf: data.parentId //clear the children of the parent
}); });
} else {
$scope.gotoFolder(data); $scope.showFolderInput = false;
}
$scope.showFolderInput = false;
$scope.newFolderName = "";
});
} else {
$scope.showFolderInput = false;
}
}; };
$scope.enterSubmitFolder = function(event) { $scope.enterSubmitFolder = function(event) {
@@ -3466,58 +3474,61 @@ angular.module("umbraco")
$scope.gotoFolder = function(folder) { $scope.gotoFolder = function(folder) {
if(!$scope.multiPicker) { if (!$scope.multiPicker) {
deselectAllImages($scope.model.selectedImages); deselectAllImages($scope.model.selectedImages);
} }
if(!folder){ if (!folder) {
folder = {id: -1, name: "Media", icon: "icon-folder"}; folder = { id: -1, name: "Media", icon: "icon-folder" };
} }
if (folder.id > 0) { if (folder.id > 0) {
entityResource.getAncestors(folder.id, "media") entityResource.getAncestors(folder.id, "media")
.then(function(anc) { .then(function(anc) {
// anc.splice(0,1); // anc.splice(0,1);
$scope.path = _.filter(anc, function (f) { $scope.path = _.filter(anc,
return f.path.indexOf($scope.startNodeId) !== -1; function(f) {
}); return f.path.indexOf($scope.startNodeId) !== -1;
});
}); });
}
else { mediaTypeHelper.getAllowedImagetypes(folder.id)
.then(function(types) {
$scope.acceptedMediatypes = types;
});
} else {
$scope.path = []; $scope.path = [];
} }
//mediaResource.rootMedia() //mediaResource.rootMedia()
mediaResource.getChildren(folder.id) mediaResource.getChildren(folder.id)
.then(function(data) { .then(function(data) {
$scope.searchTerm = ""; $scope.searchTerm = "";
$scope.images = data.items ? data.items : []; $scope.images = data.items ? data.items : [];
// set already selected images to selected // set already selected images to selected
for (var folderImageIndex = 0; folderImageIndex < $scope.images.length; folderImageIndex++) { for (var folderImageIndex = 0; folderImageIndex < $scope.images.length; folderImageIndex++) {
var folderImage = $scope.images[folderImageIndex];
var imageIsSelected = false;
var folderImage = $scope.images[folderImageIndex]; for (var selectedImageIndex = 0;
var imageIsSelected = false; selectedImageIndex < $scope.model.selectedImages.length;
selectedImageIndex++) {
var selectedImage = $scope.model.selectedImages[selectedImageIndex];
for (var selectedImageIndex = 0; selectedImageIndex < $scope.model.selectedImages.length; selectedImageIndex++) { if (folderImage.key === selectedImage.key) {
var selectedImage = $scope.model.selectedImages[selectedImageIndex]; imageIsSelected = true;
}
if(folderImage.key === selectedImage.key) {
imageIsSelected = true;
} }
} if (imageIsSelected) {
folderImage.selected = true;
if(imageIsSelected) { }
folderImage.selected = true; }
} });
}
});
$scope.currentFolder = folder; $scope.currentFolder = folder;
// for some reason i cannot set cookies with cookieStore // for some reason i cannot set cookies with cookieStore
document.cookie="umbLastOpenedMediaNodeId=" + folder.id; document.cookie = "umbLastOpenedMediaNodeId=" + folder.id;
}; };
@@ -3529,52 +3540,40 @@ angular.module("umbraco")
eventsService.emit("dialogs.mediaPicker.select", image); eventsService.emit("dialogs.mediaPicker.select", image);
selectImage(image); selectImage(image);
} }
} else { } else {
eventsService.emit("dialogs.mediaPicker.select", image); eventsService.emit("dialogs.mediaPicker.select", image);
if ($scope.showDetails) {
if($scope.showDetails) {
$scope.target = image; $scope.target = image;
$scope.target.url = mediaHelper.resolveFile(image); $scope.target.url = mediaHelper.resolveFile(image);
$scope.openDetailsDialog(); $scope.openDetailsDialog();
} else { } else {
selectImage(image); selectImage(image);
} }
} }
}; };
$scope.clickItemName = function(item) { $scope.clickItemName = function(item) {
if(item.isFolder) { if (item.isFolder) {
$scope.gotoFolder(item); $scope.gotoFolder(item);
} }
}; };
function selectImage(image) { function selectImage(image) {
if (image.selected) {
if(image.selected) { for (var i = 0; $scope.model.selectedImages.length > i; i++) {
for(var i = 0; $scope.model.selectedImages.length > i; i++) {
var imageInSelection = $scope.model.selectedImages[i]; var imageInSelection = $scope.model.selectedImages[i];
if(image.key === imageInSelection.key) { if (image.key === imageInSelection.key) {
image.selected = false; image.selected = false;
$scope.model.selectedImages.splice(i, 1); $scope.model.selectedImages.splice(i, 1);
} }
} }
} else { } else {
if (!$scope.multiPicker) {
if(!$scope.multiPicker) {
deselectAllImages($scope.model.selectedImages); deselectAllImages($scope.model.selectedImages);
} }
image.selected = true; image.selected = true;
$scope.model.selectedImages.push(image); $scope.model.selectedImages.push(image);
} }
} }
function deselectAllImages(images) { function deselectAllImages(images) {
@@ -3585,68 +3584,68 @@ angular.module("umbraco")
images.length = 0; images.length = 0;
} }
$scope.onUploadComplete = function () { $scope.onUploadComplete = function() {
$scope.gotoFolder($scope.currentFolder); $scope.gotoFolder($scope.currentFolder);
}; };
$scope.onFilesQueue = function(){ $scope.onFilesQueue = function() {
$scope.activeDrag = false; $scope.activeDrag = false;
}; };
//default root item //default root item
if (!$scope.target) { if (!$scope.target) {
if ($scope.lastOpenedNode && $scope.lastOpenedNode !== -1) {
entityResource.getById($scope.lastOpenedNode, "media")
.then(function(node) {
// make sure that las opened node is on the same path as start node
var nodePath = node.path.split(",");
if($scope.lastOpenedNode && $scope.lastOpenedNode !== -1) { if (nodePath.indexOf($scope.startNodeId.toString()) !== -1) {
$scope
entityResource.getById($scope.lastOpenedNode, "media") .gotoFolder({ id: $scope.lastOpenedNode, name: "Media", icon: "icon-folder" });
.then(function(node){ } else {
$scope.gotoFolder({ id: $scope.startNodeId, name: "Media", icon: "icon-folder" });
// make sure that las opened node is on the same path as start node }
var nodePath = node.path.split(","); },
function(err) {
if(nodePath.indexOf($scope.startNodeId.toString()) !== -1) { $scope.gotoFolder({ id: $scope.startNodeId, name: "Media", icon: "icon-folder" });
$scope.gotoFolder({id: $scope.lastOpenedNode, name: "Media", icon: "icon-folder"}); });
} else { } else {
$scope.gotoFolder({id: $scope.startNodeId, name: "Media", icon: "icon-folder"}); $scope.gotoFolder({ id: $scope.startNodeId, name: "Media", icon: "icon-folder" });
} }
}, function (err) {
$scope.gotoFolder({id: $scope.startNodeId, name: "Media", icon: "icon-folder"});
});
} else {
$scope.gotoFolder({id: $scope.startNodeId, name: "Media", icon: "icon-folder"});
}
} }
$scope.openDetailsDialog = function() { $scope.openDetailsDialog = function() {
$scope.mediaPickerDetailsOverlay = {}; $scope.mediaPickerDetailsOverlay = {};
$scope.mediaPickerDetailsOverlay.show = true; $scope.mediaPickerDetailsOverlay.show = true;
$scope.mediaPickerDetailsOverlay.submit = function(model) { $scope.mediaPickerDetailsOverlay.submit = function(model) {
$scope.model.selectedImages.push($scope.target);
$scope.model.submit($scope.model);
$scope.model.selectedImages.push($scope.target); $scope.mediaPickerDetailsOverlay.show = false;
$scope.model.submit($scope.model); $scope.mediaPickerDetailsOverlay = null;
};
$scope.mediaPickerDetailsOverlay.show = false;
$scope.mediaPickerDetailsOverlay = null;
};
$scope.mediaPickerDetailsOverlay.close = function(oldModel) {
$scope.mediaPickerDetailsOverlay.show = false;
$scope.mediaPickerDetailsOverlay = null;
};
$scope.mediaPickerDetailsOverlay.close = function(oldModel) {
$scope.mediaPickerDetailsOverlay.show = false;
$scope.mediaPickerDetailsOverlay = null;
};
}; };
}); });
angular.module("umbraco").controller("Umbraco.Overlays.MediaTypePickerController",
function ($scope) {
$scope.select = function(mediatype){
$scope.model.selectedType = mediatype;
$scope.model.submit($scope.model);
$scope.model.show = false;
}
});
//used for the member picker dialog //used for the member picker dialog
angular.module("umbraco").controller("Umbraco.Overlays.MemberGroupPickerController", angular.module("umbraco").controller("Umbraco.Overlays.MemberGroupPickerController",
function($scope, eventsService, entityResource, searchService, $log, localizationService) { function($scope, eventsService, entityResource, searchService, $log, localizationService) {
@@ -4159,7 +4158,7 @@ angular.module("umbraco").controller("Umbraco.Overlays.TreePickerController",
} }
}); });
} else { } else {
var a = dialogOptions.filter.toLowerCase().split(','); var a = dialogOptions.filter.toLowerCase().replace(/\s/g, '').split(',');
angular.forEach(nodes, function (value, key) { angular.forEach(nodes, function (value, key) {
var found = a.indexOf(value.metaData.contentType.toLowerCase()) >= 0; var found = a.indexOf(value.metaData.contentType.toLowerCase()) >= 0;
@@ -9065,6 +9064,7 @@ angular.module("umbraco").controller("Umbraco.Editors.Packages.DeleteController"
status: "", status: "",
progress:0 progress:0
}; };
vm.installCompleted = false;
vm.zipFile = { vm.zipFile = {
uploadStatus: "idle", uploadStatus: "idle",
uploadProgress: 0, uploadProgress: 0,
@@ -9087,6 +9087,9 @@ angular.module("umbraco").controller("Umbraco.Editors.Packages.DeleteController"
file: file file: file
}).progress(function (evt) { }).progress(function (evt) {
// set view state to uploading
vm.state = 'uploading';
// calculate progress in percentage // calculate progress in percentage
var progressPercentage = parseInt(100.0 * evt.loaded / evt.total, 10); var progressPercentage = parseInt(100.0 * evt.loaded / evt.total, 10);
@@ -9187,10 +9190,10 @@ angular.module("umbraco").controller("Umbraco.Editors.Packages.DeleteController"
localStorageService.set("packageInstallUri", "installed"); localStorageService.set("packageInstallUri", "installed");
} }
//reload on next digest (after cookie) vm.installState.status = localizationService.localize("packager_installStateCompleted");
$timeout(function () { vm.installCompleted = true;
$window.location.reload(true);
});
}, },
installError); installError);
@@ -9200,6 +9203,13 @@ angular.module("umbraco").controller("Umbraco.Editors.Packages.DeleteController"
//This will return a rejection meaning that the promise change above will stop //This will return a rejection meaning that the promise change above will stop
return $q.reject(); return $q.reject();
} }
vm.reloadPage = function() {
//reload on next digest (after cookie)
$timeout(function () {
$window.location.reload(true);
});
}
} }
angular.module("umbraco").controller("Umbraco.Editors.Packages.InstallLocalController", PackagesInstallLocalController); angular.module("umbraco").controller("Umbraco.Editors.Packages.InstallLocalController", PackagesInstallLocalController);
@@ -9301,6 +9311,7 @@ angular.module("umbraco").controller("Umbraco.Editors.Packages.DeleteController"
vm.openLightbox = openLightbox; vm.openLightbox = openLightbox;
vm.closeLightbox = closeLightbox; vm.closeLightbox = closeLightbox;
vm.search = search; vm.search = search;
vm.installCompleted = false;
var currSort = "Latest"; var currSort = "Latest";
//used to cancel any request in progress if another one needs to take it's place //used to cancel any request in progress if another one needs to take it's place
@@ -9486,10 +9497,8 @@ angular.module("umbraco").controller("Umbraco.Editors.Packages.DeleteController"
localStorageService.set("packageInstallUri", result.postInstallationPath); localStorageService.set("packageInstallUri", result.postInstallationPath);
} }
//reload on next digest (after cookie) vm.installState.status = localizationService.localize("packager_installStateCompleted");
$timeout(function() { vm.installCompleted = true;
window.location.reload(true);
});
}, },
error); error);
@@ -9548,6 +9557,13 @@ angular.module("umbraco").controller("Umbraco.Editors.Packages.DeleteController"
searchDebounced(); searchDebounced();
} }
vm.reloadPage = function () {
//reload on next digest (after cookie)
$timeout(function () {
window.location.reload(true);
});
}
init(); init();
} }
@@ -13232,7 +13248,7 @@ angular.module("umbraco").controller("Umbraco.PrevalueEditors.IncludePropertiesL
(function() { (function() {
"use strict"; "use strict";
function ListViewGridLayoutController($scope, $routeParams, mediaHelper, mediaResource, $location, listViewHelper) { function ListViewGridLayoutController($scope, $routeParams, mediaHelper, mediaResource, $location, listViewHelper, mediaTypeHelper) {
var vm = this; var vm = this;
@@ -13244,6 +13260,7 @@ angular.module("umbraco").controller("Umbraco.PrevalueEditors.IncludePropertiesL
vm.mediaDetailsTooltip = {}; vm.mediaDetailsTooltip = {};
vm.itemsWithoutFolders = []; vm.itemsWithoutFolders = [];
vm.isRecycleBin = $scope.contentId === '-21' || $scope.contentId === '-20'; vm.isRecycleBin = $scope.contentId === '-21' || $scope.contentId === '-20';
vm.acceptedMediatypes = [];
vm.dragEnter = dragEnter; vm.dragEnter = dragEnter;
vm.dragLeave = dragLeave; vm.dragLeave = dragLeave;
@@ -13258,6 +13275,13 @@ angular.module("umbraco").controller("Umbraco.PrevalueEditors.IncludePropertiesL
function activate() { function activate() {
vm.itemsWithoutFolders = filterOutFolders($scope.items); vm.itemsWithoutFolders = filterOutFolders($scope.items);
if($scope.entityType === 'media') {
mediaTypeHelper.getAllowedImagetypes(vm.nodeId).then(function (types) {
vm.acceptedMediatypes = types;
});
}
} }
function filterOutFolders(items) { function filterOutFolders(items) {
@@ -13339,7 +13363,7 @@ angular.module("umbraco").controller("Umbraco.PrevalueEditors.IncludePropertiesL
(function () { (function () {
"use strict"; "use strict";
function ListViewListLayoutController($scope, listViewHelper, $location, mediaHelper) { function ListViewListLayoutController($scope, listViewHelper, $location, mediaHelper, mediaTypeHelper) {
var vm = this; var vm = this;
@@ -13349,6 +13373,7 @@ angular.module("umbraco").controller("Umbraco.PrevalueEditors.IncludePropertiesL
vm.maxFileSize = Umbraco.Sys.ServerVariables.umbracoSettings.maxFileSize + "KB"; vm.maxFileSize = Umbraco.Sys.ServerVariables.umbracoSettings.maxFileSize + "KB";
vm.activeDrag = false; vm.activeDrag = false;
vm.isRecycleBin = $scope.contentId === '-21' || $scope.contentId === '-20'; vm.isRecycleBin = $scope.contentId === '-21' || $scope.contentId === '-20';
vm.acceptedMediatypes = [];
vm.selectItem = selectItem; vm.selectItem = selectItem;
vm.clickItem = clickItem; vm.clickItem = clickItem;
@@ -13361,38 +13386,49 @@ angular.module("umbraco").controller("Umbraco.PrevalueEditors.IncludePropertiesL
vm.onFilesQueue = onFilesQueue; vm.onFilesQueue = onFilesQueue;
vm.onUploadComplete = onUploadComplete; vm.onUploadComplete = onUploadComplete;
function activate() {
if ($scope.entityType === 'media') {
mediaTypeHelper.getAllowedImagetypes(vm.nodeId).then(function (types) {
vm.acceptedMediatypes = types;
});
}
}
function selectAll($event) { function selectAll($event) {
listViewHelper.selectAllItems($scope.items, $scope.selection, $event); listViewHelper.selectAllItems($scope.items, $scope.selection, $event);
} }
function isSelectedAll() { function isSelectedAll() {
return listViewHelper.isSelectedAll($scope.items, $scope.selection); return listViewHelper.isSelectedAll($scope.items, $scope.selection);
} }
function selectItem(selectedItem, $index, $event) { function selectItem(selectedItem, $index, $event) {
listViewHelper.selectHandler(selectedItem, $index, $scope.items, $scope.selection, $event); listViewHelper.selectHandler(selectedItem, $index, $scope.items, $scope.selection, $event);
} }
function clickItem(item) { function clickItem(item) {
$location.path($scope.entityType + '/' +$scope.entityType + '/edit/' +item.id); // if item.id is 2147483647 (int.MaxValue) use item.key
} $location.path($scope.entityType + '/' +$scope.entityType + '/edit/' + (item.id === 2147483647 ? item.key : item.id));
}
function isSortDirection(col, direction) { function isSortDirection(col, direction) {
return listViewHelper.setSortingDirection(col, direction, $scope.options); return listViewHelper.setSortingDirection(col, direction, $scope.options);
} }
function sort(field, allow, isSystem) { function sort(field, allow, isSystem) {
if (allow) { if (allow) {
$scope.options.orderBySystemField = isSystem; $scope.options.orderBySystemField = isSystem;
listViewHelper.setSorting(field, allow, $scope.options); listViewHelper.setSorting(field, allow, $scope.options);
$scope.getContent($scope.contentId); $scope.getContent($scope.contentId);
} }
} }
// Dropzone upload functions // Dropzone upload functions
function dragEnter(el, event) { function dragEnter(el, event) {
vm.activeDrag = true; vm.activeDrag = true;
} }
function dragLeave(el, event) { function dragLeave(el, event) {
vm.activeDrag = false; vm.activeDrag = false;
@@ -13400,11 +13436,13 @@ angular.module("umbraco").controller("Umbraco.PrevalueEditors.IncludePropertiesL
function onFilesQueue() { function onFilesQueue() {
vm.activeDrag = false; vm.activeDrag = false;
} }
function onUploadComplete() { function onUploadComplete() {
$scope.getContent($scope.contentId); $scope.getContent($scope.contentId);
} }
activate();
} }
@@ -15785,7 +15823,7 @@ function sliderController($scope, $log, $element, assetsService, angularHelper)
angular.module("umbraco").controller("Umbraco.PropertyEditors.SliderController", sliderController); angular.module("umbraco").controller("Umbraco.PropertyEditors.SliderController", sliderController);
angular.module("umbraco") angular.module("umbraco")
.controller("Umbraco.PropertyEditors.TagsController", .controller("Umbraco.PropertyEditors.TagsController",
function ($rootScope, $scope, $log, assetsService, umbRequestHelper, angularHelper, $timeout, $element) { function ($rootScope, $scope, $log, assetsService, umbRequestHelper, angularHelper, $timeout, $element, $sanitize) {
var $typeahead; var $typeahead;
@@ -15826,6 +15864,7 @@ angular.module("umbraco")
//Helper method to add a tag on enter or on typeahead select //Helper method to add a tag on enter or on typeahead select
function addTag(tagToAdd) { function addTag(tagToAdd) {
tagToAdd = String(tagToAdd).htmlEncode();
if (tagToAdd != null && tagToAdd.length > 0) { if (tagToAdd != null && tagToAdd.length > 0) {
if ($scope.model.value.indexOf(tagToAdd) < 0) { if ($scope.model.value.indexOf(tagToAdd) < 0) {
$scope.model.value.push(tagToAdd); $scope.model.value.push(tagToAdd);
+199 -188
View File
@@ -9725,215 +9725,226 @@ Use this directive to render a tooltip.
/* /*
TODO TODO
.directive("umbFileDrop", function ($timeout, $upload, localizationService, umbRequestHelper){ .directive("umbFileDrop", function ($timeout, $upload, localizationService, umbRequestHelper){
return{
return{ restrict: "A",
restrict: "A", link: function(scope, element, attrs){
link: function(scope, element, attrs){ //load in the options model
}
//load in the options model }
}
}
}) })
*/ */
angular.module("umbraco.directives") angular.module("umbraco.directives")
.directive('umbFileDropzone',
function($timeout, Upload, localizationService, umbRequestHelper) {
return {
restrict: 'E',
replace: true,
templateUrl: 'views/components/upload/umb-file-dropzone.html',
scope: {
parentId: '@',
contentTypeAlias: '@',
propertyAlias: '@',
accept: '@',
maxFileSize: '@',
.directive('umbFileDropzone', function ($timeout, Upload, localizationService, umbRequestHelper) { compact: '@',
return { hideDropzone: '@',
acceptedMediatypes: '=',
restrict: 'E', filesQueued: '=',
replace: true, handleFile: '=',
filesUploaded: '='
},
link: function(scope, element, attrs) {
scope.queue = [];
scope.done = [];
scope.rejected = [];
scope.currentFile = undefined;
templateUrl: 'views/components/upload/umb-file-dropzone.html', function _filterFile(file) {
var ignoreFileNames = ['Thumbs.db'];
var ignoreFileTypes = ['directory'];
scope: { // ignore files with names from the list
parentId: '@', // ignore files with types from the list
contentTypeAlias: '@', // ignore files which starts with "."
propertyAlias: '@', if (ignoreFileNames.indexOf(file.name) === -1 &&
accept: '@', ignoreFileTypes.indexOf(file.type) === -1 &&
maxFileSize: '@', file.name.indexOf(".") !== 0) {
return true;
} else {
return false;
}
}
compact: '@', function _filesQueued(files, event) {
hideDropzone: '@', //Push into the queue
angular.forEach(files,
function(file) {
filesQueued: '=', if (_filterFile(file) === true) {
handleFile: '=',
filesUploaded: '='
},
link: function(scope, element, attrs) { if (file.$error) {
scope.rejected.push(file);
} else {
scope.queue.push(file);
}
}
});
scope.queue = []; //when queue is done, kick the uploader
scope.done = []; if (!scope.working) {
scope.rejected = []; // Upload not allowed
scope.currentFile = undefined; if (!scope.acceptedMediatypes || !scope.acceptedMediatypes.length) {
files.map(function(file) {
file.uploadStatus = "error";
file.serverErrorMessage = "File type is not allowed here";
scope.rejected.push(file);
});
scope.queue = [];
}
// One allowed type
if (scope.acceptedMediatypes && scope.acceptedMediatypes.length === 1) {
// Standard setup - set alias to auto select to let the server best decide which media type to use
if (scope.acceptedMediatypes[0].alias === 'Image') {
scope.contentTypeAlias = "umbracoAutoSelect";
} else {
scope.contentTypeAlias = scope.acceptedMediatypes[0].alias;
}
function _filterFile(file) { _processQueueItem();
}
// More than one, open dialog
if (scope.acceptedMediatypes && scope.acceptedMediatypes.length > 1) {
_chooseMediaType();
}
}
}
var ignoreFileNames = ['Thumbs.db']; function _processQueueItem() {
var ignoreFileTypes = ['directory']; if (scope.queue.length > 0) {
scope.currentFile = scope.queue.shift();
_upload(scope.currentFile);
} else if (scope.done.length > 0) {
if (scope.filesUploaded) {
//queue is empty, trigger the done action
scope.filesUploaded(scope.done);
}
// ignore files with names from the list //auto-clear the done queue after 3 secs
// ignore files with types from the list var currentLength = scope.done.length;
// ignore files which starts with "." $timeout(function() {
if(ignoreFileNames.indexOf(file.name) === -1 && scope.done.splice(0, currentLength);
ignoreFileTypes.indexOf(file.type) === -1 && },
file.name.indexOf(".") !== 0) { 3000);
return true; }
} else { }
return false;
}
} function _upload(file) {
function _filesQueued(files, event){ scope.propertyAlias = scope.propertyAlias ? scope.propertyAlias : "umbracoFile";
scope.contentTypeAlias = scope.contentTypeAlias ? scope.contentTypeAlias : "Image";
//Push into the queue Upload.upload({
angular.forEach(files, function(file){ url: umbRequestHelper.getApiUrl("mediaApiBaseUrl", "PostAddFile"),
fields: {
'currentFolder': scope.parentId,
'contentTypeAlias': scope.contentTypeAlias,
'propertyAlias': scope.propertyAlias,
'path': file.path
},
file: file
})
.progress(function(evt) {
// calculate progress in percentage
var progressPercentage = parseInt(100.0 * evt.loaded / evt.total, 10);
// set percentage property on file
file.uploadProgress = progressPercentage;
// set uploading status on file
file.uploadStatus = "uploading";
})
.success(function(data, status, headers, config) {
if (data.notifications && data.notifications.length > 0) {
// set error status on file
file.uploadStatus = "error";
// Throw message back to user with the cause of the error
file.serverErrorMessage = data.notifications[0].message;
// Put the file in the rejected pool
scope.rejected.push(file);
} else {
// set done status on file
file.uploadStatus = "done";
// set date/time for when done - used for sorting
file.doneDate = new Date();
// Put the file in the done pool
scope.done.push(file);
}
scope.currentFile = undefined;
//after processing, test if everthing is done
_processQueueItem();
})
.error(function(evt, status, headers, config) {
// set status done
file.uploadStatus = "error";
//if the service returns a detailed error
if (evt.InnerException) {
file.serverErrorMessage = evt.InnerException.ExceptionMessage;
//Check if its the common "too large file" exception
if (evt.InnerException.StackTrace &&
evt.InnerException.StackTrace.indexOf("ValidateRequestEntityLength") > 0) {
file.serverErrorMessage = "File too large to upload";
}
} else if (evt.Message) {
file.serverErrorMessage = evt.Message;
}
// If file not found, server will return a 404 and display this message
if (status === 404) {
file.serverErrorMessage = "File not found";
}
//after processing, test if everthing is done
scope.rejected.push(file);
scope.currentFile = undefined;
_processQueueItem();
});
}
if(_filterFile(file) === true) { function _chooseMediaType() {
scope.mediatypepickerOverlay = {
view: "mediatypepicker",
title: "Choose media type",
acceptedMediatypes: scope.acceptedMediatypes,
hideSubmitButton: true,
show: true,
submit: function(model) {
scope.contentTypeAlias = model.selectedType.alias;
scope.mediatypepickerOverlay.show = false;
scope.mediatypepickerOverlay = null;
_processQueueItem();
},
close: function(oldModel) {
if(file.$error) { scope.queue.map(function(file) {
scope.rejected.push(file); file.uploadStatus = "error";
} else { file.serverErrorMessage = "Cannot upload this file, no mediatype selected";
scope.queue.push(file); scope.rejected.push(file);
} });
scope.queue = [];
scope.mediatypepickerOverlay.show = false;
scope.mediatypepickerOverlay = null;
}
};
}
} scope.handleFiles = function(files, event) {
if (scope.filesQueued) {
}); scope.filesQueued(files, event);
}
//when queue is done, kick the uploader _filesQueued(files, event);
if(!scope.working){ };
_processQueueItem(); }
} };
} });
function _processQueueItem(){
if(scope.queue.length > 0){
scope.currentFile = scope.queue.shift();
_upload(scope.currentFile);
}else if(scope.done.length > 0){
if(scope.filesUploaded){
//queue is empty, trigger the done action
scope.filesUploaded(scope.done);
}
//auto-clear the done queue after 3 secs
var currentLength = scope.done.length;
$timeout(function(){
scope.done.splice(0, currentLength);
}, 3000);
}
}
function _upload(file) {
scope.propertyAlias = scope.propertyAlias ? scope.propertyAlias : "umbracoFile";
scope.contentTypeAlias = scope.contentTypeAlias ? scope.contentTypeAlias : "Image";
Upload.upload({
url: umbRequestHelper.getApiUrl("mediaApiBaseUrl", "PostAddFile"),
fields: {
'currentFolder': scope.parentId,
'contentTypeAlias': scope.contentTypeAlias,
'propertyAlias': scope.propertyAlias,
'path': file.path
},
file: file
}).progress(function (evt) {
// calculate progress in percentage
var progressPercentage = parseInt(100.0 * evt.loaded / evt.total, 10);
// set percentage property on file
file.uploadProgress = progressPercentage;
// set uploading status on file
file.uploadStatus = "uploading";
}).success(function (data, status, headers, config) {
if(data.notifications && data.notifications.length > 0) {
// set error status on file
file.uploadStatus = "error";
// Throw message back to user with the cause of the error
file.serverErrorMessage = data.notifications[0].message;
// Put the file in the rejected pool
scope.rejected.push(file);
} else {
// set done status on file
file.uploadStatus = "done";
// set date/time for when done - used for sorting
file.doneDate = new Date();
// Put the file in the done pool
scope.done.push(file);
}
scope.currentFile = undefined;
//after processing, test if everthing is done
_processQueueItem();
}).error( function (evt, status, headers, config) {
// set status done
file.uploadStatus = "error";
//if the service returns a detailed error
if (evt.InnerException) {
file.serverErrorMessage = evt.InnerException.ExceptionMessage;
//Check if its the common "too large file" exception
if (evt.InnerException.StackTrace && evt.InnerException.StackTrace.indexOf("ValidateRequestEntityLength") > 0) {
file.serverErrorMessage = "File too large to upload";
}
} else if (evt.Message) {
file.serverErrorMessage = evt.Message;
}
// If file not found, server will return a 404 and display this message
if(status === 404 ) {
file.serverErrorMessage = "File not found";
}
//after processing, test if everthing is done
scope.rejected.push(file);
scope.currentFile = undefined;
_processQueueItem();
});
}
scope.handleFiles = function(files, event){
if(scope.filesQueued){
scope.filesQueued(files, event);
}
_filesQueued(files, event);
};
}
};
});
/** /**
* @ngdoc directive * @ngdoc directive
@@ -4880,6 +4880,65 @@ function mediaHelper(umbRequestHelper) {
}; };
}angular.module('umbraco.services').factory('mediaHelper', mediaHelper); }angular.module('umbraco.services').factory('mediaHelper', mediaHelper);
/**
* @ngdoc service
* @name umbraco.services.mediaTypeHelper
* @description A helper service for the media types
**/
function mediaTypeHelper(mediaTypeResource, $q) {
var mediaTypeHelperService = {
getAllowedImagetypes: function (mediaId){
// Get All allowedTypes
return mediaTypeResource.getAllowedTypes(mediaId)
.then(function(types){
var allowedQ = types.map(function(type){
return mediaTypeResource.getById(type.id);
});
// Get full list
return $q.all(allowedQ).then(function(fullTypes){
// Find all the media types with an Image Cropper property editor
var filteredTypes = mediaTypeHelperService.getTypeWithEditor(fullTypes, ['Umbraco.ImageCropper']);
// If there is only one media type with an Image Cropper we will return this one
if(filteredTypes.length === 1) {
return filteredTypes;
// If there is more than one Image cropper, custom media types have been added, and we return all media types with and Image cropper or UploadField
} else {
return mediaTypeHelperService.getTypeWithEditor(fullTypes, ['Umbraco.ImageCropper', 'Umbraco.UploadField']);
}
});
});
},
getTypeWithEditor: function (types, editors) {
return types.filter(function (mediatype) {
for (var i = 0; i < mediatype.groups.length; i++) {
var group = mediatype.groups[i];
for (var j = 0; j < group.properties.length; j++) {
var property = group.properties[j];
if( editors.indexOf(property.editor) !== -1 ) {
return mediatype;
}
}
}
});
}
};
return mediaTypeHelperService;
}
angular.module('umbraco.services').factory('mediaTypeHelper', mediaTypeHelper);
/** /**
* @ngdoc service * @ngdoc service
* @name umbraco.services.umbracoMenuActions * @name umbraco.services.umbracoMenuActions
File diff suppressed because it is too large Load Diff
@@ -69,6 +69,22 @@
}; };
} }
if (!String.prototype.htmlEncode) {
/** htmlEncode extension method for string */
String.prototype.htmlEncode = function () {
//create a in-memory div, set it's inner text(which jQuery automatically encodes)
//then grab the encoded contents back out. The div never exists on the page.
return $('<div/>').text(this).html();
};
}
if (!String.prototype.htmlDecode) {
/** htmlDecode extension method for string */
String.prototype.htmlDecode = function () {
return $('<div/>').html(this).text();
};
}
if (!String.prototype.startsWith) { if (!String.prototype.startsWith) {
/** startsWith extension method for string */ /** startsWith extension method for string */
String.prototype.startsWith = function (str) { String.prototype.startsWith = function (str) {
@@ -281,7 +281,7 @@ Umbraco.Application.Actions = function() {
actionRePublish: function() { actionRePublish: function() {
/// <summary></summary> /// <summary></summary>
UmbClientMgr.openModalWindow('dialogs/republish.aspx?rnd=' + this._utils.generateRandom(), 'Republishing entire site', true, 450, 210); UmbClientMgr.openModalWindow('dialogs/republish.aspx?rnd=' + this._utils.generateRandom(), uiKeys['actions_republish'], true, 450, 210);
}, },
actionAssignDomain: function() { actionAssignDomain: function() {
+14 -5
View File
@@ -37,9 +37,9 @@
Umbraco web.config configuration documentation can be found here: Umbraco web.config configuration documentation can be found here:
http://our.umbraco.org/documentation/using-umbraco/config-files/#webconfig http://our.umbraco.org/documentation/using-umbraco/config-files/#webconfig
--> -->
<add key="umbracoConfigurationStatus" value="7.5.4" /> <add key="umbracoConfigurationStatus" value="7.5.5" />
<add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/Hiccup.aspx,~/signalR,~/VSEnterpriseHelper.axd" /> <add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/Hiccup.aspx,~/signalR,~/VSEnterpriseHelper.axd" />
<add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/communityLogoGenerator,~/adhoc,~/signalR,~/apidocs" /> <add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/communityLogoGenerator,~/adhoc,~/signalR,~/apidocs,~/hangfire" />
<add key="umbracoContentXML" value="~/App_Data/umbraco.config" /> <add key="umbracoContentXML" value="~/App_Data/umbraco.config" />
<add key="umbracoStorageDirectory" value="~/App_Data" /> <add key="umbracoStorageDirectory" value="~/App_Data" />
<add key="umbracoPath" value="~/umbraco" /> <add key="umbracoPath" value="~/umbraco" />
@@ -103,6 +103,7 @@
<add key="AppVeyorWebHookAuthKey" value="it's a secret.. and no, this is not the secret, this key will transformed on the build server" /> <add key="AppVeyorWebHookAuthKey" value="it's a secret.. and no, this is not the secret, this key will transformed on the build server" />
<add key="GoogleOAuthClientID" value="it's a secret.. and no, this is not the secret, this key will transformed on the build server" /> <add key="GoogleOAuthClientID" value="it's a secret.. and no, this is not the secret, this key will transformed on the build server" />
<add key="GoogleOAuthSecret" value="it's a secret.. and no, this is not the secret, this key will transformed on the build server" /> <add key="GoogleOAuthSecret" value="it's a secret.. and no, this is not the secret, this key will transformed on the build server" />
<add key="HangFireEnabled" value="false" />
</appSettings> </appSettings>
<connectionStrings> <connectionStrings>
<remove name="umbracoDbDSN" /> <remove name="umbracoDbDSN" />
@@ -451,11 +452,19 @@
</rule> </rule>
<rule name="UaaSGeneralForum" patternSyntax="Wildcard"> <rule name="UaaSGeneralForum" patternSyntax="Wildcard">
<match url="forum/umbraco-as-a-service/general-questions/*" /> <match url="forum/umbraco-as-a-service/general-questions/*" />
<action type="Redirect" url="forum/umbraco-as-a-service/{R:1}" redirectType="Permanent" appendQueryString="true" /> <action type="Redirect" url="forum/umbraco-cloud/{R:1}" redirectType="Permanent" appendQueryString="true" />
</rule> </rule>
<rule name="UaaSIssuesForum" patternSyntax="Wildcard"> <rule name="UaaSIssuesForum" patternSyntax="Wildcard">
<match url="forum/umbraco-as-a-service/issues/*" /> <match url="forum/umbraco-as-a-service/issues/*" />
<action type="Redirect" url="forum/umbraco-as-a-service/{R:1}" redirectType="Permanent" appendQueryString="true" /> <action type="Redirect" url="forum/umbraco-cloud/{R:1}" redirectType="Permanent" appendQueryString="true" />
</rule>
<rule name="UCloudForum" patternSyntax="Wildcard">
<match url="forum/umbraco-as-a-service/*" />
<action type="Redirect" url="forum/umbraco-cloud/{R:1}" redirectType="Permanent" appendQueryString="true" />
</rule>
<rule name="UCloudDocs" patternSyntax="Wildcard">
<match url="Documentation/Umbraco-as-a-Service/*" />
<action type="Redirect" url="Documentation/Umbraco-Cloud/{R:1}" redirectType="Permanent" appendQueryString="true" />
</rule> </rule>
<rule name="RedirectRepoSearch" patternSyntax="Wildcard"> <rule name="RedirectRepoSearch" patternSyntax="Wildcard">
<match url="umbraco/api/Search/FindProjects/*" /> <match url="umbraco/api/Search/FindProjects/*" />
@@ -561,7 +570,7 @@
<!-- Ensure correct version of HtmlAgilityPack --> <!-- Ensure correct version of HtmlAgilityPack -->
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" /> <assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.4.9.0" newVersion="1.4.9.0" /> <bindingRedirect oldVersion="0.0.0.0-1.4.9.5" newVersion="1.4.9.5" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
@@ -263,7 +263,7 @@ namespace OurUmbraco.Documentation.Busineslogic.GithubSourcePull
case "umbracoforms": case "umbracoforms":
return 0; return 0;
//Umbraco as a Service //Umbraco Cloud
case "getting-started": case "getting-started":
return 0; return 0;
case "set-up": case "set-up":
+18 -19
View File
@@ -34,36 +34,35 @@ namespace OurUmbraco.Events.Library
public static XPathNodeIterator UpcomingEvents() public static XPathNodeIterator UpcomingEvents()
{ {
int contentType = DocumentType.GetByAlias("Event").Id; var contentType = DocumentType.GetByAlias("Event").Id;
string property = "start"; var property = "start";
string sql = string.Format(@"SELECT distinct contentNodeId from cmsPropertyData var sql = string.Format(@"SELECT distinct contentNodeId from cmsPropertyData
inner join cmsPropertyType ON inner join cmsPropertyType ON
cmspropertytype.contenttypeid = {0} and cmspropertytype.contenttypeid = {0} and
cmspropertytype.Alias = '{1}' and cmspropertytype.Alias = '{1}' and
cmspropertytype.id = cmspropertydata.propertytypeid cmspropertytype.id = cmspropertydata.propertytypeid
where dataDate > GETDATE()", contentType, property); where dataDate > GETDATE()", contentType, property);
ISqlHelper sqlhelper = umbraco.BusinessLogic.Application.SqlHelper; using (var sqlhelper = umbraco.BusinessLogic.Application.SqlHelper)
IRecordsReader rr = sqlhelper.ExecuteReader(sql); using (var reader = sqlhelper.ExecuteReader(sql))
XmlDocument doc = new XmlDocument();
XmlNode root = umbraco.xmlHelper.addTextNode(doc, "events", "");
while (rr.Read())
{ {
XmlNode x = (XmlNode)umbraco.content.Instance.XmlContent.GetElementById( rr.GetInt("contentNodeId").ToString() ); var xmlDocument = new XmlDocument();
var root = umbraco.xmlHelper.addTextNode(xmlDocument, "events", "");
if (x != null) while (reader.Read())
{ {
x = doc.ImportNode(x, true); var contentNodeId = reader.GetInt("contentNodeId").ToString();
root.AppendChild(x); var xmlNode = (XmlNode)umbraco.content.Instance.XmlContent.GetElementById(contentNodeId);
}
}
rr.Close();
rr.Dispose();
return root.CreateNavigator().Select("."); if (xmlNode == null) continue;
xmlNode = xmlDocument.ImportNode(xmlNode, true);
root.AppendChild(xmlNode);
}
return root.CreateNavigator().Select(".");
}
} }
} }
} }
+23 -34
View File
@@ -31,20 +31,16 @@ namespace OurUmbraco.Events.Relations
private static int GetRelations(string alias, int parentId) private static int GetRelations(string alias, int parentId)
{ {
ISqlHelper sqlhelper = umbraco.BusinessLogic.Application.SqlHelper; using (var sqlhelper = umbraco.BusinessLogic.Application.SqlHelper)
int result = sqlhelper.ExecuteScalar<int>( {
@" var result = sqlhelper.ExecuteScalar<int>(@"
SELECT count(umbracoRelation.id) SELECT count(umbracoRelation.id)
FROM umbracoRelation FROM umbracoRelation
INNER JOIN umbracoRelationType ON umbracoRelationType.id = umbracoRelation.relType AND umbracoRelationType.alias = @alias INNER JOIN umbracoRelationType ON umbracoRelationType.id = umbracoRelation.relType AND umbracoRelationType.alias = @alias
where parentId = @parent where parentId = @parent", sqlhelper.CreateParameter("@parent", parentId), sqlhelper.CreateParameter("@alias", alias));
"
,
sqlhelper.CreateParameter("@parent", parentId),
sqlhelper.CreateParameter("@alias", alias)
);
return result; return result;
}
} }
public static int GetSignedUp(int eventId) public static int GetSignedUp(int eventId)
@@ -59,32 +55,25 @@ namespace OurUmbraco.Events.Relations
private static List<Relation> GetRelations(string alias, string sort, int parentId, int number) private static List<Relation> GetRelations(string alias, string sort, int parentId, int number)
{ {
List<Relation> retval = new List<Relation>(); var retval = new List<Relation>();
ISqlHelper sqlhelper = umbraco.BusinessLogic.Application.SqlHelper; using (var sqlhelper = umbraco.BusinessLogic.Application.SqlHelper)
IRecordsReader rr = sqlhelper.ExecuteReader(
string.Format(@"
SELECT TOP {0} umbracoRelation.id
FROM umbracoRelation
INNER JOIN umbracoRelationType ON umbracoRelationType.id = umbracoRelation.relType AND umbracoRelationType.alias = @alias
where parentId = @parent
ORDER BY datetime {1}
", number, sort)
,
sqlhelper.CreateParameter("@parent", parentId),
sqlhelper.CreateParameter("@alias", alias)
);
while (rr.Read())
{ {
retval.Add( new Relation( rr.GetInt("id") ) ); var query = string.Format(@"
} SELECT TOP {0} umbracoRelation.id
rr.Close(); FROM umbracoRelation
rr.Dispose(); INNER JOIN umbracoRelationType ON umbracoRelationType.id = umbracoRelation.relType AND umbracoRelationType.alias = @alias
where parentId = @parent
ORDER BY datetime {1}
", number, sort);
return retval; using (var reader = sqlhelper.ExecuteReader(query, sqlhelper.CreateParameter("@parent", parentId), sqlhelper.CreateParameter("@alias", alias)))
{
while (reader.Read())
retval.Add(new Relation(reader.GetInt("id")));
return retval;
}
}
} }
public static List<Relation> GetPeopleWaiting(int eventId, int number) public static List<Relation> GetPeopleWaiting(int eventId, int number)
+1 -2
View File
@@ -15,7 +15,6 @@ using OurUmbraco.Forum.Services;
using umbraco.BusinessLogic; using umbraco.BusinessLogic;
using Umbraco.Core; using Umbraco.Core;
using Umbraco.Core.Models; using Umbraco.Core.Models;
using Umbraco.Web;
namespace OurUmbraco.Forum.AntiSpam namespace OurUmbraco.Forum.AntiSpam
{ {
@@ -39,7 +38,7 @@ namespace OurUmbraco.Forum.AntiSpam
var reputationCurrent = member.GetValue<int>("reputationCurrent"); var reputationCurrent = member.GetValue<int>("reputationCurrent");
member.SetValue("reputationCurrent", reputationCurrent >= 0 ? reputationCurrent - 1 : 0); member.SetValue("reputationCurrent", reputationCurrent >= 0 ? reputationCurrent - 1 : 0);
var memberService = UmbracoContext.Current.Application.Services.MemberService; var memberService = ApplicationContext.Current.Services.MemberService;
memberService.Save(member); memberService.Save(member);
memberService.AssignRole(member.Id, "potentialspam"); memberService.AssignRole(member.Id, "potentialspam");
} }
+2 -2
View File
@@ -483,7 +483,7 @@ namespace OurUmbraco.Forum.Api
if (memberId != 0) if (memberId != 0)
{ {
var member = global::Umbraco.Web.UmbracoContext.Current.Application.Services.MemberService.GetById(memberId); var member = ApplicationContext.Current.Services.MemberService.GetById(memberId);
if (member != null) if (member != null)
{ {
@@ -502,7 +502,7 @@ namespace OurUmbraco.Forum.Api
if (memberId != 0) if (memberId != 0)
{ {
var member = global::Umbraco.Web.UmbracoContext.Current.Application.Services.MemberService.GetById(memberId); var member = ApplicationContext.Current.Services.MemberService.GetById(memberId);
if (member != null) if (member != null)
{ {
@@ -29,7 +29,7 @@ namespace OurUmbraco.Forum.EventHandlers
&& member.Properties.Contains(Constants.Conventions.Member.IsApproved) && member.Properties.Contains(Constants.Conventions.Member.IsApproved)
&& member.IsApproved == false); && member.IsApproved == false);
var memberService = UmbracoContext.Current.Application.Services.MemberService; var memberService = ApplicationContext.Current.Services.MemberService;
foreach (var member in nonApprovedMembers) foreach (var member in nonApprovedMembers)
{ {
// Adds test for member having an Id, if they don't then it's a NEW member, // Adds test for member having an Id, if they don't then it's a NEW member,
@@ -11,6 +11,7 @@ using MarkdownSharp;
using OurUmbraco.Forum.AntiSpam; using OurUmbraco.Forum.AntiSpam;
using OurUmbraco.Forum.Library; using OurUmbraco.Forum.Library;
using OurUmbraco.Forum.Models; using OurUmbraco.Forum.Models;
using Umbraco.Core;
using Umbraco.Core.Models; using Umbraco.Core.Models;
using Umbraco.Web; using Umbraco.Web;
@@ -143,14 +144,14 @@ namespace OurUmbraco.Forum.Extensions
public static bool DetectSpam(this Comment comment) public static bool DetectSpam(this Comment comment)
{ {
var member = UmbracoContext.Current.Application.Services.MemberService.GetById(comment.MemberId); var member = ApplicationContext.Current.Services.MemberService.GetById(comment.MemberId);
comment.IsSpam = SpamChecker.IsSpam(member, comment.Body); comment.IsSpam = SpamChecker.IsSpam(member, comment.Body);
return comment.IsSpam; return comment.IsSpam;
} }
public static bool DetectSpam(this Topic topic) public static bool DetectSpam(this Topic topic)
{ {
var member = UmbracoContext.Current.Application.Services.MemberService.GetById(topic.MemberId); var member = ApplicationContext.Current.Services.MemberService.GetById(topic.MemberId);
topic.IsSpam = SpamChecker.IsSpam(member, string.Format("{0} {1}", topic.Title, topic.Body)); topic.IsSpam = SpamChecker.IsSpam(member, string.Format("{0} {1}", topic.Title, topic.Body));
return topic.IsSpam; return topic.IsSpam;
} }
+2 -1
View File
@@ -11,6 +11,7 @@ using System.Web.Security;
using RestSharp; using RestSharp;
using RestSharp.Deserializers; using RestSharp.Deserializers;
using umbraco.BusinessLogic; using umbraco.BusinessLogic;
using Umbraco.Core;
using Umbraco.Core.Logging; using Umbraco.Core.Logging;
using Umbraco.Core.Models; using Umbraco.Core.Models;
using Umbraco.Web; using Umbraco.Web;
@@ -183,7 +184,7 @@ namespace OurUmbraco.Forum.Library
if (spammer != null && spammer.TotalScore > PotentialSpammerThreshold) if (spammer != null && spammer.TotalScore > PotentialSpammerThreshold)
{ {
var memberService = UmbracoContext.Current.Application.Services.MemberService; var memberService = ApplicationContext.Current.Services.MemberService;
memberService.AssignRole(member.Id, SpamMemberGroupName); memberService.AssignRole(member.Id, SpamMemberGroupName);
spammer.MemberId = member.Id; spammer.MemberId = member.Id;
@@ -9,6 +9,7 @@ using OurUmbraco.Our;
using OurUmbraco.Wiki.Extensions; using OurUmbraco.Wiki.Extensions;
using umbraco; using umbraco;
using umbraco.BusinessLogic; using umbraco.BusinessLogic;
using Umbraco.Core;
using Umbraco.Core.Models; using Umbraco.Core.Models;
using Umbraco.Web; using Umbraco.Web;
@@ -99,8 +100,10 @@ namespace OurUmbraco.MarketPlace.NodeListing
{ {
try try
{ {
return Application.SqlHelper.ExecuteScalar<int>(" select count(*) from projectDownload where projectId = @id;", using (var sqlHelper = Application.SqlHelper)
Application.SqlHelper.CreateParameter("@id", projectId)); {
return sqlHelper.ExecuteScalar<int>("select count(*) from projectDownload where projectId = @id;", sqlHelper.CreateParameter("@id", projectId));
}
} }
catch catch
{ {
@@ -110,13 +113,12 @@ namespace OurUmbraco.MarketPlace.NodeListing
public int GetProjectKarma(int projectId) public int GetProjectKarma(int projectId)
{ {
using (var sqlHelper = Application.SqlHelper)
using (var reader = Application.SqlHelper.ExecuteReader("SELECT SUM([points]) AS Karma FROM powersProject WHERE id = @projectId", using (var reader = sqlHelper.ExecuteReader("SELECT SUM([points]) AS Karma FROM powersProject WHERE id = @projectId", sqlHelper.CreateParameter("@projectId", projectId)))
Application.SqlHelper.CreateParameter("@projectId", projectId))) {
if (reader.Read()) if (reader.Read())
{
return reader.GetInt("Karma"); return reader.GetInt("Karma");
} }
return 0; return 0;
} }
@@ -133,7 +135,7 @@ namespace OurUmbraco.MarketPlace.NodeListing
/// <param name="listingItem"></param> /// <param name="listingItem"></param>
public void SaveOrUpdate(IListingItem listingItem) public void SaveOrUpdate(IListingItem listingItem)
{ {
var contentService = UmbracoContext.Current.Application.Services.ContentService; var contentService = ApplicationContext.Current.Services.ContentService;
//check if this is a new listing or an existing one. //check if this is a new listing or an existing one.
var isUpdate = listingItem.Id != 0; var isUpdate = listingItem.Id != 0;
var content = (isUpdate) var content = (isUpdate)
@@ -260,7 +262,7 @@ namespace OurUmbraco.MarketPlace.NodeListing
var umbracoHelper = new UmbracoHelper(UmbracoContext.Current); var umbracoHelper = new UmbracoHelper(UmbracoContext.Current);
var contribProjects = new List<IPublishedContent>(); var contribProjects = new List<IPublishedContent>();
const string sql = @"SELECT * FROM projectContributors WHERE memberId=@memberId"; const string sql = @"SELECT * FROM projectContributors WHERE memberId=@memberId";
var contribPackageIds = UmbracoContext.Current.Application.DatabaseContext.Database.Fetch<int>(sql, new { memberId }); var contribPackageIds = ApplicationContext.Current.DatabaseContext.Database.Fetch<int>(sql, new { memberId });
foreach (var contribPackageId in contribPackageIds) foreach (var contribPackageId in contribPackageIds)
{ {
@@ -1,8 +1,8 @@
using System;using System.Collections.Generic; using System;
using System.Linq; using System.Collections.Generic;
using OurUmbraco.MarketPlace.Interfaces; using OurUmbraco.MarketPlace.Interfaces;
using OurUmbraco.Our; using umbraco.BusinessLogic;
using Umbraco.Web; using Umbraco.Core;
namespace OurUmbraco.MarketPlace.Providers namespace OurUmbraco.MarketPlace.Providers
{ {
@@ -10,7 +10,7 @@ namespace OurUmbraco.MarketPlace.Providers
{ {
public int GetProjectKarma(int projectId) public int GetProjectKarma(int projectId)
{ {
var db = UmbracoContext.Current.Application.DatabaseContext.Database; var db = ApplicationContext.Current.DatabaseContext.Database;
var result = db.ExecuteScalar<int>("SELECT SUM(points) karma FROM powersProject WHERE id = @projectId", new { projectId = projectId }); var result = db.ExecuteScalar<int>("SELECT SUM(points) karma FROM powersProject WHERE id = @projectId", new { projectId = projectId });
return result; return result;
} }
@@ -19,7 +19,7 @@ namespace OurUmbraco.MarketPlace.Providers
{ {
var karmaList = new List<IKarma>(); var karmaList = new List<IKarma>();
using (var reader = Data.SqlHelper.ExecuteReader("SELECT id as ProjectId, SUM(points) Points FROM powersProject GROUP BY id ORDER BY SUM(points) DESC")) using (var reader = Application.SqlHelper.ExecuteReader("SELECT id as ProjectId, SUM(points) Points FROM powersProject GROUP BY id ORDER BY SUM(points) DESC"))
{ {
while (reader.Read()) while (reader.Read())
{ {
@@ -28,6 +28,7 @@ namespace OurUmbraco.MarketPlace.Providers
ProjectId = reader.GetInt("ProjectId"), ProjectId = reader.GetInt("ProjectId"),
Points = reader.GetInt("Points") Points = reader.GetInt("Points")
}; };
karmaList.Add(karma); karmaList.Add(karma);
} }
} }
@@ -0,0 +1,73 @@
using System;
using System.IO;
using System.Net.Mail;
using System.Web.Hosting;
using OurUmbraco.Forum.Services;
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Core.Persistence;
using Umbraco.Web;
using Umbraco.Web.Security;
namespace OurUmbraco.NotificationsCore.Notifications
{
public class MarkAsSolutionReminder
{
public void SendNotification(int topicId, int memberId, NotificationMail notificationMail)
{
try
{
var topicService = new TopicService(ApplicationContext.Current.DatabaseContext);
var topic = topicService.GetById(topicId);
using (ContextHelper.EnsureHttpContext())
{
var memberShipHelper = new MembershipHelper(UmbracoContext.Current);
var member = memberShipHelper.GetById(memberId);
using (var smtpClient = new SmtpClient())
{
var fromMailAddress = new MailAddress(notificationMail.FromMail, notificationMail.FromName);
var subject = string.Format("{0} - '{1}'", notificationMail.Subject, topic.Title);
var domain = notificationMail.Domain;
var body = notificationMail.Body;
body = string.Format(body, topic.Title, "https://" + domain + topic.GetUrl());
if (member.GetPropertyValue<bool>("bugMeNot") == false)
{
const string notificationTestFolder = "~/App_Data/NotificationTest";
if (Directory.Exists(HostingEnvironment.MapPath(notificationTestFolder)) == false)
Directory.CreateDirectory(HostingEnvironment.MapPath(notificationTestFolder));
File.AppendAllText(string.Format("{0}/{1}.txt", HostingEnvironment.MapPath(notificationTestFolder), topic.Id),
string.Format("To: {0}{3}Subject: {1}{3}Body: {3}{2}", member.GetPropertyValue<string>("Email"), subject, body, Environment.NewLine));
using (var mailMessage = new MailMessage())
{
mailMessage.Subject = subject;
mailMessage.Body = body;
mailMessage.To.Add(member.GetPropertyValue<string>("Email"));
mailMessage.From = fromMailAddress;
smtpClient.Send(mailMessage);
}
}
}
}
using (var db = ApplicationContext.Current.DatabaseContext.Database)
{
var sql = new Sql("UPDATE forumTopics SET markAsSolutionReminderSent = 1 WHERE id = @topicId", new {topicId = topic.Id});
var result = db.Execute(sql);
}
}
catch (Exception ex)
{
LogHelper.Error<MarkAsSolutionReminder>("Error processing notification", ex);
throw;
}
}
}
}
@@ -0,0 +1,53 @@
using System;
using System.Net.Mail;
using System.Xml;
using OurUmbraco.NotificationsWeb;
using Umbraco.Core.Logging;
namespace OurUmbraco.NotificationsCore.Notifications
{
public class NotificationMail
{
public string FromName;
public string FromMail;
public string Subject;
public string Domain;
public string Body;
public NotificationMail GetNotificationMail(string notificationType)
{
try
{
var notifications = new XmlDocument();
notifications.Load(Config.ConfigurationFile);
var settings = notifications.SelectSingleNode("//global");
var node = notifications.SelectSingleNode(string.Format("//instant//notification [@name = '{0}']", notificationType));
var details = new XmlDocument();
var cont = details.CreateElement("details");
cont.AppendChild(details.ImportNode(settings, true));
cont.AppendChild(details.ImportNode(node, true));
var detailsChild = details.AppendChild(cont);
var notificationMail = new NotificationMail
{
FromMail = detailsChild.SelectSingleNode("//email").InnerText,
FromName = detailsChild.SelectSingleNode("//name").InnerText,
Subject = detailsChild.SelectSingleNode("//subject").InnerText,
Domain = detailsChild.SelectSingleNode("//domain").InnerText,
Body = detailsChild.SelectSingleNode("//body").InnerText
};
return notificationMail;
}
catch (Exception e)
{
LogHelper.Error<MarkAsSolutionReminder>(string.Format("Couldn't get settings for {0}", notificationType), e);
throw;
}
}
}
}
@@ -0,0 +1,38 @@
using System;
using Hangfire;
using Umbraco.Core;
using Umbraco.Core.Persistence;
namespace OurUmbraco.NotificationsCore.Notifications
{
public class ScheduleHangfireJobs
{
public void MarkAsSolvedReminder()
{
RecurringJob.AddOrUpdate(() => ScheduleTopics(), Cron.HourInterval(12));
}
public void ScheduleTopics()
{
using (var db = ApplicationContext.Current.DatabaseContext.Database)
{
var sql = new Sql("SELECT id, memberId FROM forumTopics WHERE answer = 0 AND (markAsSolutionReminderSent IS NULL OR markAsSolutionReminderSent = 0) AND replies > 0 AND updated < getdate() - 7 AND created > '2016-10-01 00:00:00' AND id NOT IN (SELECT topicId FROM notificationMarkAsSolution) ORDER BY created DESC");
var results = db.Query<ReminderTopic>(sql);
var reminder = new MarkAsSolutionReminder();
var notification = new NotificationMail();
var reminderMail = notification.GetNotificationMail("MarkAsSolutionReminderSingle");
foreach (var reminderTopic in results)
{
var jobId = BackgroundJob.Schedule(() => reminder.SendNotification(reminderTopic.Id, reminderTopic.MemberId, reminderMail), TimeSpan.FromMinutes(10));
}
}
}
}
public class ReminderTopic
{
public int Id { get; set; }
public int MemberId { get; set; }
}
}
@@ -32,7 +32,7 @@ namespace OurUmbraco.NotificationsWeb.EventHandlers
void ForumService_Created(object sender, ForumEventArgs e) void ForumService_Created(object sender, ForumEventArgs e)
{ {
var content = Umbraco.Web.UmbracoContext.Current.Application.Services.ContentService.GetById(e.Forum.ParentId); var content = ApplicationContext.Current.Services.ContentService.GetById(e.Forum.ParentId);
if (content.ContentType.Alias == "Project") if (content.ContentType.Alias == "Project")
{ {
var owner = content.GetValue<int>("owner"); var owner = content.GetValue<int>("owner");
+20 -19
View File
@@ -134,40 +134,41 @@ namespace OurUmbraco.Our.Api
int tagId = 0; int tagId = 0;
//first clear out all items associated with this ID... //first clear out all items associated with this ID...
Application.SqlHelper.ExecuteNonQuery("DELETE FROM cmsTagRelationship WHERE (nodeId = @nodeId) AND EXISTS (SELECT id FROM cmsTags WHERE (cmsTagRelationship.tagId = id) AND ([group] = @group));", using (var sqlHelper = Application.SqlHelper)
Application.SqlHelper.CreateParameter("@nodeId", nodeId),
Application.SqlHelper.CreateParameter("@group", group));
//and now we add them again...
foreach (string tag in tags.Split(','))
{ {
string cleanedtag = tag.Replace("<", ""); sqlHelper.ExecuteNonQuery(
cleanedtag = cleanedtag.Replace("'", ""); "DELETE FROM cmsTagRelationship WHERE (nodeId = @nodeId) AND EXISTS (SELECT id FROM cmsTags WHERE (cmsTagRelationship.tagId = id) AND ([group] = @group));",
cleanedtag = cleanedtag.Replace("\"", ""); sqlHelper.CreateParameter("@nodeId", nodeId),
cleanedtag = cleanedtag.Replace(">", ""); sqlHelper.CreateParameter("@group", group));
if (cleanedtag.Length > 0) //and now we add them again...
foreach (var tag in tags.Split(','))
{ {
var cleanedtag = tag.Replace("<", "");
cleanedtag = cleanedtag.Replace("'", "");
cleanedtag = cleanedtag.Replace("\"", "");
cleanedtag = cleanedtag.Replace(">", "");
if (cleanedtag.Length <= 0)
continue;
try try
{ {
tagId = umbraco.editorControls.tags.library.AddTag(cleanedtag, group); tagId = umbraco.editorControls.tags.library.AddTag(cleanedtag, @group);
if (tagId > 0) if (tagId > 0)
{ {
sqlHelper.ExecuteNonQuery(
Application.SqlHelper.ExecuteNonQuery("INSERT INTO cmsTagRelationShip(nodeId,tagId) VALUES (@nodeId, @tagId)", "INSERT INTO cmsTagRelationShip(nodeId,tagId) VALUES (@nodeId, @tagId)",
Application.SqlHelper.CreateParameter("@nodeId", nodeId), sqlHelper.CreateParameter("@nodeId", nodeId),
Application.SqlHelper.CreateParameter("@tagId", tagId) sqlHelper.CreateParameter("@tagId", tagId)
); );
tagId = 0; tagId = 0;
} }
} }
catch { } catch { }
} }
} }
} }
@@ -1,4 +1,7 @@
namespace OurUmbraco.Our.Businesslogic using System.Net.Mime;
using umbraco.BusinessLogic;
namespace OurUmbraco.Our.Businesslogic
{ {
public class ProjectContributor public class ProjectContributor
{ {
@@ -13,23 +16,31 @@
public void Add() public void Add()
{ {
if (!(Data.SqlHelper.ExecuteScalar<int>("SELECT 1 FROM projectContributors WHERE projectId = @projectId and memberId = @memberId;", using (var sqlHelper = Application.SqlHelper)
Data.SqlHelper.CreateParameter("@projectId", ProjectId),
Data.SqlHelper.CreateParameter("@memberId", MemberId)) > 0))
{ {
Data.SqlHelper.ExecuteNonQuery( var exists = sqlHelper.ExecuteScalar<int>(
"INSERT INTO projectContributors(projectId,memberId) values(@projectId,@memberId);", "SELECT 1 FROM projectContributors WHERE projectId = @projectId and memberId = @memberId;",
Data.SqlHelper.CreateParameter("@projectId", ProjectId), sqlHelper.CreateParameter("@projectId", ProjectId),
Data.SqlHelper.CreateParameter("@memberId", MemberId)); sqlHelper.CreateParameter("@memberId", MemberId)) > 0;
if (exists == false)
{
sqlHelper.ExecuteNonQuery(
"INSERT INTO projectContributors(projectId,memberId) values(@projectId,@memberId);",
sqlHelper.CreateParameter("@projectId", ProjectId),
sqlHelper.CreateParameter("@memberId", MemberId));
}
} }
} }
public void Delete() public void Delete()
{ {
Data.SqlHelper.ExecuteNonQuery( using (var sqlHelper = Application.SqlHelper)
"DELETE FROM projectContributors WHERE projectId = @projectId and memberId = @memberId;", {
Data.SqlHelper.CreateParameter("@projectId", ProjectId), sqlHelper.ExecuteNonQuery(
Data.SqlHelper.CreateParameter("@memberId", MemberId)); "DELETE FROM projectContributors WHERE projectId = @projectId and memberId = @memberId;",
sqlHelper.CreateParameter("@projectId", ProjectId),
sqlHelper.CreateParameter("@memberId", MemberId));
}
} }
} }
} }
@@ -106,7 +106,7 @@ namespace OurUmbraco.Our.Controllers
memberService.AssignRole(member.Id, "newaccount"); memberService.AssignRole(member.Id, "newaccount");
var redirectPage = "/"; var redirectPage = "/";
var contentService = UmbracoContext.Current.Application.Services.ContentService; var contentService = ApplicationContext.Current.Services.ContentService;
var rootNode = contentService.GetRootContent().OrderBy(x => x.SortOrder).First(x => x.ContentType.Alias == "Community"); var rootNode = contentService.GetRootContent().OrderBy(x => x.SortOrder).First(x => x.ContentType.Alias == "Community");
var memberNode = rootNode.Children().FirstOrDefault(x => x.Name == "Member"); var memberNode = rootNode.Children().FirstOrDefault(x => x.Name == "Member");
+11 -9
View File
@@ -2,6 +2,7 @@
using OurUmbraco.Forum.Services; using OurUmbraco.Forum.Services;
using OurUmbraco.Powers.BusinessLogic; using OurUmbraco.Powers.BusinessLogic;
using OurUmbraco.Powers.Library; using OurUmbraco.Powers.Library;
using umbraco.BusinessLogic;
using Umbraco.Core; using Umbraco.Core;
using Action = OurUmbraco.Powers.BusinessLogic.Action; using Action = OurUmbraco.Powers.BusinessLogic.Action;
@@ -23,20 +24,21 @@ namespace OurUmbraco.Our.CustomHandlers
void CommentScoring(object sender, ActionEventArgs e) void CommentScoring(object sender, ActionEventArgs e)
{ {
Action a = (Action)sender; var action = (Action)sender;
if (a.Alias == "LikeComment" || a.Alias == "DisLikeComment" || a.Alias == "TopicSolved") if (action.Alias != "LikeComment" && action.Alias != "DisLikeComment" && action.Alias != "TopicSolved")
return;
var score = Xslt.Score(e.ItemId, action.DataBaseTable);
//we then add the sum of the total score to the
using (var sqlHelper = Application.SqlHelper)
{ {
sqlHelper.ExecuteNonQuery("UPDATE forumComments SET score = @score WHERE id = @id",
int score = Xslt.Score(e.ItemId, a.DataBaseTable); sqlHelper.CreateParameter("@id", e.ItemId), sqlHelper.CreateParameter("@score", score));
//we then add the sum of the total score to the
Data.SqlHelper.ExecuteNonQuery("UPDATE forumComments SET score = @score WHERE id = @id", Data.SqlHelper.CreateParameter("@id", e.ItemId), Data.SqlHelper.CreateParameter("@score", score));
} }
} }
void CommentVote(object sender, ActionEventArgs e) void CommentVote(object sender, ActionEventArgs e)
{ {
@@ -14,13 +14,16 @@ namespace OurUmbraco.Our.CustomHandlers
void Action_BeforePerform(object sender, ActionEventArgs e) void Action_BeforePerform(object sender, ActionEventArgs e)
{ {
Action a = (Action)sender; var action = (Action)sender;
if (a.Alias == "ExternalVote") if (action.Alias != "ExternalVote")
{ return;
var memberId = OurUmbraco.Powers.BusinessLogic.Data.SqlHelper.ExecuteScalar<int>("SELECT memberId FROM externalUrls WHERE (@id = id)", OurUmbraco.Powers.BusinessLogic.Data.SqlHelper.CreateParameter("@id", e.ItemId));
e.ReceiverId = memberId; using (var sqlHelper = Application.SqlHelper)
} {
var memberId = sqlHelper.ExecuteScalar<int>("SELECT memberId FROM externalUrls WHERE (@id = id)", sqlHelper.CreateParameter("@id", e.ItemId));
e.ReceiverId = memberId;
}
} }
} }
} }
@@ -22,7 +22,7 @@ namespace OurUmbraco.Our.CustomHandlers {
{ {
if (e.Comment != null && e.Comment.MemberId > 0) if (e.Comment != null && e.Comment.MemberId > 0)
{ {
var ms = UmbracoContext.Current.Application.Services.MemberService; var ms = ApplicationContext.Current.Services.MemberService;
var member = ms.GetById(e.Comment.MemberId); var member = ms.GetById(e.Comment.MemberId);
member.IncreaseForumPostCount(); member.IncreaseForumPostCount();
ms.Save(member); ms.Save(member);
@@ -36,7 +36,7 @@ namespace OurUmbraco.Our.CustomHandlers {
{ {
if (e.Topic != null && e.Topic.MemberId > 0) if (e.Topic != null && e.Topic.MemberId > 0)
{ {
var ms = UmbracoContext.Current.Application.Services.MemberService; var ms = ApplicationContext.Current.Services.MemberService;
var member = ms.GetById(e.Topic.MemberId); var member = ms.GetById(e.Topic.MemberId);
member.IncreaseForumPostCount(); member.IncreaseForumPostCount();
ms.Save(member); ms.Save(member);
+2 -2
View File
@@ -22,7 +22,7 @@ namespace OurUmbraco.Our.CustomHandlers
if (a.Alias == "ProjectUp") if (a.Alias == "ProjectUp")
{ {
var contentService = UmbracoContext.Current.Application.Services.ContentService; var contentService = ApplicationContext.Current.Services.ContentService;
var content = contentService.GetById(e.ItemId); var content = contentService.GetById(e.ItemId);
if (content.GetValue<bool>("approved") == false && if (content.GetValue<bool>("approved") == false &&
Xslt.Score(content.Id, "powersProject") >= 15) Xslt.Score(content.Id, "powersProject") >= 15)
@@ -39,7 +39,7 @@ namespace OurUmbraco.Our.CustomHandlers
if (a.Alias == "ProjectUp" || a.Alias == "ProjectDown") if (a.Alias == "ProjectUp" || a.Alias == "ProjectDown")
{ {
var contentService = UmbracoContext.Current.Application.Services.ContentService; var contentService = ApplicationContext.Current.Services.ContentService;
var content = contentService.GetById(e.ItemId); var content = contentService.GetById(e.ItemId);
e.ReceiverId = content.GetValue<int>("owner"); e.ReceiverId = content.GetValue<int>("owner");
+15 -10
View File
@@ -4,6 +4,7 @@ using System.Web.Security;
using OurUmbraco.Forum.Services; using OurUmbraco.Forum.Services;
using OurUmbraco.Powers.BusinessLogic; using OurUmbraco.Powers.BusinessLogic;
using OurUmbraco.Powers.Library; using OurUmbraco.Powers.Library;
using umbraco.BusinessLogic;
using Umbraco.Core; using Umbraco.Core;
using Action = OurUmbraco.Powers.BusinessLogic.Action; using Action = OurUmbraco.Powers.BusinessLogic.Action;
@@ -61,17 +62,21 @@ namespace OurUmbraco.Our.CustomHandlers
void TopicScoring(object sender, ActionEventArgs e) void TopicScoring(object sender, ActionEventArgs e)
{ {
if (!e.Cancel) if (e.Cancel)
return;
var action = (Action)sender;
if (action.Alias != "LikeTopic" && action.Alias != "DisLikeTopic")
return;
var topicScore = Xslt.Score(e.ItemId, action.DataBaseTable);
using (var sqlHelper = Application.SqlHelper)
{ {
Action a = (Action)sender; //this uses a non-standard coloumn in the forum schema, so this is added manually..
sqlHelper.ExecuteNonQuery("UPDATE forumTopics SET score = @score WHERE id = @id",
if (a.Alias == "LikeTopic" || a.Alias == "DisLikeTopic") sqlHelper.CreateParameter("@id", e.ItemId),
{ sqlHelper.CreateParameter("@score", topicScore));
int topicScore = Xslt.Score(e.ItemId, a.DataBaseTable);
//this uses a non-standard coloumn in the forum schema, so this is added manually..
Data.SqlHelper.ExecuteNonQuery("UPDATE forumTopics SET score = @score WHERE id = @id", Data.SqlHelper.CreateParameter("@id", e.ItemId), Data.SqlHelper.CreateParameter("@score", topicScore));
}
} }
} }
-30
View File
@@ -1,30 +0,0 @@
using umbraco.DataLayer;
namespace OurUmbraco.Our
{
public class Data
{
private static string _ConnString = umbraco.GlobalSettings.DbDSN;
private static ISqlHelper _sqlHelper;
/// <summary>
/// Gets the SQL helper.
/// </summary>
/// <value>The SQL helper.</value>
public static ISqlHelper SqlHelper
{
get
{
if (_sqlHelper == null)
{
try
{
_sqlHelper = DataLayerHelper.CreateSqlHelper(_ConnString);
}
catch { }
}
return _sqlHelper;
}
}
}
}
@@ -1,5 +1,10 @@
using System;
using System.Configuration;
using System.Web.Configuration; using System.Web.Configuration;
using Hangfire;
using Hangfire.SqlServer;
using Microsoft.Owin; using Microsoft.Owin;
using OurUmbraco.NotificationsCore.Notifications;
using OurUmbraco.Our.GoogleOAuth; using OurUmbraco.Our.GoogleOAuth;
using Owin; using Owin;
using Umbraco.Web; using Umbraco.Web;
@@ -22,7 +27,22 @@ namespace OurUmbraco.Our.GoogleOAuth
var clientId = WebConfigurationManager.AppSettings["GoogleOAuthClientID"]; var clientId = WebConfigurationManager.AppSettings["GoogleOAuthClientID"];
var secret = WebConfigurationManager.AppSettings["GoogleOAuthSecret"]; var secret = WebConfigurationManager.AppSettings["GoogleOAuthSecret"];
UmbracoGoogleAuthExtensions.ConfigureBackOfficeGoogleAuth(app, clientId, secret); app.ConfigureBackOfficeGoogleAuth(clientId, secret);
if (string.Equals(ConfigurationManager.AppSettings["HangFireEnabled"], "true", StringComparison.InvariantCultureIgnoreCase) == false)
return;
// Configure hangfire
var options = new SqlServerStorageOptions {PrepareSchemaIfNecessary = true};
var connectionString = Umbraco.Core.ApplicationContext.Current.DatabaseContext.ConnectionString;
GlobalConfiguration.Configuration.UseSqlServerStorage(connectionString, options);
var dashboardOptions = new DashboardOptions {Authorization = new[] {new UmbracoAuthorizationFilter()}};
app.UseHangfireDashboard("/hangfire", dashboardOptions);
app.UseHangfireServer();
// Schedule jobs
var scheduler = new ScheduleHangfireJobs();
scheduler.MarkAsSolvedReminder();
} }
} }
} }
+80 -19
View File
@@ -33,6 +33,8 @@ namespace OurUmbraco.Our
AddTermsAndConditionsPage(); AddTermsAndConditionsPage();
UseNewRegistrationForm(); UseNewRegistrationForm();
AddStrictMinimumVersionForPackages(); AddStrictMinimumVersionForPackages();
RenameUaaStoUCloud();
AddMarkAsSolutionReminderSent();
} }
private void EnsureMigrationsMarkerPathExists() private void EnsureMigrationsMarkerPathExists()
@@ -52,7 +54,7 @@ namespace OurUmbraco.Our
if (File.Exists(path)) if (File.Exists(path))
return; return;
var macroService = UmbracoContext.Current.Application.Services.MacroService; var macroService = ApplicationContext.Current.Services.MacroService;
var macroAlias = "MembersActivate"; var macroAlias = "MembersActivate";
if (macroService.GetByAlias(macroAlias) == null) if (macroService.GetByAlias(macroAlias) == null)
{ {
@@ -68,7 +70,7 @@ namespace OurUmbraco.Our
macro.Save(); macro.Save();
} }
var contentService = UmbracoContext.Current.Application.Services.ContentService; var contentService = ApplicationContext.Current.Services.ContentService;
var rootNode = contentService.GetRootContent().OrderBy(x => x.SortOrder).First(x => x.ContentType.Alias == "Community"); var rootNode = contentService.GetRootContent().OrderBy(x => x.SortOrder).First(x => x.ContentType.Alias == "Community");
var memberNode = rootNode.Children().FirstOrDefault(x => x.Name == "Member"); var memberNode = rootNode.Children().FirstOrDefault(x => x.Name == "Member");
@@ -108,7 +110,7 @@ namespace OurUmbraco.Our
if (File.Exists(path)) if (File.Exists(path))
return; return;
var macroService = UmbracoContext.Current.Application.Services.MacroService; var macroService = ApplicationContext.Current.Services.MacroService;
var macroAlias = "AntiSpam"; var macroAlias = "AntiSpam";
if (macroService.GetByAlias(macroAlias) == null) if (macroService.GetByAlias(macroAlias) == null)
{ {
@@ -124,7 +126,7 @@ namespace OurUmbraco.Our
macro.Save(); macro.Save();
} }
var contentService = UmbracoContext.Current.Application.Services.ContentService; var contentService = ApplicationContext.Current.Services.ContentService;
var rootNode = contentService.GetRootContent().OrderBy(x => x.SortOrder).First(x => x.ContentType.Alias == "Community"); var rootNode = contentService.GetRootContent().OrderBy(x => x.SortOrder).First(x => x.ContentType.Alias == "Community");
var antiSpamPageName = "AntiSpam"; var antiSpamPageName = "AntiSpam";
@@ -154,7 +156,7 @@ namespace OurUmbraco.Our
if (File.Exists(path)) if (File.Exists(path))
return; return;
var macroService = UmbracoContext.Current.Application.Services.MacroService; var macroService = ApplicationContext.Current.Services.MacroService;
var macroAlias = "CommunityHome"; var macroAlias = "CommunityHome";
if (macroService.GetByAlias(macroAlias) == null) if (macroService.GetByAlias(macroAlias) == null)
{ {
@@ -189,7 +191,7 @@ namespace OurUmbraco.Our
if (File.Exists(path)) if (File.Exists(path))
return; return;
var contentTypeService = UmbracoContext.Current.Application.Services.ContentTypeService; var contentTypeService = ApplicationContext.Current.Services.ContentTypeService;
var releaseContentType = contentTypeService.GetContentType("Release"); var releaseContentType = contentTypeService.GetContentType("Release");
var propertyTypeAlias = "overrideYouTrackDescription"; var propertyTypeAlias = "overrideYouTrackDescription";
if (releaseContentType.PropertyTypeExists(propertyTypeAlias) == false) if (releaseContentType.PropertyTypeExists(propertyTypeAlias) == false)
@@ -228,13 +230,13 @@ namespace OurUmbraco.Our
if (File.Exists(path)) if (File.Exists(path))
return; return;
var contentTypeService = UmbracoContext.Current.Application.Services.ContentTypeService; var contentTypeService = ApplicationContext.Current.Services.ContentTypeService;
var projectContentType = contentTypeService.GetContentType("Project"); var projectContentType = contentTypeService.GetContentType("Project");
var propertyTypeAlias = "worksOnUaaS"; var propertyTypeAlias = "worksOnUaaS";
if (projectContentType.PropertyTypeExists(propertyTypeAlias) == false) if (projectContentType.PropertyTypeExists(propertyTypeAlias) == false)
{ {
var checkbox = new DataTypeDefinition("Umbraco.TrueFalse"); var checkbox = new DataTypeDefinition("Umbraco.TrueFalse");
var checkboxPropertyType = new PropertyType(checkbox, propertyTypeAlias) { Name = "Works on Umbraco as a Service?" }; var checkboxPropertyType = new PropertyType(checkbox, propertyTypeAlias) { Name = "Works on Umbraco Cloud?" };
projectContentType.AddPropertyType(checkboxPropertyType, "Project"); projectContentType.AddPropertyType(checkboxPropertyType, "Project");
contentTypeService.Save(projectContentType); contentTypeService.Save(projectContentType);
} }
@@ -258,7 +260,7 @@ namespace OurUmbraco.Our
if (File.Exists(path)) if (File.Exists(path))
return; return;
var contentTypeService = UmbracoContext.Current.Application.Services.ContentTypeService; var contentTypeService = ApplicationContext.Current.Services.ContentTypeService;
var projectContentType = contentTypeService.GetContentType("Forum"); var projectContentType = contentTypeService.GetContentType("Forum");
var propertyTypeAlias = "archived"; var propertyTypeAlias = "archived";
if (projectContentType.PropertyTypeExists(propertyTypeAlias) == false) if (projectContentType.PropertyTypeExists(propertyTypeAlias) == false)
@@ -288,7 +290,7 @@ namespace OurUmbraco.Our
if (File.Exists(path)) if (File.Exists(path))
return; return;
var contentTypeService = UmbracoContext.Current.Application.Services.ContentTypeService; var contentTypeService = ApplicationContext.Current.Services.ContentTypeService;
var communityContentType = contentTypeService.GetContentType("Community"); var communityContentType = contentTypeService.GetContentType("Community");
var propertyTypeAlias = "homeOnlyBanner"; var propertyTypeAlias = "homeOnlyBanner";
if (communityContentType.PropertyTypeExists(propertyTypeAlias) == false) if (communityContentType.PropertyTypeExists(propertyTypeAlias) == false)
@@ -319,7 +321,7 @@ namespace OurUmbraco.Our
if (File.Exists(path)) if (File.Exists(path))
return; return;
var userService = UmbracoContext.Current.Application.Services.UserService; var userService = ApplicationContext.Current.Services.UserService;
var rootUser = userService.GetUserById(0); var rootUser = userService.GetUserById(0);
if (rootUser == null) if (rootUser == null)
return; return;
@@ -328,7 +330,7 @@ namespace OurUmbraco.Our
if (rootUser.Email == "pph@umrbaco.org") if (rootUser.Email == "pph@umrbaco.org")
return; return;
var db = UmbracoContext.Current.Application.DatabaseContext.Database; var db = ApplicationContext.Current.DatabaseContext.Database;
db.Execute("DELETE FROM [umbracoUser] WHERE id != 0"); db.Execute("DELETE FROM [umbracoUser] WHERE id != 0");
db.Execute("DELETE FROM [umbracoUser2app] WHERE [user] != 0"); db.Execute("DELETE FROM [umbracoUser2app] WHERE [user] != 0");
db.Execute("DBCC CHECKIDENT ('dbo.umbracoUser');"); db.Execute("DBCC CHECKIDENT ('dbo.umbracoUser');");
@@ -361,7 +363,7 @@ namespace OurUmbraco.Our
if (File.Exists(path)) if (File.Exists(path))
return; return;
var contentTypeService = UmbracoContext.Current.Application.Services.ContentTypeService; var contentTypeService = ApplicationContext.Current.Services.ContentTypeService;
var releaseCompareAlias = "ReleaseCompare"; var releaseCompareAlias = "ReleaseCompare";
var compareContentType = contentTypeService.GetContentType(releaseCompareAlias); var compareContentType = contentTypeService.GetContentType(releaseCompareAlias);
if (compareContentType == null) if (compareContentType == null)
@@ -391,7 +393,7 @@ namespace OurUmbraco.Our
Content = templateContent Content = templateContent
}; };
var fileService = UmbracoContext.Current.Application.Services.FileService; var fileService = ApplicationContext.Current.Services.FileService;
var masterTemplate = fileService.GetTemplate("Master"); var masterTemplate = fileService.GetTemplate("Master");
releaseCompareTemplate.SetMasterTemplate(masterTemplate); releaseCompareTemplate.SetMasterTemplate(masterTemplate);
@@ -404,7 +406,7 @@ namespace OurUmbraco.Our
contentTypeService.Save(compareContentType); contentTypeService.Save(compareContentType);
var contentService = UmbracoContext.Current.Application.Services.ContentService; var contentService = ApplicationContext.Current.Services.ContentService;
var rootNode = contentService.GetRootContent().OrderBy(x => x.SortOrder).First(x => x.ContentType.Alias == "Community"); var rootNode = contentService.GetRootContent().OrderBy(x => x.SortOrder).First(x => x.ContentType.Alias == "Community");
if (rootNode == null) if (rootNode == null)
return; return;
@@ -422,7 +424,7 @@ namespace OurUmbraco.Our
compareContent.Template = releaseCompareTemplate; compareContent.Template = releaseCompareTemplate;
contentService.SaveAndPublishWithStatus(compareContent); contentService.SaveAndPublishWithStatus(compareContent);
var macroService = UmbracoContext.Current.Application.Services.MacroService; var macroService = ApplicationContext.Current.Services.MacroService;
const string macroAlias = "ReleasesDropdown"; const string macroAlias = "ReleasesDropdown";
if (macroService.GetByAlias(macroAlias) == null) if (macroService.GetByAlias(macroAlias) == null)
{ {
@@ -456,7 +458,7 @@ namespace OurUmbraco.Our
if (File.Exists(path)) if (File.Exists(path))
return; return;
var contentService = UmbracoContext.Current.Application.Services.ContentService; var contentService = ApplicationContext.Current.Services.ContentService;
var rootContent = contentService.GetRootContent().FirstOrDefault(); var rootContent = contentService.GetRootContent().FirstOrDefault();
if (rootContent != null) if (rootContent != null)
{ {
@@ -488,7 +490,7 @@ namespace OurUmbraco.Our
if (File.Exists(path)) if (File.Exists(path))
return; return;
var macroService = UmbracoContext.Current.Application.Services.MacroService; var macroService = ApplicationContext.Current.Services.MacroService;
var macro = macroService.GetByAlias("MemberSignup"); var macro = macroService.GetByAlias("MemberSignup");
macro.ControlType = ""; macro.ControlType = "";
macro.ScriptPath = "~/Views/MacroPartials/Members/Register.cshtml"; macro.ScriptPath = "~/Views/MacroPartials/Members/Register.cshtml";
@@ -513,7 +515,7 @@ namespace OurUmbraco.Our
if (File.Exists(path)) if (File.Exists(path))
return; return;
var db = UmbracoContext.Current.Application.DatabaseContext.Database; var db = ApplicationContext.Current.DatabaseContext.Database;
db.Execute("ALTER TABLE [wikiFiles] ADD [minimumVersionStrict] VARCHAR(50)"); db.Execute("ALTER TABLE [wikiFiles] ADD [minimumVersionStrict] VARCHAR(50)");
string[] lines = { "" }; string[] lines = { "" };
@@ -524,5 +526,64 @@ namespace OurUmbraco.Our
LogHelper.Error<MigrationsHandler>(string.Format("Migration: '{0}' failed", migrationName), ex); LogHelper.Error<MigrationsHandler>(string.Format("Migration: '{0}' failed", migrationName), ex);
} }
} }
private void RenameUaaStoUCloud()
{
var migrationName = MethodBase.GetCurrentMethod().Name;
try
{
var path = HostingEnvironment.MapPath(MigrationMarkersPath + migrationName + ".txt");
if (File.Exists(path))
return;
var contentService = ApplicationContext.Current.Services.ContentService;
var rootContent = contentService.GetRootContent().FirstOrDefault();
if (rootContent != null)
{
var forumContent = rootContent.Children().FirstOrDefault(x => x.Name == "Forum");
if (forumContent != null)
{
var uaasForumContent = forumContent.Children().FirstOrDefault(x => x.Name.ToLowerInvariant() == "Umbraco as a Service".ToLowerInvariant());
if (uaasForumContent != null)
{
uaasForumContent.Name = "Umbraco Cloud";
uaasForumContent.SetValue("forumDescription", "Discussions about Umbraco Cloud.");
var status = contentService.SaveAndPublishWithStatus(uaasForumContent);
status = contentService.SaveAndPublishWithStatus(uaasForumContent);
}
}
}
string[] lines = { "" };
File.WriteAllLines(path, lines);
}
catch (Exception ex)
{
LogHelper.Error<MigrationsHandler>(string.Format("Migration: '{0}' failed", migrationName), ex);
}
}
private void AddMarkAsSolutionReminderSent()
{
var migrationName = MethodBase.GetCurrentMethod().Name;
try
{
var path = HostingEnvironment.MapPath(MigrationMarkersPath + migrationName + ".txt");
if (File.Exists(path))
return;
var db = ApplicationContext.Current.DatabaseContext.Database;
db.Execute("ALTER TABLE [forumTopics] ADD [markAsSolutionReminderSent] [BIT] NULL DEFAULT ((0))");
string[] lines = { "" };
File.WriteAllLines(path, lines);
}
catch (Exception ex)
{
LogHelper.Error<MigrationsHandler>(string.Format("Migration: '{0}' failed", migrationName), ex);
}
}
} }
} }
+29 -29
View File
@@ -79,17 +79,17 @@ namespace OurUmbraco.Our
if (Utils.IsAdmin(_currentMember)) if (Utils.IsAdmin(_currentMember))
{ {
//Yep - it's valid, lets get that member //Yep - it's valid, lets get that member
Member MemberToBlock = Utils.GetMember(memberId); Member MemberToBlock = Utils.GetMember(memberId);
//Now we have the member - lets update the 'blocked' property on the member //Now we have the member - lets update the 'blocked' property on the member
MemberToBlock.getProperty("blocked").Value = false; MemberToBlock.getProperty("blocked").Value = false;
//Save the changes //Save the changes
MemberToBlock.Save(); MemberToBlock.Save();
//It's all good... //It's all good...
return "true"; return "true";
} }
@@ -106,16 +106,19 @@ namespace OurUmbraco.Our
if (Utils.IsHq(_currentMember)) if (Utils.IsHq(_currentMember))
{ {
//Lets check the memberID of the member we are blocking passed into /base is a valid member.. //Lets check the memberID of the member we are blocking passed into /base is a valid member..
//Yep - it's valid, lets get that member //Yep - it's valid, lets get that member
var member = Utils.GetMember(memberId); var member = Utils.GetMember(memberId);
Membership.DeleteUser(member.LoginName, true); Membership.DeleteUser(member.LoginName, true);
Application.SqlHelper.ExecuteNonQuery("UPDATE forumForums SET latestAuthor = 0 WHERE latestAuthor = @memberId", using (var sqlHelper = Application.SqlHelper)
Application.SqlHelper.CreateParameter("@memberId", memberId)); {
sqlHelper.ExecuteNonQuery("UPDATE forumForums SET latestAuthor = 0 WHERE latestAuthor = @memberId",
sqlHelper.CreateParameter("@memberId", memberId));
}
//It's all good... //It's all good...
return "true"; return "true";
} }
@@ -126,30 +129,27 @@ namespace OurUmbraco.Our
[RestExtensionMethod(AllowGroup = "HQ", ReturnXml = false)] [RestExtensionMethod(AllowGroup = "HQ", ReturnXml = false)]
public static string GetBlockedMembers() public static string GetBlockedMembers()
{ {
int _currentMember = HttpContext.Current.User.Identity.IsAuthenticated ? (int)Membership.GetUser().ProviderUserKey : 0; var currentMember = HttpContext.Current.User.Identity.IsAuthenticated ? (int)Membership.GetUser().ProviderUserKey : 0;
//Check if member is an admin (in group 'admin') //Check if member is an admin (in group 'admin')
if (Utils.IsHq(_currentMember)) //Member not authorised or memberID passed in is not valid
if (Utils.IsHq(currentMember) == false) return string.Empty;
var returnValue = string.Empty;
const string blockedMembersQuery = "SELECT contentNodeId FROM cmsPropertyData WHERE propertytypeid = (SELECT id FROM cmsPropertyType WHERE alias = 'blocked') AND dataInt = 1";
using (var reader = Application.SqlHelper.ExecuteReader(blockedMembersQuery))
{ {
var returnValue = string.Empty;
const string blockedMembersQuery = "SELECT contentNodeId FROM cmsPropertyData WHERE propertytypeid = (SELECT id FROM cmsPropertyType WHERE alias = 'blocked') AND dataInt = 1";
var reader = Data.SqlHelper.ExecuteReader(blockedMembersQuery);
while (reader.Read()) while (reader.Read())
{ {
var memberId = reader.GetInt("contentNodeId"); var memberId = reader.GetInt("contentNodeId");
returnValue = returnValue + "<a href=\"/member/" + memberId + "\">" + memberId + "</a><br />"; returnValue = returnValue + "<a href=\"/member/" + memberId + "\">" + memberId + "</a><br />";
} }
//It's all good...
return returnValue;
} }
//Member not authorised or memberID passed in is not valid //It's all good...
return ""; return returnValue;
} }
} }
} }
+15 -12
View File
@@ -6,6 +6,7 @@ using System.Text.RegularExpressions;
using System.Web; using System.Web;
using System.Web.Hosting; using System.Web.Hosting;
using System.Web.Security; using System.Web.Security;
using umbraco.BusinessLogic;
using Umbraco.Core.Logging; using Umbraco.Core.Logging;
using Umbraco.Core.Models; using Umbraco.Core.Models;
using Umbraco.Web; using Umbraco.Web;
@@ -194,24 +195,26 @@ namespace OurUmbraco.Our
public static List<int> GetProjectContributors(int projectId) public static List<int> GetProjectContributors(int projectId)
{ {
var projects = new List<int>();
using (var sqlHelper = Application.SqlHelper)
List<int> projects = new List<int>(); using (var recordsReader = sqlHelper.ExecuteReader("SELECT * FROM projectContributors WHERE projectId = @projectId ", sqlHelper.CreateParameter("@projectId", projectId)))
umbraco.DataLayer.IRecordsReader dr = Data.SqlHelper.ExecuteReader("SELECT * FROM projectContributors WHERE projectId = " + projectId);
while (dr.Read())
{ {
projects.Add(dr.GetInt("memberId")); while (recordsReader.Read())
projects.Add(recordsReader.GetInt("memberId"));
return projects;
} }
return projects;
} }
public static bool IsProjectContributor(int memberId, int projectId) public static bool IsProjectContributor(int memberId, int projectId)
{ {
return ((Data.SqlHelper.ExecuteScalar<int>("SELECT 1 FROM projectContributors WHERE projectId = @projectId and memberId = @memberId;", using (var sqlHelper = Application.SqlHelper)
Data.SqlHelper.CreateParameter("@projectId", projectId), {
Data.SqlHelper.CreateParameter("@memberId", memberId)) > 0)); return sqlHelper.ExecuteScalar<int>(
"SELECT 1 FROM projectContributors WHERE projectId = @projectId and memberId = @memberId;",
sqlHelper.CreateParameter("@projectId", projectId),
sqlHelper.CreateParameter("@memberId", memberId)) > 0;
}
} }
public static string GetMemberAvatar(IPublishedContent member, int avatarSize, bool getRawUrl = false) public static string GetMemberAvatar(IPublishedContent member, int avatarSize, bool getRawUrl = false)
@@ -8,21 +8,23 @@ namespace OurUmbraco.Our.usercontrols
{ {
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
if (Request["id"] != null) if (Request["id"] == null)
return;
var fileId = int.Parse(Request["id"]);
var wikiFile = new WikiFile(fileId);
wikiFile.UpdateDownloadCounter(false, wikiFile.FileType == "package");
using (var sqlHelper = BL.Application.SqlHelper)
{ {
var fileId = int.Parse(Request["id"]); var path = sqlHelper.ExecuteScalar<string>(
"Select path from wikiFiles where id = @id;",
sqlHelper.CreateParameter("@id", fileId));
var wikiFile = new WikiFile(fileId); var file = sqlHelper.ExecuteScalar<string>(
"Select name from wikiFiles where id = @id;",
wikiFile.UpdateDownloadCounter(false, wikiFile.FileType == "package"); sqlHelper.CreateParameter("@id", fileId));
var path = BL.Application.SqlHelper.ExecuteScalar<string>(
"Select path from wikiFiles where id = @id;",
BL.Application.SqlHelper.CreateParameter("@id", fileId));
var file = BL.Application.SqlHelper.ExecuteScalar<string>(
"Select name from wikiFiles where id = @id;",
BL.Application.SqlHelper.CreateParameter("@id", fileId));
var fileinfo = new System.IO.FileInfo(Server.MapPath(path)); var fileinfo = new System.IO.FileInfo(Server.MapPath(path));
+1 -1
View File
@@ -156,7 +156,7 @@ namespace OurUmbraco.Our.usercontrols
memberService.AssignRole(member.Id, "newaccount"); memberService.AssignRole(member.Id, "newaccount");
var redirectPage = "/"; var redirectPage = "/";
var contentService = UmbracoContext.Current.Application.Services.ContentService; var contentService = ApplicationContext.Current.Services.ContentService;
var rootNode = contentService.GetRootContent().OrderBy(x => x.SortOrder).First(x => x.ContentType.Alias == "Community"); var rootNode = contentService.GetRootContent().OrderBy(x => x.SortOrder).First(x => x.ContentType.Alias == "Community");
var memberNode = rootNode.Children().FirstOrDefault(x => x.Name == "Member"); var memberNode = rootNode.Children().FirstOrDefault(x => x.Name == "Member");
+47 -36
View File
@@ -39,24 +39,24 @@
<HintPath>..\packages\AutoMapper.3.3.1\lib\net40\AutoMapper.Net4.dll</HintPath> <HintPath>..\packages\AutoMapper.3.3.1\lib\net40\AutoMapper.Net4.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="businesslogic, Version=1.0.6136.27244, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="businesslogic, Version=1.0.6183.23126, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\businesslogic.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\businesslogic.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="ClientDependency.Core, Version=1.9.1.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="ClientDependency.Core, Version=1.9.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ClientDependency.1.9.1\lib\net45\ClientDependency.Core.dll</HintPath> <HintPath>..\packages\ClientDependency.1.9.2\lib\net45\ClientDependency.Core.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="ClientDependency.Core.Mvc, Version=1.8.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="ClientDependency.Core.Mvc, Version=1.8.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ClientDependency-Mvc5.1.8.0.0\lib\net45\ClientDependency.Core.Mvc.dll</HintPath> <HintPath>..\packages\ClientDependency-Mvc5.1.8.0.0\lib\net45\ClientDependency.Core.Mvc.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="cms, Version=1.0.6136.27244, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="cms, Version=1.0.6183.23126, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\cms.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\cms.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="controls, Version=1.0.6136.27246, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="controls, Version=1.0.6183.23128, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\controls.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\controls.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="CookComputing.XmlRpcV2, Version=2.5.0.0, Culture=neutral, PublicKeyToken=a7d6e17aa302004d, processorArchitecture=MSIL"> <Reference Include="CookComputing.XmlRpcV2, Version=2.5.0.0, Culture=neutral, PublicKeyToken=a7d6e17aa302004d, processorArchitecture=MSIL">
@@ -71,8 +71,16 @@
<HintPath>..\packages\Examine.0.1.70.0\lib\Examine.dll</HintPath> <HintPath>..\packages\Examine.0.1.70.0\lib\Examine.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="HtmlAgilityPack, Version=1.4.9.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL"> <Reference Include="Hangfire.Core, Version=1.6.7.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.1.4.9\lib\Net45\HtmlAgilityPack.dll</HintPath> <HintPath>..\packages\Hangfire.Core.1.6.7\lib\net45\Hangfire.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Hangfire.SqlServer, Version=1.6.7.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Hangfire.SqlServer.1.6.7\lib\net45\Hangfire.SqlServer.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="HtmlAgilityPack, Version=1.4.9.5, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.1.4.9.5\lib\Net45\HtmlAgilityPack.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL"> <Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
@@ -87,8 +95,8 @@
<HintPath>..\packages\ImageProcessor.Web.4.6.6.0\lib\net45\ImageProcessor.Web.dll</HintPath> <HintPath>..\packages\ImageProcessor.Web.4.6.6.0\lib\net45\ImageProcessor.Web.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="interfaces, Version=1.0.6136.27240, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="interfaces, Version=1.0.6183.23122, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\interfaces.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\interfaces.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="JsonFx, Version=2.0.1209.2802, Culture=neutral, PublicKeyToken=315052dd637f8a52, processorArchitecture=MSIL"> <Reference Include="JsonFx, Version=2.0.1209.2802, Culture=neutral, PublicKeyToken=315052dd637f8a52, processorArchitecture=MSIL">
@@ -96,7 +104,7 @@
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="log4net, Version=1.2.11.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="log4net, Version=1.2.11.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\log4net.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\log4net.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Lucene.Net, Version=2.9.4.1, Culture=neutral, PublicKeyToken=85089178b9ac3181, processorArchitecture=MSIL"> <Reference Include="Lucene.Net, Version=2.9.4.1, Culture=neutral, PublicKeyToken=85089178b9ac3181, processorArchitecture=MSIL">
@@ -112,7 +120,7 @@
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.ApplicationBlocks.Data, Version=1.0.1559.20655, Culture=neutral"> <Reference Include="Microsoft.ApplicationBlocks.Data, Version=1.0.1559.20655, Culture=neutral">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\Microsoft.ApplicationBlocks.Data.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\Microsoft.ApplicationBlocks.Data.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -175,8 +183,8 @@
<HintPath>..\packages\semver.1.1.2\lib\net451\Semver.dll</HintPath> <HintPath>..\packages\semver.1.1.2\lib\net451\Semver.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="SQLCE4Umbraco, Version=1.0.6136.27245, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="SQLCE4Umbraco, Version=1.0.6183.23127, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\SQLCE4Umbraco.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\SQLCE4Umbraco.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
@@ -185,11 +193,11 @@
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Data.Linq" /> <Reference Include="System.Data.Linq" />
<Reference Include="System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL"> <Reference Include="System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\System.Data.SqlServerCe.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\System.Data.SqlServerCe.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System.Data.SqlServerCe.Entity, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL"> <Reference Include="System.Data.SqlServerCe.Entity, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\System.Data.SqlServerCe.Entity.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\System.Data.SqlServerCe.Entity.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
@@ -251,43 +259,43 @@
<Reference Include="System.Net.Http" /> <Reference Include="System.Net.Http" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="TidyNet, Version=1.0.0.0, Culture=neutral"> <Reference Include="TidyNet, Version=1.0.0.0, Culture=neutral">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\TidyNet.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\TidyNet.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="umbraco, Version=1.0.6136.27248, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="umbraco, Version=1.0.6183.23129, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\umbraco.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\umbraco.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Umbraco.Core, Version=1.0.6136.27241, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Umbraco.Core, Version=1.0.6183.23123, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\Umbraco.Core.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\Umbraco.Core.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="umbraco.DataLayer, Version=1.0.6136.27243, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="umbraco.DataLayer, Version=1.0.6183.23126, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\umbraco.DataLayer.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\umbraco.DataLayer.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="umbraco.editorControls, Version=1.0.6136.27251, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="umbraco.editorControls, Version=1.0.6183.23131, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\umbraco.editorControls.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\umbraco.editorControls.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Umbraco.IdentityExtensions, Version=1.0.5779.34109, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Umbraco.IdentityExtensions, Version=1.0.5779.34109, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.IdentityExtensions.1.0.0\lib\net45\Umbraco.IdentityExtensions.dll</HintPath> <HintPath>..\packages\UmbracoCms.IdentityExtensions.1.0.0\lib\net45\Umbraco.IdentityExtensions.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="umbraco.MacroEngines, Version=1.0.6136.27252, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="umbraco.MacroEngines, Version=1.0.6183.23132, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\umbraco.MacroEngines.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\umbraco.MacroEngines.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="umbraco.providers, Version=1.0.6136.27246, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="umbraco.providers, Version=1.0.6183.23128, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\umbraco.providers.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\umbraco.providers.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Umbraco.Web.UI, Version=1.0.6136.27253, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Umbraco.Web.UI, Version=1.0.6183.23133, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\Umbraco.Web.UI.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\Umbraco.Web.UI.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="UmbracoExamine, Version=0.7.0.27245, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="UmbracoExamine, Version=0.7.0.23127, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UmbracoCms.Core.7.5.4\lib\UmbracoExamine.dll</HintPath> <HintPath>..\packages\UmbracoCms.Core.7.5.5\lib\UmbracoExamine.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="UrlRewritingNet.UrlRewriter, Version=2.0.7.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="UrlRewritingNet.UrlRewriter, Version=2.0.7.0, Culture=neutral, processorArchitecture=MSIL">
@@ -395,6 +403,9 @@
<Compile Include="NotificationsCore\Notifications\AccountApproved.cs" /> <Compile Include="NotificationsCore\Notifications\AccountApproved.cs" />
<Compile Include="NotificationsCore\Notifications\NewForumTopic.cs" /> <Compile Include="NotificationsCore\Notifications\NewForumTopic.cs" />
<Compile Include="NotificationsCore\Notifications\NewForumComment.cs" /> <Compile Include="NotificationsCore\Notifications\NewForumComment.cs" />
<Compile Include="NotificationsCore\Notifications\NotificationMail.cs" />
<Compile Include="NotificationsCore\Notifications\ScheduleHangfireJobs.cs" />
<Compile Include="NotificationsCore\Notifications\MarkAsSolutionReminder.cs" />
<Compile Include="NotificationsCore\NotificationTypes\NewForumTopic.cs" /> <Compile Include="NotificationsCore\NotificationTypes\NewForumTopic.cs" />
<Compile Include="NotificationsCore\NotificationTypes\NewForumTopicComment.cs" /> <Compile Include="NotificationsCore\NotificationTypes\NewForumTopicComment.cs" />
<Compile Include="NotificationsCore\SheduledNotification.cs" /> <Compile Include="NotificationsCore\SheduledNotification.cs" />
@@ -427,7 +438,6 @@
<Compile Include="Our\CustomHandlers\ProjectVote.cs" /> <Compile Include="Our\CustomHandlers\ProjectVote.cs" />
<Compile Include="Our\CustomHandlers\SearchPageRouteHandler.cs" /> <Compile Include="Our\CustomHandlers\SearchPageRouteHandler.cs" />
<Compile Include="Our\CustomHandlers\TopicVote.cs" /> <Compile Include="Our\CustomHandlers\TopicVote.cs" />
<Compile Include="Our\Data.cs" />
<Compile Include="Our\DefaultMemberAvatarHandler.cs" /> <Compile Include="Our\DefaultMemberAvatarHandler.cs" />
<Compile Include="Our\Examine\DocumentationIndexConfig.cs" /> <Compile Include="Our\Examine\DocumentationIndexConfig.cs" />
<Compile Include="Our\Examine\DocumentationIndexDataService.cs" /> <Compile Include="Our\Examine\DocumentationIndexDataService.cs" />
@@ -658,6 +668,7 @@
<DependentUpon>repository.asmx</DependentUpon> <DependentUpon>repository.asmx</DependentUpon>
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
<Compile Include="UmbracoAuthorizationFilter.cs" />
<Compile Include="Version\Config.cs" /> <Compile Include="Version\Config.cs" />
<Compile Include="Version\uWikiFileVerison.cs" /> <Compile Include="Version\uWikiFileVerison.cs" />
<Compile Include="Wiki\Api\WikiController.cs" /> <Compile Include="Wiki\Api\WikiController.cs" />
+17 -19
View File
@@ -1,7 +1,7 @@
using System; using System;
using System.IO; using System.IO;
using System.Xml; using System.Xml;
using umbraco.DataLayer; using umbraco.BusinessLogic;
namespace OurUmbraco.Powers.Buddha namespace OurUmbraco.Powers.Buddha
{ {
@@ -11,7 +11,6 @@ namespace OurUmbraco.Powers.Buddha
public string WebRoot { get; set; } public string WebRoot { get; set; }
private XmlDocument _config; private XmlDocument _config;
private ISqlHelper _sqlhelper;
private Char sep = System.IO.Path.DirectorySeparatorChar; private Char sep = System.IO.Path.DirectorySeparatorChar;
@@ -29,8 +28,6 @@ namespace OurUmbraco.Powers.Buddha
if (!Directory.Exists(WebRoot + sep + karmaDir)) if (!Directory.Exists(WebRoot + sep + karmaDir))
Directory.CreateDirectory(WebRoot + sep + karmaDir); Directory.CreateDirectory(WebRoot + sep + karmaDir);
_sqlhelper = DataLayerHelper.CreateSqlHelper(ConnectionString);
_config = new XmlDocument(); _config = new XmlDocument();
_config.Load(WebRoot + sep + "config" + sep + "uPowers.config"); _config.Load(WebRoot + sep + "config" + sep + "uPowers.config");
} }
@@ -55,13 +52,14 @@ namespace OurUmbraco.Powers.Buddha
//here we do all the detail, and dig into each individual member //here we do all the detail, and dig into each individual member
public void CalculateKarmaHistory() public void CalculateKarmaHistory()
{ {
string memberSql = "SELECT nodeId from cmsMember"; const string memberSql = "SELECT nodeId from cmsMember";
IRecordsReader rr = _sqlhelper.ExecuteReader(memberSql); using (var reader = Application.SqlHelper.ExecuteReader(memberSql))
while (rr.Read())
{ {
ProcessMember( rr.GetInt("nodeId") ); while (reader.Read())
{
ProcessMember(reader.GetInt("nodeId"));
}
} }
} }
@@ -81,15 +79,17 @@ namespace OurUmbraco.Powers.Buddha
string forumTopics = "SELECT count(id) from forumTopics WHERE memberID = " + memberId.ToString(); string forumTopics = "SELECT count(id) from forumTopics WHERE memberID = " + memberId.ToString();
string forumComments = "SELECT count(id) from forumComments WHERE memberID = " + memberId.ToString(); string forumComments = "SELECT count(id) from forumComments WHERE memberID = " + memberId.ToString();
int topicCount = _sqlhelper.ExecuteScalar<int>(forumTopics); using (var sqlHelper = Application.SqlHelper)
int commentCount = _sqlhelper.ExecuteScalar<int>(forumComments); {
int topicCount = sqlHelper.ExecuteScalar<int>(forumTopics);
XmlNode karma = doc.SelectSingleNode("//karma"); int commentCount = sqlHelper.ExecuteScalar<int>(forumComments);
XmlNode forum = umbraco.xmlHelper.addTextNode(doc, "forum","");
forum.AppendChild( umbraco.xmlHelper.addTextNode(doc, "topics", topicCount.ToString()));
forum.AppendChild(umbraco.xmlHelper.addTextNode(doc, "comments", commentCount.ToString()));
karma.AppendChild(forum);
XmlNode karma = doc.SelectSingleNode("//karma");
XmlNode forum = umbraco.xmlHelper.addTextNode(doc, "forum", "");
forum.AppendChild(umbraco.xmlHelper.addTextNode(doc, "topics", topicCount.ToString()));
forum.AppendChild(umbraco.xmlHelper.addTextNode(doc, "comments", commentCount.ToString()));
karma.AppendChild(forum);
}
if (File.Exists(memberKarmaFile)) if (File.Exists(memberKarmaFile))
File.Delete(memberKarmaFile); File.Delete(memberKarmaFile);
@@ -261,8 +261,6 @@ namespace OurUmbraco.Powers.Buddha
public void Dispose() public void Dispose()
{ {
_config = null; _config = null;
_sqlhelper.Dispose();
_sqlhelper = null;
} }
#endregion #endregion
+109 -74
View File
@@ -1,9 +1,12 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Xml; using System.Xml;
using umbraco.BusinessLogic;
namespace OurUmbraco.Powers.BusinessLogic { namespace OurUmbraco.Powers.BusinessLogic
public class Action { {
public class Action
{
public string Alias { get; set; } public string Alias { get; set; }
public string TypeAlias { get; set; } public string TypeAlias { get; set; }
@@ -22,68 +25,82 @@ namespace OurUmbraco.Powers.BusinessLogic {
public string[] AllowedGroups { get; set; } public string[] AllowedGroups { get; set; }
public string DataBaseTable { public string DataBaseTable
get{ {
get
{
return "powers" + TypeAlias; return "powers" + TypeAlias;
} }
} }
private Events _e = new Events(); private Events _e = new Events();
public bool Perform(int performer, int itemId, string comment) { public bool Perform(int performer, int itemId, string comment)
{
return Perform(performer, itemId, 0, comment); return Perform(performer, itemId, 0, comment);
} }
public void ClearVotes(int performer, int itemId) { public void ClearVotes(int performer, int itemId)
{
Data.SqlHelper.ExecuteNonQuery("Delete FROM " + DataBaseTable + " WHERE memberId = @memberId AND id = @id", using (var sqlHelper = Application.SqlHelper)
Data.SqlHelper.CreateParameter("@memberId", performer), {
Data.SqlHelper.CreateParameter("@id", itemId)); sqlHelper.ExecuteNonQuery(
"Delete FROM " + DataBaseTable + " WHERE memberId = @memberId AND id = @id",
sqlHelper.CreateParameter("@memberId", performer),
sqlHelper.CreateParameter("@id", itemId));
}
} }
public bool Perform(int performer, int itemId, int receiver, string comment) { public bool Perform(int performer, int itemId, int receiver, string comment)
{
ActionEventArgs e = new ActionEventArgs(); ActionEventArgs e = new ActionEventArgs();
e.PerformerId = performer; e.PerformerId = performer;
e.ItemId = itemId; e.ItemId = itemId;
e.ReceiverId = receiver; e.ReceiverId = receiver;
e.ActionType = TypeAlias; e.ActionType = TypeAlias;
FireBeforePerform(e); FireBeforePerform(e);
if (!e.Cancel) { if (!e.Cancel)
{
bool allowed = Allowed(performer, itemId, receiver, comment); bool allowed = Allowed(performer, itemId, receiver, comment);
if (allowed) if (allowed)
{
using (var sqlHelper = Application.SqlHelper)
{ {
sqlHelper.ExecuteNonQuery(
Data.SqlHelper.ExecuteNonQuery("INSERT INTO " + DataBaseTable + "(id, memberId, points, receiverId, receiverPoints, performerPoints, comment) VALUES(@id, @memberId, @points, @receiverId, @receiverPoints, @performerPoints, @comment)", "INSERT INTO " + DataBaseTable +
Data.SqlHelper.CreateParameter("@id", e.ItemId), "(id, memberId, points, receiverId, receiverPoints, performerPoints, comment) VALUES(@id, @memberId, @points, @receiverId, @receiverPoints, @performerPoints, @comment)",
Data.SqlHelper.CreateParameter("@table", DataBaseTable), sqlHelper.CreateParameter("@id", e.ItemId),
Data.SqlHelper.CreateParameter("@memberId", e.PerformerId), sqlHelper.CreateParameter("@table", DataBaseTable),
Data.SqlHelper.CreateParameter("@points", Weight), sqlHelper.CreateParameter("@memberId", e.PerformerId),
Data.SqlHelper.CreateParameter("@receiverid", e.ReceiverId), sqlHelper.CreateParameter("@points", Weight),
Data.SqlHelper.CreateParameter("@receiverPoints", ReceiverReward), sqlHelper.CreateParameter("@receiverid", e.ReceiverId),
Data.SqlHelper.CreateParameter("@performerPoints", PerformerReward), sqlHelper.CreateParameter("@receiverPoints", ReceiverReward),
Data.SqlHelper.CreateParameter("@comment", comment + " ") sqlHelper.CreateParameter("@performerPoints", PerformerReward),
); sqlHelper.CreateParameter("@comment", comment + " ")
);
}
//the performer gets his share //the performer gets his share
if(PerformerReward != 0){ if (PerformerReward != 0)
{
Reputation r = new Reputation(e.PerformerId); Reputation r = new Reputation(e.PerformerId);
r.Current = (r.Current + (PerformerReward) ); r.Current = (r.Current + (PerformerReward));
r.Total = (r.Total + (PerformerReward) ); r.Total = (r.Total + (PerformerReward));
r.Save(); r.Save();
} }
//And maybe the author of the item gets a cut as well.. //And maybe the author of the item gets a cut as well..
if (e.ReceiverId > 0 && ReceiverReward != 0) { if (e.ReceiverId > 0 && ReceiverReward != 0)
{
Reputation pr = new Reputation(e.ReceiverId); Reputation pr = new Reputation(e.ReceiverId);
pr.Current = (pr.Current + (ReceiverReward) ); pr.Current = (pr.Current + (ReceiverReward));
pr.Total = (pr.Total + (ReceiverReward)); pr.Total = (pr.Total + (ReceiverReward));
pr.Save(); pr.Save();
} }
@@ -95,17 +112,23 @@ namespace OurUmbraco.Powers.BusinessLogic {
{ {
if (allowed) if (allowed)
{ {
//make sure the extra receivers also get inserted (but no points for item and performer) using (var sqlHelper = Application.SqlHelper)
Data.SqlHelper.ExecuteNonQuery("INSERT INTO " + DataBaseTable + "(id, memberId, points, receiverId, receiverPoints, performerPoints, comment) VALUES(@id, @memberId, @points, @receiverId, @receiverPoints, @performerPoints, @comment)", {
Data.SqlHelper.CreateParameter("@id", e.ItemId), //make sure the extra receivers also get inserted (but no points for item and performer)
Data.SqlHelper.CreateParameter("@table", DataBaseTable), sqlHelper.ExecuteNonQuery(
Data.SqlHelper.CreateParameter("@memberId", e.PerformerId), "INSERT INTO " + DataBaseTable +
Data.SqlHelper.CreateParameter("@points", 0), "(id, memberId, points, receiverId, receiverPoints, performerPoints, comment) VALUES(@id, @memberId, @points, @receiverId, @receiverPoints, @performerPoints, @comment)",
Data.SqlHelper.CreateParameter("@receiverid", r), sqlHelper.CreateParameter("@id", e.ItemId),
Data.SqlHelper.CreateParameter("@receiverPoints", ReceiverReward), sqlHelper.CreateParameter("@table", DataBaseTable),
Data.SqlHelper.CreateParameter("@performerPoints", 0), sqlHelper.CreateParameter("@memberId", e.PerformerId),
Data.SqlHelper.CreateParameter("@comment", comment + " ")); sqlHelper.CreateParameter("@points", 0),
sqlHelper.CreateParameter("@receiverid", r),
sqlHelper.CreateParameter("@receiverPoints", ReceiverReward),
sqlHelper.CreateParameter("@performerPoints", 0),
sqlHelper.CreateParameter("@comment", comment + " "));
}
} }
Reputation pr = new Reputation(r); Reputation pr = new Reputation(r);
pr.Current = (pr.Current + (ReceiverReward)); pr.Current = (pr.Current + (ReceiverReward));
pr.Total = (pr.Total + (ReceiverReward)); pr.Total = (pr.Total + (ReceiverReward));
@@ -122,40 +145,47 @@ namespace OurUmbraco.Powers.BusinessLogic {
return false; return false;
} }
public bool Allowed(int performer, int id, int receiver, string comment) { public bool Allowed(int performer, int id, int receiver, string comment)
if (performer > 0 && (!MandatoryComment || (MandatoryComment && comment.Length >= _minCommentLenght) )) { {
if (performer > 0 && (!MandatoryComment || (MandatoryComment && comment.Length >= _minCommentLenght)))
{
if (AllowedGroups != null && AllowedGroups.Length > 0) if (AllowedGroups != null && AllowedGroups.Length > 0)
{ {
bool allowed = false; var allowed = false;
foreach(string group in AllowedGroups) foreach (var group in AllowedGroups)
if(Library.Utils.IsMemberInGroup(group, performer)){ if (Library.Utils.IsMemberInGroup(group, performer))
{
allowed = true; allowed = true;
break; break;
} }
if(!allowed) if (!allowed)
return false; return false;
} }
var reputation = new Reputation(performer);
using (var sqlHelper = Application.SqlHelper)
{
var doneBefore = sqlHelper.ExecuteScalar<int>(
"SELECT count(id) from " + DataBaseTable +
" WHERE id = @id and memberId = @memberId",
sqlHelper.CreateParameter("@id", id),
sqlHelper.CreateParameter("@memberId", performer)
) > 0;
Reputation r = new Reputation(performer); return MinimumReputation <= reputation.Current && !doneBefore && performer != receiver;
}
}
bool doneBefore = Data.SqlHelper.ExecuteScalar<int>("SELECT count(id) from " + DataBaseTable + " WHERE id = @id and memberId = @memberId", return false;
Data.SqlHelper.CreateParameter("@id", id),
Data.SqlHelper.CreateParameter("@memberId", performer)
) > 0;
return ( (MinimumReputation <= r.Current) && !doneBefore && performer != receiver);
} else
return false;
} }
public Action(string alias) { public Action(string alias)
{
XmlNode x = config.GetKeyAsNode("/configuration/actions/action [@alias = '" + alias + "']"); XmlNode x = config.GetKeyAsNode("/configuration/actions/action [@alias = '" + alias + "']");
if (x != null) { if (x != null)
Weight = int.Parse( x.Attributes.GetNamedItem("weight" ).Value); {
Weight = int.Parse(x.Attributes.GetNamedItem("weight").Value);
ReceiverReward = int.Parse(x.Attributes.GetNamedItem("receiverReward").Value); ReceiverReward = int.Parse(x.Attributes.GetNamedItem("receiverReward").Value);
PerformerReward = int.Parse(x.Attributes.GetNamedItem("performerReward").Value); PerformerReward = int.Parse(x.Attributes.GetNamedItem("performerReward").Value);
@@ -174,16 +204,19 @@ namespace OurUmbraco.Powers.BusinessLogic {
MandatoryComment = _mandatoryComment; MandatoryComment = _mandatoryComment;
Exists = true; Exists = true;
} else }
Exists = false;
Exists = false;
} }
public static List<Action> GetAllActions() { public static List<Action> GetAllActions()
{
XmlNode x = config.GetKeyAsNode("/configuration/actions"); XmlNode x = config.GetKeyAsNode("/configuration/actions");
List<Action> l = new List<Action>(); List<Action> l = new List<Action>();
foreach (XmlNode cx in x.ChildNodes) { foreach (XmlNode cx in x.ChildNodes)
{
if (cx.Attributes.GetNamedItem("alias") != null) if (cx.Attributes.GetNamedItem("alias") != null)
l.Add( new Action( cx.Attributes.GetNamedItem("alias").Value )); l.Add(new Action(cx.Attributes.GetNamedItem("alias").Value));
} }
return l; return l;
@@ -191,11 +224,13 @@ namespace OurUmbraco.Powers.BusinessLogic {
/* EVENTS */ /* EVENTS */
public static event EventHandler<ActionEventArgs> BeforePerform; public static event EventHandler<ActionEventArgs> BeforePerform;
protected virtual void FireBeforePerform(ActionEventArgs e) { protected virtual void FireBeforePerform(ActionEventArgs e)
{
_e.FireCancelableEvent(BeforePerform, this, e); _e.FireCancelableEvent(BeforePerform, this, e);
} }
public static event EventHandler<ActionEventArgs> AfterPerform; public static event EventHandler<ActionEventArgs> AfterPerform;
protected virtual void FireAfterPerform(ActionEventArgs e) { protected virtual void FireAfterPerform(ActionEventArgs e)
{
if (AfterPerform != null) if (AfterPerform != null)
AfterPerform(this, e); AfterPerform(this, e);
} }
-17
View File
@@ -4,28 +4,11 @@ using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Xml; using System.Xml;
using System.Xml.XPath; using System.Xml.XPath;
using umbraco.DataLayer;
namespace OurUmbraco.Powers.BusinessLogic { namespace OurUmbraco.Powers.BusinessLogic {
public class Data { public class Data {
private static string _ConnString = umbraco.GlobalSettings.DbDSN; private static string _ConnString = umbraco.GlobalSettings.DbDSN;
private static ISqlHelper _sqlHelper;
/// <summary>
/// Gets the SQL helper.
/// </summary>
/// <value>The SQL helper.</value>
public static ISqlHelper SqlHelper {
get {
if (_sqlHelper == null) {
try {
_sqlHelper = DataLayerHelper.CreateSqlHelper(_ConnString);
} catch { }
}
return _sqlHelper;
}
}
public static XmlNode GetDataSetAsNode(string connectionstring, string sql, string elementName) public static XmlNode GetDataSetAsNode(string connectionstring, string sql, string elementName)
{ {
+10 -3
View File
@@ -1,4 +1,5 @@
using umbraco.cms.businesslogic.member; using umbraco.BusinessLogic;
using umbraco.cms.businesslogic.member;
namespace OurUmbraco.Powers.Library namespace OurUmbraco.Powers.Library
{ {
@@ -26,8 +27,14 @@ namespace OurUmbraco.Powers.Library
public static bool HasVoted(int memberId, int id, string dataBaseTable) public static bool HasVoted(int memberId, int id, string dataBaseTable)
{ {
return (BusinessLogic.Data.SqlHelper.ExecuteScalar<int>("SELECT count(points) FROM " + dataBaseTable + " WHERE (id = @id) AND (memberId = @memberId)", using (var sqlHelper = Application.SqlHelper)
BusinessLogic.Data.SqlHelper.CreateParameter("@id", id), BusinessLogic.Data.SqlHelper.CreateParameter("@memberId", memberId)) > 0); {
return sqlHelper.ExecuteScalar<int>(
"SELECT count(points) FROM " + dataBaseTable +
" WHERE (id = @id) AND (memberId = @memberId)",
sqlHelper.CreateParameter("@id", id),
sqlHelper.CreateParameter("@memberId", memberId)) > 0;
}
} }
} }
} }
+10 -9
View File
@@ -1,6 +1,7 @@
using System.Xml; using System.Xml;
using System.Xml.XPath; using System.Xml.XPath;
using OurUmbraco.Powers.BusinessLogic; using OurUmbraco.Powers.BusinessLogic;
using umbraco.BusinessLogic;
namespace OurUmbraco.Powers.Library { namespace OurUmbraco.Powers.Library {
[Umbraco.Core.Macros.XsltExtension("uPowers")] [Umbraco.Core.Macros.XsltExtension("uPowers")]
@@ -46,28 +47,28 @@ namespace OurUmbraco.Powers.Library {
} }
public static int Score(int id, string dataBaseTable) { public static int Score(int id, string dataBaseTable) {
return BusinessLogic.Data.SqlHelper.ExecuteScalar<int>("SELECT SUM(points) AS count FROM " + dataBaseTable + " WHERE (id = @id)", return Application.SqlHelper.ExecuteScalar<int>("SELECT SUM(points) AS count FROM " + dataBaseTable + " WHERE (id = @id)",
BusinessLogic.Data.SqlHelper.CreateParameter("@id", id)); Application.SqlHelper.CreateParameter("@id", id));
} }
public static bool HasVoted(int memberId, int id, string dataBaseTable) { public static bool HasVoted(int memberId, int id, string dataBaseTable) {
return (BusinessLogic.Data.SqlHelper.ExecuteScalar<int>("SELECT count(points) FROM " + dataBaseTable + " WHERE (id = @id) AND (memberId = @memberId)", return (Application.SqlHelper.ExecuteScalar<int>("SELECT count(points) FROM " + dataBaseTable + " WHERE (id = @id) AND (memberId = @memberId)",
BusinessLogic.Data.SqlHelper.CreateParameter("@id", id), BusinessLogic.Data.SqlHelper.CreateParameter("@memberId", memberId)) > 0); Application.SqlHelper.CreateParameter("@id", id), Application.SqlHelper.CreateParameter("@memberId", memberId)) > 0);
} }
public static int YourVote(int memberId, int id, string dataBaseTable) { public static int YourVote(int memberId, int id, string dataBaseTable) {
return BusinessLogic.Data.SqlHelper.ExecuteScalar<int>("SELECT sum(points) FROM " + dataBaseTable + " WHERE (id = @id) AND (memberId = @memberId)", return Application.SqlHelper.ExecuteScalar<int>("SELECT sum(points) FROM " + dataBaseTable + " WHERE (id = @id) AND (memberId = @memberId)",
BusinessLogic.Data.SqlHelper.CreateParameter("@id", id), BusinessLogic.Data.SqlHelper.CreateParameter("@memberId", memberId)); Application.SqlHelper.CreateParameter("@id", id), Application.SqlHelper.CreateParameter("@memberId", memberId));
} }
public static int GetExternalUrlData(int memberId, string url) public static int GetExternalUrlData(int memberId, string url)
{ {
// get the Item Id of the Url // get the Item Id of the Url
var id = BusinessLogic.Data.SqlHelper.ExecuteScalar<int>("SELECT id FROM externalUrls WHERE (@url = url)", BusinessLogic.Data.SqlHelper.CreateParameter("@url", url)); var id = Application.SqlHelper.ExecuteScalar<int>("SELECT id FROM externalUrls WHERE (@url = url)", Application.SqlHelper.CreateParameter("@url", url));
// doesn't exist ... then create a new entry // doesn't exist ... then create a new entry
if (id == 0) if (id == 0)
id = BusinessLogic.Data.SqlHelper.ExecuteScalar<int>("INSERT INTO externalUrls (memberId, url) VALUES (@memberId, @url); SELECT SCOPE_IDENTITY()", BusinessLogic.Data.SqlHelper.CreateParameter("@memberId", memberId), BusinessLogic.Data.SqlHelper.CreateParameter("@url", url)); id = Application.SqlHelper.ExecuteScalar<int>("INSERT INTO externalUrls (memberId, url) VALUES (@memberId, @url); SELECT SCOPE_IDENTITY()", Application.SqlHelper.CreateParameter("@memberId", memberId), Application.SqlHelper.CreateParameter("@url", url));
return id; return id;
} }
@@ -82,7 +83,7 @@ namespace OurUmbraco.Powers.Library {
return true; return true;
// check if member has already voted for the Url // check if member has already voted for the Url
return (BusinessLogic.Data.SqlHelper.ExecuteScalar<int>("SELECT count(points) FROM powersExternal WHERE (id = @id) AND (memberId = @memberId)", BusinessLogic.Data.SqlHelper.CreateParameter("@id", itemId), BusinessLogic.Data.SqlHelper.CreateParameter("@memberId", memberId)) > 0); return (Application.SqlHelper.ExecuteScalar<int>("SELECT count(points) FROM powersExternal WHERE (id = @id) AND (memberId = @memberId)", Application.SqlHelper.CreateParameter("@id", itemId), Application.SqlHelper.CreateParameter("@memberId", memberId)) > 0);
} }
} }
} }
@@ -5,6 +5,7 @@ using OurUmbraco.MarketPlace.Interfaces;
using OurUmbraco.Our; using OurUmbraco.Our;
using OurUmbraco.Wiki.BusinessLogic; using OurUmbraco.Wiki.BusinessLogic;
using umbraco.cms.businesslogic.member; using umbraco.cms.businesslogic.member;
using Umbraco.Core;
using Umbraco.Core.Logging; using Umbraco.Core.Logging;
using Umbraco.Web; using Umbraco.Web;
@@ -61,7 +62,7 @@ namespace OurUmbraco.Project
var packageFileType = (FileType)Enum.Parse(typeof(FileType), (string)fileType , true); var packageFileType = (FileType)Enum.Parse(typeof(FileType), (string)fileType , true);
// TODO: Don't know how else to get the bloody version // TODO: Don't know how else to get the bloody version
var version = UmbracoContext.Current.Application.Services.ContentService.GetById(p.Id).Version; var version = ApplicationContext.Current.Services.ContentService.GetById(p.Id).Version;
mediaProvider.CreateFile(fileName, version, mem.UniqueId, file, packageFileType, v, dotNetVersion, trust); mediaProvider.CreateFile(fileName, version, mem.UniqueId, file, packageFileType, v, dotNetVersion, trust);
} else { } else {
+23
View File
@@ -0,0 +1,23 @@
using System.Web;
using Hangfire.Dashboard;
using Umbraco.Core.Security;
using Umbraco.Web;
using Umbraco.Web.Mvc;
namespace OurUmbraco
{
[UmbracoAuthorize]
public class UmbracoAuthorizationFilter : IDashboardAuthorizationFilter
{
public bool Authorize(DashboardContext context)
{
var http = new HttpContextWrapper(HttpContext.Current);
var ticket = http.GetUmbracoAuthTicket();
http.AuthenticateCurrentRequest(ticket, true);
var user = UmbracoContext.Current.Security.CurrentUser;
return user != null && user.UserType.Alias == "admin";
}
}
}
+8 -4
View File
@@ -2,6 +2,7 @@
using System.Web.Http; using System.Web.Http;
using OurUmbraco.Wiki.BusinessLogic; using OurUmbraco.Wiki.BusinessLogic;
using OurUmbraco.Wiki.Library; using OurUmbraco.Wiki.Library;
using umbraco.BusinessLogic;
using umbraco.cms.businesslogic.web; using umbraco.cms.businesslogic.web;
using Umbraco.Web.WebApi; using Umbraco.Web.WebApi;
@@ -161,10 +162,13 @@ namespace OurUmbraco.Wiki.Api
[HttpGet] [HttpGet]
public void ClearHelpRequests(string section, string applicationPage) public void ClearHelpRequests(string section, string applicationPage)
{ {
Data.SqlHelper.ExecuteNonQuery( using (var sqlHelper = Application.SqlHelper)
"Delete from wikiHelpRequest where section = @section and applicationPage = @applicationPage", {
Data.SqlHelper.CreateParameter("@section", section), sqlHelper.ExecuteNonQuery(
Data.SqlHelper.CreateParameter("@applicationPage", applicationPage)); "Delete from wikiHelpRequest where section = @section and applicationPage = @applicationPage",
sqlHelper.CreateParameter("@section", section),
sqlHelper.CreateParameter("@applicationPage", applicationPage));
}
} }
} }
} }
+2 -15
View File
@@ -4,27 +4,13 @@ using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Xml; using System.Xml;
using System.Xml.XPath; using System.Xml.XPath;
using umbraco.DataLayer;
namespace OurUmbraco.Wiki.BusinessLogic { namespace OurUmbraco.Wiki.BusinessLogic {
public class Data { public class Data {
private static string _ConnString = umbraco.GlobalSettings.DbDSN;
private static ISqlHelper _sqlHelper;
/// <summary>
/// Gets the SQL helper.
/// </summary>
/// <value>The SQL helper.</value>
public static ISqlHelper SqlHelper
{
get { return _sqlHelper ?? (_sqlHelper = DataLayerHelper.CreateSqlHelper(_ConnString)); }
}
public static XmlNode GetDataSetAsNode(string sql, string elementName) { public static XmlNode GetDataSetAsNode(string sql, string elementName) {
try { try {
DataSet ds = getDataSetFromSql(_ConnString, sql, elementName); DataSet ds = getDataSetFromSql(umbraco.GlobalSettings.DbDSN, sql, elementName);
XmlDataDocument dataDoc = new XmlDataDocument(ds); XmlDataDocument dataDoc = new XmlDataDocument(ds);
return (XmlNode)dataDoc; return (XmlNode)dataDoc;
} catch (Exception e) { } catch (Exception e) {
@@ -55,6 +41,7 @@ namespace OurUmbraco.Wiki.BusinessLogic {
adapter.Fill(ds, tableName); adapter.Fill(ds, tableName);
} finally { } finally {
con.Close(); con.Close();
con.Dispose();
} }
return ds; return ds;
} }
+146 -116
View File
@@ -4,7 +4,6 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Web; using System.Web;
using System.Xml; using System.Xml;
using OurUmbraco.MarketPlace.Interfaces;
using OurUmbraco.Wiki.Extensions; using OurUmbraco.Wiki.Extensions;
using umbraco.BusinessLogic; using umbraco.BusinessLogic;
using umbraco.cms.businesslogic; using umbraco.cms.businesslogic;
@@ -44,7 +43,11 @@ namespace OurUmbraco.Wiki.BusinessLogic
if (File.Exists(HttpContext.Current.Server.MapPath(Path))) if (File.Exists(HttpContext.Current.Server.MapPath(Path)))
File.Delete(HttpContext.Current.Server.MapPath(Path)); File.Delete(HttpContext.Current.Server.MapPath(Path));
Application.SqlHelper.ExecuteNonQuery("DELETE FROM wikiFiles where ID = @id", Application.SqlHelper.CreateParameter("@id", Id)); using (var sqlHelper = Application.SqlHelper)
{
sqlHelper.ExecuteNonQuery("DELETE FROM wikiFiles where ID = @id",
sqlHelper.CreateParameter("@id", Id));
}
} }
/// <summary> /// <summary>
@@ -107,12 +110,15 @@ namespace OurUmbraco.Wiki.BusinessLogic
{ {
var wikiFiles = new List<WikiFile>(); var wikiFiles = new List<WikiFile>();
using (var reader = Application.SqlHelper.ExecuteReader("SELECT id FROM wikiFiles WHERE nodeId = @nodeid", Application.SqlHelper.CreateParameter("@nodeId", nodeId))) using (var sqlHelper = Application.SqlHelper)
using (var reader = sqlHelper.ExecuteReader("SELECT id FROM wikiFiles WHERE nodeId = @nodeid", sqlHelper.CreateParameter("@nodeId", nodeId)))
{ {
while (reader.Read()) {
wikiFiles.Add(new WikiFile(reader.GetInt("id"))); while (reader.Read())
wikiFiles.Add(new WikiFile(reader.GetInt("id")));
return wikiFiles; return wikiFiles;
}
} }
} }
@@ -201,18 +207,18 @@ namespace OurUmbraco.Wiki.BusinessLogic
if (content != null) if (content != null)
{ {
var wikiFile = new WikiFile var wikiFile = new WikiFile
{ {
Name = fileName, Name = fileName,
NodeId = content.Id, NodeId = content.Id,
NodeVersion = content.Version, NodeVersion = content.Version,
FileType = filetype, FileType = filetype,
CreatedBy = member.Id, CreatedBy = member.Id,
Downloads = 0, Downloads = 0,
Archived = false, Archived = false,
Versions = versions, Versions = versions,
Version = versions[0], Version = versions[0],
Verified = false Verified = false
}; };
wikiFile.SetMinimumUmbracoVersion(); wikiFile.SetMinimumUmbracoVersion();
var path = string.Format("/media/wiki/{0}", content.Id); var path = string.Format("/media/wiki/{0}", content.Id);
@@ -249,26 +255,32 @@ namespace OurUmbraco.Wiki.BusinessLogic
if (e.Cancel) if (e.Cancel)
return; return;
Application.SqlHelper.ExecuteNonQuery( using (var sqlHelper = Application.SqlHelper)
"INSERT INTO wikiFiles (path, name, createdBy, nodeId, version, type, downloads, archived, umbracoVersion, verified, dotNetVersion, minimumVersionStrict) VALUES(@path, @name, @createdBy, @nodeId, @nodeVersion, @type, @downloads, @archived, @umbracoVersion, @verified, @dotNetVersion, @minimumVersionStrict)", {
Application.SqlHelper.CreateParameter("@path", Path), sqlHelper.ExecuteNonQuery(
Application.SqlHelper.CreateParameter("@name", Name), "INSERT INTO wikiFiles (path, name, createdBy, nodeId, version, type, downloads, archived, umbracoVersion, verified, dotNetVersion, minimumVersionStrict) VALUES(@path, @name, @createdBy, @nodeId, @nodeVersion, @type, @downloads, @archived, @umbracoVersion, @verified, @dotNetVersion, @minimumVersionStrict)",
Application.SqlHelper.CreateParameter("@createdBy", CreatedBy), sqlHelper.CreateParameter("@path", Path),
Application.SqlHelper.CreateParameter("@nodeId", NodeId), sqlHelper.CreateParameter("@name", Name),
Application.SqlHelper.CreateParameter("@type", FileType), sqlHelper.CreateParameter("@createdBy", CreatedBy),
Application.SqlHelper.CreateParameter("@nodeVersion", NodeVersion), sqlHelper.CreateParameter("@nodeId", NodeId),
Application.SqlHelper.CreateParameter("@downloads", Downloads), sqlHelper.CreateParameter("@type", FileType),
Application.SqlHelper.CreateParameter("@archived", Archived), sqlHelper.CreateParameter("@nodeVersion", NodeVersion),
Application.SqlHelper.CreateParameter("@umbracoVersion", ToVersionString(Versions)), sqlHelper.CreateParameter("@downloads", Downloads),
Application.SqlHelper.CreateParameter("@verified", Verified), sqlHelper.CreateParameter("@archived", Archived),
Application.SqlHelper.CreateParameter("@dotNetVersion", string.IsNullOrWhiteSpace(DotNetVersion) ? "" : DotNetVersion), sqlHelper.CreateParameter("@umbracoVersion", ToVersionString(Versions)),
Application.SqlHelper.CreateParameter("@minimumVersionStrict", string.IsNullOrWhiteSpace(MinimumVersionStrict) ? "" : MinimumVersionStrict) sqlHelper.CreateParameter("@verified", Verified),
sqlHelper.CreateParameter("@dotNetVersion",
string.IsNullOrWhiteSpace(DotNetVersion) ? "" : DotNetVersion),
sqlHelper.CreateParameter("@minimumVersionStrict",
string.IsNullOrWhiteSpace(MinimumVersionStrict) ? "" : MinimumVersionStrict)
); );
CreateDate = DateTime.Now; CreateDate = DateTime.Now;
Id = Application.SqlHelper.ExecuteScalar<int>("SELECT MAX(id) FROM wikiFiles WHERE createdBy = @createdBy", Application.SqlHelper.CreateParameter("@createdBy", CreatedBy));
Id = sqlHelper.ExecuteScalar<int>(
"SELECT MAX(id) FROM wikiFiles WHERE createdBy = @createdBy",
sqlHelper.CreateParameter("@createdBy", CreatedBy));
}
FireAfterCreate(e); FireAfterCreate(e);
} }
else else
@@ -279,23 +291,27 @@ namespace OurUmbraco.Wiki.BusinessLogic
if (e.Cancel) if (e.Cancel)
return; return;
Application.SqlHelper.ExecuteNonQuery( using (var sqlHelper = Application.SqlHelper)
"UPDATE wikiFiles SET path = @path, name = @name, type = @type, [current] = @current, removedBy = @removedBy, version = @version, downloads = @downloads, archived = @archived, umbracoVersion = @umbracoVersion, verified = @verified, dotNetVersion = @dotNetVersion, minimumVersionStrict = @minimumVersionStrict WHERE id = @id", {
Application.SqlHelper.CreateParameter("@path", Path), sqlHelper.ExecuteNonQuery(
Application.SqlHelper.CreateParameter("@name", Name), "UPDATE wikiFiles SET path = @path, name = @name, type = @type, [current] = @current, removedBy = @removedBy, version = @version, downloads = @downloads, archived = @archived, umbracoVersion = @umbracoVersion, verified = @verified, dotNetVersion = @dotNetVersion, minimumVersionStrict = @minimumVersionStrict WHERE id = @id",
Application.SqlHelper.CreateParameter("@type", FileType), sqlHelper.CreateParameter("@path", Path),
Application.SqlHelper.CreateParameter("@current", Current), sqlHelper.CreateParameter("@name", Name),
Application.SqlHelper.CreateParameter("@removedBy", RemovedBy), sqlHelper.CreateParameter("@type", FileType),
Application.SqlHelper.CreateParameter("@version", NodeVersion), sqlHelper.CreateParameter("@current", Current),
Application.SqlHelper.CreateParameter("@id", Id), sqlHelper.CreateParameter("@removedBy", RemovedBy),
Application.SqlHelper.CreateParameter("@downloads", Downloads), sqlHelper.CreateParameter("@version", NodeVersion),
Application.SqlHelper.CreateParameter("@archived", Archived), sqlHelper.CreateParameter("@id", Id),
Application.SqlHelper.CreateParameter("@umbracoVersion", ToVersionString(Versions)), sqlHelper.CreateParameter("@downloads", Downloads),
Application.SqlHelper.CreateParameter("@verified", Verified), sqlHelper.CreateParameter("@archived", Archived),
Application.SqlHelper.CreateParameter("@dotNetVersion", string.IsNullOrWhiteSpace(DotNetVersion) ? "" : DotNetVersion), sqlHelper.CreateParameter("@umbracoVersion", ToVersionString(Versions)),
Application.SqlHelper.CreateParameter("@minimumVersionStrict", string.IsNullOrWhiteSpace(MinimumVersionStrict) ? "" : MinimumVersionStrict) sqlHelper.CreateParameter("@verified", Verified),
sqlHelper.CreateParameter("@dotNetVersion",
string.IsNullOrWhiteSpace(DotNetVersion) ? "" : DotNetVersion),
sqlHelper.CreateParameter("@minimumVersionStrict",
string.IsNullOrWhiteSpace(MinimumVersionStrict) ? "" : MinimumVersionStrict)
); );
}
FireAfterUpdate(e); FireAfterUpdate(e);
} }
} }
@@ -317,26 +333,29 @@ namespace OurUmbraco.Wiki.BusinessLogic
{ {
try try
{ {
//try find one based on the specific version first using (var sqlHelper = Application.SqlHelper)
var id = Application.SqlHelper.ExecuteScalar<int>( {
"Select TOP 1 id from wikiFiles where nodeId = @nodeid and type = @packageType and (umbracoVersion like @umbracoVersion) ORDER BY createDate DESC", //try find one based on the specific version first
Application.SqlHelper.CreateParameter("@nodeid", nodeid), var id = sqlHelper.ExecuteScalar<int>(
Application.SqlHelper.CreateParameter("@packageType", fileType), "Select TOP 1 id from wikiFiles where nodeId = @nodeid and type = @packageType and (umbracoVersion like @umbracoVersion) ORDER BY createDate DESC",
Application.SqlHelper.CreateParameter("@umbracoVersion", "%" + umbracoVersion + "%") sqlHelper.CreateParameter("@nodeid", nodeid),
sqlHelper.CreateParameter("@packageType", fileType),
sqlHelper.CreateParameter("@umbracoVersion", "%" + umbracoVersion + "%")
); );
if (id > 0) if (id > 0)
return new WikiFile(id); return new WikiFile(id);
//if a version specific file wasnt found try and find one based on nan //if a version specific file wasnt found try and find one based on nan
id = Application.SqlHelper.ExecuteScalar<int>( id = sqlHelper.ExecuteScalar<int>(
"Select TOP 1 id from wikiFiles where nodeId = @nodeid and type = @packageType and (umbracoVersion like '%nan%') ORDER BY createDate DESC", "Select TOP 1 id from wikiFiles where nodeId = @nodeid and type = @packageType and (umbracoVersion like '%nan%') ORDER BY createDate DESC",
Application.SqlHelper.CreateParameter("@nodeid", nodeid), sqlHelper.CreateParameter("@nodeid", nodeid),
Application.SqlHelper.CreateParameter("@packageType", fileType) sqlHelper.CreateParameter("@packageType", fileType)
); );
if (id > 0) if (id > 0)
return new WikiFile(id); return new WikiFile(id);
}
} }
catch catch
{ {
@@ -348,34 +367,36 @@ namespace OurUmbraco.Wiki.BusinessLogic
public WikiFile(int id) public WikiFile(int id)
{ {
using (var reader = Application.SqlHelper.ExecuteReader("SELECT * FROM wikiFiles WHERE id = @fileId", using (var sqlHelper = Application.SqlHelper)
Application.SqlHelper.CreateParameter("@fileId", id))) using (var reader = sqlHelper.ExecuteReader("SELECT * FROM wikiFiles WHERE id = @fileId", sqlHelper.CreateParameter("@fileId", id)))
{ {
if (reader.Read())
{ {
Id = reader.GetInt("id"); if (reader.Read())
Path = reader.GetString("path"); {
Name = reader.GetString("name"); Id = reader.GetInt("id");
FileType = reader.GetString("type"); Path = reader.GetString("path");
RemovedBy = reader.GetInt("removedBy"); Name = reader.GetString("name");
CreatedBy = reader.GetInt("createdBy"); FileType = reader.GetString("type");
NodeVersion = reader.GetGuid("version"); RemovedBy = reader.GetInt("removedBy");
NodeId = reader.GetInt("nodeId"); CreatedBy = reader.GetInt("createdBy");
CreateDate = reader.GetDateTime("createDate"); NodeVersion = reader.GetGuid("version");
Current = reader.GetBoolean("current"); NodeId = reader.GetInt("nodeId");
Downloads = reader.GetInt("downloads"); CreateDate = reader.GetDateTime("createDate");
Archived = reader.GetBoolean("archived"); Current = reader.GetBoolean("current");
Verified = reader.GetBoolean("verified"); Downloads = reader.GetInt("downloads");
DotNetVersion = reader.GetString("dotNetVersion"); Archived = reader.GetBoolean("archived");
Versions = GetVersionsFromString(reader.GetString("umbracoVersion")); Verified = reader.GetBoolean("verified");
Version = Versions.Any() DotNetVersion = reader.GetString("dotNetVersion");
? GetVersionsFromString(reader.GetString("umbracoVersion"))[0] Versions = GetVersionsFromString(reader.GetString("umbracoVersion"));
: UmbracoVersion.DefaultVersion(); Version = Versions.Any()
MinimumVersionStrict = reader.GetString("minimumVersionStrict"); ? GetVersionsFromString(reader.GetString("umbracoVersion"))[0]
} : UmbracoVersion.DefaultVersion();
else MinimumVersionStrict = reader.GetString("minimumVersionStrict");
{ }
throw new ArgumentException(string.Format("No node exists with id '{0}'", Id)); else
{
throw new ArgumentException(string.Format("No node exists with id '{0}'", Id));
}
} }
} }
} }
@@ -424,37 +445,46 @@ namespace OurUmbraco.Wiki.BusinessLogic
var downloads = 0; var downloads = 0;
var projectId = 0; var projectId = 0;
var reader = Application.SqlHelper.ExecuteReader("Select downloads, nodeId from wikiFiles where id = @id;", Application.SqlHelper.CreateParameter("@id", fileId)); using (var sqlHelper = Application.SqlHelper)
if (reader.Read())
{ {
downloads = reader.GetInt("downloads"); using (var reader = sqlHelper.ExecuteReader("Select downloads, nodeId from wikiFiles where id = @id;", sqlHelper.CreateParameter("@id", fileId)))
projectId = reader.GetInt("nodeId"); {
} if (reader.Read())
downloads = downloads + 1; {
downloads = reader.GetInt("downloads");
projectId = reader.GetInt("nodeId");
}
}
Application.SqlHelper.ExecuteNonQuery( downloads = downloads + 1;
"update wikiFiles set downloads = @downloads where id = @id;",
Application.SqlHelper.CreateParameter("@id", fileId),
Application.SqlHelper.CreateParameter("@downloads", downloads));
var totalDownloads = Application.SqlHelper.ExecuteScalar<int>("Select SUM(downloads) from wikiFiles where nodeId = @projectId;", Application.SqlHelper.CreateParameter("@projectId", projectId)); sqlHelper.ExecuteNonQuery(
"update wikiFiles set downloads = @downloads where id = @id;",
sqlHelper.CreateParameter("@id", fileId),
sqlHelper.CreateParameter("@downloads", downloads));
if (isPackage) var totalDownloads =
{ sqlHelper.ExecuteScalar<int>(
var memberHelper = new Umbraco.Web.Security.MembershipHelper(Umbraco.Web.UmbracoContext.Current); "Select SUM(downloads) from wikiFiles where nodeId = @projectId;",
var memberId = memberHelper.GetCurrentMemberId(); sqlHelper.CreateParameter("@projectId", projectId));
var currentMemberId = memberId == -1 ? 0 : memberId;
//update download count update if (isPackage)
Application.SqlHelper.ExecuteNonQuery( {
@"insert into projectDownload(projectId,memberId,timestamp) var memberHelper = new Umbraco.Web.Security.MembershipHelper(Umbraco.Web.UmbracoContext.Current);
var memberId = memberHelper.GetCurrentMemberId();
var currentMemberId = memberId == -1 ? 0 : memberId;
//update download count update
sqlHelper.ExecuteNonQuery(
@"insert into projectDownload(projectId,memberId,timestamp)
values((select nodeId from wikiFiles where id = @id) ,@memberId, getdate())", values((select nodeId from wikiFiles where id = @id) ,@memberId, getdate())",
Application.SqlHelper.CreateParameter("@id", fileId), sqlHelper.CreateParameter("@id", fileId),
Application.SqlHelper.CreateParameter("@memberId", currentMemberId)); sqlHelper.CreateParameter("@memberId", currentMemberId));
} }
var e = new FileDownloadUpdateEventArgs { ProjectId = projectId, Downloads = totalDownloads }; var e = new FileDownloadUpdateEventArgs { ProjectId = projectId, Downloads = totalDownloads };
FireAfterDownloadUpdate(e); FireAfterDownloadUpdate(e);
}
cookie = new HttpCookie("ProjectFileDownload" + fileId) { Expires = DateTime.Now.AddHours(1) }; cookie = new HttpCookie("ProjectFileDownload" + fileId) { Expires = DateTime.Now.AddHours(1) };
HttpContext.Current.Response.Cookies.Add(cookie); HttpContext.Current.Response.Cookies.Add(cookie);
@@ -35,22 +35,24 @@ namespace OurUmbraco.Wiki.BusinessLogic
public void Save() public void Save()
{ {
HelpRequestEventArgs e = new HelpRequestEventArgs(); var helpRequestEventArgs = new HelpRequestEventArgs();
FireBeforeSave(e); FireBeforeSave(helpRequestEventArgs);
if (!e.Cancel) if (helpRequestEventArgs.Cancel)
return;
using (var sqlHelper = umbraco.BusinessLogic.Application.SqlHelper)
{ {
Data.SqlHelper.ExecuteNonQuery( sqlHelper.ExecuteNonQuery(
"INSERT INTO wikiHelpRequest (section, application, applicationPage, url) VALUES(@section, @application, @applicationPage, @url)", "INSERT INTO wikiHelpRequest (section, application, applicationPage, url) VALUES(@section, @application, @applicationPage, @url)",
Data.SqlHelper.CreateParameter("@section", Section), sqlHelper.CreateParameter("@section", Section),
Data.SqlHelper.CreateParameter("@application", Application), sqlHelper.CreateParameter("@application", Application),
Data.SqlHelper.CreateParameter("@applicationPage", ApplicationPage), sqlHelper.CreateParameter("@applicationPage", ApplicationPage),
Data.SqlHelper.CreateParameter("@url", Url)); sqlHelper.CreateParameter("@url", Url));
FireAfterSave(e); FireAfterSave(helpRequestEventArgs);
} }
} }
private Events _e = new Events(); private Events _e = new Events();
+4
View File
@@ -51,6 +51,10 @@
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" /> <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.4.9.5" newVersion="1.4.9.5" />
</dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /></startup><system.data> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /></startup><system.data>
+6 -3
View File
@@ -1,12 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="AutoMapper" version="3.3.1" targetFramework="net452" /> <package id="AutoMapper" version="3.3.1" targetFramework="net452" />
<package id="ClientDependency" version="1.9.1" targetFramework="net452" /> <package id="ClientDependency" version="1.9.2" targetFramework="net452" />
<package id="ClientDependency-Mvc" version="1.8.0.0" targetFramework="net451" /> <package id="ClientDependency-Mvc" version="1.8.0.0" targetFramework="net451" />
<package id="ClientDependency-Mvc5" version="1.8.0.0" targetFramework="net452" /> <package id="ClientDependency-Mvc5" version="1.8.0.0" targetFramework="net452" />
<package id="EasyHttp" version="1.6.29.0" targetFramework="net451" /> <package id="EasyHttp" version="1.6.29.0" targetFramework="net451" />
<package id="Examine" version="0.1.70.0" targetFramework="net452" /> <package id="Examine" version="0.1.70.0" targetFramework="net452" />
<package id="HtmlAgilityPack" version="1.4.9" targetFramework="net452" /> <package id="Hangfire" version="1.6.7" targetFramework="net452" />
<package id="Hangfire.Core" version="1.6.7" targetFramework="net452" />
<package id="Hangfire.SqlServer" version="1.6.7" targetFramework="net452" />
<package id="HtmlAgilityPack" version="1.4.9.5" targetFramework="net452" />
<package id="ImageProcessor" version="2.4.5.0" targetFramework="net452" /> <package id="ImageProcessor" version="2.4.5.0" targetFramework="net452" />
<package id="ImageProcessor.Web" version="4.6.6.0" targetFramework="net452" /> <package id="ImageProcessor.Web" version="4.6.6.0" targetFramework="net452" />
<package id="JsonFx" version="2.0.1209.2802" targetFramework="net451" /> <package id="JsonFx" version="2.0.1209.2802" targetFramework="net451" />
@@ -39,7 +42,7 @@
<package id="RestSharp" version="104.1" targetFramework="net451" /> <package id="RestSharp" version="104.1" targetFramework="net451" />
<package id="semver" version="1.1.2" targetFramework="net452" /> <package id="semver" version="1.1.2" targetFramework="net452" />
<package id="SharpZipLib" version="0.86.0" targetFramework="net452" /> <package id="SharpZipLib" version="0.86.0" targetFramework="net452" />
<package id="UmbracoCms.Core" version="7.5.4" targetFramework="net452" /> <package id="UmbracoCms.Core" version="7.5.5" targetFramework="net452" />
<package id="UmbracoCms.IdentityExtensions" version="1.0.0" targetFramework="net451" /> <package id="UmbracoCms.IdentityExtensions" version="1.0.0" targetFramework="net451" />
<package id="UmbracoCms.IdentityExtensions.Google" version="1.0.0" targetFramework="net451" /> <package id="UmbracoCms.IdentityExtensions.Google" version="1.0.0" targetFramework="net451" />
<package id="UrlRewritingNet" version="2.0.7" targetFramework="net452" /> <package id="UrlRewritingNet" version="2.0.7" targetFramework="net452" />
+17 -12
View File
@@ -3,35 +3,40 @@ SETLOCAL
:: SETLOCAL is on, so changes to the path not persist to the actual user's path :: SETLOCAL is on, so changes to the path not persist to the actual user's path
SET release=%1 SET release=%1
ECHO Installing Npm NuGet Package SET buildFolder=%CD%
SET nuGetFolder=%CD%\..\packages\ SET nuGetFolder=%CD%\..\packages
ECHO Configured packages folder: %nuGetFolder% ECHO Configured packages folder: %nuGetFolder%
ECHO Current folder: %CD% ECHO Current folder: %CD%
%CD%\..\.nuget\NuGet.exe install Npm.js -OutputDirectory %nuGetFolder% -Verbosity quiet ECHO Installing Npm NuGet Package
"%CD%\..\.nuget\NuGet.exe" install Npm.js -OutputDirectory "%nuGetFolder%" -Verbosity quiet
for /f "delims=" %%A in ('dir %nuGetFolder%node.js.* /b') do set "nodePath=%nuGetFolder%%%A\" for /f "delims=" %%A in ('dir "%nuGetFolder%\node.js.*" /b') do set "nodePath=%nuGetFolder%\%%A\"
for /f "delims=" %%A in ('dir %nuGetFolder%npm.js.* /b') do set "npmPath=%nuGetFolder%%%A\tools\" for /f "delims=" %%A in ('dir "%nuGetFolder%\npm.js.*" /b') do set "npmPath=%nuGetFolder%\%%A\tools\"
REM Ensures that we look for the just downloaded NPM, not whatever the user has installed on their machine REM Ensures that we look for the just downloaded NPM, not whatever the user has installed on their machine
path=%npmPath%;%nodePath% SET PATH=%npmPath%;%nodePath%;%PATH%
ECHO Path
ECHO %PATH%
ECHO %path% ECHO Node
node -v
SET buildFolder=%CD% ECHO Change directory to "%CD%\..\OurUmbraco.Client"
CD "%CD%\..\OurUmbraco.Client"
ECHO Change directory to %CD%\..\OurUmbraco.Client\
CD %CD%\..\OurUmbraco.Client\
ECHO. ECHO.
ECHO Setting node_modules folder to hidden to prevent VS13 from crashing on it while loading the websites project ECHO Setting node_modules folder to hidden to prevent VS13 from crashing on it while loading the websites project
attrib +h node_modules attrib +h node_modules
ECHO Do npm install and the gulp build ECHO Npm Cache Clean
call npm cache clean call npm cache clean
ECHO Npm Install
call npm install call npm install
ECHO Npm Install Gulp
call npm install -g install gulp -g --quiet call npm install -g install gulp -g --quiet
ECHO Gulp build
call gulp build call gulp build
ECHO Move back to the build folder ECHO Move back to the build folder