diff --git a/Database.php b/Database.php index 93b54c0..146c4fb 100644 --- a/Database.php +++ b/Database.php @@ -62,7 +62,7 @@ class Database { array_push($this->data, $patch); } private function cmp(PatchObject $a, PatchObject $b) : int { - return strcasecmp($a->getProduct(), $b->getProduct()); + return strcasecmp($a->getProduct() . $a->getBranch(), $b->getProduct() . $b->getBranch()); } } diff --git a/PatchObject.php b/PatchObject.php index 0e9bb3b..3706637 100644 --- a/PatchObject.php +++ b/PatchObject.php @@ -4,6 +4,7 @@ class PatchObject { private $id = ''; private $vendor = ''; private $product = ''; + private $branch = ''; private $version = ''; private $url = ''; private $timestamp = 0; @@ -14,10 +15,10 @@ class PatchObject { } } function __toString() : string { - return $this->vendor . ' ' . $this->product . ' ' . $this->version; + return $this->vendor . ' ' . $this->product . ' ' . $this->branch . ' ' . $this->version; } function toArray() : array { - return array('id' => $this->id, 'vendor' => $this->vendor, 'product' => $this->product, 'version' => $this->version, 'url' => $this->url, 'timestamp' => $this->timestamp); + return array('id' => $this->id, 'vendor' => $this->vendor, 'product' => $this->product, 'branch' => $this->branch, 'version' => $this->version, 'url' => $this->url, 'timestamp' => $this->timestamp); } function getId() : string { return $this->id; @@ -28,6 +29,9 @@ class PatchObject { function getProduct() : string { return $this->product; } + function getBranch() : string { + return $this->branch; + } function getVersion() : string { return $this->version; } diff --git a/PatchViewer.php b/PatchViewer.php index 60936cf..2e7d852 100644 --- a/PatchViewer.php +++ b/PatchViewer.php @@ -31,11 +31,12 @@ $db->sort();

Patch Notification Robot

Donate

Follow me Providing you the latest update notifications.

- +
+ @@ -48,6 +49,7 @@ $db->sort(); echo ''; echo ''; echo ''; + echo ''; echo ''; echo ''; echo '' . "\r\n";
Vendor ProductBranch Version Release Date*
' . $patch->getVendor() . '' . $patch->getProduct() . '' . $patch->getBranch() . '' . $patch->getVersion() . '' . date('Y-m-d', $patch->getTimestamp()) . '