View config_override_custom.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$config_override = []; | |
$config_override['passwordsetting']['minpwdlength'] = 1; | |
$config_override['passwordsetting']['oneupper'] = 0; | |
$config_override['passwordsetting']['onelower'] = 0; | |
$config_override['passwordsetting']['onenumber'] = 0; | |
$config_override['passwordsetting']['onespecial'] = 0; | |
$config_override['passwordsetting']['SystemGeneratedPasswordON'] = 0; | |
$config_override['passwordsetting']['forgotpasswordON'] = 0; | |
$config_override['moduleInstaller']['packageScan'] = true; |
View custominitsystem.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Enrico Simonetti | |
// enricosimonetti.com | |
// settings | |
$set = [ | |
'email-admin' => 'my@email.com', | |
'email-user' => 'my-second@email.com', | |
'tzone' => 'Australia/Sydney', |
View csv_to_sugar_php_dropdown.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// example dropdowns.csv content | |
// "ddname","key1","value1" | |
// "ddname","key2","value2" | |
$fileName = 'dropdowns.csv'; | |
if (file_exists($fileName)) { | |
$file = fopen($fileName, 'r'); | |
$dd = []; |
View config_override.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$sugar_config['metrics_enabled'] = 1; | |
$sugar_config['metric_providers']['SugarMetric_Provider_Newrelic'] = 'include/SugarMetric/Provider/Newrelic.php'; | |
$sugar_config['metric_settings']['SugarMetric_Provider_Newrelic']['applicationname'] = 'Sugar'; |
View cacheOnSugar.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// remember to set redis on config_override.php | |
/* | |
$sugar_config['external_cache_disabled'] = false; | |
$sugar_config['external_cache_disabled_redis'] = false; | |
$sugar_config['external_cache']['redis']['host'] = 'sugar-redis'; | |
*/ | |
// to test the simplest standalone script |
View extractMetadata.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Enrico Simonetti | |
// enricosimonetti.com | |
// | |
// 2019-09-26 on Sugar 9.0.0 | |
// | |
// Metadata extractor, to compare 2 metadatas with a diff command | |
// eg: diff -auNw file1.array file2.array) |
View createMissingTables.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Enrico Simonetti | |
// enricosimonetti.com | |
// | |
// 2019-09-24 Sugar 9.0.0 | |
// create missing tables | |
function usage($error = '') { | |
if (!empty($error)) print(PHP_EOL . 'Error: ' . $error . PHP_EOL); |
View with_acl_team_set_id.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Enrico Simonetti | |
// enricosimonetti.com | |
// | |
// 2019-09-02 on Sugar 8.0.0 | |
// | |
// CLI script to find records with acl_team_set_id | |
function usage($error = '') { |
View sugar-cli-fus.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Quick way to tell the difference of the modules dir of two instances | |
# 1 - from within the vanilla system module's dir | |
cd modules | |
ls -la | awk '{ print $9 }' | grep -v '\.' | grep -v '\.\.' > ~/core_modules_dir.txt | |
# 2 - from within the customer system module's dir | |
cd modules | |
ls -la | awk '{ print $9 }' | grep -v '\.' | grep -v '\.\.' > ~/customer.txt | |
# 3 - diff the twos and do some fus to get the actual differences | |
diff -auNw ~/core_modules_dir.txt ~/customer.txt | grep + | grep -v "@" | cut -c 2- | grep -v "\+\+" | grep -v "\-\-" |
View .htaccess
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
... | |
# file path will depend on the installation path or where the file should be | |
# if this needs to be executed everywhere (even from cron), consider setting it on php.ini instead of the .htaccess | |
php_value auto_prepend_file /var/www/html/sugar/prepend.php |
NewerOlder