diff --git a/core/lib/Drupal/Core/Path/AliasStorage.php b/core/lib/Drupal/Core/Path/AliasStorage.php index a02bc35..c8d3bdb 100644 --- a/core/lib/Drupal/Core/Path/AliasStorage.php +++ b/core/lib/Drupal/Core/Path/AliasStorage.php @@ -324,13 +324,16 @@ public function languageAliasExists() { /** * {@inheritdoc} */ - public function getAliasesForAdminListing($header, $keys = NULL) { + public function getPathsForAdminListing($header, $keys = NULL) { $query = $this->connection->select(static::TABLE) ->extend('Drupal\Core\Database\Query\PagerSelectExtender') ->extend('Drupal\Core\Database\Query\TableSortExtender'); if ($keys) { // Replace wildcards with PDO wildcards. - $query->condition('alias', '%' . preg_replace('!\*+!', '%', $keys) . '%', 'LIKE'); + $or = new Condition('OR'); + $or->condition('alias', '%' . preg_replace('!\*+!', '%', $keys) . '%', 'LIKE'); + $or->condition('source', '%' . preg_replace('!\*+!', '%', $keys) . '%', 'LIKE'); + $query->condition($or); } try { return $query diff --git a/core/lib/Drupal/Core/Path/AliasStorageInterface.php b/core/lib/Drupal/Core/Path/AliasStorageInterface.php index 398ce07..525a96b 100644 --- a/core/lib/Drupal/Core/Path/AliasStorageInterface.php +++ b/core/lib/Drupal/Core/Path/AliasStorageInterface.php @@ -141,7 +141,7 @@ public function aliasExists($alias, $langcode, $source = NULL); public function languageAliasExists(); /** - * Loads aliases for admin listing. + * Loads paths for admin listing. * * @param array $header * Table header. @@ -152,7 +152,7 @@ public function languageAliasExists(); * @return array * Array of items to be displayed on the current page. */ - public function getAliasesForAdminListing($header, $keys = NULL); + public function getPathsForAdminListing($header, $keys = NULL); /** * Check if any alias exists starting with $initial_substring. diff --git a/core/modules/path/src/Controller/PathController.php b/core/modules/path/src/Controller/PathController.php index 51f88dd..2841efa 100644 --- a/core/modules/path/src/Controller/PathController.php +++ b/core/modules/path/src/Controller/PathController.php @@ -79,7 +79,8 @@ public function adminOverview(Request $request) { $rows = []; $destination = $this->getDestinationArray(); - foreach ($this->aliasStorage->getAliasesForAdminListing($header, $keys) as $data) { + $paths = $this->aliasStorage->getPathsForAdminListing($header, $keys); + foreach ($paths as $data) { $row = []; // @todo Should Path module store leading slashes? See // https://www.drupal.org/node/2430593. diff --git a/core/modules/path/src/Form/PathFilterForm.php b/core/modules/path/src/Form/PathFilterForm.php index 52b0ffb..103f279 100644 --- a/core/modules/path/src/Form/PathFilterForm.php +++ b/core/modules/path/src/Form/PathFilterForm.php @@ -26,13 +26,13 @@ public function buildForm(array $form, FormStateInterface $form_state, $keys = N $form['#attributes'] = ['class' => ['search-form']]; $form['basic'] = [ '#type' => 'details', - '#title' => $this->t('Filter aliases'), + '#title' => $this->t('Filter paths'), '#open' => TRUE, '#attributes' => ['class' => ['container-inline']], ]; $form['basic']['filter'] = [ '#type' => 'search', - '#title' => $this->t('Path alias'), + '#title' => $this->t('Path'), '#title_display' => 'invisible', '#default_value' => $keys, '#maxlength' => 128,