aboutsummaryrefslogtreecommitdiff
path: root/pkgs/webapps/roundcubemail/add_all.patch
blob: ba651e2a0d088fdc273bffd2fd5abcd21c93555a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php
index 0552b89c2..1b84e1b4e 100644
--- a/program/include/rcmail_output_html.php
+++ b/program/include/rcmail_output_html.php
@@ -1013,13 +1013,13 @@ EOF;
         // use minified file if exists (not in development mode)
         if (!$this->devel_mode && !preg_match('/\.min\.' . $ext . '$/', $file)) {
             $minified_file = substr($file, 0, strlen($ext) * -1) . 'min.' . $ext;
-            if ($fs = @filemtime($this->assets_dir . $minified_file)) {
-                return $minified_file . '?s=' . $fs;
+            if ($fs = @md5_file($this->assets_dir . $minified_file)) {
+                return $minified_file . '?s=' . substr($fs, 0, 6);
             }
         }
 
-        if ($fs = @filemtime($this->assets_dir . $file)) {
-            $file .= '?s=' . $fs;
+        if ($fs = @md5_file($this->assets_dir . $file)) {
+            $file .= '?s=' . substr($fs, 0, 6);
         }
 
         return $file;
diff --git a/program/js/app.js b/program/js/app.js
index 2094b7b7b..06fe96a80 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -2277,6 +2277,9 @@ function rcube_webmail()
     }
 
     tree += '<span id="msgicn'+row.id+'" class="'+css_class+status_class+'" title="'+status_label+'"></span>';
+    if (flags.mbox != this.env.mailbox) {
+      tree += '<span style="color:#737677">' + flags.mbox + '&nbsp;<span>';
+    }
     row.className = row_class;
 
     // build subject link
diff --git a/program/localization/en_CA/labels.inc b/program/localization/en_CA/labels.inc
index 03c1c8e11..8d67a49ac 100644
--- a/program/localization/en_CA/labels.inc
+++ b/program/localization/en_CA/labels.inc
@@ -128,6 +128,7 @@ $labels['markunread'] = 'As unread';
 $labels['markflagged'] = 'As flagged';
 $labels['markunflagged'] = 'As unflagged';
 $labels['moreactions'] = 'More actions...';
+$labels['folders-allsubscribed'] = 'All subscribed folders';
 $labels['folders-all'] = 'All folders';
 $labels['more'] = 'More';
 $labels['back'] = 'Back';
@@ -184,6 +185,7 @@ $labels['namex'] = 'Name';
 $labels['searchscope'] = 'Scope';
 $labels['currentfolder'] = 'Current folder';
 $labels['subfolders'] = 'This and subfolders';
+$labels['allsubscribedfolders'] = 'All subscribed folders';
 $labels['allfolders'] = 'All folders';
 $labels['openinextwin'] = 'Open in new window';
 $labels['emlsave'] = 'Download (.eml)';
diff --git a/program/localization/en_GB/labels.inc b/program/localization/en_GB/labels.inc
index a442965de..b5b4839e3 100644
--- a/program/localization/en_GB/labels.inc
+++ b/program/localization/en_GB/labels.inc
@@ -135,6 +135,7 @@ $labels['moreactions'] = 'More actions...';
 $labels['markallread'] = 'Mark all as read';
 $labels['folders-cur'] = 'Selected folder only';
 $labels['folders-sub'] = 'Selected folder and its subfolders';
+$labels['folders-allsubscribed'] = 'All subscribed folders';
 $labels['folders-all'] = 'All folders';
 $labels['more'] = 'More';
 $labels['back'] = 'Back';
@@ -221,6 +222,7 @@ $labels['namex'] = 'Name';
 $labels['searchscope'] = 'Scope';
 $labels['currentfolder'] = 'Current folder';
 $labels['subfolders'] = 'This and subfolders';
+$labels['allsubscribedfolders'] = 'All subscribed folders';
 $labels['allfolders'] = 'All folders';
 $labels['searchinterval-1W'] = 'older than a week';
 $labels['searchinterval-1M'] = 'older than a month';
diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc
index 2e8ec8009..c7736557f 100644
--- a/program/localization/en_US/labels.inc
+++ b/program/localization/en_US/labels.inc
@@ -158,6 +158,7 @@ $labels['moreactions'] = 'More actions...';
 $labels['markallread'] = 'Mark all as read';
 $labels['folders-cur'] = 'Selected folder only';
 $labels['folders-sub'] = 'Selected folder and its subfolders';
+$labels['folders-allsubscribed'] = 'All subscribed folders';
 $labels['folders-all'] = 'All folders';
 $labels['more'] = 'More';
 $labels['back'] = 'Back';
@@ -249,6 +250,7 @@ $labels['namex'] = 'Name';
 $labels['searchscope'] = 'Scope';
 $labels['currentfolder'] = 'Current folder';
 $labels['subfolders'] = 'This and subfolders';
+$labels['allsubscribedfolders'] = 'All subscribed folders';
 $labels['allfolders'] = 'All folders';
 $labels['searchinterval-1W'] = 'older than a week';
 $labels['searchinterval-1M'] = 'older than a month';
diff --git a/program/localization/fr_FR/labels.inc b/program/localization/fr_FR/labels.inc
index 6db44f95c..ad83e15d8 100644
--- a/program/localization/fr_FR/labels.inc
+++ b/program/localization/fr_FR/labels.inc
@@ -135,6 +135,7 @@ $labels['moreactions'] = 'Plus d’actions…';
 $labels['markallread'] = 'Tout marquer comme lu';
 $labels['folders-cur'] = 'Dossier sélectionné seulement';
 $labels['folders-sub'] = 'Dossier sélectionné et ses sous-dossiers';
+$labels['folders-allsubscribed'] = 'Tous les dossiers souscrits';
 $labels['folders-all'] = 'Tous les dossiers';
 $labels['more'] = 'Plus';
 $labels['back'] = 'Retour';
@@ -221,6 +222,7 @@ $labels['namex'] = 'Nom';
 $labels['searchscope'] = 'Portée';
 $labels['currentfolder'] = 'Répertoire actuel';
 $labels['subfolders'] = 'Ceci et les sous-dossiers';
+$labels['allsubscribedfolders'] = 'Tous les dossiers souscrits';
 $labels['allfolders'] = 'Tous les dossiers';
 $labels['searchinterval-1W'] = 'plus d’une semaine';
 $labels['searchinterval-1M'] = 'plus d’un mois';
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 8e0c642f6..ac79780e0 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -110,8 +110,8 @@ if (empty($RCMAIL->action) || $RCMAIL->action == 'list') {
             'copy', 'move', 'quota', 'replyall', 'replylist', 'stillsearching',
             'flagged', 'unflagged', 'unread', 'deleted', 'replied', 'forwarded',
             'priority', 'withattachment', 'fileuploaderror', 'mark', 'markallread',
-            'folders-cur', 'folders-sub', 'folders-all', 'cancel', 'bounce', 'bouncemsg',
-            'sendingmessage');
+            'folders-cur', 'folders-sub', 'folders-allsubscribed', 'folder-all',
+            'cancel', 'bounce', 'bouncemsg', 'sendingmessage');
     }
 }
 
diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc
index f60528835..836a715b0 100644
--- a/program/steps/mail/search.inc
+++ b/program/steps/mail/search.inc
@@ -86,7 +86,7 @@ else if (strlen(trim($str))) {
         }
 
         // save search modifiers for the current folder to user prefs
-        $mkey               = $scope == 'all' ? '*' : $mbox;
+        $mkey               = ($scope == 'all' || $scope == 'allsubscribed') ? '*' : $mbox;
         $search_mods        = rcmail_search_mods();
         $search_mods[$mkey] = array_fill_keys(array_keys($subject), 1);
 
@@ -124,6 +124,10 @@ if (!empty($continue) && isset($_SESSION['search']) && $_SESSION['search_request
 if ($search_str) {
     // search all, current or subfolders folders
     if ($scope == 'all') {
+        $mboxes = $RCMAIL->storage->list_folders('', '*', 'mail', null, true);
+        natcasesort($mboxes);  // we want natural alphabetic sorting of folders in the result set
+    }
+    else if ($scope == 'allsubscribed') {
         $mboxes = $RCMAIL->storage->list_folders_subscribed('', '*', 'mail', null, true);
         natcasesort($mboxes);  // we want natural alphabetic sorting of folders in the result set
     }
@@ -133,7 +137,7 @@ if ($search_str) {
         array_unshift($mboxes, $mbox);
     }
 
-    if ($scope != 'all') {
+    if ($scope != 'all' && $scope != 'allsubscribed') {
         // Remember current folder, it can change in meantime (plugins)
         // but we need it to e.g. recognize Sent folder to handle From/To column later
         $RCMAIL->output->set_env('mailbox', $mbox);
@@ -194,7 +198,7 @@ else {
     $count = 0;
     $OUTPUT->show_message('searchnomatch', 'notice');
     $OUTPUT->set_env('multifolder_listing', (bool)$result->multi);
-    if ($result->multi && $scope == 'all') {
+    if ($result->multi && ($scope == 'all' || $scope == 'allsubscribed')) {
         $OUTPUT->command('select_folder', '');
     }
 }
diff --git a/skins/classic/templates/mail.html b/skins/classic/templates/mail.html
index 666adf606..23d12a275 100644
--- a/skins/classic/templates/mail.html
+++ b/skins/classic/templates/mail.html
@@ -106,6 +106,7 @@
     <li><label class="comment"><roundcube:label name="searchscope" /></label></li>
     <li><label><input type="radio" name="s_scope" value="base" id="s_scope_base" onclick="rcmail.set_searchscope(this.value)" /> <span><roundcube:label name="currentfolder" /></span></label></li>
     <li><label><input type="radio" name="s_scope" value="sub" id="s_scope_sub" onclick="rcmail.set_searchscope(this.value)" /> <span><roundcube:label name="subfolders" /></span></label></li>
+    <li><label><input type="radio" name="s_scope" value="allsubscribed" id="s_scope_allsubscribed" onclick="rcmail.set_searchscope(this.value)" /> <span><roundcube:label name="allsubscribedfolders" /></span></label></li>
     <li><label><input type="radio" name="s_scope" value="all" id="s_scope_all" onclick="rcmail.set_searchscope(this.value)" /> <span><roundcube:label name="allfolders" /></span></label></li>
   </ul>
 </div>
diff --git a/skins/elastic/templates/mail.html b/skins/elastic/templates/mail.html
index 51dbfcd30..4c2281281 100644
--- a/skins/elastic/templates/mail.html
+++ b/skins/elastic/templates/mail.html
@@ -77,6 +77,7 @@
 				<select name="s_scope" id="s_scope">
 					<option value="base"><roundcube:label name="currentfolder" /></option>
 					<option value="sub"><roundcube:label name="subfolders" /></option>
+					<option value="allsubscribed"><roundcube:label name="allsubscribedfolders" /></option>
 					<option value="all"><roundcube:label name="allfolders" /></option>
 				</select>
 			</div>
diff --git a/skins/larry/templates/mail.html b/skins/larry/templates/mail.html
index 5ef0bc211..e0e8280ad 100644
--- a/skins/larry/templates/mail.html
+++ b/skins/larry/templates/mail.html
@@ -56,6 +56,7 @@
 		<li role="separator" class="separator"><label><roundcube:label name="searchscope" /></label></li>
 		<li role="menuitem"><label><input type="radio" name="s_scope" value="base" id="s_scope_base" onclick="UI.set_searchscope(this)" /> <span><roundcube:label name="currentfolder" /></span></label></li>
 		<li role="menuitem"><label><input type="radio" name="s_scope" value="sub" id="s_scope_sub" onclick="UI.set_searchscope(this)" /> <span><roundcube:label name="subfolders" /></span></label></li>
+		<li role="menuitem"><label><input type="radio" name="s_scope" value="allsubscribed" id="s_scope_allsubscribed" onclick="UI.set_searchscope(this)" /> <span><roundcube:label name="allsubscribedfolders" /></span></label></li>
 		<li role="menuitem"><label><input type="radio" name="s_scope" value="all" id="s_scope_all" onclick="UI.set_searchscope(this)" /> <span><roundcube:label name="allfolders" /></span></label></li>
 	</ul>
 	<div class="buttons"><a class="button" href="#" onclick="if (rcmail.command('search')) UI.show_popup('searchmenu',false)"><roundcube:label name="search" /></a></div>