From 39538dd1c71297fb385a26c1aead204229558d44 Mon Sep 17 00:00:00 2001 From: Edward Date: Thu, 7 Mar 2019 16:21:59 +0800 Subject: [PATCH] Fix #5774 - City / Province... --- DataObjects/I18n.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/DataObjects/I18n.php b/DataObjects/I18n.php index 36614330..9711cb6c 100644 --- a/DataObjects/I18n.php +++ b/DataObjects/I18n.php @@ -171,6 +171,19 @@ class Pman_Core_DataObjects_I18n extends DB_DataObject ) AS no_of_city "); + if(!empty($q['_hide_unused'])) { + $this->whereAdd(" + ( + SELECT + COUNT(geoip_division.id) + FROM + geoip_division + WHERE + geoip_division.country = i18n.lkey + ) > 0 + "); + } + } } -- 2.39.2