Permalink
Browse files

correctly upgrade plonebrowser plugin

  • Loading branch information...
1 parent 3112db3 commit 13cfb95727da9f79439af621ac0d7380bdd9ecba @domenkozar domenkozar committed Oct 17, 2011
Showing with 8 additions and 0 deletions.
  1. +8 −0 Products/TinyMCE/upgrades.py
View
8 Products/TinyMCE/upgrades.py
@@ -62,5 +62,13 @@ def upgrade_11_to_2(setuptool):
def upgrade_12_to_13(setuptool):
# Unregister old js and kss and register new js
+ tinymce = getUtility(ITinyMCE)
+
+ # plonebrowser replaces ploneimage & plonelink
+ plugins = tinymce.customplugins.split()
+ plugins.append(u'plonebrowser')
+ plugins = filter(lambda x: x != u'plonelink' and x != u'ploneimage', plugins)
+ tinymce.customplugins = '\n'.join(plugins)
+
setuptool.runAllImportStepsFromProfile('profile-Products.TinyMCE:upgrade_12_to_13')
setuptool.runImportStepFromProfile('profile-Products.TinyMCE:TinyMCE', 'viewlets')

0 comments on commit 13cfb95

Please sign in to comment.