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
Comment #1
Omniweb commentedTo 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)) {
Comment #2
fasdalf@fasdalf.ru commentedI сат confirm: this solution works very well.