Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
iena
iena-modale-activity-filter
Commits
e3776768
Commit
e3776768
authored
Jun 03, 2020
by
BETTENFELD Vincent
Browse files
Commented filter.php
parent
968ce373
Changes
1
Hide whitespace changes
Inline
Side-by-side
filter.php
View file @
e3776768
...
...
@@ -153,8 +153,8 @@ function filter($text, array $options = array())
}
}
/
*
Looks for link(s) in the argument text and place them in the array named
matches
*/
/
/
Looks for link(s) in the argument text and place them in the array named
//
matches
preg_match_all
(
'/<a href="(.*?)">(.*?)<\/a>/s'
,
$text
,
$matches
);
// ? remove tags opening links in new tab from $text ?
...
...
@@ -168,7 +168,8 @@ function filter($text, array $options = array())
$pieces
=
explode
(
$CFG
->
wwwroot
.
'/mod'
,
$text
);
$pieces
=
$this
->
filter_iena_add_delimiters
(
$pieces
);
//
// Each link is replaced by a button with a relevant name, link and ID
// The corresponding iframe is also inserted
for
(
$i
=
0
;
$i
<
count
(
$pieces
);
$i
++
)
{
$pieces
[
$i
]
=
' '
.
$pieces
[
$i
];
$ini
=
strpos
(
$pieces
[
$i
],
$this
->
start
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment