summaryrefslogtreecommitdiff
path: root/plugins/example_addressbook/example_addressbook.php
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-05-25 06:58:42 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-05-25 06:58:42 +0000
commitbc3d7575952b5b38f05892c8c213faa6ba32d8d9 (patch)
tree199eade449e4d3b0a8ca12169449c5e4ccbc8ded /plugins/example_addressbook/example_addressbook.php
parent031bea402791053b2b24df56467e950167f55ee4 (diff)
Add dummy group functionality to example address book plugin
git-svn-id: https://svn.roundcube.net/trunk@3658 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/example_addressbook/example_addressbook.php')
-rw-r--r--plugins/example_addressbook/example_addressbook.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/example_addressbook/example_addressbook.php b/plugins/example_addressbook/example_addressbook.php
index 108c0aebb..42272c86e 100644
--- a/plugins/example_addressbook/example_addressbook.php
+++ b/plugins/example_addressbook/example_addressbook.php
@@ -1,5 +1,7 @@
<?php
+require_once(dirname(__FILE__) . '/example_addressbook_backend.php');
+
/**
* Sample plugin to add a new address book
* with just a static list of contacts
@@ -25,14 +27,19 @@ class example_addressbook extends rcube_plugin
public function address_sources($p)
{
- $p['sources'][$this->abook_id] = array('id' => $this->abook_id, 'name' => 'Static List', 'readonly' => true);
+ $abook = new example_addressbook_backend;
+ $p['sources'][$this->abook_id] = array(
+ 'id' => $this->abook_id,
+ 'name' => 'Static List',
+ 'readonly' => $abook->readonly,
+ 'groups' => $abook->groups,
+ );
return $p;
}
public function get_address_book($p)
{
if ($p['id'] === $this->abook_id) {
- require_once(dirname(__FILE__) . '/example_addressbook_backend.php');
$p['instance'] = new example_addressbook_backend;
}