# HG changeset patch # User Arthur Lutz # Date 1260442627 -3600 # Node ID 7e478d7caf20d0c6d61413f0b16d8d1b045af16b # Parent dc04bede3502bae287f53eb9185808069781ef68 [mq]: small_api_changes_for_3.6 diff -r dc04bede3502 -r 7e478d7caf20 server/hook.py --- a/server/hook.py Thu Dec 10 10:36:24 2009 +0100 +++ b/server/hook.py Thu Dec 10 11:57:07 2009 +0100 @@ -246,7 +246,7 @@ def __call__(self): for eid in (self.eidfrom, self.eidto): etype = self._cw.describe(eid)[0] - if not self.schema.eschema(etype).has_subject_relation(self.main_rtype): + if not self._cw.vreg.schema.eschema(etype).has_subject_relation(self.main_rtype): return if self.rtype in self.subject_relations: meid, seid = self.eidfrom, self.eidto @@ -269,7 +269,7 @@ object_relations = None def __call__(self): - eschema = self.schema.eschema(self._cw.describe(self.eidfrom)[0]) + eschema = self._cw.vreg.schema.eschema(self._cw.describe(self.eidfrom)[0]) execute = self._cw.unsafe_execute for rel in self.subject_relations: if rel in eschema.subjrels: @@ -293,7 +293,7 @@ object_relations = None def __call__(self): - eschema = self.schema.eschema(self._cw.describe(self.eidfrom)[0]) + eschema = self._cw.vreg.schema.eschema(self._cw.describe(self.eidfrom)[0]) execute = self._cw.unsafe_execute for rel in self.subject_relations: if rel in eschema.subjrels: diff -r dc04bede3502 -r 7e478d7caf20 web/views/primary.py --- a/web/views/primary.py Thu Dec 10 10:36:24 2009 +0100 +++ b/web/views/primary.py Thu Dec 10 11:57:07 2009 +0100 @@ -95,7 +95,7 @@ if self.is_primary(): self.w(u'

%s

' % title) else: - atitle = self.req._('follow this link for more information on this %s') % entity.dc_type() + atitle = self._cw._('follow this link for more information on this %s') % entity.dc_type() self.w(u'

%s

' % (entity.absolute_url(), atitle, title)) @@ -244,7 +244,7 @@ if dispctrl.get('label'): label = self._cw._(dispctrl.get('label')) else: - label = display_name(self.req, rschema.type, role) + label = display_name(self._cw, rschema.type, role) self.field(label, value, show_label=showlabel, tr=False, table=table)