Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
137
Merge Requests
137
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
aa6b7cae
Commit
aa6b7cae
authored
Oct 31, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Disallow clearing catalog."
This reverts commit
4e0c2786
. Catalog clearing functionality is required.
parent
7746dd0f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
12 deletions
+2
-12
product/ZSQLCatalog/SQLCatalog.py
product/ZSQLCatalog/SQLCatalog.py
+1
-11
product/ZSQLCatalog/ZSQLCatalog.py
product/ZSQLCatalog/ZSQLCatalog.py
+1
-1
No files found.
product/ZSQLCatalog/SQLCatalog.py
View file @
aa6b7cae
...
...
@@ -1316,7 +1316,7 @@ class Catalog(Folder,
'Total time: %s<br>'
'Total CPU time: %s'
%
(
`elapse`
,
`c_elapse`
)))
def
_allowed_
manage_catalogClear
(
self
,
REQUEST
=
None
,
RESPONSE
=
None
,
def
manage_catalogClear
(
self
,
REQUEST
=
None
,
RESPONSE
=
None
,
URL1
=
None
,
sql_catalog_id
=
None
):
""" clears the whole enchilada """
self
.
beforeCatalogClear
()
...
...
@@ -1327,16 +1327,6 @@ class Catalog(Folder,
RESPONSE
.
redirect
(
'%s/manage_catalogAdvanced?'
\
'manage_tabs_message=Catalog%%20Cleared'
%
URL1
)
def
manage_catalogClear
(
self
,
REQUEST
=
None
,
RESPONSE
=
None
,
URL1
=
None
,
sql_catalog_id
=
None
):
""" Disallows clearing default catalog """
default_catalog_id
=
self
.
default_sql_catalog_id
if
self
.
getId
()
==
default_catalog_id
or
sql_catalog_id
==
default_catalog_id
:
raise
NotImplementedError
(
"Default Catalog deletion is forbidden"
)
return
self
.
_allowed_manage_catalogClear
(
REQUEST
=
REQUEST
,
RESPONSE
=
RESPONSE
,
URL1
=
URL1
,
sql_catalog_id
=
sql_catalog_id
)
def
manage_catalogClearReserved
(
self
,
REQUEST
=
None
,
RESPONSE
=
None
,
URL1
=
None
):
""" clears reserved uids """
self
.
clearReserved
()
...
...
product/ZSQLCatalog/ZSQLCatalog.py
View file @
aa6b7cae
...
...
@@ -603,7 +603,7 @@ class ZCatalog(Folder, Persistent, Implicit):
catalog
=
self
.
getSQLCatalog
(
sql_catalog_id
)
if
catalog
is
not
None
:
catalog
.
_allowed_
manage_catalogClear
(
REQUEST
=
REQUEST
,
RESPONSE
=
RESPONSE
,
URL1
=
URL1
)
catalog
.
manage_catalogClear
(
REQUEST
=
REQUEST
,
RESPONSE
=
RESPONSE
,
URL1
=
URL1
)
def
manage_catalogClearReserved
(
self
,
REQUEST
=
None
,
RESPONSE
=
None
,
URL1
=
None
,
sql_catalog_id
=
None
):
""" clears the whole enchilada """
...
...
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