Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
292
Merge Requests
292
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
92a674e5
Commit
92a674e5
authored
Jun 09, 2013
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1890536
by chx, jibran: Update core pregs to use ?<name> for subpatterns instead of ?P<>.
parent
bda47427
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
core/includes/schema.inc
core/includes/schema.inc
+1
-1
core/lib/Drupal/Core/Extension/ModuleHandler.php
core/lib/Drupal/Core/Extension/ModuleHandler.php
+3
-3
core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
.../modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
+1
-1
No files found.
core/includes/schema.inc
View file @
92a674e5
...
...
@@ -126,7 +126,7 @@ function drupal_get_schema_versions($module) {
}
// Prepare regular expression to match all possible defined hook_update_N().
$regexp
=
'/^(?
P<module>.+)_update_(?P
<version>\d+)$/'
;
$regexp
=
'/^(?
<module>.+)_update_(?
<version>\d+)$/'
;
$functions
=
get_defined_functions
();
// Narrow this down to functions ending with an integer, since all
// hook_update_N() functions end this way, and there are other
...
...
core/lib/Drupal/Core/Extension/ModuleHandler.php
View file @
92a674e5
...
...
@@ -489,12 +489,12 @@ protected function getImplementationInfo($hook) {
protected
function
parseDependency
(
$dependency
)
{
// We use named subpatterns and support every op that version_compare
// supports. Also, op is optional and defaults to equals.
$p_op
=
'(?
P
<operation>!=|==|=|<|<=|>|>=|<>)?'
;
$p_op
=
'(?<operation>!=|==|=|<|<=|>|>=|<>)?'
;
// Core version is always optional: 8.x-2.x and 2.x is treated the same.
$p_core
=
'(?:'
.
preg_quote
(
DRUPAL_CORE_COMPATIBILITY
)
.
'-)?'
;
$p_major
=
'(?
P
<major>\d+)'
;
$p_major
=
'(?<major>\d+)'
;
// By setting the minor version to x, branches can be matched.
$p_minor
=
'(?
P
<minor>(?:\d+|x)(?:-[A-Za-z]+\d+)?)'
;
$p_minor
=
'(?<minor>(?:\d+|x)(?:-[A-Za-z]+\d+)?)'
;
$value
=
array
();
$parts
=
explode
(
'('
,
$dependency
,
2
);
$value
[
'name'
]
=
trim
(
$parts
[
0
]);
...
...
core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
View file @
92a674e5
...
...
@@ -1642,7 +1642,7 @@ protected function checkForMetaRefresh() {
if
(
!
empty
(
$refresh
))
{
// Parse the content attribute of the meta tag for the format:
// "[delay]: URL=[page_to_redirect_to]".
if
(
preg_match
(
'/\d+;\s*URL=(?
P
<url>.*)/i'
,
$refresh
[
0
][
'content'
],
$match
))
{
if
(
preg_match
(
'/\d+;\s*URL=(?<url>.*)/i'
,
$refresh
[
0
][
'content'
],
$match
))
{
return
$this
->
drupalGet
(
$this
->
getAbsoluteUrl
(
decode_entities
(
$match
[
'url'
])));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment