cleanup, docstring update stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 27 Jan 2011 18:46:47 +0100
branchstable
changeset 6911 75849076fd6c
parent 6910 bab54e22f94d
child 6912 b61b844f2dad
cleanup, docstring update
sobjects/textparsers.py
web/views/reledit.py
--- a/sobjects/textparsers.py	Thu Jan 27 18:29:17 2011 +0100
+++ b/sobjects/textparsers.py	Thu Jan 27 18:46:47 2011 +0100
@@ -15,13 +15,13 @@
 #
 # You should have received a copy of the GNU Lesser General Public License along
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
-"""hooks triggered on email entities creation:
+"""Some parsers to detect action to do from text
 
-* look for state change instruction (XXX security)
-* set email content as a comment on an entity when comments are supported and
-  linking information are found
+Currently only a parser to look for state change instruction is provided.
+Take care to security when you're using it, think about the user that
+will provide the text to analyze...
+"""
 
-"""
 __docformat__ = "restructuredtext en"
 
 import re
@@ -29,7 +29,6 @@
 from cubicweb import UnknownEid, typed_eid
 from cubicweb.view import Component
 
-        # XXX use user session if gpg signature validated
 
 class TextAnalyzer(Component):
     """analyze and extract information from plain text by calling registered
--- a/web/views/reledit.py	Thu Jan 27 18:29:17 2011 +0100
+++ b/web/views/reledit.py	Thu Jan 27 18:46:47 2011 +0100
@@ -81,7 +81,7 @@
         self._cw.add_js(('cubicweb.reledit.js', 'cubicweb.edition.js', 'cubicweb.ajax.js'))
         entity = self.cw_rset.get_entity(row, col)
         rschema = self._cw.vreg.schema[rtype]
-        self._rules = rctrl.etype_get(entity.e_schema.type, rschema.type, role, '*')
+        self._rules = rctrl.etype_get(entity.e_schema, rschema, role, '*')
         if rvid is not None or default_value is not None:
             warn('[3.9] specifying rvid/default_value on select is deprecated, '
                  'reledit_ctrl rtag to control this' % self, DeprecationWarning)