summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 49b15d8)
raw | patch | inline | side by side (parent: 49b15d8)
author | gmcm <gmcm@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 1 Aug 2002 15:06:26 +0000 (15:06 +0000) | ||
committer | gmcm <gmcm@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 1 Aug 2002 15:06:26 +0000 (15:06 +0000) |
Fix to back_metakit for not changing journaltag on reopen.
Fix htmltemplate's do_link so [No <whatever>] strings are href'd.
Fix bogus "nosy edited ok" msg - the **d syntax does NOT share d between caller and callee.
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@946 57a73879-2fb5-44c3-a270-3262357dd7e2
Fix htmltemplate's do_link so [No <whatever>] strings are href'd.
Fix bogus "nosy edited ok" msg - the **d syntax does NOT share d between caller and callee.
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@946 57a73879-2fb5-44c3-a270-3262357dd7e2
index 979382f50533736619b38de15c4373adf8de69ba..0de77023d9e3a38db5eb38ddc315630cabddcb3b 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-#$Id: back_anydbm.py,v 1.57 2002-07-31 23:57:36 richard Exp $
+#$Id: back_anydbm.py,v 1.58 2002-08-01 15:06:24 gmcm Exp $
'''
This module defines a backend that saves the hyperdatabase in a database
chosen by anydbm. It is guaranteed to always be available in python
to modify the "creation" or "activity" properties cause a KeyError.
"""
if not propvalues:
- return
+ return propvalues
if propvalues.has_key('creation') or propvalues.has_key('activity'):
raise KeyError, '"creation" and "activity" are reserved'
# nothing to do?
if not propvalues:
- return
+ return propvalues
# do the set, and journal it
self.db.setnode(self.classname, nodeid, node)
self.fireReactors('set', nodeid, oldvalues)
+ return propvalues
+
def retire(self, nodeid):
"""Retire a node.
#
#$Log: not supported by cvs2svn $
+#Revision 1.57 2002/07/31 23:57:36 richard
+# . web forms may now unset Link values (like assignedto)
+#
#Revision 1.56 2002/07/31 22:04:33 richard
#cleanup
#
index 26bf2aa33a4b4d8b8c8f50d92cdbc32ebd44ab32..d78b27f9f8034f176cf7c29718d4c42938faad02 100755 (executable)
if db is None or db._db is None:
db = _Database(config, journaltag)
_dbs[config.DATABASE] = db
+ else:
+ db.journaltag = journaltag
+ try:
+ delattr(db, 'curuserid')
+ except AttributeError:
+ pass
return db
class _Database(hyperdb.Database):
if not isnew:
self.fireAuditors('set', nodeid, propvalues)
if not propvalues:
- return
+ return propvalues
if propvalues.has_key('id'):
raise KeyError, '"id" is reserved'
if self.db.journaltag is None:
if value is not None and not isinstance(value, type('')):
raise ValueError, 'property "%s" link value be a string'%(
propname)
+ # Roundup sets to "unselected" by passing None
+ if value is None:
+ value = 0
# if it isn't a number, it's a key
try:
int(value)
for id in adds:
sv.append(fid=int(id))
changes[key] = oldvalue
+ if not rmvd and not adds:
+ del propvalues[key]
elif isinstance(prop, hyperdb.String):
# nothing to do?
if not propvalues:
- return
+ return propvalues
if not propvalues.has_key('activity'):
row.activity = int(time.time())
if isnew:
self.db.addjournal(self.classname, nodeid, _SET, changes)
self.fireReactors('set', nodeid, oldnode)
+ return propvalues
+
def retire(self, nodeid):
self.fireAuditors('retire', nodeid, None)
view = self.getview(1)
diff --git a/roundup/cgi_client.py b/roundup/cgi_client.py
index 94aa96212799cbfa367c54c7c321b57048dfd1ee..5407557408a1bdd4cd3c5400fa235cf76455c134 100644 (file)
--- a/roundup/cgi_client.py
+++ b/roundup/cgi_client.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: cgi_client.py,v 1.155 2002-08-01 00:56:22 richard Exp $
+# $Id: cgi_client.py,v 1.156 2002-08-01 15:06:06 gmcm Exp $
__doc__ = """
WWW request handler (also used in the stand-alone server).
else:
props = parsePropsFromForm(self.db, cl, self.form, self.nodeid)
# make changes to the node
- self._changenode(props)
+ props = self._changenode(props)
# handle linked nodes
self._post_editnode(self.nodeid)
# and some nice feedback for the user
props['files'] = cl.get(self.nodeid, 'files') + files
# make the changes
- cl.set(self.nodeid, **props)
+ return cl.set(self.nodeid, **props)
def _createnode(self):
''' create a node based on the contents of the form
#
# $Log: not supported by cvs2svn $
+# Revision 1.155 2002/08/01 00:56:22 richard
+# Added the web access and email access permissions, so people can restrict
+# access to users who register through the email interface (for example).
+# Also added "security" command to the roundup-admin interface to display the
+# Role/Permission config for an instance.
+#
# Revision 1.154 2002/07/31 23:57:36 richard
# . web forms may now unset Link values (like assignedto)
#
index 4fd620b4a6e6d2b1e85310f89b77a1eaeb89fd57..2721cbb522810b59e5c42176eb7f90246001f326 100644 (file)
--- a/roundup/htmltemplate.py
+++ b/roundup/htmltemplate.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: htmltemplate.py,v 1.108 2002-07-31 22:40:50 gmcm Exp $
+# $Id: htmltemplate.py,v 1.109 2002-08-01 15:06:08 gmcm Exp $
__doc__ = """
Template engine.
# get the value
value = self.determine_value(property)
- if value in ('', None, []):
- return _('[no %(propname)s]')%{'propname':property.capitalize()}
propclass = self.properties[property]
if isinstance(propclass, hyperdb.Boolean):
value = value and "Yes" or "No"
elif isinstance(propclass, hyperdb.Link):
+ if value in ('', None, []):
+ return _('[no %(propname)s]')%{'propname':property.capitalize()}
linkname = propclass.classname
linkcl = self.db.classes[linkname]
k = linkcl.labelprop(1)
else:
return '<a href="%s%s"%s>%s</a>'%(linkname, value, title, label)
elif isinstance(propclass, hyperdb.Multilink):
+ if value in ('', None, []):
+ return _('[no %(propname)s]')%{'propname':property.capitalize()}
linkname = propclass.classname
linkcl = self.db.classes[linkname]
k = linkcl.labelprop(1)
title, label))
return ', '.join(l)
if is_download:
+ if value in ('', None, []):
+ return _('[no %(propname)s]')%{'propname':property.capitalize()}
return '<a href="%s%s/%s">%s</a>'%(self.classname, self.nodeid,
value, value)
else:
+ if value in ('', None, []):
+ value = _('[no %(propname)s]')%{'propname':property.capitalize()}
return '<a href="%s%s">%s</a>'%(self.classname, self.nodeid, value)
def do_count(self, property, **args):
def clear(self):
self.db = self.cl = self.properties = None
+ del self.globals['handle_require']
TemplateFunctions.clear(self)
def buildurl(self, filterspec, search_text, filter, columns, sort, group, pagesize):
if nodeids is None:
if search_text != '':
matches = self.db.indexer.search(
- search_text.split(' '), self.cl)
+ re.findall(r'\b\w{2,25}\b', search_text), self.cl)
+ #search_text.split(' '), self.cl)
nodeids = self.cl.filter(matches, filterspec, sort, group)
for nodeid in nodeids[startwith:startwith+pagesize]:
# check for a group heading
def clear(self):
self.db = self.cl = self.properties = None
+ del self.globals['handle_require']
TemplateFunctions.clear(self)
def render(self, nodeid):
#
# $Log: not supported by cvs2svn $
+# Revision 1.108 2002/07/31 22:40:50 gmcm
+# Fixes to the search form and saving queries.
+# Fixes to sorting in back_metakit.py.
+#
# Revision 1.107 2002/07/30 05:27:30 richard
# nicer error messages, and a bugfix
#