diff options
Diffstat (limited to 'flakes/mypackages')
8 files changed, 113 insertions, 149 deletions
diff --git a/flakes/mypackages/pkgs/webapps/roundcubemail/add_all.patch b/flakes/mypackages/pkgs/webapps/roundcubemail/add_all.patch index ba651e2..e987fda 100644 --- a/flakes/mypackages/pkgs/webapps/roundcubemail/add_all.patch +++ b/flakes/mypackages/pkgs/webapps/roundcubemail/add_all.patch | |||
@@ -1,30 +1,60 @@ | |||
1 | diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php | 1 | diff --git a/program/actions/mail/index.php b/program/actions/mail/index.php |
2 | index 0552b89c2..1b84e1b4e 100644 | 2 | --- a/program/actions/mail/index.php 1970-01-01 01:00:01.000000000 +0100 |
3 | --- a/program/include/rcmail_output_html.php | 3 | +++ b/program/actions/mail/index.php 2024-08-10 01:49:10.362367233 +0200 |
4 | +++ b/program/include/rcmail_output_html.php | 4 | @@ -146,7 +146,7 @@ |
5 | @@ -1013,13 +1013,13 @@ EOF; | 5 | 'copy', 'move', 'quota', 'replyall', 'replylist', 'stillsearching', |
6 | // use minified file if exists (not in development mode) | 6 | 'flagged', 'unflagged', 'unread', 'deleted', 'replied', 'forwarded', |
7 | if (!$this->devel_mode && !preg_match('/\.min\.' . $ext . '$/', $file)) { | 7 | 'priority', 'withattachment', 'fileuploaderror', 'mark', 'markallread', |
8 | $minified_file = substr($file, 0, strlen($ext) * -1) . 'min.' . $ext; | 8 | - 'folders-cur', 'folders-sub', 'folders-all', 'cancel', 'bounce', 'bouncemsg', |
9 | - if ($fs = @filemtime($this->assets_dir . $minified_file)) { | 9 | + 'folders-cur', 'folders-sub', 'folders-allsubscribed', 'folders-all', 'cancel', 'bounce', 'bouncemsg', |
10 | - return $minified_file . '?s=' . $fs; | 10 | 'sendingmessage'); |
11 | + if ($fs = @md5_file($this->assets_dir . $minified_file)) { | ||
12 | + return $minified_file . '?s=' . substr($fs, 0, 6); | ||
13 | } | 11 | } |
14 | } | 12 | } |
13 | diff --git a/program/actions/mail/search.php b/program/actions/mail/search.php | ||
14 | --- a/program/actions/mail/search.php 1970-01-01 01:00:01.000000000 +0100 | ||
15 | +++ b/program/actions/mail/search.php 2024-08-10 01:53:20.152011854 +0200 | ||
16 | @@ -83,6 +83,10 @@ | ||
15 | 17 | ||
16 | - if ($fs = @filemtime($this->assets_dir . $file)) { | 18 | // search all, current or subfolders folders |
17 | - $file .= '?s=' . $fs; | 19 | if ($scope == 'all') { |
18 | + if ($fs = @md5_file($this->assets_dir . $file)) { | 20 | + $mboxes = $RCMAIL->storage->list_folders('', '*', 'mail', null, true); |
19 | + $file .= '?s=' . substr($fs, 0, 6); | 21 | + natcasesort($mboxes); // we want natural alphabetic sorting of folders in the result set |
22 | + } | ||
23 | + else if ($scope == 'allsubscribed') { | ||
24 | $mboxes = $rcmail->storage->list_folders_subscribed('', '*', 'mail', null, true); | ||
25 | // we want natural alphabetic sorting of folders in the result set | ||
26 | natcasesort($mboxes); | ||
27 | @@ -93,7 +97,7 @@ | ||
28 | array_unshift($mboxes, $mbox); | ||
29 | } | ||
30 | |||
31 | - if ($scope != 'all') { | ||
32 | + if ($scope != 'all' && $scope != 'allsubscribed') { | ||
33 | // Remember current folder, it can change in meantime (plugins) | ||
34 | // but we need it to e.g. recognize Sent folder to handle From/To column later | ||
35 | $rcmail->output->set_env('mailbox', $mbox); | ||
36 | @@ -158,7 +162,7 @@ | ||
37 | $rcmail->output->show_message('searchnomatch', 'notice'); | ||
38 | $rcmail->output->set_env('multifolder_listing', isset($result) ? !empty($result->multi) : false); | ||
39 | |||
40 | - if (isset($result) && !empty($result->multi) && $scope == 'all') { | ||
41 | + if (isset($result) && !empty($result->multi) && ($scope == 'all' || $scope == 'allsubscribed')) { | ||
42 | $rcmail->output->command('select_folder', ''); | ||
43 | } | ||
20 | } | 44 | } |
45 | @@ -266,7 +270,7 @@ | ||
46 | } | ||
47 | |||
48 | // save search modifiers for the current folder to user prefs | ||
49 | - if ($scope != 'all') { | ||
50 | + if ($scope != 'all' && $scope != 'allsubscribed') { | ||
51 | $search_mods = self::search_mods(); | ||
52 | $search_mods_value = array_fill_keys(array_keys($subject), 1); | ||
21 | 53 | ||
22 | return $file; | ||
23 | diff --git a/program/js/app.js b/program/js/app.js | 54 | diff --git a/program/js/app.js b/program/js/app.js |
24 | index 2094b7b7b..06fe96a80 100644 | 55 | --- a/program/js/app.js 1970-01-01 01:00:01.000000000 +0100 |
25 | --- a/program/js/app.js | 56 | +++ b/program/js/app.js 2024-08-10 01:44:57.834696269 +0200 |
26 | +++ b/program/js/app.js | 57 | @@ -2311,6 +2311,9 @@ |
27 | @@ -2277,6 +2277,9 @@ function rcube_webmail() | ||
28 | } | 58 | } |
29 | 59 | ||
30 | tree += '<span id="msgicn'+row.id+'" class="'+css_class+status_class+'" title="'+status_label+'"></span>'; | 60 | tree += '<span id="msgicn'+row.id+'" class="'+css_class+status_class+'" title="'+status_label+'"></span>'; |
@@ -35,10 +65,9 @@ index 2094b7b7b..06fe96a80 100644 | |||
35 | 65 | ||
36 | // build subject link | 66 | // build subject link |
37 | diff --git a/program/localization/en_CA/labels.inc b/program/localization/en_CA/labels.inc | 67 | diff --git a/program/localization/en_CA/labels.inc b/program/localization/en_CA/labels.inc |
38 | index 03c1c8e11..8d67a49ac 100644 | 68 | --- a/program/localization/en_CA/labels.inc 1970-01-01 01:00:01.000000000 +0100 |
39 | --- a/program/localization/en_CA/labels.inc | 69 | +++ b/program/localization/en_CA/labels.inc 2024-08-10 01:46:39.151767483 +0200 |
40 | +++ b/program/localization/en_CA/labels.inc | 70 | @@ -128,6 +128,7 @@ |
41 | @@ -128,6 +128,7 @@ $labels['markunread'] = 'As unread'; | ||
42 | $labels['markflagged'] = 'As flagged'; | 71 | $labels['markflagged'] = 'As flagged'; |
43 | $labels['markunflagged'] = 'As unflagged'; | 72 | $labels['markunflagged'] = 'As unflagged'; |
44 | $labels['moreactions'] = 'More actions...'; | 73 | $labels['moreactions'] = 'More actions...'; |
@@ -46,7 +75,7 @@ index 03c1c8e11..8d67a49ac 100644 | |||
46 | $labels['folders-all'] = 'All folders'; | 75 | $labels['folders-all'] = 'All folders'; |
47 | $labels['more'] = 'More'; | 76 | $labels['more'] = 'More'; |
48 | $labels['back'] = 'Back'; | 77 | $labels['back'] = 'Back'; |
49 | @@ -184,6 +185,7 @@ $labels['namex'] = 'Name'; | 78 | @@ -184,6 +185,7 @@ |
50 | $labels['searchscope'] = 'Scope'; | 79 | $labels['searchscope'] = 'Scope'; |
51 | $labels['currentfolder'] = 'Current folder'; | 80 | $labels['currentfolder'] = 'Current folder'; |
52 | $labels['subfolders'] = 'This and subfolders'; | 81 | $labels['subfolders'] = 'This and subfolders'; |
@@ -55,10 +84,9 @@ index 03c1c8e11..8d67a49ac 100644 | |||
55 | $labels['openinextwin'] = 'Open in new window'; | 84 | $labels['openinextwin'] = 'Open in new window'; |
56 | $labels['emlsave'] = 'Download (.eml)'; | 85 | $labels['emlsave'] = 'Download (.eml)'; |
57 | diff --git a/program/localization/en_GB/labels.inc b/program/localization/en_GB/labels.inc | 86 | diff --git a/program/localization/en_GB/labels.inc b/program/localization/en_GB/labels.inc |
58 | index a442965de..b5b4839e3 100644 | 87 | --- a/program/localization/en_GB/labels.inc 1970-01-01 01:00:01.000000000 +0100 |
59 | --- a/program/localization/en_GB/labels.inc | 88 | +++ b/program/localization/en_GB/labels.inc 2024-08-10 01:47:14.141137558 +0200 |
60 | +++ b/program/localization/en_GB/labels.inc | 89 | @@ -139,6 +139,7 @@ |
61 | @@ -135,6 +135,7 @@ $labels['moreactions'] = 'More actions...'; | ||
62 | $labels['markallread'] = 'Mark all as read'; | 90 | $labels['markallread'] = 'Mark all as read'; |
63 | $labels['folders-cur'] = 'Selected folder only'; | 91 | $labels['folders-cur'] = 'Selected folder only'; |
64 | $labels['folders-sub'] = 'Selected folder and its subfolders'; | 92 | $labels['folders-sub'] = 'Selected folder and its subfolders'; |
@@ -66,7 +94,7 @@ index a442965de..b5b4839e3 100644 | |||
66 | $labels['folders-all'] = 'All folders'; | 94 | $labels['folders-all'] = 'All folders'; |
67 | $labels['more'] = 'More'; | 95 | $labels['more'] = 'More'; |
68 | $labels['back'] = 'Back'; | 96 | $labels['back'] = 'Back'; |
69 | @@ -221,6 +222,7 @@ $labels['namex'] = 'Name'; | 97 | @@ -225,6 +226,7 @@ |
70 | $labels['searchscope'] = 'Scope'; | 98 | $labels['searchscope'] = 'Scope'; |
71 | $labels['currentfolder'] = 'Current folder'; | 99 | $labels['currentfolder'] = 'Current folder'; |
72 | $labels['subfolders'] = 'This and subfolders'; | 100 | $labels['subfolders'] = 'This and subfolders'; |
@@ -75,10 +103,9 @@ index a442965de..b5b4839e3 100644 | |||
75 | $labels['searchinterval-1W'] = 'older than a week'; | 103 | $labels['searchinterval-1W'] = 'older than a week'; |
76 | $labels['searchinterval-1M'] = 'older than a month'; | 104 | $labels['searchinterval-1M'] = 'older than a month'; |
77 | diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc | 105 | diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc |
78 | index 2e8ec8009..c7736557f 100644 | 106 | --- a/program/localization/en_US/labels.inc 1970-01-01 01:00:01.000000000 +0100 |
79 | --- a/program/localization/en_US/labels.inc | 107 | +++ b/program/localization/en_US/labels.inc 2024-08-10 01:47:40.749419031 +0200 |
80 | +++ b/program/localization/en_US/labels.inc | 108 | @@ -162,6 +162,7 @@ |
81 | @@ -158,6 +158,7 @@ $labels['moreactions'] = 'More actions...'; | ||
82 | $labels['markallread'] = 'Mark all as read'; | 109 | $labels['markallread'] = 'Mark all as read'; |
83 | $labels['folders-cur'] = 'Selected folder only'; | 110 | $labels['folders-cur'] = 'Selected folder only'; |
84 | $labels['folders-sub'] = 'Selected folder and its subfolders'; | 111 | $labels['folders-sub'] = 'Selected folder and its subfolders'; |
@@ -86,7 +113,7 @@ index 2e8ec8009..c7736557f 100644 | |||
86 | $labels['folders-all'] = 'All folders'; | 113 | $labels['folders-all'] = 'All folders'; |
87 | $labels['more'] = 'More'; | 114 | $labels['more'] = 'More'; |
88 | $labels['back'] = 'Back'; | 115 | $labels['back'] = 'Back'; |
89 | @@ -249,6 +250,7 @@ $labels['namex'] = 'Name'; | 116 | @@ -253,6 +254,7 @@ |
90 | $labels['searchscope'] = 'Scope'; | 117 | $labels['searchscope'] = 'Scope'; |
91 | $labels['currentfolder'] = 'Current folder'; | 118 | $labels['currentfolder'] = 'Current folder'; |
92 | $labels['subfolders'] = 'This and subfolders'; | 119 | $labels['subfolders'] = 'This and subfolders'; |
@@ -95,10 +122,9 @@ index 2e8ec8009..c7736557f 100644 | |||
95 | $labels['searchinterval-1W'] = 'older than a week'; | 122 | $labels['searchinterval-1W'] = 'older than a week'; |
96 | $labels['searchinterval-1M'] = 'older than a month'; | 123 | $labels['searchinterval-1M'] = 'older than a month'; |
97 | diff --git a/program/localization/fr_FR/labels.inc b/program/localization/fr_FR/labels.inc | 124 | diff --git a/program/localization/fr_FR/labels.inc b/program/localization/fr_FR/labels.inc |
98 | index 6db44f95c..ad83e15d8 100644 | 125 | --- a/program/localization/fr_FR/labels.inc 1970-01-01 01:00:01.000000000 +0100 |
99 | --- a/program/localization/fr_FR/labels.inc | 126 | +++ b/program/localization/fr_FR/labels.inc 2024-08-10 01:48:22.494860699 +0200 |
100 | +++ b/program/localization/fr_FR/labels.inc | 127 | @@ -139,6 +139,7 @@ |
101 | @@ -135,6 +135,7 @@ $labels['moreactions'] = 'Plus d’actions…'; | ||
102 | $labels['markallread'] = 'Tout marquer comme lu'; | 128 | $labels['markallread'] = 'Tout marquer comme lu'; |
103 | $labels['folders-cur'] = 'Dossier sélectionné seulement'; | 129 | $labels['folders-cur'] = 'Dossier sélectionné seulement'; |
104 | $labels['folders-sub'] = 'Dossier sélectionné et ses sous-dossiers'; | 130 | $labels['folders-sub'] = 'Dossier sélectionné et ses sous-dossiers'; |
@@ -106,7 +132,7 @@ index 6db44f95c..ad83e15d8 100644 | |||
106 | $labels['folders-all'] = 'Tous les dossiers'; | 132 | $labels['folders-all'] = 'Tous les dossiers'; |
107 | $labels['more'] = 'Plus'; | 133 | $labels['more'] = 'Plus'; |
108 | $labels['back'] = 'Retour'; | 134 | $labels['back'] = 'Retour'; |
109 | @@ -221,6 +222,7 @@ $labels['namex'] = 'Nom'; | 135 | @@ -225,6 +226,7 @@ |
110 | $labels['searchscope'] = 'Portée'; | 136 | $labels['searchscope'] = 'Portée'; |
111 | $labels['currentfolder'] = 'Répertoire actuel'; | 137 | $labels['currentfolder'] = 'Répertoire actuel'; |
112 | $labels['subfolders'] = 'Ceci et les sous-dossiers'; | 138 | $labels['subfolders'] = 'Ceci et les sous-dossiers'; |
@@ -114,96 +140,14 @@ index 6db44f95c..ad83e15d8 100644 | |||
114 | $labels['allfolders'] = 'Tous les dossiers'; | 140 | $labels['allfolders'] = 'Tous les dossiers'; |
115 | $labels['searchinterval-1W'] = 'plus d’une semaine'; | 141 | $labels['searchinterval-1W'] = 'plus d’une semaine'; |
116 | $labels['searchinterval-1M'] = 'plus d’un mois'; | 142 | $labels['searchinterval-1M'] = 'plus d’un mois'; |
117 | diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc | ||
118 | index 8e0c642f6..ac79780e0 100644 | ||
119 | --- a/program/steps/mail/func.inc | ||
120 | +++ b/program/steps/mail/func.inc | ||
121 | @@ -110,8 +110,8 @@ if (empty($RCMAIL->action) || $RCMAIL->action == 'list') { | ||
122 | 'copy', 'move', 'quota', 'replyall', 'replylist', 'stillsearching', | ||
123 | 'flagged', 'unflagged', 'unread', 'deleted', 'replied', 'forwarded', | ||
124 | 'priority', 'withattachment', 'fileuploaderror', 'mark', 'markallread', | ||
125 | - 'folders-cur', 'folders-sub', 'folders-all', 'cancel', 'bounce', 'bouncemsg', | ||
126 | - 'sendingmessage'); | ||
127 | + 'folders-cur', 'folders-sub', 'folders-allsubscribed', 'folder-all', | ||
128 | + 'cancel', 'bounce', 'bouncemsg', 'sendingmessage'); | ||
129 | } | ||
130 | } | ||
131 | |||
132 | diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc | ||
133 | index f60528835..836a715b0 100644 | ||
134 | --- a/program/steps/mail/search.inc | ||
135 | +++ b/program/steps/mail/search.inc | ||
136 | @@ -86,7 +86,7 @@ else if (strlen(trim($str))) { | ||
137 | } | ||
138 | |||
139 | // save search modifiers for the current folder to user prefs | ||
140 | - $mkey = $scope == 'all' ? '*' : $mbox; | ||
141 | + $mkey = ($scope == 'all' || $scope == 'allsubscribed') ? '*' : $mbox; | ||
142 | $search_mods = rcmail_search_mods(); | ||
143 | $search_mods[$mkey] = array_fill_keys(array_keys($subject), 1); | ||
144 | |||
145 | @@ -124,6 +124,10 @@ if (!empty($continue) && isset($_SESSION['search']) && $_SESSION['search_request | ||
146 | if ($search_str) { | ||
147 | // search all, current or subfolders folders | ||
148 | if ($scope == 'all') { | ||
149 | + $mboxes = $RCMAIL->storage->list_folders('', '*', 'mail', null, true); | ||
150 | + natcasesort($mboxes); // we want natural alphabetic sorting of folders in the result set | ||
151 | + } | ||
152 | + else if ($scope == 'allsubscribed') { | ||
153 | $mboxes = $RCMAIL->storage->list_folders_subscribed('', '*', 'mail', null, true); | ||
154 | natcasesort($mboxes); // we want natural alphabetic sorting of folders in the result set | ||
155 | } | ||
156 | @@ -133,7 +137,7 @@ if ($search_str) { | ||
157 | array_unshift($mboxes, $mbox); | ||
158 | } | ||
159 | |||
160 | - if ($scope != 'all') { | ||
161 | + if ($scope != 'all' && $scope != 'allsubscribed') { | ||
162 | // Remember current folder, it can change in meantime (plugins) | ||
163 | // but we need it to e.g. recognize Sent folder to handle From/To column later | ||
164 | $RCMAIL->output->set_env('mailbox', $mbox); | ||
165 | @@ -194,7 +198,7 @@ else { | ||
166 | $count = 0; | ||
167 | $OUTPUT->show_message('searchnomatch', 'notice'); | ||
168 | $OUTPUT->set_env('multifolder_listing', (bool)$result->multi); | ||
169 | - if ($result->multi && $scope == 'all') { | ||
170 | + if ($result->multi && ($scope == 'all' || $scope == 'allsubscribed')) { | ||
171 | $OUTPUT->command('select_folder', ''); | ||
172 | } | ||
173 | } | ||
174 | diff --git a/skins/classic/templates/mail.html b/skins/classic/templates/mail.html | ||
175 | index 666adf606..23d12a275 100644 | ||
176 | --- a/skins/classic/templates/mail.html | ||
177 | +++ b/skins/classic/templates/mail.html | ||
178 | @@ -106,6 +106,7 @@ | ||
179 | <li><label class="comment"><roundcube:label name="searchscope" /></label></li> | ||
180 | <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> | ||
181 | <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> | ||
182 | + <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> | ||
183 | <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> | ||
184 | </ul> | ||
185 | </div> | ||
186 | diff --git a/skins/elastic/templates/mail.html b/skins/elastic/templates/mail.html | 143 | diff --git a/skins/elastic/templates/mail.html b/skins/elastic/templates/mail.html |
187 | index 51dbfcd30..4c2281281 100644 | 144 | --- a/skins/elastic/templates/mail.html 1970-01-01 01:00:01.000000000 +0100 |
188 | --- a/skins/elastic/templates/mail.html | 145 | +++ b/skins/elastic/templates/mail.html 2024-08-10 01:55:08.812162821 +0200 |
189 | +++ b/skins/elastic/templates/mail.html | 146 | @@ -91,6 +91,7 @@ |
190 | @@ -77,6 +77,7 @@ | 147 | <select name="s_scope" id="s_scope" class="custom-select"> |
191 | <select name="s_scope" id="s_scope"> | ||
192 | <option value="base"><roundcube:label name="currentfolder" /></option> | 148 | <option value="base"><roundcube:label name="currentfolder" /></option> |
193 | <option value="sub"><roundcube:label name="subfolders" /></option> | 149 | <option value="sub"><roundcube:label name="subfolders" /></option> |
194 | + <option value="allsubscribed"><roundcube:label name="allsubscribedfolders" /></option> | 150 | + <option value="allsubscribed"><roundcube:label name="allsubscribedfolders" /></option> |
195 | <option value="all"><roundcube:label name="allfolders" /></option> | 151 | <option value="all"><roundcube:label name="allfolders" /></option> |
196 | </select> | 152 | </select> |
197 | </div> | 153 | </div> |
198 | diff --git a/skins/larry/templates/mail.html b/skins/larry/templates/mail.html | ||
199 | index 5ef0bc211..e0e8280ad 100644 | ||
200 | --- a/skins/larry/templates/mail.html | ||
201 | +++ b/skins/larry/templates/mail.html | ||
202 | @@ -56,6 +56,7 @@ | ||
203 | <li role="separator" class="separator"><label><roundcube:label name="searchscope" /></label></li> | ||
204 | <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> | ||
205 | <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> | ||
206 | + <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> | ||
207 | <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> | ||
208 | </ul> | ||
209 | <div class="buttons"><a class="button" href="#" onclick="if (rcmail.command('search')) UI.show_popup('searchmenu',false)"><roundcube:label name="search" /></a></div> | ||
diff --git a/flakes/mypackages/pkgs/webapps/roundcubemail/default.nix b/flakes/mypackages/pkgs/webapps/roundcubemail/default.nix index a786e86..f83e61b 100644 --- a/flakes/mypackages/pkgs/webapps/roundcubemail/default.nix +++ b/flakes/mypackages/pkgs/webapps/roundcubemail/default.nix | |||
@@ -1,6 +1,6 @@ | |||
1 | { varDir ? "/var/lib/roundcubemail" | 1 | { varDir ? "/var/lib/roundcubemail" |
2 | , roundcube_config ? "/etc/roundcube/config.php" | 2 | , roundcube_config ? "/etc/roundcube/config.php" |
3 | , stdenv, fetchurl, jre, unzip, lib, callPackage }: | 3 | , stdenv, fetchurl, which, nodePackages, lib, callPackage }: |
4 | let | 4 | let |
5 | defaultInstall = '' | 5 | defaultInstall = '' |
6 | mkdir -p $out | 6 | mkdir -p $out |
@@ -52,22 +52,20 @@ let | |||
52 | passthru = toPassthru newRoundcube pkg.plugins (pkg.skins ++ skins); | 52 | passthru = toPassthru newRoundcube pkg.plugins (pkg.skins ++ skins); |
53 | }); | 53 | }); |
54 | in newRoundcube; | 54 | in newRoundcube; |
55 | shrinker = fetchurl { | ||
56 | url = "https://dl.google.com/closure-compiler/compiler-20200719.zip"; | ||
57 | sha256 = "0j46y9ack2yq67naca6nfysbmyilwjlkl29dbswidf1lq09yhhj3"; | ||
58 | }; | ||
59 | package = stdenv.mkDerivation rec { | 55 | package = stdenv.mkDerivation rec { |
60 | version = "1.4.15"; | 56 | version = "1.6.8"; |
61 | name = "roundcubemail-${version}"; | 57 | name = "roundcubemail-${version}"; |
62 | src= fetchurl { | 58 | src= fetchurl { |
63 | url = "https://github.com/roundcube/roundcubemail/releases/download/${version}/${name}-complete.tar.gz"; | 59 | url = "https://github.com/roundcube/roundcubemail/releases/download/${version}/${name}-complete.tar.gz"; |
64 | sha256 = "sha256-0CRVGmPCjMOUPEELpWk93TifchXUbzhUvS55IOgaAh8="; | 60 | sha256 = "sha256-hGi+AgSnNMV0re9L4BV4x9xPq5wv40ADvzQaK9IO/So="; |
65 | }; | 61 | }; |
66 | patches = [ ./add_all.patch ]; # This patch includes js modification which requires to re-run the jsshrink below | 62 | patches = [ |
67 | buildInputs = [ unzip jre ]; | 63 | ./add_all.patch # This patch includes js modification which requires to re-run the jsshrink below |
64 | ./md5.patch | ||
65 | ]; | ||
66 | buildInputs = [ which nodePackages.uglify-js ]; | ||
68 | buildPhase = '' | 67 | buildPhase = '' |
69 | mkdir -p /tmp | 68 | sed -i -e "s/uglify-js/uglifyjs/g" ./bin/jsshrink.sh |
70 | unzip -p "${shrinker}" "*.jar" > "/tmp/compiler.jar" | ||
71 | ./bin/jsshrink.sh | 69 | ./bin/jsshrink.sh |
72 | sed -i \ | 70 | sed -i \ |
73 | -e "s|RCUBE_INSTALL_PATH . 'temp.*|'${varDir}/cache';|" \ | 71 | -e "s|RCUBE_INSTALL_PATH . 'temp.*|'${varDir}/cache';|" \ |
diff --git a/flakes/mypackages/pkgs/webapps/roundcubemail/md5.patch b/flakes/mypackages/pkgs/webapps/roundcubemail/md5.patch new file mode 100644 index 0000000..36b30c2 --- /dev/null +++ b/flakes/mypackages/pkgs/webapps/roundcubemail/md5.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php | ||
2 | index 0552b89c2..1b84e1b4e 100644 | ||
3 | --- a/program/include/rcmail_output_html.php | ||
4 | +++ b/program/include/rcmail_output_html.php | ||
5 | @@ -1013,13 +1013,13 @@ EOF; | ||
6 | // use minified file if exists (not in development mode) | ||
7 | if (!$this->devel_mode && !preg_match('/\.min\.' . $ext . '$/', $file)) { | ||
8 | $minified_file = substr($file, 0, strlen($ext) * -1) . 'min.' . $ext; | ||
9 | - if ($fs = @filemtime($this->assets_dir . $minified_file)) { | ||
10 | - return $minified_file . '?s=' . $fs; | ||
11 | + if ($fs = @md5_file($this->assets_dir . $minified_file)) { | ||
12 | + return $minified_file . '?s=' . substr($fs, 0, 6); | ||
13 | } | ||
14 | } | ||
15 | |||
16 | - if ($fs = @filemtime($this->assets_dir . $file)) { | ||
17 | - $file .= '?s=' . $fs; | ||
18 | + if ($fs = @md5_file($this->assets_dir . $file)) { | ||
19 | + $file .= '?s=' . substr($fs, 0, 6); | ||
20 | } | ||
21 | |||
22 | return $file; | ||
diff --git a/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/carddav/default.nix b/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/carddav/default.nix index ad6856b..a9e7821 100644 --- a/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/carddav/default.nix +++ b/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/carddav/default.nix | |||
@@ -1,7 +1,7 @@ | |||
1 | { buildPlugin }: | 1 | { buildPlugin }: |
2 | buildPlugin rec { | 2 | buildPlugin rec { |
3 | appName = "carddav"; | 3 | appName = "carddav"; |
4 | version = "3.0.3"; | 4 | version = "5.1.0"; |
5 | url = "https://github.com/blind-coder/rcmcarddav/releases/download/v${version}/${appName}-${version}.tar.bz2"; | 5 | url = "https://github.com/mstilkerich/rcmcarddav/releases/download/v${version}/${appName}-v${version}.tar.gz"; |
6 | sha256 = "0cf5rnqkhhag2vdy808zfpr4l5586fn43nvcia8ac1ha58azrxal"; | 6 | sha256 = "sha256-lmeTr1i1oO65IQcry6NRxL1iEi+QxW0K6r9dyv/wJis="; |
7 | } | 7 | } |
diff --git a/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/contextmenu/default.nix b/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/contextmenu/default.nix index 34a43a7..9e56784 100644 --- a/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/contextmenu/default.nix +++ b/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/contextmenu/default.nix | |||
@@ -1,7 +1,7 @@ | |||
1 | { buildPlugin }: | 1 | { buildPlugin }: |
2 | buildPlugin rec { | 2 | buildPlugin rec { |
3 | appName = "contextmenu"; | 3 | appName = "contextmenu"; |
4 | version = "3.2"; | 4 | version = "3.3.1"; |
5 | url = "https://github.com/johndoh/roundcube-${appName}/archive/${version}.tar.gz"; | 5 | url = "https://github.com/johndoh/roundcube-${appName}/archive/${version}.tar.gz"; |
6 | sha256 = "1j7qns42bvgwav8d5n8g16iajyrhydd76hgil8625f3xyjbv4mx0"; | 6 | sha256 = "sha256-Y4IPe6EWvfU3pRq1MBTMMDxF9GXj/x4xDTMz5klAwLs="; |
7 | } | 7 | } |
diff --git a/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/contextmenu_folder/default.nix b/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/contextmenu_folder/default.nix index e5cb46d..d3c3683 100644 --- a/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/contextmenu_folder/default.nix +++ b/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/contextmenu_folder/default.nix | |||
@@ -1,7 +1,7 @@ | |||
1 | { buildPlugin }: | 1 | { buildPlugin }: |
2 | buildPlugin rec { | 2 | buildPlugin rec { |
3 | appName = "contextmenu_folder"; | 3 | appName = "contextmenu_folder"; |
4 | version = "1.3.3"; | 4 | version = "2.0.2"; |
5 | url = "https://github.com/random-cuber/${appName}/archive/${version}.tar.gz"; | 5 | url = "https://github.com/random-cuber/${appName}/archive/${version}.tar.gz"; |
6 | sha256 = "1ngfws1v8qrpa52rjh7kirc98alchk2vbqwra86h00agyjjlcc57"; | 6 | sha256 = "sha256-P/T7EZPKzcz1R5iDZU+V+5sWnli9OCwSziWm8oPuuFM="; |
7 | } | 7 | } |
diff --git a/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/ident_switch/default.nix b/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/ident_switch/default.nix index 3e10fee..14815f6 100644 --- a/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/ident_switch/default.nix +++ b/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/ident_switch/default.nix | |||
@@ -1,7 +1,7 @@ | |||
1 | { buildPlugin }: | 1 | { buildPlugin }: |
2 | buildPlugin rec { | 2 | buildPlugin rec { |
3 | appName = "ident_switch"; | 3 | appName = "ident_switch"; |
4 | version = "4.2"; | 4 | version = "4.4.2"; |
5 | url = "https://bitbucket.org/BoresExpress/${appName}/get/${version}.tar.gz"; | 5 | url = "https://bitbucket.org/BoresExpress/${appName}/get/${version}.tar.gz"; |
6 | sha256 = "0rf2krjsnly4i0mzgsbx09xckr3p9a9dzxf8qq4lkyng1a7dvjkq"; | 6 | sha256 = "sha256-+3rus8+2PU1E1/8U6KeJJNm6JpJq7elyL07BDR0UsZg="; |
7 | } | 7 | } |
diff --git a/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/thunderbird_labels/default.nix b/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/thunderbird_labels/default.nix index b67f16a..4e1ab51 100644 --- a/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/thunderbird_labels/default.nix +++ b/flakes/mypackages/pkgs/webapps/roundcubemail/plugins/thunderbird_labels/default.nix | |||
@@ -1,7 +1,7 @@ | |||
1 | { buildPlugin }: | 1 | { buildPlugin }: |
2 | buildPlugin rec { | 2 | buildPlugin rec { |
3 | appName = "thunderbird_labels"; | 3 | appName = "thunderbird_labels"; |
4 | version = "v1.4.2"; | 4 | version = "v1.6.1"; |
5 | url = "https://github.com/mike-kfed/roundcube-${appName}/archive/${version}.tar.gz"; | 5 | url = "https://github.com/mike-kfed/roundcube-${appName}/archive/${version}.tar.gz"; |
6 | sha256 = "00dqqlq6m8a6dwynp6gwfimc10anbs8kh0qdy8xvq2l06hk6jxyc"; | 6 | sha256 = "sha256-2zVGoIMwO+zg3v/MZmGdvc7Qyrcyyf6Hua0fRc7ewuU="; |
7 | } | 7 | } |