]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - pkgs/webapps/roundcubemail/add_all.patch
Squash changes containing private information
[perso/Immae/Config/Nix.git] / pkgs / webapps / roundcubemail / add_all.patch
diff --git a/pkgs/webapps/roundcubemail/add_all.patch b/pkgs/webapps/roundcubemail/add_all.patch
deleted file mode 100644 (file)
index ba651e2..0000000
+++ /dev/null
@@ -1,209 +0,0 @@
-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>