Under Administer -> Content Management, I have a few contents that I don't want to use Image Upload, and set the "Use Image Upload for this node" options to "No". But the Image Upload field is still being shown whenever I tried to add that content type. Seems like the settings is not being enforced.

Comments

Omniweb’s picture

Status: Active » Needs work

To solve this problem change image_upload_NODE_TYPE to image_upload_enabled_NODE_TYPE in two lines:

220:
from
'#default_value' => variable_get('image_upload'. $form['#node_type']->type, 1),
to
'#default_value' => variable_get('image_upload_enabled_'. $form['#node_type']->type, 1),

243:
if ($form['type']['#value'] .'_node_form' == $form_id && variable_get("image_upload_$node->type", TRUE)) {
to
if ($form['type']['#value'] .'_node_form' == $form_id && variable_get("image_upload_enabled_$node->type", TRUE)) {

fasdalf@fasdalf.ru’s picture

Status: Needs work » Reviewed & tested by the community

I сат confirm: this solution works very well.