The Starter Kit is a great way to experience some of the ways you can use Umbraco. It's a complete website with textpages, landing pages, blog, product listings and more that's easy to get started with Umbraco.
+
+
+ It's also a great way to learn Umbraco as the Starter Kit comes with a set of Lessons that'll teach you how to implement and extend Umbraco using short 5-15 minute tasks.
+
+
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/installer/steps/upgrade.html b/src/Umbraco.Web.UI.Client/src/installer/steps/upgrade.html
index ec45b652c9..4edf2eda25 100644
--- a/src/Umbraco.Web.UI.Client/src/installer/steps/upgrade.html
+++ b/src/Umbraco.Web.UI.Client/src/installer/steps/upgrade.html
@@ -5,7 +5,7 @@
- To read a report of changes between your current version {{installer.current.model.currentVersion}} and this version your upgrading to {{installer.current.model.newVersion}}
+ To read a report of changes between your current version {{installer.current.model.currentVersion}} and this version you're upgrading to {{installer.current.model.newVersion}}
- This package cannot be installed, it requires a minimum Umbraco version of {{vm.localPackage.umbracoVersion}}
+ This package cannot be installed, it requires a minimum Umbraco version of {{vm.localPackage.umbracoVersion}}
You don’t have any packages installed. Either install a local package by selecting it from your machine, or browse through available packages using the "Package" icon in the top right of your screen."
+
You don’t have any packages installed.
+
You don’t have any packages installed. Either install a local package by selecting it from your machine, or browse through available packages using the "Packages" icon in the top right of your screen.
This package is compatible with the following versions of Umbraco, as reported by community members. Full compatability cannot be gauranteed for versions reported below 100%
+
Compatibility
+
This package is compatible with the following versions of Umbraco, as reported by community members. Full compatability cannot be gauranteed for versions reported below 100%
- This package cannot be installed, it requires a minimum Umbraco version of {{vm.localPackage.umbracoVersion}}
+ This package cannot be installed, it requires a minimum Umbraco version of {{vm.localPackage.umbracoVersion}}
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js
index 471e97e875..f04b2b2285 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js
@@ -144,8 +144,11 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
}
- //if we have a query for the startnode, we will use that.
- if ($scope.model.config.startNode.query) {
+ if ($routeParams.section === "settings" && $routeParams.tree === "documentTypes") {
+ //if the content-picker is being rendered inside the document-type editor, we don't need to process the startnode query
+ dialogOptions.startNodeId = -1;
+ } else if ($scope.model.config.startNode.query) {
+ //if we have a query for the startnode, we will use that.
var rootId = $routeParams.id;
entityResource.getByQuery($scope.model.config.startNode.query, rootId, "Document").then(function (ent) {
dialogOptions.startNodeId = $scope.model.config.idType === "udi" ? ent.udi : ent.id;
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html
index 900cf6b416..75cc74f02d 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html
@@ -30,13 +30,12 @@
- You need to add at least {{model.config.minNumber}} items
+ You need to add at least {{model.config.minNumber}} items
- You can only have {{model.config.maxNumber}} items selected
+ You can only have {{model.config.maxNumber}} items selected
- Required
+ Required{{datePickerForm.datepicker.errorMsg}}
- Invalid date
+ Invalid date
This translates to the following time on the server: {{serverTime}}
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/decimal/decimal.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/decimal/decimal.html
index 64730bbfb2..9b619bc6b5 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/decimal/decimal.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/decimal/decimal.html
@@ -1,4 +1,4 @@
-
+
- Not a number
+ Not a number{{propertyForm.requiredField.errorMsg}}
-
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/fileupload/fileupload.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/fileupload/fileupload.controller.js
index df21541f09..3c8170e54b 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/fileupload/fileupload.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/fileupload/fileupload.controller.js
@@ -138,15 +138,15 @@ function fileUploadController($scope, $element, $compile, imageHelper, fileManag
//cannot just check for !newVal because it might be an empty string which we
//want to look for.
if (newVal !== null && newVal !== undefined && newVal !== oldVal) {
- //now we need to check if we need to re-initialize our structure which is kind of tricky
- // since we only want to do that if the server has changed the value, not if this controller
- // has changed the value. There's only 2 scenarios where we change the value internall so
- // we know what those values can be, if they are not either of them, then we'll re-initialize.
-
- if (newVal.clearFiles !== true && newVal !== $scope.originalValue && !newVal.selectedFiles) {
+ // here we need to check if the value change needs to trigger an update in the UI.
+ // if the value is only changed in the controller and not in the server values, we do not
+ // want to trigger an update yet.
+ // we can however no longer rely on checking values in the controller vs. values from the server
+ // to determine whether to update or not, since you could potentially be uploading a file with
+ // the exact same name - in that case we need to reinitialize to show the newly uploaded file.
+ if (newVal.clearFiles !== true && !newVal.selectedFiles) {
initialize($scope.rebuildInput.index + 1);
}
-
}
});
};
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.controller.js
index e289a389cb..bb580a906d 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.controller.js
@@ -1,10 +1,17 @@
angular.module("umbraco")
.controller("Umbraco.PropertyEditors.Grid.MediaController",
- function ($scope, $rootScope, $timeout) {
+ function ($scope, $rootScope, $timeout, userService) {
+
+ if (!$scope.model.config.startNodeId) {
+ userService.getCurrentUser().then(function (userData) {
+ $scope.model.config.startNodeId = userData.startMediaId;
+ });
+ }
$scope.setImage = function(){
$scope.mediaPickerOverlay = {};
$scope.mediaPickerOverlay.view = "mediapicker";
+ $scope.mediaPickerOverlay.startNodeId = $scope.model.config && $scope.model.config.startNodeId ? $scope.model.config.startNodeId : undefined;
$scope.mediaPickerOverlay.cropSize = $scope.control.editor.config && $scope.control.editor.config.size ? $scope.control.editor.config.size : undefined;
$scope.mediaPickerOverlay.showDetails = true;
$scope.mediaPickerOverlay.disableFolderSelect = true;
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html
index 3299ae9437..62a5565d95 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html
@@ -16,34 +16,34 @@
-
Define crop
+
Define crop
- Give the crop an alias and it's default width and height.
+ Give the crop an alias and it's default width and height.
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js
index bbb8024a53..aff1569890 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js
@@ -1,6 +1,6 @@
angular.module("umbraco")
.controller("Umbraco.PropertyEditors.RTEController",
- function ($rootScope, $scope, $q, dialogService, $log, imageHelper, assetsService, $timeout, tinyMceService, angularHelper, stylesheetResource, macroService) {
+ function ($rootScope, $scope, $q, $locale, dialogService, $log, imageHelper, assetsService, $timeout, tinyMceService, angularHelper, stylesheetResource, macroService) {
$scope.isLoading = true;
@@ -100,9 +100,45 @@ angular.module("umbraco")
//stores a reference to the editor
var tinyMceEditor = null;
+ // these languages are available for localization
+ var availableLanguages = [
+ 'da',
+ 'de',
+ 'en',
+ 'en_us',
+ 'fi',
+ 'fr',
+ 'he',
+ 'it',
+ 'ja',
+ 'nl',
+ 'no',
+ 'pl',
+ 'pt',
+ 'ru',
+ 'sv',
+ 'zh'
+ ];
+
+ //define fallback language
+ var language = 'en_us';
+ //get locale from angular and match tinymce format. Angular localization is always in the format of ru-ru, de-de, en-gb, etc.
+ //wheras tinymce is in the format of ru, de, en, en_us, etc.
+ var localeId = $locale.id.replace('-', '_');
+ //try matching the language using full locale format
+ var languageMatch = _.find(availableLanguages, function(o) { return o === localeId; });
+ //if no matches, try matching using only the language
+ if (languageMatch === undefined) {
+ var localeParts = localeId.split('_');
+ languageMatch = _.find(availableLanguages, function(o) { return o === localeParts[0]; });
+ }
+ //if a match was found - set the language
+ if (languageMatch !== undefined) {
+ language = languageMatch;
+ }
+
//wait for queue to end
$q.all(await).then(function () {
-
//create a baseline Config to exten upon
var baseLineConfigObj = {
mode: "exact",
@@ -119,10 +155,10 @@ angular.module("umbraco")
toolbar: toolbar,
content_css: stylesheets,
relative_urls: false,
- style_formats: styleFormats
+ style_formats: styleFormats,
+ language: language
};
-
if (tinyMceConfig.customConfig) {
//if there is some custom config, we need to see if the string value of each item might actually be json and if so, we need to
@@ -295,10 +331,7 @@ angular.module("umbraco")
});
};
-
-
-
-
+
/** Loads in the editor */
function loadTinyMce() {
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.html
index 656f5b7490..774f860c31 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.html
@@ -1,5 +1,5 @@
-
-
Loading...
+
+
Loading...
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textarea/textarea.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textarea/textarea.html
index 0d1fae3f6f..aba4c52ed3 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textarea/textarea.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textarea/textarea.html
@@ -1,3 +1,3 @@
-
-Required
-
\ No newline at end of file
+
+Required
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textbox/textbox.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textbox/textbox.html
index c55fc350fa..1848574f8b 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textbox/textbox.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textbox/textbox.html
@@ -1,9 +1,9 @@
-
+
- Required
+ Required
diff --git a/src/Umbraco.Web.UI.Client/src/views/templates/edit.html b/src/Umbraco.Web.UI.Client/src/views/templates/edit.html
index ec8ca3e9b4..2d59b644d0 100644
--- a/src/Umbraco.Web.UI.Client/src/views/templates/edit.html
+++ b/src/Umbraco.Web.UI.Client/src/views/templates/edit.html
@@ -13,6 +13,7 @@
..\packages\dotless.1.5.2\lib\dotless.Core.dll
-
- ..\packages\Examine.0.1.82\lib\net45\Examine.dll
+
+ ..\packages\Examine.0.1.83\lib\net45\Examine.dll
+ TrueFalse
@@ -2376,9 +2377,9 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\x86\*.* "$(TargetDir)x86\"
TrueTrue
- 7600
+ 7640/
- http://localhost:7600
+ http://localhost:7640FalseFalse
@@ -2395,7 +2396,26 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\x86\*.* "$(TargetDir)x86\"
+
+ $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.Tasks.dll
+
+
+ $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.Tasks.dll
+
+
+ $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.Tasks.dll
+
+
+ $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.Tasks.dll
+
+
+ $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.Tasks.dll
+
+
+
+
+
diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.config b/src/Umbraco.Web.UI/config/umbracoSettings.config
index 78d13ab600..f208ab649e 100644
--- a/src/Umbraco.Web.UI/config/umbracoSettings.config
+++ b/src/Umbraco.Web.UI/config/umbracoSettings.config
@@ -102,6 +102,9 @@
ashx,aspx,ascx,config,cshtml,vbhtml,asmx,air,axd,swf,xml,xhtml,html,htm,svg,php,htaccess
+
+
+
Textstring
diff --git a/src/Umbraco.Web.UI/packages.config b/src/Umbraco.Web.UI/packages.config
index 555740eda3..8b22708406 100644
--- a/src/Umbraco.Web.UI/packages.config
+++ b/src/Umbraco.Web.UI/packages.config
@@ -4,7 +4,7 @@
-
+
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml
index 281dbacdbd..4fe1120eee 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml
@@ -89,8 +89,8 @@
Gem og udgivGem og send til udgivelseGem listevisning
- Se siden
- Preview er deaktiveret fordi der ikke er nogen skabelon tildelt
+ Forhåndsvisning
+ Forhåndsvisning er deaktiveret fordi der ikke er nogen skabelon tildeltVælg formatteringVis koderIndsæt tabel
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml
index ecea653650..49a2fae91a 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml
@@ -177,6 +177,8 @@
TargetThis translates to the following time on the server:What does this mean?]]>
+ Add another text box
+ Remove this text boxClick to upload
@@ -304,6 +306,7 @@
Link to pageOpens the linked document in a new window or tabLink to media
+ Link to fileSelect mediaSelect iconSelect item
@@ -320,9 +323,10 @@
StacktraceInner ExceptionLink your
- Un-Link your
+ Un-link youraccountSelect editor
+ Select snippetRelated stylesheetsShow labelWidth and height
+ All property types & property data
+ using this data type will be deleted permanently, please confirm you want to delete these as well
+ Yes, delete
+ and all property types & property data using this data type
+ Select the folder to move
+ to in the tree structure below
+ was moved underneathYour data has been saved, but before you can publish this page there are some errors you need to fix first:
@@ -438,6 +449,7 @@
Close WindowCommentConfirm
+ ConstrainConstrain proportionsContinueCopy
@@ -449,6 +461,7 @@
DeletedDeleting...Design
+ DictionaryDimensionsDownDownload
@@ -458,6 +471,7 @@
EmailErrorFind
+ FirstHeightHelpIcon
@@ -468,6 +482,7 @@
InvalidJustifyLanguage
+ LastLayoutLoadingLocked
@@ -495,6 +510,7 @@
Email to receive form dataRecycle BinRemaining
+ RemoveRenameRenewRequired
@@ -806,6 +822,39 @@ To manage your website, simply open the Umbraco back office and start adding con
Choose Package from your machine, by clicking the Browse
button and locating the package. Umbraco packages usually have a ".zip" extension.
]]>
+ Drop to upload
+ or click here to choose files
+ Upload package
+ Install a local package by selecting it from your machine. Only install packages from sources you know and trust
+ Upload another package
+ Cancel and upload another package
+ License
+ I accept
+ terms of use
+ Install package
+ Finish
+ Installed packages
+ You don’t have any packages installed
+ 'Packages' icon in the top right of your screen]]>
+ Search for packages
+ Results for
+ We couldn’t find anything for
+ Please try searching for another package or browse through the categories
+ Popular
+ New releases
+ has
+ karma points
+ Information
+ Owner
+ Contributors
+ Created
+ Current version
+ .NET version
+ Downloads
+ Likes
+ Compatibility
+ This package is compatible with the following versions of Umbraco, as reported by community members. Full compatability cannot be gauranteed for versions reported below 100%
+ External sourcesAuthorDemonstrationDocumentation
@@ -818,7 +867,7 @@ To manage your website, simply open the Umbraco back office and start adding con
Package optionsPackage readmePackage repository
- Confirm uninstall
+ Confirm package uninstallPackage was uninstalledThe package was successfully uninstalledUninstall package
@@ -833,14 +882,15 @@ To manage your website, simply open the Umbraco back office and start adding con
Package version historyView package websitePackage already installed
- This package cannot be installed, it requires a minimum Umbraco version of %0%
+ This package cannot be installed, it requires a minimum Umbraco version ofUninstalling...Downloading...Importing...Installing...Restarting, please wait...All done, your browser will now refresh, please wait...
- Please click finish to complete installation and reload page.
+ Please click 'Finish' to complete installation and reload the page.
+ Uploading package...Paste with full formatting (Not recommended)
@@ -908,6 +958,10 @@ To manage your website, simply open the Umbraco back office and start adding con
Reset
+ Define crop
+ Give the crop an alias and its default width and height
+ Save crop
+ Add new cropCurrent version
@@ -1116,6 +1170,7 @@ To manage your website, simply open the Umbraco back office and start adding con
Query builder
+ Build a queryitems returned, inI want
@@ -1261,34 +1316,46 @@ To manage your website, simply open the Umbraco back office and start adding con
+ Add fallback field
+ Fallback field
+ Add default value
+ Default valueAlternative fieldAlternative TextCasingEncodingChoose fieldConvert line breaks
- Replaces line breaks with html-tag <br>
+ Yes, convert line breaks
+ Replaces line breaks with 'br' html tagCustom Fields
- Yes, Date only
+ Date only
+ Format and encodingFormat as date
+ Format the value as a date, or a date with time, according to the active cultureHTML encodeWill replace special characters by their HTML equivalent.Will be inserted after the field valueWill be inserted before the field valueLowercase
+ Modify outputNone
+ Output sampleInsert after fieldInsert before fieldRecursive
- Remove Paragraph tags
- Will remove any <P> in the beginning and end of the text
+ Yes, make it recursive
+ Remove paragraph tags
+ Yes, remove paragraph tags
+ Will remove any paragraph tag in the beginning and end of the text
+ SeparatorStandard FieldsUppercaseURL encodeWill format special characters in URLsWill only be used when the field values above are emptyThis field will only be used if the primary field is empty
- Yes, with time. Separator:
+ Date and timeTasks assigned to you
@@ -1370,6 +1437,8 @@ To manage your website, simply open the Umbraco back office and start adding con
TemplatesXSLT FilesAnalytics
+ Partial Views
+ Partial View Macro FilesNew update ready
@@ -1423,12 +1492,20 @@ To manage your website, simply open the Umbraco back office and start adding con
Session expires in
- Validation
- Validate as email
- Validate as a number
- Validate as a Url
- ...or enter a custom validation
- Field is mandatory
+ Validation
+ Validate as email
+ Validate as a number
+ Validate as a Url
+ ...or enter a custom validation
+ Field is mandatory
+ Enter a regular expression
+ You need to add at least
+ You can only have
+ items
+ items selected
+ Invalid date
+ Not a number
+ Invalid email
+ Wartość jest ustawiona na rekomendowaną wartość: '%0%'.
+ Wartość została ustawiona na '%1%' dla XPath '%2%' w pliku konfiguracyjnym '%3%'.
+ Oczekiwana jest wartość '%1%' dla '%2%' w pliku konfiguracyjnym '%3%', ale znaleziono '%0%'.
+ Znaleziono nieoczekiwaną wartość '%0%' dla '%2%' w pliku konfiguracyjnym '%3%'.
+
+
+ Niestandardowe błędy są ustawione na '%0%'.
+ Niestandardowe błędy są obecnie ustawione na '%0%'. Zaleca się ustawienie ich na '%1%' przed wypuszczeniem strony na produkcję.
+ Niestandardowe błędy zostały z powodzeniem ustawione na '%0%'.
+
+ MacroErrors są ustawione na '%0%'.
+ MacroErrors są ustawione na '%0%' co uniemożliwi częściowe lub całkowite załadowanie stron w Twojej witrynie jeśli wystąpią jakiekolwiek błędy w makro. Korekta ustawi wartość na '%1%'.
+ MacroErrors są teraz ustawione na '%0%'.
+
+
+ Try Skip IIS Custom Errors jest ustawione na '%0%' a Ty używasz IIS w wersji '%1%'.
+ Try Skip IIS Custom Errors wynosi obecnie '%0%'. Zalecane jest ustawienie go na '%1%' dla Twojego IIS w wersji (%2%).
+ Try Skip IIS Custom Errors ustawiono z powodzeniem na '%0%'.
+
+
+ Plik nie istnieje: '%0%'.
+ '%0%' w pliku konfiguracyjnym '%1%'.]]>
+ Wystąpił błąd, sprawdź logi, aby wyświetlić pełen opis błędu: %0%.
+
+ Członkowie - Suma XML: %0%, Suma: %1%, Suma niepoprawnych: %2%
+ Media - Suma XML: %0%, Suma: %1%, Suma niepoprawnych: %2%
+ Zawartość - Suma XML: %0%, Suma opublikowanych: %1%, Suma niepoprawnych: %2%
+
+ Certifikat Twojej strony został oznaczony jako poprawny.
+ Błąd walidacji certyfikatu: '%0%'
+ Błąd pingowania adresu URL %0% - '%1%'
+ Oglądasz %0% stronę używając HTTPS.
+ appSetting 'umbracoUseSSL' został ustawiony na 'false' w Twoim pliku web.config. Po uzyskaniu dostępu do strony, używając HTTPS, powinieneś go ustawić na 'true'.
+ appSetting 'umbracoUseSSL' został ustawiony na '%0%' w Twoim pliku web.config, Twoje ciasteczka są %1% ustawione jako bezpieczne.
+ Nie można zaktualizaować ustawień 'umbracoUseSSL' w Twoim pliku web.config file. Błąd: %0%
+
+
+ Włącz HTTPS
+ Ustawia umbracoSSL na 'true' w appSettings pliku web.config.
+ appSetting 'umbracoUseSSL' jest teraz ustawione na 'true' w Twoim pliku web.config, Twoje ciasteczka będą oznaczone jako bezpieczne.
+
+ Napraw
+ Nie można naprawić sprawdzenia z wartością typu porównania 'ShouldNotEqual'.
+ Nie można naprawić sprawdzenia z wartością typu porównania 'ShouldEqual' z wprowadzoną wartością.
+ Nie wprowadzono wartości do naprawy sprawdzenia.
+
+ Tryb kompilacji debugowania jest wyłączony.
+ Tryb kompilacji debugowania jest obecnie włączony. Zaleca się wyłączenie tego ustawienia przed wypuszczeniem strony na produkcję.
+ Tryb komplikacji debugowania został wyłączony z powodzeniem.
+
+ Tryb śledzenia jest wyłączony.
+ Tryb śledzenia jest obecnie włączony. Zaleca się wyłączenie tego ustawienia przed wypuszczeniem strony na produkcję.
+ Tryb śledzenia został wyłączony z powodzeniem
+
+ Wszystkie foldery mają ustawione poprawne ustawienia.
+
+ %0%.]]>
+ %0%. Jeśli nie będzie nic w nich pisane, żadne działania nie muszą być podejmowane.]]>
+
+ Wszystkie pliki mają ustawione poprawne uprawnienia.
+
+ %0%.]]>
+ %0%. Jeśli nie będzie nic w nich pisane, żadne działania nie muszą być podejmowane.]]>
+
+ X-Frame-Options używany do kontrolowania czy strona może być IFRAME'owana przez inną został znaleziony.]]>
+ X-Frame-Options używany do kontrolowania czy strona może być IFRAME'owana przez inną nie został znaleziony.]]>
+ Ustaw nagłówek w Config
+ Dodaje wartość do sekcji httpProtocol/customHeaders pliku web.config, aby zapobiec IFRAME'owania strony przez inne witryny.
+ Ustawienie do tworzenia nagłówka, zapobiegającego IFRAME'owania strony przez inne witryny zostało dodane do Twojego pliku web.config.
+ Nie można zaktualizować pliku web.config. Błąd: %0%
+
+
+ %0%.]]>
+ Nie znaleziono żadnych nagłówków, ujawniających informacji o technologii strony.
+
+ Nie znaleziono system.net/mailsettings w pliku Web.config.
+ Host nie jest skonfigurowany w sekcji system.net/mailsettings pliku Web.config.
+ Ustawienia SMTP są skonfigurowane poprawnie i serwis działa według oczekiwań.
+ Nie można połączyć się z serwerem SMTP skonfigurowanym z hostem '%0%' i portem '%1%'. Proszę sprawdzić ponownie, czy ustawienia system.net/mailsettings w pliku Web.config są poprawne.
+
+ %0%.]]>
+ %0%.]]>
+
+
+ Wyłącz śledzenie URL
+ Włącz śledzenie URL
+ Oryginalny URL
+ Przekierowane do
+ Nie stworzono żadnych przekierowań
+ Kiedy nazwa opublikowanej strony zostanie zmieniona lub zostanie ona przeniesiona, zostanie stworzone automatyczne przekierowanie na nową stronę.
+ Usuń
+ Czy jesteś pewien, że chcesz usunąć przekierowanie z '%0%' do '%1%'?
+ Przekierowanie URL zostało usunięte.
+ Wystąpił błąd podczas usuwania przekierowania URL.
+ Czy jesteś pewien, że chcesz wyłączyć śledzenie URL?
+ Śledzenie URL zostało wyłączone.
+ Wystąpił błąd podczas wyłączania śledzenia URL, więcej informacji znajdziesz w pliku z logami.
+ Śledzenie URL zostało włączone.
+ Wystąpił błąd podczas włączania śledzenia URL, więcej informacji znajdziesz w pliku z logami.
+
+
+ Brak elementów słownika do wyboru
+
+
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml b/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml
index 11ce7a3252..1a0d55b6c4 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml
@@ -187,12 +187,12 @@
Ссылка на медиа-элементыТип медиа-контентаГруппа участников
- Член групп(ы)
+ Включен в группу(ы)Роль участникаТип участникаДата не указанаЗаголовок ссылки
- Не является членом групп(ы)
+ Доступные группыСвойстваЭтот документ опубликован, но скрыт, потому что его родительский документ '%0%' не опубликованВНИМАНИЕ: этот документ опубликован, но его нет в глобальном кэше (внутренняя ошибка - подробности в системном журнале)
@@ -216,13 +216,15 @@
ОбновленоУдалить файлСсылка на документ
+ Добавить новое поле текста
+ Удалить это поле текстаКомпозицииВы не добавили ни одной вкладкиДобавить вкладкуДобавить новую вкладку
- Унаследован от
+ Унаследовано отДобавить свойствоОбязательная метка
@@ -364,6 +366,7 @@
Выбрать участникаВыбрать группу участниковЭто макрос без параметров
+ Нет макросов доступных для вставки в редакторПровайдеры аутентификацииПодробное сообщение об ошибкеТрассировка стека
@@ -372,6 +375,7 @@
Разорвать связьучетную записьВыбрать редактор
+ Выбрать образецСопоставленные стили CSSПоказать меткуШирина и высота
+ ВСЕ типы свойств и данные в свойствах документов,
+ использующие этот тип данных, будут удалены безвозвратно, подтвердите их удаление
+ Да, можно удалить
+ и все типы свойств и данные свойств, использующие этот тип данных
+ Выберите папку, чтобы переместить в нее
+ в структуре дерева ниже
+ был перемещен в папкуНет доступных элементов словаря
@@ -487,6 +498,7 @@
УдаленоУдаляется...Дизайн
+ СловарьРазмерыВнизСкачать
@@ -496,6 +508,7 @@
Email адресОшибкаНайти
+ НачалоПапкаВысотаСправка
@@ -508,10 +521,11 @@
ВыравниваниеНазваниеЯзык
+ КонецМакетЗагрузкаБЛОКИРОВКА
- Логин
+ ВойтиВыйтиВыходМакрос
@@ -520,7 +534,7 @@
ПереместитьНазваниеНовый
- Следующий
+ СледНетизOk
@@ -530,12 +544,13 @@
ПутьИдентификатор контейнераМинуточку...
- Предыдущий
+ ПредСвойстваEmail адрес для получения данныхКорзинаВаша корзина пустаОсталось
+ УдалитьПереименоватьОбновитьОбязательное
@@ -731,6 +746,10 @@
Сбросить
+ Задать рамку
+ Задайте рамке имя (алиас), а также ширину и высоту по-умолчанию
+ Сохранить рамку
+ Добавить новую рамкуПрограмма установки не может установить подключение к базе данных.
@@ -799,7 +818,7 @@
Здесь можно узнать об этом подробнее) Вы также можете отложить установку "Runway" на более позднее время. Перейдите к разделу "Для разработчиков" и выберите пункт "Пакеты".
+ (Здесь можно узнать об этом подробнее) Вы также можете отложить установку "Runway" на более позднее время. Перейдите к разделу "Разработка" и выберите пункт "Пакеты".
]]>Вы только что установили чистую платформу Umbraco. Какой шаг будет следующим?"Runway" установлен
@@ -968,6 +987,39 @@
Выберите файл пакета на своем компьютере, нажав на кнопку 'Обзор'
и указав на нужный файл. Пакеты Umbraco обычно являются архивами с расширением ".umb" или ".zip".
]]>
+ Перетащите сюда
+ или нажмите здесь для выбора файла пакета
+ Загрузить пакет
+ Установите локальный пакет из файла, расположенного на Вашем компьютере. Остерегайтесь устанавливать пакеты из непроверенных источников!
+ Загрузить еще один пакет
+ Отменить и загрузить другой пакет
+ Лицензия
+ Я принимаю
+ условия использования
+ Установить пакет
+ Завершить
+ Установленные пакеты
+ Ни одного пакета еще не установлено
+ 'Packages' наверху справа]]>
+ Поиск по пакетам
+ Результаты поиска по
+ Ничего не найдено по запросу
+ Пожалуйста, повторите поиск, уточнив запрос, или воспользуйтесь просмотром по категориям
+ Популярные
+ Недавно созданные
+ имеет на счету
+ очков кармы
+ Информация
+ Владелец
+ Соавторы
+ Создан
+ Текущая версия
+ Версия .NET
+ Загрузок
+ Нравится
+ Совместимость
+ Этот пакет совместим со следующими версиями Umbraco, по сообщениям участников сообщества. Полная совместимость не гарантируется для версий со значением ниже 100%
+ Внешние источникиАвторДемонстрацияДокументация (описание)
@@ -980,7 +1032,7 @@
Опции пакетаКраткий обзор пакетаРепозиторий пакета
- Подтверждение деинсталляции
+ Подтверждение деинсталляции пакетаПакет деинсталлированУказанный пакет успешно удален из системыДеинсталлировать пакет
@@ -995,14 +1047,15 @@
История версий пакетаПерейти на веб-сайт пакетаЭтот пакет уже установлен в системе
- Этот пакет не может быть установлен, он требует наличия Umbraco версии как минимум %0%
+ Этот пакет не может быть установлен, он требует наличия Umbraco версии как минимумУдаление...Загрузка...Импорт...Установка...Перезапуск, подождите, пожалуйста...Все готово, сейчас браузер перезагрузит страницу, подождите, пожалуйста...
- Пожалуйста, нажмите кнопку 'finish' для завершения установки и перезагрузки страницы.
+ Пожалуйста, нажмите кнопку 'Завершить' для завершения установки и перезагрузки страницы.
+ Загрузка пакета...Вставить, полностью сохранив форматирование (не рекомендуется)
@@ -1119,7 +1172,7 @@
СмотрительСодержимоеКурьер
- Для Разработчиков
+ РазработкаФормыПомощьМастер конфигурирования Umbraco
@@ -1184,7 +1237,7 @@
Порядок сортировкиДата созданияСортировка завершена
- Перетаскивайте элементы на нужное место вверх или вниз для определения необходимого Вам порядка сортировки. Также можно щелкнуть по заголовкам столбцов, чтобы отсортировать все элементы сразу.
+ Перетаскивайте элементы на нужное место вверх или вниз для определения необходимого Вам порядка сортировки. Также можно использовать заголовки столбцов, чтобы отсортировать все элементы сразу. Не закрывайте это окно до окончания процесса сортировки.]]>
@@ -1330,6 +1383,7 @@
Генератор запросов
+ Построить запросэлементов в результате, заМне нужны
@@ -1367,34 +1421,42 @@
Шаблон
+ Добавить поле замены
+ Добавить значение по-умолчаниюАльтернативное поле
- Альтернативный текст
+ Текст по-умолчаниюРегистрВыбрать полеПреобразовать переводы строк
- Заменяет переводы строк на тэг html <br>
+ Заменяет переводы строк на тэг html 'br'ПользовательскиеТолько датаКодировка
+ Форматирование и кодировкаФорматировать как дату
+ Форматировать значение как дату, или как дату и время, в соответствии с текущей культуройКодировка HTMLЗаменяет спецсимволы эквивалентами в формате HTMLБудет добавлено после поляБудет вставлено перед полемВ нижнем регистре
+ Модификации при выводе-Не указано-
+ Пример результатаВставить после поляВставить перед полемРекурсивно
+ Да, использовать рекурсиюУдалить тэги параграфов
- Удаляются тэги <p> в начале и в конце абзацев
+ Удаляются тэги параграфа ('p') в начале и в конце абзацев
+ РазделительСтандартныеВ верхнем регистреКодирование URLФорматирование специальных символов в URLЭто значение будет использовано только если предыдущие поля пустыЭто значение будет использовано только если первичное поле пусто
- Дата и время. Разделитель:
+ Дата и времяЗадачи, назначенные Вам
@@ -1535,5 +1597,13 @@
Валидация по формату Url...или указать свои правила валидацииОбязательно к заполнению
+ Задайте регулярное выражение
+ Необходимо выбрать как минимум
+ Возможно выбрать максимум
+ элементов
+ элементов
+ Неверный формат даты
+ Не является числом
+ неверный формат email-адреса
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml b/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml
index 1f538e7fa0..0341316f25 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml
@@ -1252,6 +1252,8 @@
模板XSLT文件分析
+ 分部视图
+ 分部视图宏文件有可用更新
diff --git a/src/Umbraco.Web.UI/umbraco/developer/Macros/editMacro.aspx b/src/Umbraco.Web.UI/umbraco/developer/Macros/editMacro.aspx
index ee0dfe02bd..05bfab1115 100644
--- a/src/Umbraco.Web.UI/umbraco/developer/Macros/editMacro.aspx
+++ b/src/Umbraco.Web.UI/umbraco/developer/Macros/editMacro.aspx
@@ -58,6 +58,9 @@
+
+
+
diff --git a/src/Umbraco.Web.UI/umbraco/translation/default.aspx b/src/Umbraco.Web.UI/umbraco/translation/default.aspx
index 5884054a2f..06a5c2c9e6 100644
--- a/src/Umbraco.Web.UI/umbraco/translation/default.aspx
+++ b/src/Umbraco.Web.UI/umbraco/translation/default.aspx
@@ -16,7 +16,7 @@
- When you have completed the translation. Upload the edited XML file here. The related translation tasks will automaticly be closed when a file is uploaded.
+ When you have completed the translation. Upload the edited XML file here. The related translation tasks will automatically be closed when a file is uploaded.
diff --git a/src/Umbraco.Web.UI/umbraco/users/PermissionEditor.aspx b/src/Umbraco.Web.UI/umbraco/users/PermissionEditor.aspx
index d80a60c92c..75b5d6e66a 100644
--- a/src/Umbraco.Web.UI/umbraco/users/PermissionEditor.aspx
+++ b/src/Umbraco.Web.UI/umbraco/users/PermissionEditor.aspx
@@ -1,5 +1,5 @@
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../masterpages/umbracoPage.Master" CodeBehind="PermissionEditor.aspx.cs" Inherits="umbraco.cms.presentation.user.PermissionEditor" %>
-
+<%@ Import Namespace="Umbraco.Web" %>
<%@ Register Src="../controls/Tree/TreeControl.ascx" TagName="TreeControl" TagPrefix="umbraco" %>
<%@ Register Src="NodePermissions.ascx" TagName="NodePermissions" TagPrefix="user" %>
<%@ Register TagPrefix="ui" Namespace="umbraco.uicontrols" Assembly="controls" %>
diff --git a/src/Umbraco.Web.UI/umbraco_client/Editors/EditXslt.js b/src/Umbraco.Web.UI/umbraco_client/Editors/EditXslt.js
index d17296a958..67f0259afb 100644
--- a/src/Umbraco.Web.UI/umbraco_client/Editors/EditXslt.js
+++ b/src/Umbraco.Web.UI/umbraco_client/Editors/EditXslt.js
@@ -37,7 +37,7 @@
codeVal = UmbEditor.GetCode();
}
umbraco.presentation.webservices.codeEditorSave.SaveXslt(
- fileName, self._opts.originalFileName, codeVal, self._opts.skipTestingCheckBox.is(':checked'),
+ fileName, self._opts.originalFileName, codeVal, true,
function (t) { self.submitSucces(t); },
function (t) { self.submitFailure(t); });
diff --git a/src/Umbraco.Web.UI/web.Template.config b/src/Umbraco.Web.UI/web.Template.config
index 6ee7d3bfba..3a484944e6 100644
--- a/src/Umbraco.Web.UI/web.Template.config
+++ b/src/Umbraco.Web.UI/web.Template.config
@@ -433,6 +433,10 @@
+
+
+
+
diff --git a/src/Umbraco.Web/Cache/ContentTypeCacheRefresher.cs b/src/Umbraco.Web/Cache/ContentTypeCacheRefresher.cs
index 955be82783..e83050dd26 100644
--- a/src/Umbraco.Web/Cache/ContentTypeCacheRefresher.cs
+++ b/src/Umbraco.Web/Cache/ContentTypeCacheRefresher.cs
@@ -185,11 +185,10 @@ namespace Umbraco.Web.Cache
{
var needsContentRefresh = false;
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.IdToKeyCacheKey);
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.KeyToIdCacheKey);
-
foreach (var payload in payloads)
{
+ ApplicationContext.Current.Services.IdkMap.ClearCache(payload.Id);
+
//clear the cache for each item
ClearContentTypeCache(payload);
diff --git a/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs b/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs
index 34ca2ceec0..6b001d24fa 100644
--- a/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs
+++ b/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs
@@ -100,18 +100,17 @@ namespace Umbraco.Web.Cache
ClearAllIsolatedCacheByEntityType();
ClearAllIsolatedCacheByEntityType();
ClearAllIsolatedCacheByEntityType();
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.IdToKeyCacheKey);
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.KeyToIdCacheKey);
var dataTypeCache = ApplicationContext.Current.ApplicationCache.IsolatedRuntimeCache.GetCache();
- payloads.ForEach(payload =>
+ foreach (var payload in payloads)
{
//clears the prevalue cache
if (dataTypeCache)
dataTypeCache.Result.ClearCacheByKeySearch(string.Format("{0}_{1}", CacheKeys.DataTypePreValuesCacheKey, payload.Id));
+ ApplicationContext.Current.Services.IdkMap.ClearCache(payload.Id);
PublishedContentType.ClearDataType(payload.Id);
- });
+ }
TagsValueConverter.ClearCaches();
MultipleMediaPickerPropertyConverter.ClearCaches();
diff --git a/src/Umbraco.Web/Cache/MediaCacheRefresher.cs b/src/Umbraco.Web/Cache/MediaCacheRefresher.cs
index a0e037e110..fc589b530b 100644
--- a/src/Umbraco.Web/Cache/MediaCacheRefresher.cs
+++ b/src/Umbraco.Web/Cache/MediaCacheRefresher.cs
@@ -153,13 +153,13 @@ namespace Umbraco.Web.Cache
private static void ClearCache(params JsonPayload[] payloads)
{
if (payloads == null) return;
-
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.IdToKeyCacheKey);
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.KeyToIdCacheKey);
+
ApplicationContext.Current.ApplicationCache.ClearPartialViewCache();
- payloads.ForEach(payload =>
+ foreach (var payload in payloads)
{
+ ApplicationContext.Current.Services.IdkMap.ClearCache(payload.Id);
+
var mediaCache = ApplicationContext.Current.ApplicationCache.IsolatedRuntimeCache.GetCache();
//if there's no path, then just use id (this will occur on permanent deletion like emptying recycle bin)
@@ -190,9 +190,7 @@ namespace Umbraco.Web.Cache
// published cache...
PublishedMediaCache.ClearCache(payload.Id);
- });
-
-
+ }
}
}
}
\ No newline at end of file
diff --git a/src/Umbraco.Web/Cache/MemberCacheRefresher.cs b/src/Umbraco.Web/Cache/MemberCacheRefresher.cs
index 32e6a69717..e20359fb10 100644
--- a/src/Umbraco.Web/Cache/MemberCacheRefresher.cs
+++ b/src/Umbraco.Web/Cache/MemberCacheRefresher.cs
@@ -60,8 +60,7 @@ namespace Umbraco.Web.Cache
private void ClearCache(int id)
{
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.IdToKeyCacheKey);
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.KeyToIdCacheKey);
+ ApplicationContext.Current.Services.IdkMap.ClearCache(id);
ApplicationContext.Current.ApplicationCache.ClearPartialViewCache();
ApplicationContext.Current.ApplicationCache.RuntimeCache.
diff --git a/src/Umbraco.Web/Cache/PageCacheRefresher.cs b/src/Umbraco.Web/Cache/PageCacheRefresher.cs
index 83d38924ed..e884c9b3b8 100644
--- a/src/Umbraco.Web/Cache/PageCacheRefresher.cs
+++ b/src/Umbraco.Web/Cache/PageCacheRefresher.cs
@@ -15,7 +15,7 @@ namespace Umbraco.Web.Cache
///
/// If Load balancing is enabled (by default disabled, is set in umbracoSettings.config) PageCacheRefresher will be called
/// everytime content is added/updated/removed to ensure that the content cache is identical on all load balanced servers
- ///
+ ///
public class PageCacheRefresher : TypedCacheRefresherBase
{
@@ -51,6 +51,7 @@ namespace Umbraco.Web.Cache
public override void RefreshAll()
{
content.Instance.RefreshContentFromDatabase();
+ XmlPublishedContent.ClearRequest();
base.RefreshAll();
}
@@ -62,6 +63,7 @@ namespace Umbraco.Web.Cache
{
ApplicationContext.Current.ApplicationCache.ClearPartialViewCache();
content.Instance.UpdateDocumentCache(id);
+ XmlPublishedContent.ClearRequest();
DistributedCache.Instance.ClearAllMacroCacheOnCurrentServer();
DistributedCache.Instance.ClearXsltCacheOnCurrentServer();
base.Refresh(id);
@@ -75,6 +77,7 @@ namespace Umbraco.Web.Cache
{
ApplicationContext.Current.ApplicationCache.ClearPartialViewCache();
content.Instance.ClearDocumentCache(id, false);
+ XmlPublishedContent.ClearRequest();
DistributedCache.Instance.ClearAllMacroCacheOnCurrentServer();
DistributedCache.Instance.ClearXsltCacheOnCurrentServer();
ClearAllIsolatedCacheByEntityType();
diff --git a/src/Umbraco.Web/Cache/TemplateCacheRefresher.cs b/src/Umbraco.Web/Cache/TemplateCacheRefresher.cs
index 4d6c0c612b..04f3d2b4fb 100644
--- a/src/Umbraco.Web/Cache/TemplateCacheRefresher.cs
+++ b/src/Umbraco.Web/Cache/TemplateCacheRefresher.cs
@@ -60,8 +60,7 @@ namespace Umbraco.Web.Cache
private void RemoveFromCache(int id)
{
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.IdToKeyCacheKey);
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.KeyToIdCacheKey);
+ ApplicationContext.Current.Services.IdkMap.ClearCache(id);
ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheItem(
string.Format("{0}{1}", CacheKeys.TemplateFrontEndCacheKey, id));
diff --git a/src/Umbraco.Web/Cache/UnpublishedPageCacheRefresher.cs b/src/Umbraco.Web/Cache/UnpublishedPageCacheRefresher.cs
index a36ac657a7..e352c8108a 100644
--- a/src/Umbraco.Web/Cache/UnpublishedPageCacheRefresher.cs
+++ b/src/Umbraco.Web/Cache/UnpublishedPageCacheRefresher.cs
@@ -77,8 +77,7 @@ namespace Umbraco.Web.Cache
public override void RefreshAll()
{
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.IdToKeyCacheKey);
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.KeyToIdCacheKey);
+ ApplicationContext.Current.Services.IdkMap.ClearCache();
ClearAllIsolatedCacheByEntityType();
ClearAllIsolatedCacheByEntityType();
DistributedCache.Instance.ClearDomainCacheOnCurrentServer();
@@ -87,8 +86,7 @@ namespace Umbraco.Web.Cache
public override void Refresh(int id)
{
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.IdToKeyCacheKey);
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.KeyToIdCacheKey);
+ ApplicationContext.Current.Services.IdkMap.ClearCache(id);
ClearRepositoryCacheItemById(id);
ClearAllIsolatedCacheByEntityType();
content.Instance.UpdateSortOrder(id);
@@ -98,8 +96,7 @@ namespace Umbraco.Web.Cache
public override void Remove(int id)
{
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.IdToKeyCacheKey);
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.KeyToIdCacheKey);
+ ApplicationContext.Current.Services.IdkMap.ClearCache(id);
ClearRepositoryCacheItemById(id);
ClearAllIsolatedCacheByEntityType();
DistributedCache.Instance.ClearDomainCacheOnCurrentServer();
@@ -109,8 +106,7 @@ namespace Umbraco.Web.Cache
public override void Refresh(IContent instance)
{
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.IdToKeyCacheKey);
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.KeyToIdCacheKey);
+ ApplicationContext.Current.Services.IdkMap.ClearCache(instance.Id);
ClearRepositoryCacheItemById(instance.Id);
ClearAllIsolatedCacheByEntityType();
content.Instance.UpdateSortOrder(instance);
@@ -120,8 +116,7 @@ namespace Umbraco.Web.Cache
public override void Remove(IContent instance)
{
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.IdToKeyCacheKey);
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.KeyToIdCacheKey);
+ ApplicationContext.Current.Services.IdkMap.ClearCache(instance.Id);
ClearRepositoryCacheItemById(instance.Id);
ClearAllIsolatedCacheByEntityType();
DistributedCache.Instance.ClearDomainCacheOnCurrentServer();
@@ -134,12 +129,11 @@ namespace Umbraco.Web.Cache
///
public void Refresh(string jsonPayload)
{
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.IdToKeyCacheKey);
- ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(CacheKeys.KeyToIdCacheKey);
ClearAllIsolatedCacheByEntityType();
foreach (var payload in DeserializeFromJsonPayload(jsonPayload))
{
+ ApplicationContext.Current.Services.IdkMap.ClearCache(payload.Id);
ClearRepositoryCacheItemById(payload.Id);
content.Instance.UpdateSortOrder(payload.Id);
}
@@ -157,6 +151,5 @@ namespace Umbraco.Web.Cache
contentCache.Result.ClearCacheItem(RepositoryBase.GetCacheIdKey(id));
}
}
-
}
}
\ No newline at end of file
diff --git a/src/Umbraco.Web/Editors/AuthenticationController.cs b/src/Umbraco.Web/Editors/AuthenticationController.cs
index 0489fcbb70..6467aeaa21 100644
--- a/src/Umbraco.Web/Editors/AuthenticationController.cs
+++ b/src/Umbraco.Web/Editors/AuthenticationController.cs
@@ -204,7 +204,7 @@ namespace Umbraco.Web.Editors
if (identityUser != null)
{
var user = Services.UserService.GetByEmail(model.Email);
- if (user != null && user.IsLockedOut == false)
+ if (user != null)
{
var code = await UserManager.GeneratePasswordResetTokenAsync(identityUser.Id);
var callbackUrl = ConstructCallbackUrl(identityUser.Id, code);
@@ -303,9 +303,31 @@ namespace Umbraco.Web.Editors
var result = await UserManager.ResetPasswordAsync(model.UserId, model.ResetCode, model.Password);
if (result.Succeeded)
{
+ var lockedOut = await UserManager.IsLockedOutAsync(model.UserId);
+ if (lockedOut)
+ {
+ Logger.Info(
+ "User {0} is currently locked out, unlocking and resetting AccessFailedCount",
+ () => model.UserId);
+
+ //var user = await UserManager.FindByIdAsync(model.UserId);
+ var unlockResult = await UserManager.SetLockoutEndDateAsync(model.UserId, DateTimeOffset.Now);
+ if(unlockResult.Succeeded == false)
+ {
+ Logger.Warn("Could not unlock for user {0} - error {1}",
+ () => model.UserId, () => unlockResult.Errors.First());
+ }
+
+ var resetAccessFailedCountResult = await UserManager.ResetAccessFailedCountAsync(model.UserId);
+ if (resetAccessFailedCountResult.Succeeded == false)
+ {
+ Logger.Warn("Could not reset access failed count {0} - error {1}",
+ () => model.UserId, () => unlockResult.Errors.First());
+ }
+ }
+
return Request.CreateResponse(HttpStatusCode.OK);
}
-
return Request.CreateValidationErrorResponse(
result.Errors.Any() ? result.Errors.First() : "Set password failed");
}
diff --git a/src/Umbraco.Web/Editors/BackOfficeController.cs b/src/Umbraco.Web/Editors/BackOfficeController.cs
index 901189e28a..f8419fef1e 100644
--- a/src/Umbraco.Web/Editors/BackOfficeController.cs
+++ b/src/Umbraco.Web/Editors/BackOfficeController.cs
@@ -391,6 +391,10 @@ namespace Umbraco.Web.Editors
{
"disallowedUploadFiles",
string.Join(",", UmbracoConfig.For.UmbracoSettings().Content.DisallowedUploadFiles)
+ },
+ {
+ "allowedUploadFiles",
+ string.Join(",", UmbracoConfig.For.UmbracoSettings().Content.AllowedUploadFiles)
},
{
"maxFileSize",
@@ -703,8 +707,9 @@ namespace Umbraco.Web.Editors
var version = UmbracoVersion.GetSemanticVersion().ToSemanticString();
+ app.Add("cacheBuster", string.Format("{0}.{1}", version, ClientDependencySettings.Instance.Version).GenerateHash());
app.Add("version", version);
- app.Add("cdf", ClientDependencySettings.Instance.Version);
+
//useful for dealing with virtual paths on the client side when hosted in virtual directories especially
app.Add("applicationPath", HttpContext.Request.ApplicationPath.EnsureEndsWith('/'));
@@ -713,11 +718,19 @@ namespace Umbraco.Web.Editors
return app;
}
-
+
+ ///
+ /// A lazy reference to all tree controller types
+ ///
+ ///
+ /// We are doing this because if we constantly resolve the tree controller types from the PluginManager it will re-scan and also re-log that
+ /// it's resolving which is unecessary and annoying.
+ ///
+ private static readonly Lazy> TreeControllerTypes = new Lazy>(() => PluginManager.Current.ResolveAttributedTreeControllers().ToArray());
private IEnumerable> GetTreePluginsMetaData()
{
- var treeTypes = PluginManager.Current.ResolveAttributedTreeControllers();
+ var treeTypes = TreeControllerTypes.Value;
//get all plugin trees with their attributes
var treesWithAttributes = treeTypes.Select(x => new
{
diff --git a/src/Umbraco.Web/Editors/CodeFileController.cs b/src/Umbraco.Web/Editors/CodeFileController.cs
index 5f9f719a69..a7f420fc3b 100644
--- a/src/Umbraco.Web/Editors/CodeFileController.cs
+++ b/src/Umbraco.Web/Editors/CodeFileController.cs
@@ -42,13 +42,13 @@ namespace Umbraco.Web.Editors
switch (type)
{
case Core.Constants.Trees.PartialViews:
- var view = new PartialView(display.VirtualPath);
+ var view = new PartialView(PartialViewType.PartialView, display.VirtualPath);
view.Content = display.Content;
var result = Services.FileService.CreatePartialView(view, display.Snippet, Security.CurrentUser.Id);
return result.Success == true ? Request.CreateResponse(HttpStatusCode.OK) : Request.CreateNotificationValidationErrorResponse(result.Exception.Message);
case Core.Constants.Trees.PartialViewMacros:
- var viewMacro = new PartialView(display.VirtualPath);
+ var viewMacro = new PartialView(PartialViewType.PartialViewMacro, display.VirtualPath);
viewMacro.Content = display.Content;
var resultMacro = Services.FileService.CreatePartialViewMacro(viewMacro, display.Snippet, Security.CurrentUser.Id);
return resultMacro.Success == true ? Request.CreateResponse(HttpStatusCode.OK) : Request.CreateNotificationValidationErrorResponse(resultMacro.Exception.Message);
@@ -219,13 +219,13 @@ namespace Umbraco.Web.Editors
switch (type)
{
case Core.Constants.Trees.PartialViews:
- codeFileDisplay = Mapper.Map(new PartialView(string.Empty));
+ codeFileDisplay = Mapper.Map(new PartialView(PartialViewType.PartialView, string.Empty));
codeFileDisplay.VirtualPath = SystemDirectories.PartialViews;
if (snippetName.IsNullOrWhiteSpace() == false)
codeFileDisplay.Content = Services.FileService.GetPartialViewSnippetContent(snippetName);
break;
case Core.Constants.Trees.PartialViewMacros:
- codeFileDisplay = Mapper.Map(new PartialView(string.Empty));
+ codeFileDisplay = Mapper.Map(new PartialView(PartialViewType.PartialViewMacro, string.Empty));
codeFileDisplay.VirtualPath = SystemDirectories.MacroPartials;
if (snippetName.IsNullOrWhiteSpace() == false)
codeFileDisplay.Content = Services.FileService.GetPartialViewMacroSnippetContent(snippetName);
@@ -475,7 +475,7 @@ namespace Umbraco.Web.Editors
}
else
{
- view = new PartialView(virtualPath + display.Name);
+ view = new PartialView(PartialViewType.PartialView, virtualPath + display.Name);
view.Content = display.Content;
partialViewResult = createView(view, display.Snippet, Security.CurrentUser.Id);
}
diff --git a/src/Umbraco.Web/Editors/ContentControllerBase.cs b/src/Umbraco.Web/Editors/ContentControllerBase.cs
index 6b8d570e5f..f67ce13950 100644
--- a/src/Umbraco.Web/Editors/ContentControllerBase.cs
+++ b/src/Umbraco.Web/Editors/ContentControllerBase.cs
@@ -57,7 +57,7 @@ namespace Umbraco.Web.Editors
where TPersisted : IContentBase
{
//Don't update the name if it is empty
- if (!contentItem.Name.IsNullOrWhiteSpace())
+ if (contentItem.Name.IsNullOrWhiteSpace() == false)
{
contentItem.PersistedContent.Name = contentItem.Name;
}
diff --git a/src/Umbraco.Web/Editors/GravatarController.cs b/src/Umbraco.Web/Editors/GravatarController.cs
index f1e184dce7..23c4a731c2 100644
--- a/src/Umbraco.Web/Editors/GravatarController.cs
+++ b/src/Umbraco.Web/Editors/GravatarController.cs
@@ -1,5 +1,6 @@
using System;
using System.Net;
+using System.Security.Cryptography;
using Umbraco.Core;
using Umbraco.Web.Mvc;
@@ -13,6 +14,14 @@ namespace Umbraco.Web.Editors
{
public string GetCurrentUserGravatarUrl()
{
+ // If FIPS is required, never check the Gravatar service as it only supports MD5 hashing.
+ // Unfortunately, if the FIPS setting is enabled on Windows, using MD5 will throw an exception
+ // and the website will not run.
+ if (CryptoConfig.AllowOnlyFipsAlgorithms)
+ {
+ return null;
+ }
+
var userService = Services.UserService;
var user = userService.GetUserById(UmbracoContext.Security.CurrentUser.Id);
var gravatarHash = user.Email.ToMd5();
diff --git a/src/Umbraco.Web/Editors/MediaController.cs b/src/Umbraco.Web/Editors/MediaController.cs
index 4980605374..3ca4195a26 100644
--- a/src/Umbraco.Web/Editors/MediaController.cs
+++ b/src/Umbraco.Web/Editors/MediaController.cs
@@ -33,7 +33,8 @@ using Umbraco.Core.Configuration;
using Umbraco.Web.UI;
using Notification = Umbraco.Web.Models.ContentEditing.Notification;
using Umbraco.Core.Persistence;
-
+using Umbraco.Core.Configuration.UmbracoSettings;
+
namespace Umbraco.Web.Editors
{
///
@@ -723,7 +724,7 @@ namespace Umbraco.Web.Editors
var safeFileName = fileName.ToSafeFileName();
var ext = safeFileName.Substring(safeFileName.LastIndexOf('.') + 1).ToLower();
- if (UmbracoConfig.For.UmbracoSettings().Content.DisallowedUploadFiles.Contains(ext) == false)
+ if (UmbracoConfig.For.UmbracoSettings().Content.IsFileAllowedForUpload(ext))
{
var mediaType = Constants.Conventions.MediaTypes.File;
diff --git a/src/Umbraco.Web/Editors/PackageInstallController.cs b/src/Umbraco.Web/Editors/PackageInstallController.cs
index d3771ce82c..6b5f460171 100644
--- a/src/Umbraco.Web/Editors/PackageInstallController.cs
+++ b/src/Umbraco.Web/Editors/PackageInstallController.cs
@@ -543,6 +543,26 @@ namespace Umbraco.Web.Editors
var ins = new global::umbraco.cms.businesslogic.packager.Installer(Security.CurrentUser.Id);
ins.LoadConfig(IOHelper.MapPath(model.TemporaryDirectoryPath));
ins.InstallFiles(model.Id, IOHelper.MapPath(model.TemporaryDirectoryPath));
+
+ //set a restarting marker and reset the app pool
+ ApplicationContext.RestartApplicationPool(Request.TryGetHttpContext().Result);
+
+ model.IsRestarting = true;
+
+ return model;
+ }
+
+ [HttpPost]
+ public PackageInstallModel CheckRestart(PackageInstallModel model)
+ {
+ if (model.IsRestarting == false) return model;
+
+ //check for the key, if it's not there we're are restarted
+ if (Request.TryGetHttpContext().Result.Application.AllKeys.Contains("AppPoolRestarting") == false)
+ {
+ //reset it
+ model.IsRestarting = false;
+ }
return model;
}
diff --git a/src/Umbraco.Web/Editors/TemplateQueryController.cs b/src/Umbraco.Web/Editors/TemplateQueryController.cs
index cd004fe926..d7351b0e97 100644
--- a/src/Umbraco.Web/Editors/TemplateQueryController.cs
+++ b/src/Umbraco.Web/Editors/TemplateQueryController.cs
@@ -3,7 +3,6 @@ using System.Linq;
using System.Text;
using Umbraco.Core.Models;
using Umbraco.Web.Mvc;
-using Umbraco.Web.WebApi.Filters;
using Umbraco.Web.WebApi;
using System;
using System.Diagnostics;
@@ -13,8 +12,6 @@ using Umbraco.Core.Services;
namespace Umbraco.Web.Editors
{
-
-
///
/// The API controller used for building content queries within the template
///
@@ -26,10 +23,9 @@ namespace Umbraco.Web.Editors
{ }
public TemplateQueryController(UmbracoContext umbracoContext)
- :base(umbracoContext)
+ : base(umbracoContext)
{ }
-
private IEnumerable Terms
{
get
@@ -77,20 +73,19 @@ namespace Umbraco.Web.Editors
var sb = new StringBuilder();
var indention = Environment.NewLine + "\t\t\t\t\t\t";
-
+
sb.Append("Model.Content.Site()");
var timer = new Stopwatch();
-
+
timer.Start();
var currentPage = umbraco.TypedContentAtRoot().FirstOrDefault();
timer.Stop();
-
var pointerNode = currentPage;
// adjust the "FROM"
- if (model != null && model.Source.Id > 0)
+ if (model != null && model.Source != null && model.Source.Id > 0)
{
var targetNode = umbraco.TypedContent(model.Source.Id);
@@ -120,10 +115,10 @@ namespace Umbraco.Web.Editors
}
}
}
-
- // TYPE to return if filtered by type
+
+ // TYPE to return if filtered by type
IEnumerable contents;
- if (model != null && string.IsNullOrEmpty(model.ContentType.Alias) == false)
+ if (model != null && model.ContentType != null && string.IsNullOrEmpty(model.ContentType.Alias) == false)
{
timer.Start();
@@ -154,13 +149,13 @@ namespace Umbraco.Web.Editors
foreach (var condition in model.Filters)
{
- if(string.IsNullOrEmpty( condition.ConstraintValue)) continue;
-
+ if (string.IsNullOrEmpty(condition.ConstraintValue)) continue;
+
//x is passed in as the parameter alias for the linq where statement clause
var operation = condition.BuildCondition("x");
var tokenizedOperation = condition.BuildTokenizedCondition(token);
- clause = string.IsNullOrEmpty(clause) ? operation : string.Concat(new[] { clause, " && ", operation });
+ clause = string.IsNullOrEmpty(clause) ? operation : string.Concat(new[] { clause, " && ", operation });
tokenizedClause = string.IsNullOrEmpty(tokenizedClause) ? tokenizedOperation : string.Concat(new[] { tokenizedClause, " && ", tokenizedOperation });
token++;
@@ -168,7 +163,6 @@ namespace Umbraco.Web.Editors
if (string.IsNullOrEmpty(clause) == false)
{
-
timer.Start();
//trial-run the tokenized clause to time the execution
@@ -178,14 +172,13 @@ namespace Umbraco.Web.Editors
timer.Stop();
-
+
//the query to output to the editor
sb.Append(indention);
sb.Append(".Where(x => x.IsVisible())");
sb.Append(indention);
sb.AppendFormat(".Where(x => {0})", clause);
-
}
else
{
@@ -197,7 +190,6 @@ namespace Umbraco.Web.Editors
sb.Append(indention);
sb.Append(".Where(x => x.IsVisible())");
-
}
if (model.Sort != null && string.IsNullOrEmpty(model.Sort.Property.Alias) == false)
@@ -231,20 +223,19 @@ namespace Umbraco.Web.Editors
queryResult.ExecutionTime = timer.ElapsedMilliseconds;
queryResult.ResultCount = contents.Count();
queryResult.SampleResults = contents.Take(20).Select(x => new TemplateQueryResult()
- {
- Icon = "icon-file",
- Name = x.Name
- });
+ {
+ Icon = "icon-file",
+ Name = x.Name
+ });
-
- return queryResult;
+ return queryResult;
}
private object GetConstraintValue(QueryCondition condition)
{
switch (condition.Property.Type)
{
- case "int" :
+ case "int":
return int.Parse(condition.ConstraintValue);
case "datetime":
DateTime dt;
@@ -254,42 +245,41 @@ namespace Umbraco.Web.Editors
}
}
- private IEnumerable SortByDefaultPropertyValue(IEnumerable contents, SortExpression sortExpression)
+ private IEnumerable SortByDefaultPropertyValue(IEnumerable contents, SortExpression sortExpression)
{
switch (sortExpression.Property.Alias)
{
- case "id" :
+ case "id":
return sortExpression.Direction == "ascending"
- ? contents.OrderBy(x => x.Id)
- : contents.OrderByDescending(x => x.Id);
- case "createDate" :
-
+ ? contents.OrderBy(x => x.Id)
+ : contents.OrderByDescending(x => x.Id);
+ case "createDate":
+
return sortExpression.Direction == "ascending"
- ? contents.OrderBy(x => x.CreateDate)
- : contents.OrderByDescending(x => x.CreateDate);
+ ? contents.OrderBy(x => x.CreateDate)
+ : contents.OrderByDescending(x => x.CreateDate);
case "publishDate":
-
+
return sortExpression.Direction == "ascending"
- ? contents.OrderBy(x => x.UpdateDate)
- : contents.OrderByDescending(x => x.UpdateDate);
+ ? contents.OrderBy(x => x.UpdateDate)
+ : contents.OrderByDescending(x => x.UpdateDate);
case "name":
return sortExpression.Direction == "ascending"
- ? contents.OrderBy(x => x.Name)
- : contents.OrderByDescending(x => x.Name);
- default :
+ ? contents.OrderBy(x => x.Name)
+ : contents.OrderByDescending(x => x.Name);
+ default:
return sortExpression.Direction == "ascending"
- ? contents.OrderBy(x => x.Name)
- : contents.OrderByDescending(x => x.Name);
-
+ ? contents.OrderBy(x => x.Name)
+ : contents.OrderByDescending(x => x.Name);
}
}
-
+
private IEnumerable GetChildContentTypeAliases(IPublishedContent targetNode, IPublishedContent current)
{
var aliases = new List();
-
- if (targetNode.Id == current.Id) return aliases;
+
+ if (targetNode == null || targetNode.Id == current.Id) return aliases;
if (targetNode.Id != current.Id)
{
aliases.Add(targetNode.DocumentTypeAlias);
@@ -309,7 +299,7 @@ namespace Umbraco.Web.Editors
{
var contentTypes =
ApplicationContext.Services.ContentTypeService.GetAllContentTypes()
- .Select(x => new ContentTypeModel() { Alias = x.Alias, Name = Services.TextService.Localize("template/contentOfType", tokens: new string[] { x.Name } ) })
+ .Select(x => new ContentTypeModel() { Alias = x.Alias, Name = Services.TextService.Localize("template/contentOfType", tokens: new string[] { x.Name }) })
.OrderBy(x => x.Name).ToList();
contentTypes.Insert(0, new ContentTypeModel() { Alias = string.Empty, Name = Services.TextService.Localize("template/allContent") });
@@ -332,7 +322,5 @@ namespace Umbraco.Web.Editors
{
return Terms;
}
-
-
}
}
\ No newline at end of file
diff --git a/src/Umbraco.Web/Extensions/UdiExtensions.cs b/src/Umbraco.Web/Extensions/UdiExtensions.cs
index c814d63b8c..3302f5538a 100644
--- a/src/Umbraco.Web/Extensions/UdiExtensions.cs
+++ b/src/Umbraco.Web/Extensions/UdiExtensions.cs
@@ -1,23 +1,22 @@
-using Umbraco.Core;
+using System;
+using System.ComponentModel;
+using Umbraco.Core;
using Umbraco.Core.Models;
namespace Umbraco.Web.Extensions
{
+ [Obsolete("Use methods on UmbracoHelper instead")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static class UdiExtensions
{
- ///
- /// An extension method to easily acquire a typed version of content, media or member item for a given Udi
- ///
- ///
- /// An item if the item is a Document, Media or Member
+ [Obsolete("Use methods on UmbracoHelper instead")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static IPublishedContent ToPublishedContent(this Udi udi)
{
- Udi identifier;
- if (Udi.TryParse(udi.ToString(), out identifier) == false)
- return null;
+ var guidUdi = udi as GuidUdi;
+ if (guidUdi == null) return null;
- var guidUdi = GuidUdi.Parse(udi.ToString());
- var umbracoType = Constants.UdiEntityType.ToUmbracoObjectType(identifier.EntityType);
+ var umbracoType = Constants.UdiEntityType.ToUmbracoObjectType(guidUdi.EntityType);
var umbracoHelper = new UmbracoHelper(UmbracoContext.Current);
var entityService = ApplicationContext.Current.Services.EntityService;
@@ -36,7 +35,7 @@ namespace Umbraco.Web.Extensions
return umbracoHelper.TypedMember(memberAttempt.Result);
break;
}
-
+
return null;
}
}
diff --git a/src/Umbraco.Web/HealthCheck/Checks/Config/AbstractConfigCheck.cs b/src/Umbraco.Web/HealthCheck/Checks/Config/AbstractConfigCheck.cs
index 001bd4e3e8..2cec88d616 100644
--- a/src/Umbraco.Web/HealthCheck/Checks/Config/AbstractConfigCheck.cs
+++ b/src/Umbraco.Web/HealthCheck/Checks/Config/AbstractConfigCheck.cs
@@ -43,6 +43,14 @@ namespace Umbraco.Web.HealthCheck.Checks.Config
///
public abstract ValueComparisonType ValueComparisonType { get; }
+ ///
+ /// Gets the flag indicating if the check is considered successful if the config value is missing (defaults to false - an error - if missing)
+ ///
+ public virtual bool ValidIfConfigMissing
+ {
+ get { return false; }
+ }
+
protected AbstractConfigCheck(HealthCheckContext healthCheckContext) : base(healthCheckContext)
{
_textService = healthCheckContext.ApplicationContext.Services.TextService;
@@ -132,11 +140,18 @@ namespace Umbraco.Web.HealthCheck.Checks.Config
public override IEnumerable GetStatus()
{
+ var successMessage = string.Format(CheckSuccessMessage, FileName, XPath, Values, CurrentValue);
+
var configValue = _configurationService.GetConfigurationValue();
if (configValue.Success == false)
{
- var message = configValue.Result;
- return new[] { new HealthCheckStatus(message) { ResultType = StatusResultType.Error } };
+ if (ValidIfConfigMissing)
+ {
+ return new[] { new HealthCheckStatus(successMessage) { ResultType = StatusResultType.Success } };
+ }
+
+ var errorMessage = configValue.Result;
+ return new[] { new HealthCheckStatus(errorMessage) { ResultType = StatusResultType.Error } };
}
CurrentValue = configValue.Result;
@@ -144,8 +159,7 @@ namespace Umbraco.Web.HealthCheck.Checks.Config
var valueFound = Values.Any(value => string.Equals(CurrentValue, value.Value, StringComparison.InvariantCultureIgnoreCase));
if (ValueComparisonType == ValueComparisonType.ShouldEqual && valueFound || ValueComparisonType == ValueComparisonType.ShouldNotEqual && valueFound == false)
{
- var message = string.Format(CheckSuccessMessage, FileName, XPath, Values, CurrentValue);
- return new[] { new HealthCheckStatus(message) { ResultType = StatusResultType.Success } };
+ return new[] { new HealthCheckStatus(successMessage) { ResultType = StatusResultType.Success } };
}
// Declare the action for rectifying the config value
diff --git a/src/Umbraco.Web/HealthCheck/Checks/Config/CompilationDebugCheck.cs b/src/Umbraco.Web/HealthCheck/Checks/Config/CompilationDebugCheck.cs
index 989046b464..6612b77b26 100644
--- a/src/Umbraco.Web/HealthCheck/Checks/Config/CompilationDebugCheck.cs
+++ b/src/Umbraco.Web/HealthCheck/Checks/Config/CompilationDebugCheck.cs
@@ -30,6 +30,11 @@ namespace Umbraco.Web.HealthCheck.Checks.Config
get { return ValueComparisonType.ShouldEqual; }
}
+ public override bool ValidIfConfigMissing
+ {
+ get { return true; }
+ }
+
public override IEnumerable Values
{
get
diff --git a/src/Umbraco.Web/HtmlHelperBackOfficeExtensions.cs b/src/Umbraco.Web/HtmlHelperBackOfficeExtensions.cs
index 1de50f5b71..dc05b3ffa5 100644
--- a/src/Umbraco.Web/HtmlHelperBackOfficeExtensions.cs
+++ b/src/Umbraco.Web/HtmlHelperBackOfficeExtensions.cs
@@ -52,8 +52,7 @@ namespace Umbraco.Web
},
""application"": {
""applicationPath"": """ + html.ViewContext.HttpContext.Request.ApplicationPath + @""",
- ""version"": """ + version + @""",
- ""cdf"": """ + ClientDependencySettings.Instance.Version + @"""
+ ""cacheBuster"": """ + string.Format("{0}.{1}", version, ClientDependencySettings.Instance.Version).GenerateHash() + @"""
},
""isDebuggingEnabled"" : " + html.ViewContext.HttpContext.IsDebuggingEnabled.ToString().ToLowerInvariant() + @"
};
diff --git a/src/Umbraco.Web/ITypedPublishedContentQuery.cs b/src/Umbraco.Web/ITypedPublishedContentQuery.cs
index 7a2be964f7..893c036958 100644
--- a/src/Umbraco.Web/ITypedPublishedContentQuery.cs
+++ b/src/Umbraco.Web/ITypedPublishedContentQuery.cs
@@ -11,8 +11,20 @@ namespace Umbraco.Web
///
public interface ITypedPublishedContentQuery
{
+ ///
+ /// Gets a content item from the cache
+ ///
+ ///
+ ///
IPublishedContent TypedContent(int id);
+
+ ///
+ /// Gets a content item from the cache
+ ///
+ ///
+ ///
IPublishedContent TypedContent(Guid id);
+
IPublishedContent TypedContentSingleAtXPath(string xpath, params XPathVariable[] vars);
IEnumerable TypedContent(IEnumerable ids);
IEnumerable TypedContent(IEnumerable ids);
@@ -20,8 +32,8 @@ namespace Umbraco.Web
IEnumerable TypedContentAtXPath(XPathExpression xpath, params XPathVariable[] vars);
IEnumerable TypedContentAtRoot();
- // note: we CANNOT implement TypedMedia by Guid in v7 without break-changing IPublishedCache,
- // since we don't support XPath navigation of the media tree.
+ // TODO: we CANNOT implement TypedMedia by Guid in v7 without break-changing IPublishedCache, since we don't support XPath navigation of the media tree.
+ // surely there is a way we can support this without XPath, it's needed so we can query properly by UDI
IPublishedContent TypedMedia(int id);
//IPublishedContent TypedMedia(Guid id);
diff --git a/src/Umbraco.Web/Install/InstallHelper.cs b/src/Umbraco.Web/Install/InstallHelper.cs
index 8bc21a2334..6c088365a1 100644
--- a/src/Umbraco.Web/Install/InstallHelper.cs
+++ b/src/Umbraco.Web/Install/InstallHelper.cs
@@ -50,7 +50,7 @@ namespace Umbraco.Web.Install
new DatabaseConfigureStep(_umbContext.Application),
new DatabaseInstallStep(_umbContext.Application),
new DatabaseUpgradeStep(_umbContext.Application),
- new StarterKitDownloadStep(_umbContext.Application, _umbContext.Security),
+ new StarterKitDownloadStep(_umbContext.Application, _umbContext.Security, _umbContext.HttpContext),
new StarterKitInstallStep(_umbContext.Application, _umbContext.HttpContext),
new StarterKitCleanupStep(_umbContext.Application),
new SetUmbracoVersionStep(_umbContext.Application, _umbContext.HttpContext),
diff --git a/src/Umbraco.Web/Install/InstallSteps/StarterKitDownloadStep.cs b/src/Umbraco.Web/Install/InstallSteps/StarterKitDownloadStep.cs
index a8f55d3b2c..fd0c15bd61 100644
--- a/src/Umbraco.Web/Install/InstallSteps/StarterKitDownloadStep.cs
+++ b/src/Umbraco.Web/Install/InstallSteps/StarterKitDownloadStep.cs
@@ -11,16 +11,19 @@ using Umbraco.Web.Security;
namespace Umbraco.Web.Install.InstallSteps
{
[InstallSetupStep(InstallationType.NewInstall,
- "StarterKitDownload", "starterKit", 30, "Adding a simple website to Umbraco, will make it easier for you to get started")]
+ "StarterKitDownload", "starterKit", 30, "Adding a simple website to Umbraco, will make it easier for you to get started",
+ PerformsAppRestart = true)]
internal class StarterKitDownloadStep : InstallSetupStep
{
private readonly ApplicationContext _applicationContext;
private readonly WebSecurity _security;
+ private readonly HttpContextBase _httpContext;
- public StarterKitDownloadStep(ApplicationContext applicationContext, WebSecurity security)
+ public StarterKitDownloadStep(ApplicationContext applicationContext, WebSecurity security, HttpContextBase httpContext)
{
_applicationContext = applicationContext;
_security = security;
+ _httpContext = httpContext;
}
private const string RepoGuid = "65194810-1f85-11dd-bd0b-0800200c9a66";
@@ -46,6 +49,8 @@ namespace Umbraco.Web.Install.InstallSteps
var result = DownloadPackageFiles(starterKitId.Value);
+ _applicationContext.RestartApplicationPool(_httpContext);
+
return new InstallSetupResult(new Dictionary
{
{"manifestId", result.Item2},
diff --git a/src/Umbraco.Web/Models/ContentEditing/TemplateDisplay.cs b/src/Umbraco.Web/Models/ContentEditing/TemplateDisplay.cs
index 91c1aefdb0..ffa4e4e100 100644
--- a/src/Umbraco.Web/Models/ContentEditing/TemplateDisplay.cs
+++ b/src/Umbraco.Web/Models/ContentEditing/TemplateDisplay.cs
@@ -1,11 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
-using System.Linq;
using System.Runtime.Serialization;
-using System.Text;
-using System.Threading.Tasks;
-using Umbraco.Core.Models.Validation;
namespace Umbraco.Web.Models.ContentEditing
{
@@ -24,6 +20,9 @@ namespace Umbraco.Web.Models.ContentEditing
[DataMember(Name = "alias")]
public string Alias { get; set; }
+ [DataMember(Name = "key")]
+ public Guid Key { get; set; }
+
[DataMember(Name = "content")]
public string Content { get; set; }
diff --git a/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs b/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs
index 37b002d297..a33921b7b9 100644
--- a/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs
+++ b/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs
@@ -108,7 +108,7 @@ namespace Umbraco.Web.Models.Mapping
}
//fill in the template config to be passed to the template drop down.
- var templateItemConfig = new Dictionary {{"", "Choose..."}};
+ var templateItemConfig = new Dictionary {{"", localizedText.Localize("general/choose")}};
foreach (var t in content.ContentType.AllowedTemplates
.Where(t => t.Alias.IsNullOrWhiteSpace() == false && t.Name.IsNullOrWhiteSpace() == false))
{
diff --git a/src/Umbraco.Web/Models/Mapping/TemplateModelMapper.cs b/src/Umbraco.Web/Models/Mapping/TemplateModelMapper.cs
index 19677fccc8..6111941084 100644
--- a/src/Umbraco.Web/Models/Mapping/TemplateModelMapper.cs
+++ b/src/Umbraco.Web/Models/Mapping/TemplateModelMapper.cs
@@ -15,7 +15,6 @@ namespace Umbraco.Web.Models.Mapping
config.CreateMap()
.ForMember(x => x.DeletedDate, exp => exp.Ignore())
- .ForMember(x => x.Key, exp => exp.Ignore())
.ForMember(x => x.Path, exp => exp.Ignore())
.ForMember(x => x.CreateDate, exp => exp.Ignore())
.ForMember(x => x.UpdateDate, exp => exp.Ignore())
diff --git a/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs b/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs
index 72093b19a8..eedc2cafca 100644
--- a/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs
+++ b/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs
@@ -23,7 +23,7 @@ namespace Umbraco.Web.Models.Mapping
.ForMember(detail => detail.Culture, opt => opt.MapFrom(user => user.GetUserCulture(applicationContext.Services.TextService)))
.ForMember(
detail => detail.EmailHash,
- opt => opt.MapFrom(user => user.Email.ToLowerInvariant().Trim().ToMd5()))
+ opt => opt.MapFrom(user => user.Email.ToLowerInvariant().Trim().GenerateHash()))
.ForMember(detail => detail.SecondsUntilTimeout, opt => opt.Ignore());
config.CreateMap()
@@ -35,7 +35,7 @@ namespace Umbraco.Web.Models.Mapping
.ForMember(detail => detail.AllowedSections, opt => opt.MapFrom(user => user.AllowedSections))
.ForMember(
detail => detail.EmailHash,
- opt => opt.MapFrom(user => user.Email.ToLowerInvariant().Trim().ToMd5()))
+ opt => opt.MapFrom(user => user.Email.ToLowerInvariant().Trim().GenerateHash()))
.ForMember(detail => detail.SecondsUntilTimeout, opt => opt.Ignore());
config.CreateMap()
diff --git a/src/Umbraco.Web/Models/PackageInstallModel.cs b/src/Umbraco.Web/Models/PackageInstallModel.cs
index f903fc1880..7748129a40 100644
--- a/src/Umbraco.Web/Models/PackageInstallModel.cs
+++ b/src/Umbraco.Web/Models/PackageInstallModel.cs
@@ -24,6 +24,10 @@ namespace Umbraco.Web.Models
[DataMember(Name = "zipFilePath")]
public string ZipFilePath { get; set; }
-
+ ///
+ /// During installation this can be used to track any pending appdomain restarts
+ ///
+ [DataMember(Name = "isRestarting")]
+ public bool IsRestarting { get; set; }
}
}
diff --git a/src/Umbraco.Web/Models/ValidatePasswordResetCodeModel.cs b/src/Umbraco.Web/Models/ValidatePasswordResetCodeModel.cs
index cba92eeff7..7e30e0881b 100644
--- a/src/Umbraco.Web/Models/ValidatePasswordResetCodeModel.cs
+++ b/src/Umbraco.Web/Models/ValidatePasswordResetCodeModel.cs
@@ -1,8 +1,10 @@
-using System.ComponentModel.DataAnnotations;
+using System;
+using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
namespace Umbraco.Web.Models
{
+ [Serializable]
[DataContract(Name = "validatePasswordReset", Namespace = "")]
public class ValidatePasswordResetCodeModel
{
diff --git a/src/Umbraco.Web/Properties/AssemblyInfo.cs b/src/Umbraco.Web/Properties/AssemblyInfo.cs
index c9e792fcc6..c016d328a9 100644
--- a/src/Umbraco.Web/Properties/AssemblyInfo.cs
+++ b/src/Umbraco.Web/Properties/AssemblyInfo.cs
@@ -38,7 +38,6 @@ using System.Security;
[assembly: InternalsVisibleTo("Umbraco.Deploy")]
[assembly: InternalsVisibleTo("Umbraco.Deploy.UI")]
[assembly: InternalsVisibleTo("Umbraco.Deploy.Cloud")]
-[assembly: InternalsVisibleTo("Umbraco.VisualStudio")]
[assembly: InternalsVisibleTo("Umbraco.ModelsBuilder")]
[assembly: InternalsVisibleTo("Umbraco.ModelsBuilder.AspNet")]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
@@ -47,3 +46,7 @@ using System.Security;
[assembly: InternalsVisibleTo("Umbraco.Forms.Core.Providers")]
[assembly: InternalsVisibleTo("Umbraco.Forms.Web")]
+
+//allow custom unit-testing code to access internals through custom adapters
+[assembly: InternalsVisibleTo("Umbraco.VisualStudio")] // backwards compat.
+[assembly: InternalsVisibleTo("Umbraco.UnitTesting.Adapter")] // new, more imperative name
diff --git a/src/Umbraco.Web/PropertyEditors/UploadFileTypeValidator.cs b/src/Umbraco.Web/PropertyEditors/UploadFileTypeValidator.cs
index 96a1211589..8a96c7ac3e 100644
--- a/src/Umbraco.Web/PropertyEditors/UploadFileTypeValidator.cs
+++ b/src/Umbraco.Web/PropertyEditors/UploadFileTypeValidator.cs
@@ -9,7 +9,8 @@ using Umbraco.Core.Configuration;
using Umbraco.Core.Models;
using Umbraco.Core.PropertyEditors;
using umbraco;
-
+using Umbraco.Core.Configuration.UmbracoSettings;
+
namespace Umbraco.Web.PropertyEditors
{
internal class UploadFileTypeValidator : IPropertyValidator
@@ -41,8 +42,9 @@ namespace Umbraco.Web.PropertyEditors
internal static bool ValidateFileExtension(string fileName)
{
if (fileName.IndexOf('.') <= 0) return false;
- var extension = Path.GetExtension(fileName).TrimStart(".");
- return UmbracoConfig.For.UmbracoSettings().Content.DisallowedUploadFiles.Any(x => StringExtensions.InvariantEquals(x, extension)) == false;
+ var extension = Path.GetExtension(fileName).TrimStart(".");
+
+ return UmbracoConfig.For.UmbracoSettings().Content.IsFileAllowedForUpload(extension);
}
}
diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/ContentPickerPropertyConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/ContentPickerPropertyConverter.cs
index ca147698ec..9876868af1 100644
--- a/src/Umbraco.Web/PropertyEditors/ValueConverters/ContentPickerPropertyConverter.cs
+++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/ContentPickerPropertyConverter.cs
@@ -50,10 +50,12 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
///
public override bool IsConverter(PublishedPropertyType propertyType)
{
+ if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.ContentPicker2Alias))
+ return true;
+
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters)
{
- return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.ContentPickerAlias)
- || propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.ContentPicker2Alias);
+ return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.ContentPickerAlias);
}
return false;
}
@@ -106,25 +108,26 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
return null;
}
- if (UmbracoContext.Current != null)
+ if (UmbracoContext.Current == null) return source;
+
+ if ((propertyType.PropertyTypeAlias != null && PropertiesToExclude.Contains(propertyType.PropertyTypeAlias.ToLower(CultureInfo.InvariantCulture))) == false)
{
- if ((propertyType.PropertyTypeAlias != null && PropertiesToExclude.Contains(propertyType.PropertyTypeAlias.ToLower(CultureInfo.InvariantCulture))) == false)
+ IPublishedContent content;
+ if (source is int)
{
- IPublishedContent content;
- if (source is int)
- {
- var sourceInt = (int)source;
- content = UmbracoContext.Current.ContentCache.GetById(sourceInt);
- if(content != null)
- return content;
- }
- else
- {
- var sourceUdi = source as Udi;
- content = sourceUdi.ToPublishedContent();
- if (content != null)
- return content;
- }
+ var sourceInt = (int)source;
+ content = UmbracoContext.Current.ContentCache.GetById(sourceInt);
+ if(content != null)
+ return content;
+ }
+ else
+ {
+ var sourceUdi = source as Udi;
+ if (sourceUdi == null) return null;
+ var umbHelper = new UmbracoHelper(UmbracoContext.Current);
+ content = umbHelper.TypedContent(sourceUdi);
+ if (content != null)
+ return content;
}
}
return source;
diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyRelatedLinksEditorValueConvertor.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyRelatedLinksEditorValueConvertor.cs
index ee64bf6c15..df4a4356b6 100644
--- a/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyRelatedLinksEditorValueConvertor.cs
+++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyRelatedLinksEditorValueConvertor.cs
@@ -18,16 +18,12 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
[PropertyValueCache(PropertyCacheValue.All, PropertyCacheLevel.Content)]
public class LegacyRelatedLinksEditorValueConvertor : PropertyValueConverterBase
{
- private static readonly string[] MatchingEditors = {
- Constants.PropertyEditors.RelatedLinksAlias,
- Constants.PropertyEditors.RelatedLinks2Alias
- };
public override bool IsConverter(PublishedPropertyType propertyType)
{
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters == false)
{
- return MatchingEditors.Contains(propertyType.PropertyEditorAlias);
+ return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.RelatedLinksAlias);
}
return false;
}
@@ -42,37 +38,38 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
try
{
var obj = JsonConvert.DeserializeObject(sourceString);
+
//update the internal links if we have a context
- if (UmbracoContext.Current != null)
+ if (UmbracoContext.Current == null) return obj;
+
+ var helper = new UmbracoHelper(UmbracoContext.Current);
+ foreach (var a in obj)
{
- var helper = new UmbracoHelper(UmbracoContext.Current);
- foreach (var a in obj)
+ var type = a.Value("type");
+ if (type.IsNullOrWhiteSpace() == false)
{
- var type = a.Value("type");
- if (type.IsNullOrWhiteSpace() == false)
+ if (type == "internal")
{
- if (type == "internal")
+ switch (propertyType.PropertyEditorAlias)
{
- switch (propertyType.PropertyEditorAlias)
- {
- case Constants.PropertyEditors.RelatedLinksAlias:
- var intLinkId = a.Value("link");
- var intLink = helper.NiceUrl(intLinkId);
- a["link"] = intLink;
- break;
- case Constants.PropertyEditors.RelatedLinks2Alias:
- var strLinkId = a.Value("link");
- var udiAttempt = strLinkId.TryConvertTo();
- if (udiAttempt)
- {
- var content = udiAttempt.Result.ToPublishedContent();
- a["link"] = helper.NiceUrl(content.Id);
- }
- break;
- }
- }
+ case Constants.PropertyEditors.RelatedLinksAlias:
+ var intLinkId = a.Value("link");
+ var intLink = helper.NiceUrl(intLinkId);
+ a["link"] = intLink;
+ break;
+ case Constants.PropertyEditors.RelatedLinks2Alias:
+ var strLinkId = a.Value("link");
+ var udiAttempt = strLinkId.TryConvertTo();
+ if (udiAttempt)
+ {
+ var content = helper.TypedContent(udiAttempt.Result);
+ if (content == null) break;
+ a["link"] = helper.NiceUrl(content.Id);
+ }
+ break;
+ }
}
- }
+ }
}
return obj;
}
diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/MediaPickerPropertyConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/MediaPickerPropertyConverter.cs
index 4b3db67025..5f54363975 100644
--- a/src/Umbraco.Web/PropertyEditors/ValueConverters/MediaPickerPropertyConverter.cs
+++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/MediaPickerPropertyConverter.cs
@@ -12,6 +12,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using Umbraco.Core;
+using Umbraco.Core.Configuration;
using Umbraco.Core.Models;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.PropertyEditors;
@@ -122,7 +123,14 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
///
public override bool IsConverter(PublishedPropertyType propertyType)
{
- return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MediaPicker2Alias);
+ if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MediaPicker2Alias))
+ return true;
+
+ if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters)
+ {
+ return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MediaPickerAlias);
+ }
+ return false;
}
///
@@ -173,11 +181,13 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
var udis = (Udi[])source;
var mediaItems = new List();
+ if (UmbracoContext.Current == null) return source;
+ var helper = new UmbracoHelper(UmbracoContext.Current);
if (udis.Any())
{
foreach (var udi in udis)
{
- var item = udi.ToPublishedContent();
+ var item = helper.TypedMedia(udi);
if (item != null)
mediaItems.Add(item);
}
diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/MemberPickerPropertyConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/MemberPickerPropertyConverter.cs
index 4467c464f5..e89a5c1a09 100644
--- a/src/Umbraco.Web/PropertyEditors/ValueConverters/MemberPickerPropertyConverter.cs
+++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/MemberPickerPropertyConverter.cs
@@ -17,10 +17,12 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
{
public override bool IsConverter(PublishedPropertyType propertyType)
{
+ if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MemberPicker2Alias))
+ return true;
+
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters)
{
- return propertyType.PropertyEditorAlias.InvariantEquals(Constants.PropertyEditors.MemberPickerAlias)
- || propertyType.PropertyEditorAlias.InvariantEquals(Constants.PropertyEditors.MemberPicker2Alias);
+ return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MemberPickerAlias);
}
return false;
}
@@ -41,23 +43,22 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
if (source == null)
return null;
- if (UmbracoContext.Current != null)
+ if (UmbracoContext.Current == null) return source;
+
+ var umbracoHelper = new UmbracoHelper(UmbracoContext.Current);
+ IPublishedContent member;
+ if (source is int)
+ {
+ member = umbracoHelper.TypedMember((int)source);
+ if (member != null)
+ return member;
+ }
+ else
{
- IPublishedContent member;
- if (source is int)
- {
- var membershipHelper = new MembershipHelper(UmbracoContext.Current);
- member = membershipHelper.GetById((int)source);
- if (member != null)
- return member;
- }
- else
- {
- var sourceUdi = source as Udi;
- member = sourceUdi.ToPublishedContent();
- if (member != null)
- return member;
- }
+ var sourceUdi = source as Udi;
+ member = umbracoHelper.TypedMember(sourceUdi);
+ if (member != null)
+ return member;
}
return source;
diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiNodeTreePickerPropertyConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiNodeTreePickerPropertyConverter.cs
index c0c0321e91..249b7e0cac 100644
--- a/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiNodeTreePickerPropertyConverter.cs
+++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiNodeTreePickerPropertyConverter.cs
@@ -52,10 +52,12 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
///
public override bool IsConverter(PublishedPropertyType propertyType)
{
+ if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultiNodeTreePicker2Alias))
+ return true;
+
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters)
{
- return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultiNodeTreePickerAlias)
- || propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultiNodeTreePicker2Alias);
+ return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultiNodeTreePickerAlias);
}
return false;
}
@@ -119,68 +121,67 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
}
//TODO: Inject an UmbracoHelper and create a GetUmbracoHelper method based on either injected or singleton
- if (UmbracoContext.Current != null)
+ if (UmbracoContext.Current == null) return source;
+
+ var umbHelper = new UmbracoHelper(UmbracoContext.Current);
+
+ if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultiNodeTreePickerAlias))
{
- if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultiNodeTreePickerAlias))
+ var nodeIds = (int[])source;
+
+ if ((propertyType.PropertyTypeAlias != null && PropertiesToExclude.InvariantContains(propertyType.PropertyTypeAlias)) == false)
{
- var nodeIds = (int[])source;
+ var multiNodeTreePicker = new List();
- if ((propertyType.PropertyTypeAlias != null && PropertiesToExclude.InvariantContains(propertyType.PropertyTypeAlias)) == false)
+ var objectType = UmbracoObjectTypes.Unknown;
+
+ foreach (var nodeId in nodeIds)
{
- var multiNodeTreePicker = new List();
+ var multiNodeTreePickerItem =
+ GetPublishedContent(nodeId, ref objectType, UmbracoObjectTypes.Document, umbHelper.TypedContent)
+ ?? GetPublishedContent(nodeId, ref objectType, UmbracoObjectTypes.Media, umbHelper.TypedMedia)
+ ?? GetPublishedContent(nodeId, ref objectType, UmbracoObjectTypes.Member, umbHelper.TypedMember);
- if (nodeIds.Length > 0)
+ if (multiNodeTreePickerItem != null)
{
- var umbHelper = new UmbracoHelper(UmbracoContext.Current);
- var objectType = UmbracoObjectTypes.Unknown;
-
- foreach (var nodeId in nodeIds)
- {
- var multiNodeTreePickerItem =
- GetPublishedContent(nodeId, ref objectType, UmbracoObjectTypes.Document, umbHelper.TypedContent)
- ?? GetPublishedContent(nodeId, ref objectType, UmbracoObjectTypes.Media, umbHelper.TypedMedia)
- ?? GetPublishedContent(nodeId, ref objectType, UmbracoObjectTypes.Member, umbHelper.TypedMember);
-
- if (multiNodeTreePickerItem != null)
- {
- multiNodeTreePicker.Add(multiNodeTreePickerItem);
- }
- }
+ multiNodeTreePicker.Add(multiNodeTreePickerItem);
}
-
- return multiNodeTreePicker;
}
- // return the first nodeId as this is one of the excluded properties that expects a single id
- return nodeIds.FirstOrDefault();
+ return multiNodeTreePicker;
}
- if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultiNodeTreePicker2Alias))
+ // return the first nodeId as this is one of the excluded properties that expects a single id
+ return nodeIds.FirstOrDefault();
+ }
+
+ if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultiNodeTreePicker2Alias))
+ {
+ var udis = (Udi[])source;
+
+ if ((propertyType.PropertyTypeAlias != null && PropertiesToExclude.InvariantContains(propertyType.PropertyTypeAlias)) == false)
{
- var udis = (Udi[])source;
+ var multiNodeTreePicker = new List();
- if ((propertyType.PropertyTypeAlias != null && PropertiesToExclude.InvariantContains(propertyType.PropertyTypeAlias)) == false)
+ var objectType = UmbracoObjectTypes.Unknown;
+
+ foreach (var udi in udis)
{
- var multiNodeTreePicker = new List();
-
- if (udis.Length > 0)
+ var multiNodeTreePickerItem =
+ GetPublishedContent(udi, ref objectType, UmbracoObjectTypes.Document, umbHelper.TypedContent)
+ ?? GetPublishedContent(udi, ref objectType, UmbracoObjectTypes.Media, umbHelper.TypedMedia)
+ ?? GetPublishedContent(udi, ref objectType, UmbracoObjectTypes.Member, umbHelper.TypedMember);
+ if (multiNodeTreePickerItem != null)
{
- foreach (var udi in udis)
- {
- var item = udi.ToPublishedContent();
- if (item != null)
- {
- multiNodeTreePicker.Add(item);
- }
- }
+ multiNodeTreePicker.Add(multiNodeTreePickerItem);
}
-
- return multiNodeTreePicker;
}
- // return the first nodeId as this is one of the excluded properties that expects a single id
- return udis.FirstOrDefault();
+ return multiNodeTreePicker;
}
+
+ // return the first nodeId as this is one of the excluded properties that expects a single id
+ return udis.FirstOrDefault();
}
return source;
}
@@ -193,7 +194,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
/// The type of content expected/supported by
/// A function to fetch content of type
/// The requested content, or null if either it does not exist or does not match
- private IPublishedContent GetPublishedContent(int nodeId, ref UmbracoObjectTypes actualType, UmbracoObjectTypes expectedType, Func contentFetcher)
+ private IPublishedContent GetPublishedContent(T nodeId, ref UmbracoObjectTypes actualType, UmbracoObjectTypes expectedType, Func contentFetcher)
{
// is the actual type supported by the content fetcher?
if (actualType != UmbracoObjectTypes.Unknown && actualType != expectedType)
diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksEditorValueConvertor.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksEditorValueConvertor.cs
index b95644d9ca..67ff40fed4 100644
--- a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksEditorValueConvertor.cs
+++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksEditorValueConvertor.cs
@@ -53,10 +53,12 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
///
public override bool IsConverter(PublishedPropertyType propertyType)
{
+ if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.RelatedLinks2Alias))
+ return true;
+
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters)
{
- return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.RelatedLinksAlias)
- || propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.RelatedLinks2Alias);
+ return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.RelatedLinksAlias);
}
return false;
}
@@ -88,6 +90,10 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
var relatedLinksData = JsonConvert.DeserializeObject>(sourceString);
var relatedLinks = new List();
+ if (UmbracoContext.Current == null) return source;
+
+ var helper = new UmbracoHelper(UmbracoContext.Current);
+
foreach (var linkData in relatedLinksData)
{
var relatedLink = new RelatedLink
@@ -111,7 +117,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
var udiAttempt = strLinkId.TryConvertTo();
if (udiAttempt.Success)
{
- var content = udiAttempt.Result.ToPublishedContent();
+ var content = helper.TypedContent(udiAttempt.Result);
if (content != null)
{
relatedLink.Id = content.Id;
diff --git a/src/Umbraco.Web/PublishedCache/ContextualPublishedCache.cs b/src/Umbraco.Web/PublishedCache/ContextualPublishedCache.cs
index b5c3d850d2..8decd0100a 100644
--- a/src/Umbraco.Web/PublishedCache/ContextualPublishedCache.cs
+++ b/src/Umbraco.Web/PublishedCache/ContextualPublishedCache.cs
@@ -12,7 +12,11 @@ namespace Umbraco.Web.PublishedCache
/// Provides access to cached contents in a specified context.
///
public abstract class ContextualPublishedCache
- {
+ {
+ //TODO: We need to add:
+ //* GetById(Guid contentId)
+ //* GetById(UDI contentId)
+
protected readonly UmbracoContext UmbracoContext;
///
@@ -35,6 +39,18 @@ namespace Umbraco.Web.PublishedCache
return GetById(UmbracoContext.InPreviewMode, contentId);
}
+ ///
+ /// Gets a content identified by its unique identifier.
+ ///
+ /// The content unique identifier.
+ /// The content, or null.
+ /// Considers published or unpublished content depending on context.
+ public IPublishedContent GetById(Guid contentId)
+ {
+ var intId = UmbracoContext.Application.Services.EntityService.GetIdForKey(contentId, UmbracoObjectTypes.Document);
+ return GetById(intId.Success ? intId.Result : -1);
+ }
+
///
/// Gets a content identified by its unique identifier.
///
diff --git a/src/Umbraco.Web/PublishedContentQueryExtensions.cs b/src/Umbraco.Web/PublishedContentQueryExtensions.cs
new file mode 100644
index 0000000000..c40daf5e82
--- /dev/null
+++ b/src/Umbraco.Web/PublishedContentQueryExtensions.cs
@@ -0,0 +1,23 @@
+using System;
+using Umbraco.Core;
+using Umbraco.Core.Models;
+
+namespace Umbraco.Web
+{
+ public static class PublishedContentQueryExtensions
+ {
+ ///
+ /// Gets a content item from the cache
+ ///
+ ///
+ ///
+ ///
+ public static IPublishedContent TypedContent(this ITypedPublishedContentQuery contentQuery, Udi id)
+ {
+ var guidUdi = id as GuidUdi;
+ if (guidUdi == null)
+ throw new InvalidOperationException("UDIs for content items must be " + typeof(GuidUdi));
+ return contentQuery.TypedContent(guidUdi.Guid);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Umbraco.Web/Routing/PublishedContentRequestEngine.cs b/src/Umbraco.Web/Routing/PublishedContentRequestEngine.cs
index 05b6b0e468..afbfe1c4f6 100644
--- a/src/Umbraco.Web/Routing/PublishedContentRequestEngine.cs
+++ b/src/Umbraco.Web/Routing/PublishedContentRequestEngine.cs
@@ -17,13 +17,14 @@ using umbraco;
using umbraco.cms.businesslogic.web;
using umbraco.cms.businesslogic.language;
using umbraco.cms.businesslogic.member;
+using Umbraco.Core.Models;
using Umbraco.Core.Services;
using Umbraco.Web.Security;
using RenderingEngine = Umbraco.Core.RenderingEngine;
namespace Umbraco.Web.Routing
{
- internal class PublishedContentRequestEngine
+ internal class PublishedContentRequestEngine
{
private readonly PublishedContentRequest _pcr;
private readonly RoutingContext _routingContext;
@@ -518,51 +519,69 @@ namespace Umbraco.Web.Routing
const string tracePrefix = "FollowInternalRedirects: ";
if (_pcr.PublishedContent == null)
- throw new InvalidOperationException("There is no PublishedContent.");
+ throw new InvalidOperationException("There is no PublishedContent.");
+
+ // don't try to find a redirect if the property doesn't exist
+ if (_pcr.PublishedContent.HasProperty(Constants.Conventions.Content.InternalRedirectId) == false)
+ return false;
+
+ var redirect = false;
+ IPublishedContent internalRedirectNode = null;
+ var internalRedirectId =
+ _pcr.PublishedContent.GetPropertyValue(Constants.Conventions.Content.InternalRedirectId, -1);
+ var valueValid = false;
+ if (internalRedirectId > 0)
+ {
+ valueValid = true;
+ // Try and get the redirect node from a legacy integer ID
+ internalRedirectNode = _routingContext.UmbracoContext.ContentCache.GetById(internalRedirectId);
+ }
+ else
+ {
+ var udiInternalRedirectId =
+ _pcr.PublishedContent.GetPropertyValue(Constants.Conventions.Content.InternalRedirectId);
+ if (udiInternalRedirectId != null)
+ {
+ valueValid = true;
+ // Try and get the redirect node from a UDI Guid
+ internalRedirectNode =
+ _routingContext.UmbracoContext.ContentCache.GetById(udiInternalRedirectId.Guid);
+ }
+ }
+
+ if (valueValid == false)
+ {
+ // bad redirect - log and display the current page (legacy behavior)
+ ProfilingLogger
+ .Logger.Debug(
+ "{0}Failed to redirect, value of '{1}' is not an int nor a GuidUdi",
+ () => tracePrefix, () => Constants.Conventions.Content.InternalRedirectId);
+ }
- bool redirect = false;
- var internalRedirect = _pcr.PublishedContent.GetPropertyValue(Constants.Conventions.Content.InternalRedirectId);
+ if (internalRedirectNode == null)
+ {
+ ProfilingLogger.Logger.Debug(
+ "{0}Failed to redirect, value of '{1}' does not lead to a published document", () => tracePrefix,
+ () => Constants.Conventions.Content.InternalRedirectId);
+ }
+ else if (internalRedirectNode.Id == _pcr.PublishedContent.Id)
+ {
+ // redirect to self
+ ProfilingLogger.Logger.Debug("{0}Redirecting to self, ignore",
+ () => tracePrefix);
+ }
+ else
+ {
+ // Redirect to another page
+ _pcr.SetInternalRedirectPublishedContent(internalRedirectNode);
+ redirect = true;
+ ProfilingLogger.Logger.Debug("{0}Redirecting to id={1}", () => tracePrefix,
+ () => internalRedirectNode.Id);
+ }
- if (string.IsNullOrWhiteSpace(internalRedirect) == false)
- {
- ProfilingLogger.Logger.Debug("{0}Found umbracoInternalRedirectId={1}", () => tracePrefix, () => internalRedirect);
-
- int internalRedirectId;
- if (int.TryParse(internalRedirect, out internalRedirectId) == false)
- internalRedirectId = -1;
-
- if (internalRedirectId <= 0)
- {
- // bad redirect - log and display the current page (legacy behavior)
- //_pcr.Document = null; // no! that would be to force a 404
- ProfilingLogger.Logger.Debug("{0}Failed to redirect to id={1}: invalid value", () => tracePrefix, () => internalRedirect);
- }
- else if (internalRedirectId == _pcr.PublishedContent.Id)
- {
- // redirect to self
- ProfilingLogger.Logger.Debug("{0}Redirecting to self, ignore", () => tracePrefix);
- }
- else
- {
- // redirect to another page
- var node = _routingContext.UmbracoContext.ContentCache.GetById(internalRedirectId);
-
- if (node != null)
- {
- _pcr.SetInternalRedirectPublishedContent(node); // don't use .PublishedContent here
- redirect = true;
- ProfilingLogger.Logger.Debug("{0}Redirecting to id={1}", () => tracePrefix, () => internalRedirectId);
- }
- else
- {
- ProfilingLogger.Logger.Debug("{0}Failed to redirect to id={1}: no such published document", () => tracePrefix, () => internalRedirectId);
- }
- }
- }
-
- return redirect;
+ return redirect;
}
-
+
///
/// Ensures that access to current node is permitted.
///
@@ -719,16 +738,31 @@ namespace Umbraco.Web.Routing
/// As per legacy, if the redirect does not work, we just ignore it.
private void FollowExternalRedirect()
{
- if (_pcr.HasPublishedContent == false) return;
+ if (_pcr.HasPublishedContent == false) return;
+
+ // don't try to find a redirect if the property doesn't exist
+ if (_pcr.PublishedContent.HasProperty(Constants.Conventions.Content.Redirect) == false)
+ return;
+
+ var redirectId = _pcr.PublishedContent.GetPropertyValue(Constants.Conventions.Content.Redirect, -1);
- var redirectId = _pcr.PublishedContent.GetPropertyValue(Constants.Conventions.Content.Redirect, -1);
var redirectUrl = "#";
if (redirectId > 0)
- redirectUrl = _routingContext.UrlProvider.GetUrl(redirectId);
+ {
+ redirectUrl = _routingContext.UrlProvider.GetUrl(redirectId);
+ }
+ else
+ {
+ // might be a UDI instead of an int Id
+ var redirectUdi = _pcr.PublishedContent.GetPropertyValue(Constants.Conventions.Content.Redirect);
+ if (redirectUdi != null)
+ redirectUrl = _routingContext.UrlProvider.GetUrl(redirectUdi.Guid);
+ }
if (redirectUrl != "#")
+ {
_pcr.SetRedirect(redirectUrl);
+ }
}
-
#endregion
}
}
diff --git a/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs b/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs
index bf49e335f6..24359d2b50 100644
--- a/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs
+++ b/src/Umbraco.Web/Scheduling/ScheduledPublishing.cs
@@ -88,6 +88,22 @@ namespace Umbraco.Web.Scheduling
}
var result = await wc.SendAsync(request, token);
+ var content = await result.Content.ReadAsStringAsync();
+
+ if (result.IsSuccessStatusCode)
+ {
+ LogHelper.Debug(
+ () => string.Format(
+ "Request successfully sent to url = \"{0}\". ", url));
+ }
+ else
+ {
+ var msg = string.Format(
+ "Request failed with status code \"{0}\". Request content = \"{1}\".",
+ result.StatusCode, content);
+ var ex = new HttpRequestException(msg);
+ LogHelper.Error(msg, ex);
+ }
}
}
catch (Exception e)
diff --git a/src/Umbraco.Web/Security/Identity/ExternalSignInAutoLinkOptions.cs b/src/Umbraco.Web/Security/Identity/ExternalSignInAutoLinkOptions.cs
index 832f0b3a30..3f8a1480a4 100644
--- a/src/Umbraco.Web/Security/Identity/ExternalSignInAutoLinkOptions.cs
+++ b/src/Umbraco.Web/Security/Identity/ExternalSignInAutoLinkOptions.cs
@@ -10,7 +10,7 @@ namespace Umbraco.Web.Security.Identity
///
/// Options used to configure auto-linking external OAuth providers
///
- public sealed class ExternalSignInAutoLinkOptions
+ public class ExternalSignInAutoLinkOptions
{
public ExternalSignInAutoLinkOptions(
bool autoLinkExternalAccount = false,
diff --git a/src/Umbraco.Web/Trees/TemplatesTreeController.cs b/src/Umbraco.Web/Trees/TemplatesTreeController.cs
index b92e79fe7b..3869f58a2a 100644
--- a/src/Umbraco.Web/Trees/TemplatesTreeController.cs
+++ b/src/Umbraco.Web/Trees/TemplatesTreeController.cs
@@ -21,7 +21,7 @@ namespace Umbraco.Web.Trees
{
[UmbracoTreeAuthorize(Constants.Trees.Templates)]
[LegacyBaseTree(typeof (loadTemplates))]
- [Tree(Constants.Applications.Settings, Constants.Trees.Templates, "Templates", sortOrder:1)]
+ [Tree(Constants.Applications.Settings, Constants.Trees.Templates, null, sortOrder:1)]
[PluginController("UmbracoTrees")]
[CoreTree]
public class TemplatesTreeController : TreeController
diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj
index d3e31fa366..9aaab32af9 100644
--- a/src/Umbraco.Web/Umbraco.Web.csproj
+++ b/src/Umbraco.Web/Umbraco.Web.csproj
@@ -116,8 +116,8 @@
..\packages\dotless.1.5.2\lib\dotless.Core.dll
-
- ..\packages\Examine.0.1.82\lib\net45\Examine.dll
+
+ ..\packages\Examine.0.1.83\lib\net45\Examine.dllTrue
@@ -412,6 +412,7 @@
+
diff --git a/src/Umbraco.Web/UmbracoHelper.cs b/src/Umbraco.Web/UmbracoHelper.cs
index 5befbda7cf..6f3da17254 100644
--- a/src/Umbraco.Web/UmbracoHelper.cs
+++ b/src/Umbraco.Web/UmbracoHelper.cs
@@ -17,7 +17,6 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web.Mvc;
-using System.Web.Routing;
using Umbraco.Core.Cache;
namespace Umbraco.Web
@@ -38,6 +37,7 @@ namespace Umbraco.Web
private MembershipHelper _membershipHelper;
private TagQuery _tag;
private IDataTypeService _dataTypeService;
+ private IEntityService _entityService;
private UrlProvider _urlProvider;
private ICultureDictionary _cultureDictionary;
@@ -113,6 +113,14 @@ namespace Umbraco.Web
get { return _dataTypeService ?? (_dataTypeService = UmbracoContext.Application.Services.DataTypeService); }
}
+ ///
+ /// Lazy instantiates the IEntityService
+ ///
+ private IEntityService EntityService
+ {
+ get { return _entityService ?? (_entityService = UmbracoContext.Application.Services.EntityService); }
+ }
+
///
/// Lazy instantiates the IUmbracoComponentRenderer if not specified in the constructor
///
@@ -527,11 +535,23 @@ namespace Umbraco.Web
public string UrlAbsolute(int contentId)
{
return UrlProvider.GetUrl(contentId, true);
+ }
+
+ #endregion
+
+ #region Members
+
+ public IPublishedContent TypedMember(Udi id)
+ {
+ var guidUdi = id as GuidUdi;
+ if (guidUdi == null) return null;
+ return TypedMember(guidUdi.Guid);
}
- #endregion
-
- #region Members
+ public IPublishedContent TypedMember(Guid id)
+ {
+ return MembershipHelper.GetByProviderKey(id);
+ }
public IPublishedContent TypedMember(object id)
{
@@ -593,6 +613,9 @@ namespace Umbraco.Web
Guid guidId;
if (ConvertIdObjectToGuid(id, out guidId))
return ContentQuery.TypedContent(guidId);
+ Udi udiId;
+ if (ConvertIdObjectToUdi(id, out udiId))
+ return ContentQuery.TypedContent(udiId);
return null;
}
@@ -615,6 +638,16 @@ namespace Umbraco.Web
{
return ContentQuery.TypedContent(id);
}
+
+ ///
+ /// Gets a content item from the cache
+ ///
+ ///
+ ///
+ public IPublishedContent TypedContent(Udi id)
+ {
+ return ContentQuery.TypedContent(id);
+ }
///
/// Gets a content item from the cache.
@@ -907,6 +940,22 @@ namespace Umbraco.Web
return false;
}
+ private static bool ConvertIdObjectToUdi(object id, out Udi guidId)
+ {
+ var s = id as string;
+ if (s != null)
+ {
+ return Udi.TryParse(s, out guidId);
+ }
+ if (id is Udi)
+ {
+ guidId = (Udi)id;
+ return true;
+ }
+ guidId = null;
+ return false;
+ }
+
private static bool ConvertIdsObjectToInts(IEnumerable
/// The text to create a hash from
- /// Md5 has of the string
+ /// Md5 hash of the string
+ [Obsolete("Please use the CreateHash method instead. This may be removed in future versions")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static string md5(string text)
{
- return text.ToMd5();
+ return text.ToMd5();
+ }
+
+ ///
+ /// Generates a hash based on the text string passed in. This method will detect the
+ /// security requirements (is FIPS enabled) and return an appropriate hash.
+ ///
+ /// The text to create a hash from
+ /// hash of the string
+ public static string CreateHash(string text)
+ {
+ return text.GenerateHash();
}
///
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadRelationTypes.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadRelationTypes.cs
index d94ff6942e..a173926257 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadRelationTypes.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadRelationTypes.cs
@@ -89,7 +89,7 @@ namespace umbraco
/// the 'Relation Types' root node
protected override void CreateRootNode(ref XmlTreeNode rootNode)
{
- rootNode.Text = "Relation Types";
+ //rootNode.Text = "Relation Types";
rootNode.Icon = BaseTree.FolderIcon;
rootNode.OpenIcon = BaseTree.FolderIconOpen;
rootNode.NodeType = this.TreeAlias; // (Was prefixed with init)
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasksBase.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasksBase.cs
index abb1299507..9f810c01b8 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasksBase.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasksBase.cs
@@ -46,7 +46,7 @@ namespace umbraco
fileName += ".cshtml";
}
- var model = new PartialView(fileName);
+ var model = new PartialView(IsPartialViewMacro ? PartialViewType.PartialViewMacro : PartialViewType.PartialView, fileName);
var fileService = (FileService)ApplicationContext.Current.Services.FileService;
var macroService = ApplicationContext.Current.Services.MacroService;
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Macros/editMacro.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Macros/editMacro.aspx.cs
index b40515578b..73800ca117 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Macros/editMacro.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Macros/editMacro.aspx.cs
@@ -88,6 +88,7 @@ namespace umbraco.cms.presentation.developer
{
macroName.Text = macro.Name;
macroAlias.Text = macro.Alias;
+ macroKey.Text = macro.Key.ToString();
macroXslt.Text = macro.XsltPath;
macroPython.Text = macro.ScriptPath;
cachePeriod.Text = macro.CacheDuration.ToInvariantString();
@@ -209,7 +210,7 @@ namespace umbraco.cms.presentation.developer
}
protected IEnumerable GetMacroParameterEditors()
- {
+ {
// we need to show the depracated ones for backwards compatibility
return ParameterEditorResolver.Current.GetParameterEditors(true);
}
@@ -433,14 +434,23 @@ namespace umbraco.cms.presentation.developer
///
protected global::System.Web.UI.WebControls.TextBox macroAlias;
- ///
- /// Pane1_2 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.Pane Pane1_2;
+ ///
+ /// macroAlias control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label macroKey;
+
+ ///
+ /// Pane1_2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.Pane Pane1_2;
///
/// macroXslt control.
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx
index 270e58fd19..b66388d3a0 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx
@@ -117,7 +117,7 @@
Remember: .xslt and .ascx files for your macros
- will be added automaticly, but you will still need to add assemblies,
+ will be added automatically, but you will still need to add assemblies,
images and script files manually to the list below.
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installer.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installer.aspx.cs
index bdcbfaa775..a9bf7b5e43 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installer.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installer.aspx.cs
@@ -134,7 +134,7 @@ namespace umbraco.presentation.developer.packages
protected void fetchProtectedPackage(object sender, EventArgs e)
{
//we auth against the webservice. This key will be used to fetch the protected package.
- string memberGuid = _repo.Webservice.authenticate(tb_email.Text, library.md5(tb_password.Text));
+ string memberGuid = _repo.Webservice.authenticate(tb_email.Text, library.CreateHash(tb_password.Text));
//if we auth correctly and get a valid key back, we will fetch the file from the repo webservice.
if (string.IsNullOrEmpty(memberGuid) == false)
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/GzipCompressor.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/GzipCompressor.cs
index d03dca1d6d..c9df806242 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/GzipCompressor.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/GzipCompressor.cs
@@ -12,6 +12,7 @@ using System.IO;
using System.IO.Compression;
using System.Security.Cryptography;
using System.Text;
+using Umbraco.Core;
namespace umbraco.presentation.plugins.tinymce3
{
@@ -91,7 +92,7 @@ namespace umbraco.presentation.plugins.tinymce3
key += item.Data;
}
- key = MD5(key);
+ key = Hash(key);
if (this.NoCompression) {
this.SendPlainText(key, to_stream);
return;
@@ -224,12 +225,10 @@ namespace umbraco.presentation.plugins.tinymce3
}
}
- private string MD5(string str) {
- MD5 md5 = new MD5CryptoServiceProvider();
- byte[] result = md5.ComputeHash(Encoding.ASCII.GetBytes(str));
- str = BitConverter.ToString(result);
+ private string Hash(string str)
+ {
+ return str.GenerateHash();
- return str.Replace("-", "");
}
#endregion
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx
index 815a420f88..75b5d6e66a 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx
@@ -1,5 +1,5 @@
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../masterpages/umbracoPage.Master" CodeBehind="PermissionEditor.aspx.cs" Inherits="umbraco.cms.presentation.user.PermissionEditor" %>
-
+<%@ Import Namespace="Umbraco.Web" %>
<%@ Register Src="../controls/Tree/TreeControl.ascx" TagName="TreeControl" TagPrefix="umbraco" %>
<%@ Register Src="NodePermissions.ascx" TagName="NodePermissions" TagPrefix="user" %>
<%@ Register TagPrefix="ui" Namespace="umbraco.uicontrols" Assembly="controls" %>
@@ -27,7 +27,7 @@