Univention Bugzilla – Attachment 3684 Details for
Bug 24192
Extended Attributes führen zu Crash des UDMs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Behebt Crashes beim Ausprobieren der Extended Attributes
extended_attributes.patch (text/plain), 4.18 KB, created by
Tristan Bruns
on 2011-10-25 17:17:09 CEST
(
hide
)
Description:
Behebt Crashes beim Ausprobieren der Extended Attributes
Filename:
MIME Type:
Creator:
Tristan Bruns
Created:
2011-10-25 17:17:09 CEST
Size:
4.18 KB
patch
obsolete
>diff -u old//modules.py new//modules.py >--- old//modules.py 2011-10-25 16:59:21.563000004 +0200 >+++ new//modules.py 2011-10-25 17:00:34.575000004 +0200 >@@ -38,6 +38,7 @@ > import univention.admin.syntax > import univention.admin.hook > import univention.admin.localization >+from univention.admin.layout import Tab > > translation=univention.admin.localization.translation('univention/admin') > _=translation.translate >@@ -173,7 +174,7 @@ > #if module.initialized: # reload custom attributes > removetab = [] > for tab in module.layout: >- if tab.short_description in custom_fields.keys(): >+ if tab.label in custom_fields.keys(): > removetab.append(tab) > for tab in removetab: > module.layout.remove(tab) >@@ -283,7 +284,7 @@ > for item in itemlist: > if is_property_in_layout(item, field): > return True >- elif itemlist.property == field.property: >+ elif itemlist == field: > return True > return False > >@@ -477,8 +478,8 @@ > # remove fields on tabs marked for replacement > removetab = [] > for tab in module.layout: >- if tab.short_description in overwriteTabList: >- tab.set_fields( [] ) >+ if tab.label in overwriteTabList: >+ tab["layout"] = [] > > for tabname in properties4tabs.keys(): > priofields = properties4tabs[tabname] >@@ -488,12 +489,12 @@ > currentTab = None > # get existing fields if tab has not been overwritten > for tab in module.layout: >- ud.debug(ud.ADMIN, ud.INFO, 'modules update_extended_attributes: tabname=%s tab.short=%s' % (tabname, tab.short_description) ) >+ ud.debug(ud.ADMIN, ud.INFO, 'modules update_extended_attributes: tabname=%s tab.short=%s' % (tabname, tab.label) ) > >- if tab.short_description == tabname: >+ if tab.label == tabname: > currentTab = tab > # found tab in layout >- fields = currentTab.get_fields() >+ fields = currentTab["layout"] > # get last line > if len(fields) > 0: > if len(fields[-1]) == 1: >@@ -521,11 +522,11 @@ > ud.debug(ud.ADMIN, ud.INFO, 'modules update_extended_attributes: lastprio=%s lastfield=%s'% (lastprio,lastfield)) > for (prio, field, tabAdvanced, overwritePosition, fullWidth) in priofields: > ud.debug(ud.ADMIN, ud.INFO, 'modules update_extended_attributes: custom fields found prio %s'% prio) >- if currentTab.advanced and not tabAdvanced: >- currentTab.advanced = False >+ if currentTab["advanced"] and not tabAdvanced: >+ currentTab["advanced"] = False > > # do not readd property if already present in layout >- if lastfield and lastfield.property == field.property: >+ if lastfield == field: > continue > if is_property_in_layout(fields, field): > continue >@@ -541,11 +542,11 @@ > oldfield = fields[ fline ][ fpos ] > fields[ fline ][ fpos ] = field > ud.debug(ud.ADMIN, ud.INFO, >- 'modules update_extended_attributes: replacing field "%s" with "%s" on position "%s" (%s,%s)' % (oldfield.property, field.property, prio, fline, fpos)) >+ 'modules update_extended_attributes: replacing field "%s" with "%s" on position "%s" (%s,%s)' % (oldfield, field, prio, fline, fpos)) > else: > fields[ fline ].append( field ) > ud.debug(ud.ADMIN, ud.INFO, >- 'modules update_extended_attributes: added new field "%s" on position "%s" (%s,%s)' % (field.property, prio, fline, fpos)) >+ 'modules update_extended_attributes: added new field "%s" on position "%s" (%s,%s)' % (field, prio, fline, fpos)) > else: > if fullWidth: > fields.append([field]) >@@ -574,7 +575,7 @@ > if lastfield: > fields.append([lastfield]) > ud.debug(ud.ADMIN, ud.INFO, 'modules update_extended_attributes: one custom field added %s'% fields) >- currentTab.set_fields(fields) >+ currentTab["layout"] = fields > ud.debug(ud.ADMIN, ud.INFO, 'modules update_extended_attributes: layout for tab %s finished: %s'% (tabname, fields) ) > > # check for properties with the syntax class LDAP_Search >diff -u old//syntax.py new//syntax.py >--- old//syntax.py 2011-10-25 16:59:13.597000004 +0200 >+++ new//syntax.py 2011-10-25 16:59:01.351000003 +0200 >@@ -2510,6 +2510,7 @@ > self.name = self.__class__.__name__ > self.viewonly = viewonly > self.addEmptyValue = addEmptyValue >+ self.base = '' > > @classmethod > def parse( self, text ):
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 24192
: 3684