Skip to content

Commit 399448d

Browse files
committed
Chinese traditional translation added
1 parent d32cec0 commit 399448d

9 files changed

Lines changed: 8627 additions & 57 deletions

File tree

app/admin/nat/item-add-search.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,12 @@
6161
$result_subnets = $Tools->search_subnets($search_term, $search_term_edited['high'], $search_term_edited['low'], $_REQUEST['ip']. array());
6262

6363
# if some found print
64-
if(sizeof($result_addresses)>0 && sizeof($result_subnets)>0) {
64+
if(sizeof($result_addresses)>0 || sizeof($result_subnets)>0) {
65+
66+
// init arrays
67+
$html1 = [];
68+
$html2 = [];
69+
6570
if(sizeof($result_subnets)>0) {
6671
$html1[] = "<h4>Subnets</h4>";
6772
foreach ($result_subnets as $s) {

db/SCHEMA.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,4 +995,4 @@ CREATE TABLE `routing_subnets` (
995995
# ------------------------------------------------------------
996996

997997
UPDATE `settings` SET `version` = "1.4";
998-
UPDATE `settings` SET `dbversion` = 24;
998+
UPDATE `settings` SET `dbversion` = 25;

functions/classes/class.Tools.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,11 @@ public function search_subnets($search_term, $high = "", $low = "", $search_req,
218218
*/
219219
private function search_subnets_range ($search_term, $high, $low, $custom_fields = array()) {
220220
# reformat low/high
221-
if($high==0 && $low==0) { $high = "1"; $low="1"; }
221+
if($high==0 && $low==0) { $high = "1"; $low = "1"; }
222222

223223
# set search query
224224
$query[] = "select * from `subnets` where `description` like :search_term ";
225-
$query[] = "or `subnet` between :low and :high ";
225+
$query[] = "or (`subnet` >= :low and `subnet` <= :high )";
226226
# custom
227227
if(sizeof($custom_fields) > 0) {
228228
foreach($custom_fields as $myField) {
@@ -274,7 +274,7 @@ private function search_subnets_inside ($high, $low) {
274274
# parse address
275275
$net = $this->Net_IPv4->parseAddress($this->transform_address($s['subnet']).'/'.$s['mask'], "dotted");
276276

277-
if($low>$this->transform_to_decimal(@$net->network) && $low<$this->transform_address($net->broadcast, "decimal")) {
277+
if($low>=$this->transform_to_decimal(@$net->network) && $low<=$this->transform_address($net->broadcast, "decimal")) {
278278
$ids[] = $s['id'];
279279
}
280280
}

functions/locale/zh_TW

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
zh_TW.UTF-8
166 KB
Binary file not shown.

0 commit comments

Comments
 (0)