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
f5344515
Commit
f5344515
authored
Jul 24, 2010
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some style fixes, simplify code, as _getSortInfo isn't implemented
parent
bb04c4a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
15 deletions
+9
-15
src/Products/ZCatalog/ZCatalog.py
src/Products/ZCatalog/ZCatalog.py
+9
-15
No files found.
src/Products/ZCatalog/ZCatalog.py
View file @
f5344515
...
...
@@ -163,7 +163,6 @@ class ZCatalog(Folder, Persistent, Implicit):
manage_objectInformation
=
DTMLFile
(
'dtml/catalogObjectInformation'
,
globals
())
Indexes
=
ZCatalogIndexes
()
threshold
=
10000
...
...
@@ -192,7 +191,7 @@ class ZCatalog(Folder, Persistent, Implicit):
self
.
_catalog
=
Catalog
()
self
.
_migrated_280
=
True
self
.
long_query_time
=
0.1
self
.
long_query_time
=
0.1
# in seconds
def
__len__
(
self
):
# Perform a migration of _catalog.__len__ to _catalog._length
...
...
@@ -1013,26 +1012,21 @@ class ZCatalog(Folder, Persistent, Implicit):
#
# Catalog report methods
#
security
.
declareProtected
(
manage_zcatalog_entries
,
'getCatalogReport'
)
def
getCatalogReport
(
self
):
""" Reports about the duration of queries """
#sort_by, sort_reverse = self._getSortInfo()
sort_by
,
sort_reverse
=
(
'duration'
,
True
)
rval
=
self
.
_catalog
.
getCatalogReport
().
report
()
if
sort_by
:
rval
.
sort
(
lambda
e1
,
e2
,
sort_by
=
sort_by
:
cmp
(
e1
[
sort_by
],
e2
[
sort_by
]))
if
sort_reverse
:
rval
.
reverse
()
sort_by
=
'duration'
rval
.
sort
(
lambda
e1
,
e2
,
sort_by
=
sort_by
:
cmp
(
e1
[
sort_by
],
e2
[
sort_by
]))
rval
.
reverse
()
return
rval
security
.
declareProtected
(
manage_zcatalog_entries
,
'manage_resetCatalogReport'
)
def
manage_resetCatalogReport
(
self
,
REQUEST
=
None
,
RESPONSE
=
None
,
URL1
=
None
):
security
.
declareProtected
(
manage_zcatalog_entries
,
'manage_resetCatalogReport'
)
def
manage_resetCatalogReport
(
self
,
REQUEST
=
None
,
RESPONSE
=
None
,
URL1
=
None
):
""" resets the catalog reports """
self
.
_catalog
.
getCatalogReport
().
reset
()
...
...
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