Skip to content

Instantly share code, notes, and snippets.

@maranemil
Last active August 29, 2015 14:09
Show Gist options
  • Save maranemil/8a9a2f8b7bd944898604 to your computer and use it in GitHub Desktop.
Save maranemil/8a9a2f8b7bd944898604 to your computer and use it in GitHub Desktop.
SugarCRM 6.5 config_override remove settings on uninstall
<?php
if(!defined('sugarEntry')) define('sugarEntry', true);
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/entryPoint.php');
//global $db;
//global $moduleList;
/////////////////////////////////////////////////////////////////////////////////
//
// Remove config settings
//
/////////////////////////////////////////////////////////////////////////////////
require_once('modules/Configurator/Configurator.php');
$configurator = new Configurator();
$configurator->loadConfig();
$configurator->clearCache();
$configurator->readOverride(); // This will retrieve all the config override aray
$configurator->config['http_referer'] = '';
$configurator->handleOverride();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment