From 5f2d1588dde55fcd064890bb63daa172bd9331c7 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 15 Jun 2011 07:46:50 -0400
Subject: [PATCH] - Add 'foldername' attribute to folders table rows, so plugin writers would be able to iterate over the table rows and find wanted folders (folders_list hook)

---
 program/steps/settings/folders.inc |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/program/steps/settings/folders.inc b/program/steps/settings/folders.inc
index 90ced09..c84f616 100644
--- a/program/steps/settings/folders.inc
+++ b/program/steps/settings/folders.inc
@@ -259,7 +259,7 @@
         $folder_utf8    = rcube_charset_convert($folder['id'], 'UTF7-IMAP');
         $display_folder = str_repeat('&nbsp;&nbsp;&nbsp;&nbsp;', $folder['level'])
             . Q($protected ? rcmail_localize_foldername($folder['id']) : $folder['name']);
-    
+
         if ($folder['virtual']) {
             $classes[] = 'virtual';
         }
@@ -271,8 +271,9 @@
 
         $disabled = (($protected && $subscribed) || $noselect);
 
-        $table->add_row(array('id' => 'rcmrow'.$idx, 'class' => join(' ', $classes)));
-    
+        $table->add_row(array('id' => 'rcmrow'.$idx, 'class' => join(' ', $classes),
+            'foldername' => $folder['id']));
+
         $table->add('name', $display_folder);
         $table->add('subscribed', $checkbox_subscribe->show(($subscribed ? $folder_utf8 : ''),
             array('value' => $folder_utf8, 'disabled' => $disabled ? 'disabled' : '')));
@@ -297,7 +298,7 @@
 
     if (!$attrib['id'])
         $attrib['id'] = 'rcmfolderframe';
-    
+
     $attrib['name'] = $attrib['id'];
 
     $OUTPUT->set_env('contentframe', $attrib['name']);

--
Gitblit v1.9.1