Projet

Général

Profil

Révision ae34fb26

Ajouté par Assos Assos il y a presque 4 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/content_access/content_access.admin.inc
52 52
    '#value' => t('Reset to defaults'),
53 53
    '#weight' => 10,
54 54
    '#submit' => array('content_access_page_reset'),
55
    '#access' => count(content_access_get_per_node_settings($node)) > 0,
55
    '#access' => !empty(content_access_get_per_node_settings($node)),
56 56
  );
57 57
  $form['submit'] = array(
58 58
    '#type' => 'submit',
......
93 93

  
94 94
  // Apply new settings.
95 95
  node_access_acquire_grants($node);
96

  
97
  module_invoke_all('per_node', $settings);
98

  
99
  drupal_set_message(t('Your changes have been saved.'));
96
  cache_clear_all();
97
  module_invoke_all('per_node', $settings, $node);
98
  drupal_set_message(t('Your changes have been saved. You may have to !rebuild for your changes to take effect.', array('!rebuild' => l(t('rebuild permissions'), 'admin/reports/status/rebuild'))));
100 99
}
101 100

  
102 101
/**
......
106 105
  content_access_delete_per_node_settings($form_state['node']);
107 106
  node_access_acquire_grants($form_state['node']);
108 107

  
109
  drupal_set_message(t('The permissions have been reseted to the content type defaults.'));
108
  drupal_set_message(t('The permissions have been reset to the content type defaults.'));
110 109
}
111 110

  
112 111
/**
......
219 218
    }
220 219
  }
221 220

  
222
  drupal_set_message(t('Your changes have been saved.'));
221
  drupal_set_message(t('Your changes have been saved. You may have to !rebuild for your changes to take effect.', array('!rebuild' => l(t('rebuild permissions'), 'admin/reports/status/rebuild'))));
223 222
}
224 223

  
225 224
/**
......
272 271
    '#type' => 'fieldset',
273 272
    '#title' => t('Role based access control settings'),
274 273
    '#collapsible' => TRUE,
275
    '#description' => t('Note that users need at least the %access_content permission to be able to deal in any way with content.', array('%access_content' => t('access content'))) .
276
      ' ' . t('Furthermore note that content which is not @published is treated in a different way by drupal: It can be viewed only by its author or users with the %administer_nodes permission.', array('@published' => t('published'), '%administer_nodes' => t('administer nodes'))),
274
    '#description' => t('Note that users need at least the %view_published_content permission to be able to deal in any way with content.', array('%view_published_content' => t('view published content'))) .
275
      ' ' . t('Furthermore note that content which is not @published is treated in a different way by drupal: It can be viewed only by its author or users with the %bypass_node_access permission.', array('@published' => t('published'), '%bypass_node_access' => t('bypass content access control'))),
277 276
  );
278 277

  
279 278
  $operations = _content_access_get_operations($type);
......
344 343
      array('@types' => implode(', ', $types))
345 344
    ));
346 345
  }
347
}
346
}

Formats disponibles : Unified diff