X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=DataObjects%2FI18n.php;h=4d45cd74faebcd96d7debdf41a7f0be45458b698;hp=a9cac841c5b6ea100d93f50c4816cd5d2741e55a;hb=0074c71542d96bd36645299bd4b3a8eeba492467;hpb=9c9b43bf822d006745b3e1270a528e38bb0512d4 diff --git a/DataObjects/I18n.php b/DataObjects/I18n.php index a9cac841..4d45cd74 100644 --- a/DataObjects/I18n.php +++ b/DataObjects/I18n.php @@ -131,6 +131,16 @@ class Pman_Core_DataObjects_I18n extends DB_DataObject i18n_translate(ltype, lkey, 'en') as lval_en "); } + if (!empty($q['_as_code_and_title'])) { + $this->selectAdd(); + $this->selectAdd(" + {$tn}.lval as title, + {$tn}.lkey as code + "); + if (!empty($q['_title'])) { + $this->whereAdd("{$tn}.lval like '{$this->escape($_REQUEST['_title'])}%'"); + } + } if (!empty($q['!code'])) { $this->whereAddIn('!lkey', explode(',', $q['!code']), 'string');