[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Cypht plugin: Changes to server-information parameters do not take...

"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6926a678c947a_2a9e1060594b2@gitlab-sidekiq-low-urgency-cpu-bound-v2-57b49dfc9c-4b794.mail>

Victor Emanouilov pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
568bbe8a by Merci Jacob at 2025-11-26T06:56:29+00:00
[FIX] Cypht plugin: Changes to server-information parameters do not take effect because the cached version is used in most cases
---
* [FIX] Cypht plugin: Changes to server-information parameters do not take effect because the cached version is used in most cases

See merge request tikiwiki/tiki!9118

- - - - -


1 changed file:

- lib/wiki-plugins/wikiplugin_cypht.php


Changes:

=====================================
lib/wiki-plugins/wikiplugin_cypht.php
=====================================
@@ -362,9 +362,16 @@ function wikiplugin_cypht($data, $params)
             $_SESSION[$session_prefix]['user_data']['imap_servers'] = [];
         }
         $found = false;
-        foreach ($_SESSION[$session_prefix]['user_data']['imap_servers'] as $server) {
+        foreach ($_SESSION[$session_prefix]['user_data']['imap_servers'] as $id => $server) {
             if ($server['server'] == $attributes['server'] && $server['tls'] == $attributes['tls'] && $server['port'] == $attributes['port'] && $server['user'] == $attributes['user']) {
                 $found = true;
+
+                if (array_diff($server, $attributes)) {
+                    TikiLib::lib('cache')->invalidate('imap_folders_imap_' . $id . '_');
+                    $headerlib->add_js("sessionStorage.clear();");
+                    $_SESSION[$session_prefix]['user_data']['imap_servers'][$id] = array_merge($server, $attributes);
+                }
+
                 break;
             }
         }



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/568bbe8aeba626b8616b21720eeaba2a2684570a

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/568bbe8aeba626b8616b21720eeaba2a2684570a
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.