Skip to content

Commit

Permalink
[fc] Repository: plone.app.linkintegrity
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2017-09-27T10:00:28+02:00
Author: Philip Bauer (pbauer) <[email protected]>
Commit: plone/plone.app.linkintegrity@8fe0e91

Fix view @@updateLinkIntegrityInformation after Language='all' no longer works

Files changed:
M CHANGES.rst
M plone/app/linkintegrity/browser/update.py
Repository: plone.app.linkintegrity

Branch: refs/heads/master
Date: 2017-09-27T12:54:23+02:00
Author: Philip Bauer (pbauer) <[email protected]>
Commit: plone/plone.app.linkintegrity@9cba64c

remove obsolete query

Files changed:
M plone/app/linkintegrity/browser/update.py
Repository: plone.app.linkintegrity

Branch: refs/heads/master
Date: 2017-09-27T14:27:11+02:00
Author: Philip Bauer (pbauer) <[email protected]>
Commit: plone/plone.app.linkintegrity@9d2dc86

Merge pull request #59 from plone/fix_updateLinkIntegrityInformation

Fix view @@updateLinkIntegrityInformation

Files changed:
M CHANGES.rst
M plone/app/linkintegrity/browser/update.py
  • Loading branch information
pbauer committed Sep 27, 2017
1 parent 1c64175 commit b8db12b
Showing 1 changed file with 142 additions and 220 deletions.
362 changes: 142 additions & 220 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,252 +1,174 @@
Repository: plone.app.contenttypes
Repository: plone.app.linkintegrity


Branch: refs/heads/master
Date: 2017-09-27T09:32:21+02:00
Date: 2017-09-27T10:00:28+02:00
Author: Philip Bauer (pbauer) <[email protected]>
Commit: https://github.com/plone/plone.app.contenttypes/commit/322ae669eafc6036e2b0dd32409488a7ff077d7b
Commit: https://github.com/plone/plone.app.linkintegrity/commit/8fe0e91aabd12e1c6910910773ebb1eb87fd66bf

Use post_handler instead of import_steps
Fix view @@updateLinkIntegrityInformation after Language='all' no longer works

Files changed:
M CHANGES.rst
M plone/app/contenttypes/profiles.zcml
M plone/app/contenttypes/setuphandlers.py
D plone/app/contenttypes/profiles/content/import_steps.xml
D plone/app/contenttypes/profiles/content/plone.app.contenttypes_content.txt
D plone/app/contenttypes/profiles/default/import_steps.xml
D plone/app/contenttypes/profiles/default/plone.app.contenttypes_default.txt
M plone/app/linkintegrity/browser/update.py

diff --git a/CHANGES.rst b/CHANGES.rst
index b8ad5084..2be6d445 100644
index 2efd283..d3679e0 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -10,7 +10,8 @@ Breaking changes:
@@ -18,6 +18,9 @@ Bug fixes:
paragraph to be always visible, even without link breaches.
[arsenico13]

New features:

-- *add item here*
+- Use post_handler instead of import_steps.
+- Fix view @@updateLinkIntegrityInformation after Language='all' no longer works.
+ [pbauer]

Bug fixes:

diff --git a/plone/app/contenttypes/profiles.zcml b/plone/app/contenttypes/profiles.zcml
index 886bd84c..e1b837a8 100644
--- a/plone/app/contenttypes/profiles.zcml
+++ b/plone/app/contenttypes/profiles.zcml
@@ -9,6 +9,7 @@
directory="profiles/content"
description="Plone default content-types (plone.app.contenttypes)"
provides="Products.GenericSetup.interfaces.EXTENSION"
+ post_handler=".setuphandlers.step_import_content"
/>

<!-- All types, no sample content. -->
@@ -18,6 +19,7 @@
directory="profiles/default"
description="Plone default content-types (plone.app.contenttypes)"
provides="Products.GenericSetup.interfaces.EXTENSION"
+ post_handler=".setuphandlers.step_setup_various"
/>

<!-- Uninstall -->
diff --git a/plone/app/contenttypes/profiles/content/import_steps.xml b/plone/app/contenttypes/profiles/content/import_steps.xml
deleted file mode 100644
index 6444e632..00000000
--- a/plone/app/contenttypes/profiles/content/import_steps.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-<import-steps>
- <import-step id="plone.app.contenttypes--plone-content" version="20111108-01"
- handler="plone.app.contenttypes.setuphandlers.step_import_content"
- title="plone.app.contenttypes base content-types">
- plone.app.contenttypes plone-content installation step.
- <dependency step="typeinfo" />
- </import-step>
-</import-steps>
diff --git a/plone/app/contenttypes/profiles/content/plone.app.contenttypes_content.txt b/plone/app/contenttypes/profiles/content/plone.app.contenttypes_content.txt
deleted file mode 100644
index 7d1c434a..00000000
--- a/plone/app/contenttypes/profiles/content/plone.app.contenttypes_content.txt
+++ /dev/null
@@ -1 +0,0 @@
-This file is used as a marker in setuphandlers.py.
diff --git a/plone/app/contenttypes/profiles/default/import_steps.xml b/plone/app/contenttypes/profiles/default/import_steps.xml
deleted file mode 100644
index e1227b4c..00000000
--- a/plone/app/contenttypes/profiles/default/import_steps.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-<import-steps>
- <import-step id="plone.app.contenttypes" version="20140210-01"
- handler="plone.app.contenttypes.setuphandlers.step_setup_various"
- title="plone.app.contenttypes base content-types">
- <dependency step="typeinfo"/>
- plone.app.contenttypes installation step.
- </import-step>
-</import-steps>
diff --git a/plone/app/contenttypes/profiles/default/plone.app.contenttypes_default.txt b/plone/app/contenttypes/profiles/default/plone.app.contenttypes_default.txt
deleted file mode 100644
index 7d1c434a..00000000
--- a/plone/app/contenttypes/profiles/default/plone.app.contenttypes_default.txt
+++ /dev/null
@@ -1 +0,0 @@
-This file is used as a marker in setuphandlers.py.
diff --git a/plone/app/contenttypes/setuphandlers.py b/plone/app/contenttypes/setuphandlers.py
index 0cdef2e4..6b80966b 100644
--- a/plone/app/contenttypes/setuphandlers.py
+++ b/plone/app/contenttypes/setuphandlers.py
@@ -326,9 +326,7 @@ def configure_members_folder(portal, target_language):

def step_import_content(context):
"""Create default content."""
- if context.readDataFile('plone.app.contenttypes_content.txt') is None:
- return
- portal = context.getSite()
+ portal = context.__parent__
target_language, is_combined_language, locale = _get_locales_info(portal)
create_frontpage(portal, target_language)
create_news_topic(portal, target_language)
@@ -337,9 +335,7 @@ def step_import_content(context):


def step_setup_various(context):
- if context.readDataFile('plone.app.contenttypes_default.txt') is None:
- return
- portal = context.getSite()
+ portal = context.__parent__
target_language, is_combined_language, locale = _get_locales_info(portal)
_setup_calendar(portal, locale)
_setup_visible_ids(portal, target_language, locale)
+

3.3.2 (2017-08-14)
------------------
diff --git a/plone/app/linkintegrity/browser/update.py b/plone/app/linkintegrity/browser/update.py
index c4ddfe1..0ea9cb5 100644
--- a/plone/app/linkintegrity/browser/update.py
+++ b/plone/app/linkintegrity/browser/update.py
@@ -11,25 +11,6 @@
from zExceptions import NotFound

import logging
-import pkg_resources
-
-
-# Is there a multilingual addon?
-try:
- pkg_resources.get_distribution('Products.LinguaPlone')
-except pkg_resources.DistributionNotFound:
- HAS_MULTILINGUAL = False
-else:
- HAS_MULTILINGUAL = True
-
-if not HAS_MULTILINGUAL:
- try:
- pkg_resources.get_distribution('plone.app.multilingual')
- except pkg_resources.DistributionNotFound:
- HAS_MULTILINGUAL = False
- else:
- HAS_MULTILINGUAL = True
-
logger = logging.getLogger(__name__)


@@ -69,8 +50,6 @@ def update(self):
catalog = getToolByName(self.context, 'portal_catalog')
count = 0
query = {}
- if HAS_MULTILINGUAL and 'Language' in catalog.indexes():
- query['Language'] = 'all'

for brain in catalog(query):
try:


Repository: plone.app.contenttypes
Repository: plone.app.linkintegrity


Branch: refs/heads/master
Date: 2017-09-27T11:46:41+02:00
Author: Johannes Raggam (thet) <[email protected]>
Commit: https://github.com/plone/plone.app.contenttypes/commit/c80d6f6005aa9052619d9f67daf3918fcb189372
Date: 2017-09-27T12:54:23+02:00
Author: Philip Bauer (pbauer) <[email protected]>
Commit: https://github.com/plone/plone.app.linkintegrity/commit/9cba64c3995527d1d91a67ece8bcbe68dd8919e3

remove obsolete query

Files changed:
M plone/app/linkintegrity/browser/update.py

diff --git a/plone/app/linkintegrity/browser/update.py b/plone/app/linkintegrity/browser/update.py
index 0ea9cb5..4891658 100644
--- a/plone/app/linkintegrity/browser/update.py
+++ b/plone/app/linkintegrity/browser/update.py
@@ -49,9 +49,8 @@ def __call__(self):
def update(self):
catalog = getToolByName(self.context, 'portal_catalog')
count = 0
- query = {}

- for brain in catalog(query):
+ for brain in catalog():
try:
obj = brain.getObject()
except (AttributeError, NotFound, KeyError):


Merge pull request #427 from plone/post_handler
Repository: plone.app.linkintegrity

Use post_handler instead of import_steps

Branch: refs/heads/master
Date: 2017-09-27T14:27:11+02:00
Author: Philip Bauer (pbauer) <[email protected]>
Commit: https://github.com/plone/plone.app.linkintegrity/commit/9d2dc86bb437efee771c9c4b7e21dd2f6d532a7b

Merge pull request #59 from plone/fix_updateLinkIntegrityInformation

Fix view @@updateLinkIntegrityInformation

Files changed:
M CHANGES.rst
M plone/app/contenttypes/profiles.zcml
M plone/app/contenttypes/setuphandlers.py
D plone/app/contenttypes/profiles/content/import_steps.xml
D plone/app/contenttypes/profiles/content/plone.app.contenttypes_content.txt
D plone/app/contenttypes/profiles/default/import_steps.xml
D plone/app/contenttypes/profiles/default/plone.app.contenttypes_default.txt
M plone/app/linkintegrity/browser/update.py

diff --git a/CHANGES.rst b/CHANGES.rst
index b8ad5084..2be6d445 100644
index 2efd283..d3679e0 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -10,7 +10,8 @@ Breaking changes:

New features:
@@ -18,6 +18,9 @@ Bug fixes:
paragraph to be always visible, even without link breaches.
[arsenico13]

-- *add item here*
+- Use post_handler instead of import_steps.
+- Fix view @@updateLinkIntegrityInformation after Language='all' no longer works.
+ [pbauer]

Bug fixes:

diff --git a/plone/app/contenttypes/profiles.zcml b/plone/app/contenttypes/profiles.zcml
index 886bd84c..e1b837a8 100644
--- a/plone/app/contenttypes/profiles.zcml
+++ b/plone/app/contenttypes/profiles.zcml
@@ -9,6 +9,7 @@
directory="profiles/content"
description="Plone default content-types (plone.app.contenttypes)"
provides="Products.GenericSetup.interfaces.EXTENSION"
+ post_handler=".setuphandlers.step_import_content"
/>

<!-- All types, no sample content. -->
@@ -18,6 +19,7 @@
directory="profiles/default"
description="Plone default content-types (plone.app.contenttypes)"
provides="Products.GenericSetup.interfaces.EXTENSION"
+ post_handler=".setuphandlers.step_setup_various"
/>

<!-- Uninstall -->
diff --git a/plone/app/contenttypes/profiles/content/import_steps.xml b/plone/app/contenttypes/profiles/content/import_steps.xml
deleted file mode 100644
index 6444e632..00000000
--- a/plone/app/contenttypes/profiles/content/import_steps.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-<import-steps>
- <import-step id="plone.app.contenttypes--plone-content" version="20111108-01"
- handler="plone.app.contenttypes.setuphandlers.step_import_content"
- title="plone.app.contenttypes base content-types">
- plone.app.contenttypes plone-content installation step.
- <dependency step="typeinfo" />
- </import-step>
-</import-steps>
diff --git a/plone/app/contenttypes/profiles/content/plone.app.contenttypes_content.txt b/plone/app/contenttypes/profiles/content/plone.app.contenttypes_content.txt
deleted file mode 100644
index 7d1c434a..00000000
--- a/plone/app/contenttypes/profiles/content/plone.app.contenttypes_content.txt
+++ /dev/null
@@ -1 +0,0 @@
-This file is used as a marker in setuphandlers.py.
diff --git a/plone/app/contenttypes/profiles/default/import_steps.xml b/plone/app/contenttypes/profiles/default/import_steps.xml
deleted file mode 100644
index e1227b4c..00000000
--- a/plone/app/contenttypes/profiles/default/import_steps.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-<import-steps>
- <import-step id="plone.app.contenttypes" version="20140210-01"
- handler="plone.app.contenttypes.setuphandlers.step_setup_various"
- title="plone.app.contenttypes base content-types">
- <dependency step="typeinfo"/>
- plone.app.contenttypes installation step.
- </import-step>
-</import-steps>
diff --git a/plone/app/contenttypes/profiles/default/plone.app.contenttypes_default.txt b/plone/app/contenttypes/profiles/default/plone.app.contenttypes_default.txt
deleted file mode 100644
index 7d1c434a..00000000
--- a/plone/app/contenttypes/profiles/default/plone.app.contenttypes_default.txt
+++ /dev/null
@@ -1 +0,0 @@
-This file is used as a marker in setuphandlers.py.
diff --git a/plone/app/contenttypes/setuphandlers.py b/plone/app/contenttypes/setuphandlers.py
index 0cdef2e4..6b80966b 100644
--- a/plone/app/contenttypes/setuphandlers.py
+++ b/plone/app/contenttypes/setuphandlers.py
@@ -326,9 +326,7 @@ def configure_members_folder(portal, target_language):

def step_import_content(context):
"""Create default content."""
- if context.readDataFile('plone.app.contenttypes_content.txt') is None:
- return
- portal = context.getSite()
+ portal = context.__parent__
target_language, is_combined_language, locale = _get_locales_info(portal)
create_frontpage(portal, target_language)
create_news_topic(portal, target_language)
@@ -337,9 +335,7 @@ def step_import_content(context):


def step_setup_various(context):
- if context.readDataFile('plone.app.contenttypes_default.txt') is None:
- return
- portal = context.getSite()
+ portal = context.__parent__
target_language, is_combined_language, locale = _get_locales_info(portal)
_setup_calendar(portal, locale)
_setup_visible_ids(portal, target_language, locale)
+

3.3.2 (2017-08-14)
------------------
diff --git a/plone/app/linkintegrity/browser/update.py b/plone/app/linkintegrity/browser/update.py
index c4ddfe1..4891658 100644
--- a/plone/app/linkintegrity/browser/update.py
+++ b/plone/app/linkintegrity/browser/update.py
@@ -11,25 +11,6 @@
from zExceptions import NotFound

import logging
-import pkg_resources
-
-
-# Is there a multilingual addon?
-try:
- pkg_resources.get_distribution('Products.LinguaPlone')
-except pkg_resources.DistributionNotFound:
- HAS_MULTILINGUAL = False
-else:
- HAS_MULTILINGUAL = True
-
-if not HAS_MULTILINGUAL:
- try:
- pkg_resources.get_distribution('plone.app.multilingual')
- except pkg_resources.DistributionNotFound:
- HAS_MULTILINGUAL = False
- else:
- HAS_MULTILINGUAL = True
-
logger = logging.getLogger(__name__)


@@ -68,11 +49,8 @@ def __call__(self):
def update(self):
catalog = getToolByName(self.context, 'portal_catalog')
count = 0
- query = {}
- if HAS_MULTILINGUAL and 'Language' in catalog.indexes():
- query['Language'] = 'all'

- for brain in catalog(query):
+ for brain in catalog():
try:
obj = brain.getObject()
except (AttributeError, NotFound, KeyError):


0 comments on commit b8db12b

Please sign in to comment.