DataObjects/Core_groups.php
authorAlan Knowles <alan@roojs.com>
Fri, 7 Oct 2016 04:38:00 +0000 (12:38 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 7 Oct 2016 04:38:00 +0000 (12:38 +0800)
DataObjects/Core_groups.php

index 19ed1c7..33103d7 100644 (file)
@@ -30,6 +30,13 @@ class Pman_Core_DataObjects_Groups extends DB_DataObject
     ###END_AUTOCODE
     
     // group types??
+    function applyFilters($q, $au, $roo)
+    {
+        if (!empty($q['query']['name_starts'])) {
+            $v = $this->escape($q['query']['name_starts']);
+            $this->whereAdd("name like '{$v}%'");
+        }
+    }
     
     function toEventString() {
         return $this->name;