Changed DataObjects/I18n.php
authorAlan Knowles <alan@roojs.com>
Mon, 28 Dec 2020 07:39:15 +0000 (15:39 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 28 Dec 2020 07:39:15 +0000 (15:39 +0800)
DataObjects/I18n.php

index 4d9ab61..ba3386f 100644 (file)
@@ -220,6 +220,14 @@ class Pman_Core_DataObjects_I18n extends DB_DataObject
         
     }
     
+    function codeExists($ltype, $key)
+    {
+        $x = DB_DataObject::factory('i18n');
+        $x->ltype = $ltype;
+        $x->lkey = $key;
+        return $x->count() ? true : false;
+    }
+    
     // load all all to reduce future queries..
     function translateCache($inlang, $ltype, $build)
     {