Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions bridges/SamMobileUpdateBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
class SamMobileUpdateBridge extends BridgeAbstract
{
const NAME = 'SamMobile updates';
// pull info from this site
const URI = 'https://www.sammobile.com/samsung/security/';
const DESCRIPTION = 'Fetches the latest security patches for Samsung devices';
const MAINTAINER = 'floviolleau';
Expand Down Expand Up @@ -37,15 +36,14 @@ public function collectData()
foreach ($elementsDom as $elementDom) {
$item = [];

$td = $elementDom->find('td');
$td = array_map(fn($cell) => trim($cell->plaintext), $elementDom->find('td'));

$title = 'Security patch: ' . $td[2] . ' - Android version: ' . $td[3] . ' - PDA: ' . $td[4];
$text = 'Model: ' . $td[0] . '<br>Country/Carrier: ' . $td[1] . '<br>Security patch: ' . $td[2] . '<br>OS version: Android ' . $td[3] . '<br>PDA: ' . $td[4];

$item['uri'] = $uri;
$item['title'] = $title;
$item['author'] = self::MAINTAINER;
$item['timestamp'] = (new DateTime($td[2]->innertext))->getTimestamp();
$item['content'] = $text;
$item['uid'] = hash('sha256', $item['title']);

Expand Down
Loading