summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/addressbook/func.inc
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-07-27 13:42:15 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-07-27 13:42:15 +0000
commit1f8e6cd04d90422462a6ef730c603f3f7233191c (patch)
tree8d2dc965ffdf62014c84f01c3fa73cd6b3adb979 /roundcubemail/program/steps/addressbook/func.inc
parent904e2dcf0a3ed226641d36656e411cd8aaeb9824 (diff)
- Fix fallback to default source (#1488009)
git-svn-id: https://svn.roundcube.net/trunk@4976 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/addressbook/func.inc')
-rw-r--r--roundcubemail/program/steps/addressbook/func.inc10
1 files changed, 3 insertions, 7 deletions
diff --git a/roundcubemail/program/steps/addressbook/func.inc b/roundcubemail/program/steps/addressbook/func.inc
index b74b45f79..6635d1338 100644
--- a/roundcubemail/program/steps/addressbook/func.inc
+++ b/roundcubemail/program/steps/addressbook/func.inc
@@ -100,7 +100,7 @@ if ($undo = $_SESSION['contact_undo']) {
}
// instantiate a contacts object according to the given source
-function rcmail_contact_source($source=null, $init_env=false)
+function rcmail_contact_source($source=null, $init_env=false, $writable=false)
{
global $RCMAIL, $OUTPUT, $CONFIG, $CONTACT_COLTYPES;
@@ -108,12 +108,8 @@ function rcmail_contact_source($source=null, $init_env=false)
$source = get_input_value('_source', RCUBE_INPUT_GPC);
}
- if (!strlen($source)) {
- return null;
- }
-
// Get object
- $CONTACTS = $RCMAIL->get_address_book($source);
+ $CONTACTS = $RCMAIL->get_address_book($source, $writable);
$CONTACTS->set_pagesize($CONFIG['pagesize']);
// set list properties and session vars
@@ -163,7 +159,7 @@ function rcmail_default_source($writable=false)
function rcmail_set_sourcename($abook)
{
global $OUTPUT;
-
+
// get address book name (for display)
if ($abook && $_SESSION['addressbooks_count'] > 1) {
$name = $abook->get_name();