Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
jlopez
wicopa
Commits
06d17296
Commit
06d17296
authored
Jan 04, 2022
by
remy
Browse files
fix: R/Bioconductor was not working anymore
parent
fd129d2b
Pipeline
#317
failed with stage
in 1 minute and 3 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
getPackages.php
View file @
06d17296
...
...
@@ -51,6 +51,8 @@ if(isset($_GET['limit'])) {
}
$result
=
array
();
$version_num
=
""
;
$version_name
=
""
;
if
(
strpos
(
$distrib
,
':'
)
!==
false
)
{
$os
=
explode
(
":"
,
$distrib
);
...
...
package.php
View file @
06d17296
...
...
@@ -41,8 +41,10 @@ function getDocument($url) {
$context
=
stream_context_create
(
$opts
);
$content
=
file_get_contents
(
$url
,
false
,
$context
);
$doc
=
new
DOMDocument
();
$doc
=
new
\
DOMDocument
(
'1.0'
,
'UTF-8'
);
$internalErrors
=
libxml_use_internal_errors
(
true
);
$doc
->
loadHtml
(
$content
);
libxml_use_internal_errors
(
$internalErrors
);
return
$doc
;
}
...
...
@@ -414,21 +416,15 @@ function findRPackage($os_name, $version_num, $version_name, $keyword, $limit, $
$index
=
0
;
for
(
$i
=
1
;
$i
<=
$size
;
$i
++
)
{
$name
=
$trs
[
$i
]
->
childNodes
[
1
]
->
nodeValue
;
$name
=
$trs
[
$i
]
->
getElementsByTagName
(
'td'
)[
0
]
->
nodeValue
;
if
(
strpos
(
$name
,
$keyword
)
!==
false
)
{
$description
=
$trs
[
$i
]
->
childNodes
[
5
]
->
nodeValue
;
$description
=
$trs
[
$i
]
->
getElementsByTagName
(
'td'
)[
2
]
->
nodeValue
;
$version
=
""
;
$link
=
"https://www.bioconductor.org/packages/release/bioc/html/"
.
$name
.
".html"
;
$other
=
$trs
[
$i
]
->
childNodes
[
3
]
->
nodeValue
;
$other
=
$trs
[
$i
]
->
getElementsByTagName
(
'td'
)[
1
]
->
nodeValue
;
$package
=
new
Package
(
$name
,
$version
,
$description
,
$link
,
$other
);
$results
[]
=
$package
;
$index
++
;
}
...
...
remy
@remy
mentioned in issue
#26 (closed)
·
Jan 04, 2022
mentioned in issue
#26 (closed)
mentioned in issue #26
Toggle commit list
Write
Preview
Supports
Markdown
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