|
4 | 4 | use DBA\QueryFilter; |
5 | 5 | use DBA\ContainFilter; |
6 | 6 | use DBA\OrderFilter; |
| 7 | +use DBA\LimitFilter; |
7 | 8 | use DBA\Hashlist; |
8 | 9 | use DBA\HashlistHashlist; |
9 | 10 | use DBA\HashBinary; |
@@ -198,8 +199,9 @@ public static function createWordlists($hashlistId, $user) { |
198 | 199 | $size = $hashFactory->countFilter([Factory::FILTER => [$qF1, $qF2]]); |
199 | 200 | for ($x = 0; $x * $pagingSize < $size; $x++) { |
200 | 201 | $buffer = ""; |
201 | | - $oF = new OrderFilter(Hash::HASH_ID, "ASC LIMIT " . ($x * $pagingSize) . ", $pagingSize"); |
202 | | - $hashes = $hashFactory->filter([Factory::FILTER => [$qF1, $qF2], Factory::ORDER => $oF]); |
| 202 | + $oF = new OrderFilter(Hash::HASH_ID, "ASC"); |
| 203 | + $lF = new LimitFilter($pagingSize, $x * $pagingSize); |
| 204 | + $hashes = $hashFactory->filter([Factory::FILTER => [$qF1, $qF2], Factory::ORDER => $oF, Factory::LIMIT => $lF]); |
203 | 205 | foreach ($hashes as $hash) { |
204 | 206 | $plain = $hash->getPlaintext(); |
205 | 207 | if (strlen($plain) >= 8 && substr($plain, 0, 5) == "\$HEX[" && substr($plain, strlen($plain) - 1, 1) == "]") { |
@@ -714,8 +716,9 @@ public static function export($hashlistId, $user) { |
714 | 716 | $separator = SConfig::getInstance()->getVal(DConfig::FIELD_SEPARATOR); |
715 | 717 | $numEntries = 0; |
716 | 718 | for ($x = 0; $x * $pagingSize < $count; $x++) { |
717 | | - $oF = new OrderFilter($orderObject, "ASC LIMIT " . ($x * $pagingSize) . ",$pagingSize"); |
718 | | - $entries = $factory->filter([Factory::FILTER => [$qF1, $qF2], Factory::ORDER => $oF]); |
| 719 | + $oF = new OrderFilter($orderObject, "ASC"); |
| 720 | + $lF = new LimitFilter($pagingSize, $x * $pagingSize); |
| 721 | + $entries = $factory->filter([Factory::FILTER => [$qF1, $qF2], Factory::ORDER => $oF, Factory::LIMIT => $lF]); |
719 | 722 | $buffer = ""; |
720 | 723 | foreach ($entries as $entry) { |
721 | 724 | switch ($format->getFormat()) { |
@@ -1103,8 +1106,9 @@ public static function leftlist($hashlistId, $user) { |
1103 | 1106 | } |
1104 | 1107 | $numEntries = 0; |
1105 | 1108 | for ($x = 0; $x * $pagingSize < $count; $x++) { |
1106 | | - $oF = new OrderFilter(Hash::HASH_ID, "ASC LIMIT " . ($x * $pagingSize) . ",$pagingSize"); |
1107 | | - $entries = Factory::getHashFactory()->filter([Factory::FILTER => [$qF1, $qF2], Factory::ORDER => $oF]); |
| 1109 | + $oF = new OrderFilter(Hash::HASH_ID, "ASC"); |
| 1110 | + $lF = new LimitFilter($pagingSize, $x * $pagingSize); |
| 1111 | + $entries = Factory::getHashFactory()->filter([Factory::FILTER => [$qF1, $qF2], Factory::ORDER => $oF, Factory::LIMIT => $lF]); |
1108 | 1112 | $buffer = ""; |
1109 | 1113 | foreach ($entries as $entry) { |
1110 | 1114 | $buffer .= $entry->getHash(); |
|
0 commit comments