|
12 | 12 | # - GNU GENERAL PUBLIC LICENSE Version 2
|
13 | 13 | #*******************************************************************************
|
14 | 14 |
|
15 |
| -module AttachmentPatch |
| 15 | +module ClipboardImagePaste::AttachmentPatch |
16 | 16 | # go through attachments and find keys starting by 100;
|
17 | 17 | # image attachments are identified by key >= 10001, the keys should be numbers
|
18 | 18 | # 'cause acts_as_attachable is sorting them according to insertion order
|
@@ -84,38 +84,38 @@ def remove_alpha(imgData)
|
84 | 84 | # Send patches - guarded against including the module multiple time
|
85 | 85 | # (like in tests) and registering multiple callbacks
|
86 | 86 |
|
87 |
| -unless Issue.included_modules.include? AttachmentPatch |
88 |
| - Issue.send(:prepend, AttachmentPatch) |
| 87 | +unless Issue.included_modules.include? ClipboardImagePaste::AttachmentPatch |
| 88 | + Issue.send(:prepend, ClipboardImagePaste::AttachmentPatch) |
89 | 89 | end
|
90 | 90 |
|
91 |
| -unless News.included_modules.include? AttachmentPatch |
92 |
| - News.send(:prepend, AttachmentPatch) |
| 91 | +unless News.included_modules.include? ClipboardImagePaste::AttachmentPatch |
| 92 | + News.send(:prepend, ClipboardImagePaste::AttachmentPatch) |
93 | 93 | end
|
94 | 94 |
|
95 |
| -unless WikiPage.included_modules.include? AttachmentPatch |
96 |
| - WikiPage.send(:prepend, AttachmentPatch) |
| 95 | +unless WikiPage.included_modules.include? ClipboardImagePaste::AttachmentPatch |
| 96 | + WikiPage.send(:prepend, ClipboardImagePaste::AttachmentPatch) |
97 | 97 | end
|
98 | 98 |
|
99 |
| -unless Message.included_modules.include? AttachmentPatch |
100 |
| - Message.send(:prepend, AttachmentPatch) |
| 99 | +unless Message.included_modules.include? ClipboardImagePaste::AttachmentPatch |
| 100 | + Message.send(:prepend, ClipboardImagePaste::AttachmentPatch) |
101 | 101 | end
|
102 | 102 |
|
103 |
| -unless Document.included_modules.include? AttachmentPatch |
104 |
| - Document.send(:prepend, AttachmentPatch) |
| 103 | +unless Document.included_modules.include? ClipboardImagePaste::AttachmentPatch |
| 104 | + Document.send(:prepend, ClipboardImagePaste::AttachmentPatch) |
105 | 105 | end
|
106 | 106 |
|
107 |
| -unless Version.included_modules.include? AttachmentPatch |
108 |
| - Version.send(:prepend, AttachmentPatch) |
| 107 | +unless Version.included_modules.include? ClipboardImagePaste::AttachmentPatch |
| 108 | + Version.send(:prepend, ClipboardImagePaste::AttachmentPatch) |
109 | 109 | end
|
110 | 110 |
|
111 |
| -unless Project.included_modules.include? AttachmentPatch |
112 |
| - Project.send(:prepend, AttachmentPatch) |
| 111 | +unless Project.included_modules.include? ClipboardImagePaste::AttachmentPatch |
| 112 | + Project.send(:prepend, ClipboardImagePaste::AttachmentPatch) |
113 | 113 | end
|
114 | 114 |
|
115 | 115 | # KbArticle plug-in (https://github.com/alexbevi/redmine_knowledgebase)
|
116 | 116 | begin
|
117 |
| - unless KbArticle.included_modules.include? AttachmentPatch |
118 |
| - KbArticle.send(:prepend, AttachmentPatch) |
| 117 | + unless KbArticle.included_modules.include? ClipboardImagePaste::AttachmentPatch |
| 118 | + KbArticle.send(:prepend, ClipboardImagePaste::AttachmentPatch) |
119 | 119 | end
|
120 | 120 | rescue NameError => e
|
121 | 121 | # plug-in not installed
|
|
0 commit comments