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

Need to update civicrm.settings.php to account for clean urls in Backdrop

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      variable_get doesn't exist in Backdrop, so the check for clean urls needs to be updated.

      For Backdrop the following change works:

       

      if (!defined('CIVICRM_CLEANURL')) { 
        if ( function_exists('variable_get') && variable_get('clean_url', '0') != '0') { 
          define('CIVICRM_CLEANURL', 1 ); 
        } 
        else 
        { 
          define('CIVICRM_CLEANURL', 0); 
        } 
      }

      to:

      if (!defined('CIVICRM_CLEANURL')) { 
        if ( function_exists('variable_get') && variable_get('clean_url', '0') != '0') { 
          define('CIVICRM_CLEANURL', 1 ); 
        } 
        elseif ( function_exists('config_get') && config_get('system.core', 'clean_url') != 0) {
          define('CIVICRM_CLEANURL', 1 ); 
        }
        else 
        { 
          define('CIVICRM_CLEANURL', 0); 
        }
      }

        Attachments

          Activity

            People

            • Assignee:
              quicksketch Nate Haug
              Reporter:
              herb@freeform Herb
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: