From 4cf42fde05ff891f6961ba60dbb1c2e4c91c39c6 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Tue, 20 Mar 2012 18:47:24 -0400
Subject: [PATCH] Add support for read-only address book records

---
 program/steps/addressbook/edit.inc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/program/steps/addressbook/edit.inc b/program/steps/addressbook/edit.inc
index 5f8a4ec..abed2c5 100644
--- a/program/steps/addressbook/edit.inc
+++ b/program/steps/addressbook/edit.inc
@@ -36,8 +36,8 @@
         $OUTPUT->set_env('cid', $record['ID']);
     }
 
-    // adding not allowed here
-    if ($CONTACTS->readonly) {
+    // editing not allowed here
+    if ($CONTACTS->readonly || $record['readonly']) {
         $OUTPUT->show_message('sourceisreadonly');
         rcmail_overwrite_action('show');
         return;

--
Gitblit v1.9.1