View Issue Details

IDProjectCategoryView StatusLast Update
0015614phplist applicationConfigurationpublic08-08-11 20:25
Reportersfatula 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSCentosOS Version5.5
Product Version2.10.14 
Target Version2.10.XFixed in Version2.10.15 
Summary0015614: Configuring Attributes does not save order, default, and, required
DescriptionWhen using phpList as suggested with register_globals off, the values for the fields "order of listing", "default value", and "is the attribute required" are not saved when clicking save changes.

Steps To ReproduceTuen off register_globals in php, enter values in the fields that I said do not work, and, click save changes. They won't save.
Additional InformationThe reason can be traced to commonlib/pages/attributes.php, the following line:

        $query = sprintf('update %s set name = "%s" ,type = "%s" ,listorder = %d,default_value = "%s" ,required = %d where id = %d',
        $tables["attribute"],addslashes($_POST["name"][$id]),$_POST["type"][$id],$listorder[$id],$default[$id],$required[$id],$id);

Note that $listorder, $default, and $required are missing the $_POST. The line SHOULD read:

        $query = sprintf('update %s set name = "%s" ,type = "%s" ,listorder = %d,default_value = "%s" ,required = %d where id = %d',
        $tables["attribute"],addslashes($_POST["name"][$id]),$_POST["type"][$id],$_POST["listorder"][$id],$_POST["default"][$id],$_POST["required"][$id],$id);

Which then allows the screen to work with register globals off. WHich is good of course since it is deprecated in php 5.3.0
TagsNo tags attached.

Relationships

has duplicate 0015612 resolvedmichiel Attributes' order of listing on subscribe page cannot be saved (not fixed in 2.10.13) 

Activities

sfatula

19-05-11 17:15

reporter   ~0051354

I do not believe this to be a duplicate. The other case is talking about making subscribe pages. This has nothing to do with that, and, talks about additional fields as well.

duncanc

20-07-11 21:55

developer   ~0051383

I can confirm that this is still a problem in 2.10.14
On the page lists/admin/?page=attributes with two attributes displayed, changes to the "order of listing", "default value" or the "attribute required" field are not saved.

This is with register_globals set to off.

michiel

08-08-11 20:25

manager   ~0051391

http://phplist.svn.sourceforge.net/phplist/?rev=2800&view=rev