Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-9023

Remove settings /preferences stuff re wysiwig from D6 civicrm.module so we can use 3.4 version in 4.1

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 4.1.0
    • Fix Version/s: 4.1.0
    • Component/s: None
    • Labels:
      None

      Description

      Thought I'd better transfer this from email conversation to a ticket.

      "
      that stuff should not even be present in the civicrm.module file.

      kurund, can we get rid of it for 4.1. it also messes up the session (for anon users under varnish on drupal pages)
      we should use and compute editor_id only when its needed. not at the top level

      lobo"

      Need to move the wysiwig settings stuff out of civicrm.module

      Index: drupal/civicrm.module
      ===================================================================
      — drupal/civicrm.module (revision 36556)
      +++ drupal/civicrm.module (working copy)
      @@ -286,8 +286,16 @@

      // Add module-specific header elements
      drupal_set_html_head(civicrm_html_head());

      • require_once 'CRM/Core/BAO/Preferences.php';
      • if (CRM_Core_BAO_Preferences::value( 'editor_id' ) == 4) { //drupal wysiwyg
        +
        +
        +
        + require_once 'CRM/Core/BAO/Preferences.php';
        + //fixme - after 3.4 is discontinued remove 3.4 support
        + //As this file may be shared between 3.4 & 4.1 releases use the BAO_Preferences::value legacy function if it exists
        + // in future only CRM_Core_BAO_Setting::getItem will be required
        + if ((method_exists('CRM_Core_BAO_Preferences','value') && CRM_Core_BAO_Preferences::value( 'editor_id' ) == 4)
        + || ( method_exists('CRM_Core_BAO_Setting','getItem') && CRM_Core_BAO_Setting::getItem( CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
        + 'editor_id' ) == 4 )) { //drupal wysiwyg
        //we have to ensure that wysiwyg is loaded since
        $formats = filter_formats();
        foreach ($formats as $id => $format) {

        Attachments

          Activity

            People

            • Assignee:
              kurund Kurund Jalmi
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: