Skip to content

Commit

Permalink
Merge pull request #6 from M1r1k/master
Browse files Browse the repository at this point in the history
#1 | Push latest D8 master to current repo
  • Loading branch information
podarok committed Nov 2, 2014
2 parents ea2f2f2 + f36c465 commit 85ea0f4
Show file tree
Hide file tree
Showing 616 changed files with 10,066 additions and 4,471 deletions.
339 changes: 339 additions & 0 deletions drupal/LICENSE.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion drupal/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"symfony/serializer": "2.5.*",
"symfony/validator": "2.5.*",
"symfony/yaml": "dev-master#499f7d7aa96747ad97940089bd7a1fb24ad8182a",
"twig/twig": "1.15.*",
"twig/twig": "1.16.*",
"doctrine/common": "dev-master#a45d110f71c323e29f41eb0696fa230e3fa1b1b5",
"doctrine/annotations": "1.2.*",
"guzzlehttp/guzzle": "~5.0",
Expand Down
14 changes: 7 additions & 7 deletions drupal/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

146 changes: 137 additions & 9 deletions drupal/core/config/schema/core.data_types.schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -414,14 +414,19 @@ core.date_format.*:
type: string
label: 'Default language'

# Schema for the String field type.
# Schema for the configuration of the String field type.

field.string.storage_settings:
type: mapping
label: 'String settings'
mapping:
max_length:
type: integer
label: 'Maximum length'

field.string.field_settings:
type: sequence
label: 'String settings'
sequence:
- type: string
label: 'Setting'

field.string.value:
type: sequence
Expand All @@ -434,7 +439,127 @@ field.string.value:
type: string
label: 'Value'

# Schema for the configuration files of the Boolean field type.
# Schema for the configuration of the String (long) field type.

field.string_long.storage_settings:
type: field.string.storage_settings
label: 'String (long) settings'

field.string_long.field_settings:
type: field.string.field_settings
label: 'String (long) settings'

field.string_long.value:
type: sequence
label: 'Default value'
sequence:
- type: mapping
label: 'Default'
mapping:
value:
type: text
label: 'Value'

# Schema for the configuration of the URI field type.

field.uri.storage_settings:
type: mapping
label: 'URI settings'
mapping:
max_length:
type: integer
label: 'Maximum length'

field.uri.field_settings:
type: sequence
label: 'URI settings'

field.uri.value:
type: sequence
label: 'Default value'
sequence:
- type: mapping
label: 'Default'
mapping:
value:
type: string
label: 'Value'

# Schema for the configuration of the Created field type.

field.created.storage_settings:
type: sequence
label: 'Created timestamp settings'

field.created.field_settings:
type: sequence
label: 'Created timestamp settings'

field.created.value:
type: sequence
label: 'Default value'
sequence:
- type: mapping
label: 'Default'
mapping:
value:
type: integer
label: 'Value'

# Schema for the configuration of the Changed field type.

field.changed.storage_settings:
type: sequence
label: 'Changed timestamp settings'

field.changed.field_settings:
type: sequence
label: 'Changed timestamp settings'

field.changed.value:
type: sequence
label: 'Default value'
sequence:
- type: mapping
label: 'Default'
mapping:
value:
type: integer
label: 'Value'

# Schema for the configuration of the Entity reference field type.

field.entity_reference.storage_settings:
type: mapping
label: 'Entity reference settings'
mapping:
target_type:
type: string
label: 'Type of item to reference'

field.entity_reference.field_settings:
type: mapping
label: 'Entity reference settings'
mapping:
handler:
type: string
label: 'Reference method'
handler_settings:
type: entity_reference.[%parent.handler].handler_settings
label: 'Reference method settings'

field.entity_reference.value:
type: sequence
label: 'Default value'
sequence:
- type: mapping
label: 'Default'
mapping:
target_id:
type: integer
label: 'Value'

# Schema for the configuration of the Boolean field type.

field.boolean.storage_settings:
type: mapping
Expand All @@ -449,8 +574,7 @@ field.boolean.storage_settings:

field.boolean.field_settings:
label: 'Boolean settings'
type: mapping
mapping: { }
type: sequence

field.boolean.value:
type: sequence
Expand All @@ -463,7 +587,7 @@ field.boolean.value:
type: integer
label: 'Value'

# Schema for the configuration files of the Email field type.
# Schema for the configuration of the Email field type.

field.email.storage_settings:
type: sequence
Expand All @@ -489,7 +613,7 @@ field.email.value:
type: email
label: 'Value'

# Schema for configuration files of a numeric field types.
# Schema for the configuration of the Integer field type.

field.integer.storage_settings:
type: sequence
Expand Down Expand Up @@ -526,6 +650,8 @@ field.integer.value:
type: integer
label: 'Value'

# Schema for the configuration of the Decimal field type.

field.decimal.storage_settings:
type: mapping
label: 'Decimal settings'
Expand Down Expand Up @@ -565,6 +691,8 @@ field.decimal.value:
type: float
label: 'Value'

# Schema for the configuration of the Float field type.

field.float.storage_settings:
type: sequence
label: 'Float settings'
Expand Down
8 changes: 3 additions & 5 deletions drupal/core/core.services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -655,12 +655,10 @@ services:
arguments: ['@controller_resolver', '@title_resolver', '@render_html_renderer']
controller.ajax:
class: Drupal\Core\Controller\AjaxController
arguments: ['@controller_resolver', '@ajax_response_renderer']
arguments: ['@controller_resolver', '@element_info']
controller.dialog:
class: Drupal\Core\Controller\DialogController
arguments: ['@controller_resolver', '@title_resolver']
ajax_response_renderer:
class: Drupal\Core\Ajax\AjaxResponseRenderer
router_listener:
class: Symfony\Component\HttpKernel\EventListener\RouterListener
tags:
Expand All @@ -672,7 +670,7 @@ services:
class: Drupal\Core\EventSubscriber\ViewSubscriber
tags:
- { name: event_subscriber }
arguments: ['@content_negotiation', '@title_resolver', '@ajax_response_renderer']
arguments: ['@content_negotiation', '@title_resolver']
html_view_subscriber:
class: Drupal\Core\EventSubscriber\HtmlViewSubscriber
tags:
Expand Down Expand Up @@ -774,7 +772,7 @@ services:
class: Drupal\Core\EventSubscriber\DefaultExceptionHtmlSubscriber
tags:
- { name: event_subscriber }
arguments: ['@html_fragment_renderer', '@html_page_renderer']
arguments: ['@http_kernel', '@logger.channel.php']
exception.default:
class: Drupal\Core\EventSubscriber\DefaultExceptionSubscriber
tags:
Expand Down
20 changes: 17 additions & 3 deletions drupal/core/includes/common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ use Drupal\Core\Session\AnonymousUserSession;
*
* Correct:
* @code
* $my_substring = drupal_substr($original_string, 0, 5);
* $my_substring = Unicode::substr($original_string, 0, 5);
* @endcode
*
* @}
Expand Down Expand Up @@ -2869,6 +2869,19 @@ function drupal_render(&$elements, $is_root_call = FALSE) {

// Assume that if #theme is set it represents an implemented hook.
$theme_is_implemented = isset($elements['#theme']);
// Check the elements for insecure HTML and pass through sanitization.
if (isset($elements)) {
$markup_keys = array(
'#description',
'#field_prefix',
'#field_suffix',
);
foreach ($markup_keys as $key) {
if (!empty($elements[$key]) && is_scalar($elements[$key])) {
$elements[$key] = SafeMarkup::checkAdminXss($elements[$key]);
}
}
}

// Call the element's #theme function if it is set. Then any children of the
// element have to be rendered there. If the internal #render_children
Expand Down Expand Up @@ -2950,8 +2963,9 @@ function drupal_render(&$elements, $is_root_call = FALSE) {
// with how render cached output gets stored. This ensures that
// #post_render_cache callbacks get the same data to work with, no matter if
// #cache is disabled, #cache is enabled, there is a cache hit or miss.
$prefix = isset($elements['#prefix']) ? $elements['#prefix'] : '';
$suffix = isset($elements['#suffix']) ? $elements['#suffix'] : '';
$prefix = isset($elements['#prefix']) ? SafeMarkup::checkAdminXss($elements['#prefix']) : '';
$suffix = isset($elements['#suffix']) ? SafeMarkup::checkAdminXss($elements['#suffix']) : '';

$elements['#markup'] = $prefix . $elements['#children'] . $suffix;

// We've rendered this element (and its subtree!), now update the stack.
Expand Down
17 changes: 15 additions & 2 deletions drupal/core/includes/file.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* API for handling file uploads and server file management.
*/

use Drupal\Component\Utility\Unicode;
use Drupal\Component\Utility\UrlHelper;
use Drupal\Component\PhpStorage\FileStorage;
use Drupal\Component\Utility\Bytes;
Expand Down Expand Up @@ -316,13 +317,25 @@ function file_create_url($uri) {
// HTTP and to https://example.com/bar.jpg when viewing a HTTPS page)
// Both types of relative URIs are characterized by a leading slash, hence
// we can use a single check.
if (drupal_substr($uri, 0, 1) == '/') {
if (Unicode::substr($uri, 0, 1) == '/') {
return $uri;
}
else {
// If this is not a properly formatted stream, then it is a shipped file.
// Therefore, return the urlencoded URI with the base URL prepended.
return $GLOBALS['base_url'] . '/' . UrlHelper::encodePath($uri);
$options = UrlHelper::parse($uri);
$path = $GLOBALS['base_url'] . '/' . UrlHelper::encodePath($options['path']);
// Append the query.
if ($options['query']) {
$path .= '?' . UrlHelper::buildQuery($options['query']);
}

// Append fragment.
if ($options['fragment']) {
$path .= '#' . $options['fragment'];
}

return $path;
}
}
elseif ($scheme == 'http' || $scheme == 'https' || $scheme == 'data') {
Expand Down
24 changes: 0 additions & 24 deletions drupal/core/includes/form.inc
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,6 @@ use Drupal\Core\Render\Element;
use Drupal\Core\Template\Attribute;
use Symfony\Component\HttpFoundation\RedirectResponse;

/**
* Fetches a form from the cache.
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
* Use \Drupal::formBuilder()->getCache().
*
* @see \Drupal\Core\Form\FormCacheInterface::getCache().
*/
function form_get_cache($form_build_id, FormStateInterface $form_state) {
return \Drupal::formBuilder()->getCache($form_build_id, $form_state);
}

/**
* Stores a form in the cache.
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
* Use \Drupal::formBuilder()->setCache().
*
* @see \Drupal\Core\Form\FormCacheInterface::setCache().
*/
function form_set_cache($form_build_id, $form, FormStateInterface $form_state) {
\Drupal::formBuilder()->setCache($form_build_id, $form, $form_state);
}

/**
* Retrieves, populates, and processes a form.
*
Expand Down
Loading

0 comments on commit 85ea0f4

Please sign in to comment.