Firstly, thanks for the useful module, this should really be a feature in core.

When modifying the node type edit form, Drupal automatically includes newly added form elements as config variables into the variable table.

To that end, there's no need to add your own submit handler and separate, duplicate, config var.

The current code creates two config variables in the database

* comment_default_sorting_[type]
* sort_comments_[type]

with the same value.

The attached patch removes the unneeded code and uses the default created comment_default_sorting_[type] variable instead.

Cheers,

DT

Comments

davidwhthomas’s picture

StatusFileSize
new2.02 KB

Removed commented out debug line.

maurizio.ganovelli’s picture

Assigned: Unassigned » maurizio.ganovelli

Thanks davidwhthomas,
i'll review and commit your patch as soon as possible (i'm currently on summer holiday!).
Bye.

maurizio.ganovelli’s picture

Status: Needs review » Fixed

Committed to repository

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.