Projet

Général

Profil

Révision 6fd71452

Ajouté par Julien Enselme il y a environ 10 ans

Update CKEditor

Voir les différences:

drupal7/sites/all/modules/ckeditor/includes/ckeditor.features.inc
101 101
      db_query("DELETE FROM {ckeditor_settings} WHERE name = :name", array(':name' => $name));
102 102
      db_query("INSERT INTO {ckeditor_settings} (name, settings) VALUES(:name, :settings)", array(':name' => $name, ':settings' => serialize($profile['settings'])));
103 103

  
104
      // Restore the profile roles
105
      foreach ($profile["input_formats"] as $input_format => $input_format_name) {
106
        if (isset($input_formats[$input_format])) {
104
      if (empty($profile["input_formats"])) {
105
        // Remove input format if none is specified
106
        db_query("DELETE FROM {ckeditor_input_format} WHERE name = :name", array(':name' => $name));
107
      }
108
      else {
109
        // Restore the profile roles
110
        foreach ($profile["input_formats"] as $input_format => $input_format_name) {
107 111
          if (!db_query("SELECT name FROM {ckeditor_input_format} WHERE format = :format AND name = :name", array(':name' => $name, ':format' => $input_format))->fetchField()) {
108 112
            db_query("INSERT INTO {ckeditor_input_format} (name, format) VALUES(:name, :format)", array(':name' => $name, ':format' => $input_format));
109 113
          }
110 114
        }
111
        else {
112
          // Make sure they don't have access
113
          db_query("DELETE FROM {ckeditor_input_format} WHERE format = :format AND name = :name", array(':name' => $name, ':format' => $input_format));
114
        }
115 115
      }
116 116
    }
117 117
  }
118
}
118
}

Formats disponibles : Unified diff