File: 0001-Use-ckeditor4.patch

package info (click to toggle)
php-horde-imp 6.2.27-3.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 21,164 kB
  • sloc: php: 36,471; xml: 25,887; javascript: 11,916; makefile: 18; sh: 3
file content (50 lines) | stat: -rw-r--r-- 2,583 bytes parent folder | download
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
Forwarded: not-needed
Reviewed-by: Bastien Roucariès <rouca@debian.org>
Reviewed-by: Sylvain Beucler <beuc@debian.org>
Last-Update: 2025-03-21

ckeditor3 is EOL and horde-specific in Debian, drop the dependency.

Index: php-horde-imp-6.2.27/imp-6.2.27/lib/Script/Package/ComposeBase.php
===================================================================
--- php-horde-imp-6.2.27.orig/imp-6.2.27/lib/Script/Package/ComposeBase.php
+++ php-horde-imp-6.2.27/imp-6.2.27/lib/Script/Package/ComposeBase.php
@@ -53,10 +53,11 @@ class IMP_Script_Package_ComposeBase ext
 
             $js = new Horde_Script_File_JsDir('ckeditor/' . $plugin . '.js', 'imp');
             $page_output->addInlineScript(array(
-                'if (window.CKEDITOR) { CKEDITOR.on("loaded", function(e) {' .
-                  'CKEDITOR.plugins.addExternal("' . $plugin . '", "' . $js->url->url . '", "");' .
-                  'CKEDITOR.config.filebrowserImageUploadUrl = "' . $upload_url . '";' .
-                '}); };'
+                'if (window.CKEDITOR) {' .
+                  // Debian: pasteattachment was broken even in ckeditor3 and now disabled
+                  //'CKEDITOR.plugins.addExternal("' . $plugin . '", "' . $js->url->url . '", "");' .
+                  //'CKEDITOR.config.filebrowserImageUploadUrl = "' . $upload_url . '";' .
+                '};'
             ), true);
         }
     }
Index: php-horde-imp-6.2.27/imp-6.2.27/js/compose-dimp.js
===================================================================
--- php-horde-imp-6.2.27.orig/imp-6.2.27/js/compose-dimp.js
+++ php-horde-imp-6.2.27/imp-6.2.27/js/compose-dimp.js
@@ -584,7 +584,8 @@ var DimpCompose = {
 
         if (rte && !this.rte) {
             config = Object.clone(IMP.ckeditor_config);
-            config.extraPlugins = 'pasteattachment';
+            // Debian: pasteattachment was broken even in ckeditor3 and now disabled
+            //config.extraPlugins = 'pasteattachment';
             this.rte = new IMP_Editor('composeMessage', config);
 
             this.rte.editor.on('getData', function(evt) {
@@ -1559,7 +1560,7 @@ document.observe('HordeCore:ajaxFailure'
 document.observe('IMP_Editor:ready', function(e) {
     if (e.memo.name == 'composeMessage') {
         new CKEDITOR.dom.document(
-            e.memo.getThemeSpace('contents').$.down('IFRAME').contentWindow.document)
+            e.memo.ui.space('contents').$.down('IFRAME').contentWindow.document)
         .on('keydown', function(evt) {
             this.keydownHandler(Event.extend(evt.data.$), true);
         }.bind(this));