We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e8f0cb commit 7981124Copy full SHA for 7981124
controllers/Packet/Index.php
@@ -36,9 +36,14 @@ public function run(Router &$router) {
36
// Alphabetically sort the packets for HTML
37
if ($view instanceof PacketIndexHtmlView && $model->packets) {
38
usort($model->packets, function($a, $b){
39
- $a1 = $a->getPacketName();
40
- $b1 = $b->getPacketName();
41
- if ($a1 == $b1) return 0;
+ $a1 = $a->getPacketApplicationLayerId();
+ $b1 = $b->getPacketApplicationLayerId();
+ if ($a1 == $b1) {
42
+ $a2 = $a->getPacketId();
43
+ $b2 = $b->getPacketId();
44
+ if ($a2 == $b2) return 0;
45
+ return ($a2 < $b2 ? -1 : 1);
46
+ }
47
return ($a1 < $b1 ? -1 : 1);
48
});
49
}
0 commit comments