#1086 Config options issue - possible during install/update module

XOOPS_2.6.x
open
trabis
5
2012-09-25
2010-08-23
amasz3gr
No

Example notification options. If the various options (defined in xoops_version.php) have the same title (defined in the language file), in the form of preferences is displayed only one of item.

This is a piece of code

foreach ($categories as $category) {
$events =& notificationEvents ($category['name'], false, $module->getVar('mid'));
foreach ($events as $event) {
if (!empty($event['invisible'])) {
continue;
}
$option_name = $category['title'] . ' : ' . $event['title'];
$option_value = $category['name'] . '-' . $event['name'];
$options[$option_name] = $option_value;
}
}

The key in $options array is $option_name. Therefore, two (or more) options can be merged into one if the titles of two (or more) different options will be translated exactly the same in the language file. The probability of such a mistake is much higher (many translators) rather than giving the same name by the developer in xoops_version.php

The code is in two files (main.php AND modulesadmin.php) in /modules/system/admin/modulesadmin/

Discussion

  • trabis
    trabis
    2011-09-18

    This will be addressed on future version