From: Edward Date: Thu, 7 Mar 2019 08:21:59 +0000 (+0800) Subject: Fix #5774 - City / Province... X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=39538dd1c71297fb385a26c1aead204229558d44 Fix #5774 - City / Province... --- 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 + "); + } + } }