Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Framasoft
myframa
Commits
49fd4d23
Commit
49fd4d23
authored
Sep 16, 2016
by
JosephK
Browse files
Fix notices preg_replace_callback
parent
f0bc3ea4
Changes
2
Hide whitespace changes
Inline
Side-by-side
shaarli/plugins/recovery/recovery.php
View file @
49fd4d23
...
...
@@ -20,7 +20,7 @@ function hook_recovery_render_tools($data)
if
(
!
function_exists
(
translate
))
{
function
translate
(
$matches
)
{
return
t
(
$matches
[
1
]);
}
}
$html
=
preg_replace_callback
(
'/\{\'(.+)\'\|t\}/i'
,
translate
,
$html
);
$html
=
preg_replace_callback
(
'/\{\'(.+)\'\|t\}/i'
,
'
translate
'
,
$html
);
if
(
isset
(
$GLOBALS
[
'config'
][
'email'
]))
{
$html
=
str_replace
(
'value=""'
,
'value="'
.
htmlentities
(
$GLOBALS
[
'config'
][
'email'
])
.
'"'
,
$html
);
...
...
shaarli/plugins/tags_advanced/tags_advanced.php
View file @
49fd4d23
...
...
@@ -13,7 +13,7 @@ function tags_advanced_config($taData)
if
(
!
function_exists
(
translate
))
{
function
translate
(
$matches
)
{
return
t
(
$matches
[
1
]);
}
}
$html
=
preg_replace_callback
(
'/\{\'(.+)\'\|t\}/i'
,
translate
,
$html
);
$html
=
preg_replace_callback
(
'/\{\'(.+)\'\|t\}/i'
,
'
translate
'
,
$html
);
if
(
!
isset
(
$taData
)
||
empty
(
$taData
))
{
$taData
=
array
(
...
...
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