From 207cc0b9b3cfdfb29e4f02e83014320fd12eeb68 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 16 Feb 2011 05:48:11 -0500
Subject: [PATCH] - Applied plugin changes since 0.5-stable release

---
 plugins/example_addressbook/example_addressbook_backend.php |   39 ++++++++++++++++++++++++++++++++++++++-
 1 files changed, 38 insertions(+), 1 deletions(-)

diff --git a/plugins/example_addressbook/example_addressbook_backend.php b/plugins/example_addressbook/example_addressbook_backend.php
index ad6b89d..5f4e0f4 100644
--- a/plugins/example_addressbook/example_addressbook_backend.php
+++ b/plugins/example_addressbook/example_addressbook_backend.php
@@ -11,6 +11,7 @@
 {
   public $primary_key = 'ID';
   public $readonly = true;
+  public $groups = true;
   
   private $filter;
   private $result;
@@ -36,6 +37,14 @@
     $this->filter = null;
   }
 
+  function list_groups($search = null)
+  {
+    return array(
+      array('ID' => 'testgroup1', 'name' => "Testgroup"),
+      array('ID' => 'testgroup2', 'name' => "Sample Group"),
+    );
+  }
+  
   public function list_records($cols=null, $subset=0)
   {
     $this->result = $this->count();
@@ -44,7 +53,7 @@
     return $this->result;
   }
 
-  public function search($fields, $value, $strict=false, $select=true)
+  public function search($fields, $value, $strict=false, $select=true, $nocount=false, $required=array())
   {
     // no search implemented, just list all records
     return $this->list_records();
@@ -68,5 +77,33 @@
     
     return $assoc && $sql_arr ? $sql_arr : $this->result;
   }
+
+
+  function create_group($name)
+  {
+    $result = false;
+
+    return $result;
+  }
+
+  function delete_group($gid)
+  {
+    return false;
+  }
+
+  function rename_group($gid, $newname)
+  {
+    return $newname;
+  }
+
+  function add_to_group($group_id, $ids)
+  {
+    return false;
+  }
+
+  function remove_from_group($group_id, $ids)
+  {
+     return false;
+  }
   
 }

--
Gitblit v1.9.1