Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tvgids
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
tvgids
Commits
e34332ec
Commit
e34332ec
authored
Feb 10, 2014
by
Taddeus Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue where sometimes the details would be blank
parent
d72afd60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
details.php
details.php
+6
-7
No files found.
details.php
View file @
e34332ec
...
...
@@ -6,20 +6,19 @@ $page = file_get_contents($url);
preg_match
(
'/<div\s+id="prog-content">\s*(.*?)\s*<div\s+class="prog-functionbar">/s'
,
$page
,
$m1
);
assert
(
$m1
);
$description
=
trim
(
strip_tags
(
$m1
[
1
],
'<p><strong><em><b><i><font><a><span>'
)
);
$description
=
strip_tags
(
$m1
[
1
],
'<p><strong><em><b><i><font><a><span>'
);
$description
=
str_replace
(
'showVideoPlaybutton()'
,
''
,
$description
);
$description
=
preg_replace
(
'/\s+/'
,
' '
,
$description
);
$description
=
htmlentities
(
$description
,
ENT_COMPAT
|
ENT_HTML401
|
ENT_SUBSTITUTE
,
'ISO-8859-1'
);
$description
=
str_replace
(
array
(
'<'
,
'>'
),
array
(
'<'
,
'>'
),
$description
);
preg_match
(
'/<ul\s+id="prog-info-content-colleft">\s*(.*?)\s*<\/ul>/s'
,
$page
,
$m2
);
assert
(
$m2
);
preg_match_all
(
'/<li><strong>(\w+):<\/strong>(.*?)<\/li>/'
,
$m2
[
1
],
$m3
);
assert
(
$m3
);
$props
=
array
();
$prop
ertie
s
=
array
();
foreach
(
$m3
[
1
]
as
$i
=>
$name
)
$props
[]
=
array
(
'name'
=>
$name
,
'value'
=>
$m3
[
2
][
$i
]);
$prop
ertie
s
[]
=
array
(
'name'
=>
$name
,
'value'
=>
$m3
[
2
][
$i
]);
echo
json_encode
(
array
(
'description'
=>
$description
,
'properties'
=>
$props
));
echo
json_encode
(
compact
(
'description'
,
'properties'
),
JSON_UNESCAPED_SLASHES
);
?>
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