Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
php
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
php
Commits
0018afbe
Commit
0018afbe
authored
9 years ago
by
Alexander Hass
Browse files
Options
Downloads
Patches
Plain Diff
Default value need to have PHP tags surrounded
parent
998d4102
No related branches found
No related tags found
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
js/php.admin.js
+1
-1
1 addition, 1 deletion
js/php.admin.js
src/Plugin/Condition/Php.php
+1
-1
1 addition, 1 deletion
src/Plugin/Condition/Php.php
with
2 additions
and
2 deletions
js/php.admin.js
+
1
−
1
View file @
0018afbe
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
$
(
'
[data-drupal-selector="edit-visibility-php"]
'
).
drupalSetSummary
(
function
(
context
)
{
$
(
'
[data-drupal-selector="edit-visibility-php"]
'
).
drupalSetSummary
(
function
(
context
)
{
var
$code
=
$
(
context
).
find
(
'
textarea[name="visibility[php][php]"]
'
);
var
$code
=
$
(
context
).
find
(
'
textarea[name="visibility[php][php]"]
'
);
if
(
$code
.
val
()
===
'
return TRUE;
'
)
{
if
(
$code
.
val
()
===
'
<?php
return TRUE;
?>
'
)
{
return
Drupal
.
t
(
'
Not restricted
'
);
return
Drupal
.
t
(
'
Not restricted
'
);
}
}
else
{
else
{
...
...
This diff is collapsed.
Click to expand it.
src/Plugin/Condition/Php.php
+
1
−
1
View file @
0018afbe
...
@@ -27,7 +27,7 @@ class Php extends ConditionPluginBase {
...
@@ -27,7 +27,7 @@ class Php extends ConditionPluginBase {
// By default the PHP snippet need to return TRUE or blocks will silently
// By default the PHP snippet need to return TRUE or blocks will silently
// disappear after the module has been enabled and/or a block has been
// disappear after the module has been enabled and/or a block has been
// configured without configuring a PHP snippet.
// configured without configuring a PHP snippet.
return
[
'php'
=>
'return TRUE;'
]
+
parent
::
defaultConfiguration
();
return
[
'php'
=>
'
<?php
return TRUE;
?>
'
]
+
parent
::
defaultConfiguration
();
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment