Verified Commit a3c0a51b authored by Dave Long's avatar Dave Long
Browse files

task: #3340978 Remove uses of “illegal” from core

By: schlaukopf
By: xjm
By: quietone
By: ghost of drupal past
By: dcam
By: dww
(cherry picked from commit 5d2be21b)
parent 0fe642ba
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@
      "e-mail",
      "grey",
      "hte",
      "illegal",
      "ist",
      "please",
      "queuing",
+2 −2
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@
 * there is no language-specific override for a character, the generic
 * transliteration character tables are searched (see
 * PhpTransliteration::readGenericData()). If looking up the character in the
 * generic table results in a NULL value, or an illegal character is
 * generic table results in a NULL value, or an invalid character is
 * encountered, then a substitute character is returned.
 *
 * Some parts of this code were derived from the MediaWiki project's UtfNormal
@@ -184,7 +184,7 @@ public function transliterate($string, $langcode = 'en', $unknown_character = '?
   *   A single UTF-8 character.
   *
   * @return int
   *   The character code, or -1 if an illegal character is found.
   *   The character code, or -1 if an invalid character is found.
   */
  protected static function ordUTF8($character) {
    $first_byte = ord($character[0]);
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ public static function create(ContainerInterface $container) {
   * entity type property 'enable_page_title_template'.
   * - FALSE (default): use the output of the related field formatter if it
   *   exists. This approach only works correctly for the node entity type and
   *   with the 'string' formatter. In other cases it likely produces illegal
   *   with the 'string' formatter. In other cases it likely produces invalid
   *   markup and possibly incorrect display. This option has been retained for
   *   backward-compatibility to support sites that expect attributes set on
   *   the field to propagate to the page title.
+1 −2
Original line number Diff line number Diff line
@@ -117,8 +117,7 @@ public function conditionAggregateGroupFactory($conjunction = 'AND');
   * @param string $field
   *   The name of a field.
   * @param string $function
   *   The aggregate function. This is only marked optional for interface
   *   compatibility, it is illegal to leave it out.
   *   The aggregate function.
   * @param string $direction
   *   The order of sorting, either DESC for descending of ASC for ascending.
   * @param string $langcode
+5 −5
Original line number Diff line number Diff line
@@ -2067,7 +2067,7 @@ protected function getSharedTableFieldSchema(FieldStorageDefinitionInterface $st

    // Check that the schema does not include forbidden column names.
    if (array_intersect(array_keys($field_schema['columns']), $table_mapping->getReservedColumns())) {
      throw new FieldException("Illegal field column names on {$storage_definition->getName()}");
      throw new FieldException("Reserved field column names on {$storage_definition->getName()}");
    }

    $field_name = $storage_definition->getName();
@@ -2089,15 +2089,15 @@ protected function getSharedTableFieldSchema(FieldStorageDefinitionInterface $st
      if ($initial_value_field_name = $storage_definition->getInitialValueFromField()) {
        // Check that the field used for populating initial values is valid.
        if (!isset($this->fieldStorageDefinitions[$initial_value_field_name])) {
          throw new FieldException("Illegal initial value definition on {$storage_definition->getName()}: The field $initial_value_field_name does not exist.");
          throw new FieldException("Invalid initial value definition on {$storage_definition->getName()}: The field $initial_value_field_name does not exist.");
        }

        if ($storage_definition->getType() !== $this->fieldStorageDefinitions[$initial_value_field_name]->getType()) {
          throw new FieldException("Illegal initial value definition on {$storage_definition->getName()}: The field types do not match.");
          throw new FieldException("Invalid initial value definition on {$storage_definition->getName()}: The field types do not match.");
        }

        if (!$table_mapping->allowsSharedTableStorage($this->fieldStorageDefinitions[$initial_value_field_name])) {
          throw new FieldException("Illegal initial value definition on {$storage_definition->getName()}: Both fields have to be stored in the shared entity tables.");
          throw new FieldException("Invalid initial value definition on {$storage_definition->getName()}: Both fields have to be stored in the shared entity tables.");
        }

        $initial_value_from_field = $table_mapping->getColumnNames($initial_value_field_name);
@@ -2334,7 +2334,7 @@ protected function getDedicatedTableSchema(FieldStorageDefinitionInterface $stor
    $properties = $storage_definition->getPropertyDefinitions();
    $table_mapping = $this->getTableMapping($entity_type, [$storage_definition]);
    if (array_intersect(array_keys($schema['columns']), $table_mapping->getReservedColumns())) {
      throw new FieldException("Illegal field column names on {$storage_definition->getName()}");
      throw new FieldException("Reserved field column names on {$storage_definition->getName()}");
    }

    // Add field columns.
Loading