Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Products/zms/ZMSItem.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from Acquisition import Implicit
import OFS.SimpleItem, OFS.ObjectManager
import os
import markdown
# Product Imports.
from Products.zms import standard
from Products.zms import _accessmanager
Expand Down Expand Up @@ -74,6 +73,7 @@ class ZMSItem(
# --------------------------------------------------------------------------
def readme(self, REQUEST=None, RESPONSE=None):
"""Returns readme rendered as HTML"""
import markdown
if RESPONSE is None:
RESPONSE = self.REQUEST.RESPONSE
RESPONSE.setHeader('Content-Type', 'text/html;charset=utf-8')
Expand Down
20 changes: 10 additions & 10 deletions Products/zms/_zreferableitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,26 +516,26 @@ def getLinkObj(self, url, REQUEST=None):
try:
ob = self.getDocumentElement().fetchReqBuff(reqBuffId)
except:
path = ''
ob = None
# Find object by uid.
if url.find('id:') >= 0:
catalog = self.getZMSIndex().get_catalog()
q = catalog({'get_uid':url})
for r in q:
path = '%s/'%r['getPath']
l = [x for x in path.split('/') if x]
ob = self.getRootElement()
if l:
[l.pop(0) for x in ob.getPhysicalPath() if l[0] == x]
for id in l:
ob = getattr(ob,id,None)
break
# Find object by path.
elif not url.startswith('__'):
path = url.replace('@','/content/')
l = [x for x in path.split('/') if x]
ob = self.getDocumentElement()
if l:
[l.pop(0) for x in ob.getPhysicalPath() if l[0] == x]
for id in l:
ob = getattr(ob,id,None)
# Traverse path.
if path and ob:
l = [x for x in path.split('/') if x]
[l.pop(0) for x in ob.getPhysicalPath() if l and l[0] == x]
for id in l:
ob = getattr(ob,id,None)
#-- [ReqBuff]: Store value in buffer of Http-Request.
self.getDocumentElement().storeReqBuff(reqBuffId, ob)
# Prepare request (only if ref_params are provided)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
class manage_validate_inline_link_objs:
"""
python-representation of manage_validate_inline_link_objs
"""

# Acquired
acquired = 0

# Action
action = "%smanage_executeMetacmd?id=manage_validate_inline_link_objs"

# Description
description = ""

# Execution
execution = False

# Icon_clazz
icon_clazz = "fas fa-cogs"

# Id
id = "manage_validate_inline_link_objs"

# Meta_types
meta_types = ["ZMS"]

# Name
name = "Validate Inline-Link-Objects..."

# Nodes
nodes = "{$}"

# Package
package = "com.zms.custom.metacmd"

# Revision
revision = "0.0.2"

# Roles
roles = ["ZMSAdministrator"]

# Stereotype
stereotype = ""

# Title
title = "Validate Inline-Link-Objects..."

# Impl
class Impl:
manage_zmsindex_reindex = {"id":"manage_validate_inline_link_objs"
,"type":"External Method"}
Loading