<commit_before>/**
 * @ngdoc controller
 * @name Umbraco.Editors.Content.CreateController
 * @function
 * 
 * @description
 * The controller for the content creation dialog
 */
function contentCreateController($scope,
    $routeParams,
    contentTypeResource,
    iconHelper,
    $location,
    navigationService,
    blueprintConfig,
    authResource,
    contentResource,
    $q) {

    var mainCulture = $routeParams.mculture ? $routeParams.mculture : null;

    function initialize() {
        $scope.loading = true;
        $scope.allowedTypes = null;
        $scope.countTypes = contentTypeResource.getCount;
        
        var getAllowedTypes = contentTypeResource.getAllowedTypes($scope.currentNode.id).then(function (data) {
            $scope.allowedTypes = iconHelper.formatContentTypeIcons(data);
        });
        var getCurrentUser = authResource.getCurrentUser().then(function (currentUser) {
            if (currentUser.allowedSections.indexOf("settings") > -1) {
                $scope.hasSettingsAccess = true;
                if ($scope.currentNode.id > -1) {
                    contentResource.getById($scope.currentNode.id).then(function (data) {
                        $scope.contentTypeId = data.contentTypeId;
                    });
                }
            }
        });

        $q.all([getAllowedTypes, getCurrentUser]).then(function() {
            $scope.loading = false;
        });

        $scope.selectContentType = true;
        $scope.selectBlueprint = false;
        $scope.allowBlank = blueprintConfig.allowBlank;
    }

    function close() {
        navigationService.hideMenu();<commit_msg>Fix the create dialog on empty installs<commit_after>/**
 * @ngdoc controller
 * @name Umbraco.Editors.Content.CreateController
 * @function
 * 
 * @description
 * The controller for the content creation dialog
 */
function contentCreateController($scope,
    $routeParams,
    contentTypeResource,
    iconHelper,
    $location,
    navigationService,
    blueprintConfig,
    authResource,
    contentResource,
    $q) {

    var mainCulture = $routeParams.mculture ? $routeParams.mculture : null;

    function initialize() {
        $scope.loading = true;
        $scope.allowedTypes = null;
        
        var getAllowedTypes = contentTypeResource.getAllowedTypes($scope.currentNode.id).then(function (data) {
            $scope.allowedTypes = iconHelper.formatContentTypeIcons(data);
            if ($scope.allowedTypes.length === 0) {
                contentTypeResource.getCount().then(function(count) {
                    $scope.countTypes = count;
                });
            }
        });
        var getCurrentUser = authResource.getCurrentUser().then(function (currentUser) {
            if (currentUser.allowedSections.indexOf("settings") > -1) {
                $scope.hasSettingsAccess = true;
                if ($scope.currentNode.id > -1) {
                    contentResource.getById($scope.currentNode.id).then(function (data) {
                        $scope.contentTypeId = data.contentTypeId;
                    });
                }
            }
        });

        $q.all([getAllowedTypes, getCurrentUser]).then(function() {
            $scope.loading = false;
        });

        $scope.selectContentType = true;
        $scope.selectBlueprint = false;
        $scope.allowBlank = blueprintConfig.allowBlank;
    }

    function close() {
        navigationService.hideMenu();
{'fraction_non_alphanumeric': 0.10934336129592132, 'fraction_numerical': 0.0014463407578825572, 'mean_word_length': 2.240862230552952, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7061233', 'n_tokens_mistral': 921, 'n_tokens_neox': 900, 'n_words': 155}