Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
9b4f7bf9
Commit
9b4f7bf9
authored
Aug 31, 1999
by
Michel Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed resolve_url issues and removing items from catalog
parent
8ca4da9c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
lib/python/Products/ZCatalog/ZCatalog.py
lib/python/Products/ZCatalog/ZCatalog.py
+7
-9
lib/python/Products/ZCatalog/catalogView.dtml
lib/python/Products/ZCatalog/catalogView.dtml
+5
-2
No files found.
lib/python/Products/ZCatalog/ZCatalog.py
View file @
9b4f7bf9
...
@@ -217,7 +217,7 @@ class ZCatalog(Folder, FindSupport, Persistent, Implicit):
...
@@ -217,7 +217,7 @@ class ZCatalog(Folder, FindSupport, Persistent, Implicit):
# if an error happens here, the catalog will be in
# if an error happens here, the catalog will be in
# an unstable state. If this happens, ignore the
# an unstable state. If this happens, ignore the
# object.
# object.
obj
=
REQUEST
.
resolve_url
(
url
,
REQUEST
)
obj
=
self
.
resolve_url
(
url
,
REQUEST
)
except
:
except
:
continue
continue
...
@@ -229,11 +229,12 @@ class ZCatalog(Folder, FindSupport, Persistent, Implicit):
...
@@ -229,11 +229,12 @@ class ZCatalog(Folder, FindSupport, Persistent, Implicit):
def
manage_uncatalogObject
(
self
,
REQUEST
,
urls
=
None
):
def
manage_uncatalogObject
(
self
,
REQUEST
,
urls
=
None
):
""" removes Zope object 'urls' from catalog """
""" removes Zope object 'urls' from catalog """
## import pdb
## pdb.set_trace()
if
urls
:
if
urls
:
for
url
in
urls
:
for
url
in
urls
:
try
:
try
:
obj
=
REQUEST
.
resolve_url
(
url
,
REQUEST
)
obj
=
self
.
resolve_url
(
url
,
REQUEST
)
except
:
except
:
continue
continue
self
.
uncatalog_object
(
url
)
self
.
uncatalog_object
(
url
)
...
@@ -246,11 +247,11 @@ class ZCatalog(Folder, FindSupport, Persistent, Implicit):
...
@@ -246,11 +247,11 @@ class ZCatalog(Folder, FindSupport, Persistent, Implicit):
""" clear the catalog, then re-index everything """
""" clear the catalog, then re-index everything """
paths
=
tuple
(
self
.
_catalog
.
paths
.
values
())
paths
=
tuple
(
self
.
_catalog
.
paths
.
values
())
self
.
manage_catalogClear
()
self
.
manage_catalogClear
(
REQUEST
)
for
p
in
paths
:
for
p
in
paths
:
try
:
try
:
obj
=
REQUEST
.
resolve_url
(
p
)
obj
=
self
.
resolve_url
(
p
,
REQUEST
)
self
.
catalog_object
(
obj
,
p
)
self
.
catalog_object
(
obj
,
p
)
except
:
except
:
pass
pass
...
@@ -369,9 +370,8 @@ class ZCatalog(Folder, FindSupport, Persistent, Implicit):
...
@@ -369,9 +370,8 @@ class ZCatalog(Folder, FindSupport, Persistent, Implicit):
"""
"""
if
REQUEST
is
None
:
if
REQUEST
is
None
:
REQUEST
=
self
.
REQUEST
REQUEST
=
self
.
REQUEST
url
=
'%s/%s'
%
(
REQUEST
.
script
,
self
.
getpath
(
rid
))
try
:
try
:
obj
=
REQUEST
.
resolve_url
(
url
)
obj
=
self
.
resolve_url
(
self
.
getpath
(
rid
),
REQUEST
)
except
:
except
:
return
None
return
None
return
obj
return
obj
...
@@ -498,8 +498,6 @@ class ZCatalog(Folder, FindSupport, Persistent, Implicit):
...
@@ -498,8 +498,6 @@ class ZCatalog(Folder, FindSupport, Persistent, Implicit):
raise
rsp
.
errmsg
,
sys
.
exc_value
raise
rsp
.
errmsg
,
sys
.
exc_value
Globals
.
default__class_init__
(
ZCatalog
)
Globals
.
default__class_init__
(
ZCatalog
)
...
...
lib/python/Products/ZCatalog/catalogView.dtml
View file @
9b4f7bf9
...
@@ -47,7 +47,7 @@ can also remove or update individual catalog records.
...
@@ -47,7 +47,7 @@ can also remove or update individual catalog records.
</TD>
</TD>
<td valign="top"><dtml-var meta_type></td>
<td valign="top"><dtml-var meta_type></td>
<td valign="top" align="left">
<td valign="top" align="left">
<a href="
../
<dtml-var "getpath(data_record_id_)">/manage_main"><dtml-var "getpath(data_record_id_)">
<a href="<dtml-var "getpath(data_record_id_)">/manage_main"><dtml-var "getpath(data_record_id_)">
<dtml-if title> (<dtml-var title>)</dtml-if></a>
<dtml-if title> (<dtml-var title>)</dtml-if></a>
</td>
</td>
</tr>
</tr>
...
@@ -73,7 +73,7 @@ can also remove or update individual catalog records.
...
@@ -73,7 +73,7 @@ can also remove or update individual catalog records.
<dtml-else>
<dtml-else>
<P>There are no
entrie
s in the Catalog.</P>
<P>There are no
object
s in the Catalog.</P>
</dtml-if>
</dtml-if>
...
@@ -82,3 +82,6 @@ can also remove or update individual catalog records.
...
@@ -82,3 +82,6 @@ can also remove or update individual catalog records.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment