Projet

Général

Profil

Révision 134c7813

Ajouté par Mathieu Schiano Di Schiabica il y a environ 8 ans

Update to 7.43

Voir les différences:

drupal7/modules/system/system.admin.inc
2202 2202
 * Return the date for a given format string via Ajax.
2203 2203
 */
2204 2204
function system_date_time_lookup() {
2205
  // This callback is protected with a CSRF token because user input from the
2206
  // query string is reflected in the output.
2207
  if (!isset($_GET['token']) || !drupal_valid_token($_GET['token'], 'admin/config/regional/date-time/formats/lookup')) {
2208
    return MENU_ACCESS_DENIED;
2209
  }
2205 2210
  $result = format_date(REQUEST_TIME, 'custom', $_GET['format']);
2206 2211
  drupal_json_output($result);
2207 2212
}
......
2875 2880
 * Allow users to add additional date formats.
2876 2881
 */
2877 2882
function system_configure_date_formats_form($form, &$form_state, $dfid = 0) {
2883
  $ajax_path = 'admin/config/regional/date-time/formats/lookup';
2878 2884
  $js_settings = array(
2879 2885
    'type' => 'setting',
2880 2886
    'data' => array(
2881 2887
      'dateTime' => array(
2882 2888
        'date-format' => array(
2883 2889
          'text' => t('Displayed as'),
2884
          'lookup' => url('admin/config/regional/date-time/formats/lookup'),
2890
          'lookup' => url($ajax_path, array('query' => array('token' => drupal_get_token($ajax_path)))),
2885 2891
        ),
2886 2892
      ),
2887 2893
    ),

Formats disponibles : Unified diff