This file contains hidden or 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 | |
/* File: ./custom/clients/base/api/FakeLinkApi.php */ | |
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); | |
class FakeLinkApi extends SugarApi { | |
public function registerApiRest() { | |
return array( | |
'filterRelatedRecords' => array( |
This file contains hidden or 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 | |
function usage($error = '') { | |
if(!empty($error)) print(PHP_EOL . 'Error: ' . $error . PHP_EOL); | |
print(' php ' . __FILE__ . ' --instance /full/path' . PHP_EOL); | |
exit(1); | |
} |
This file contains hidden or 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 | |
function usage($error = '') { | |
if(!empty($error)) print(PHP_EOL . 'Error: ' . $error . PHP_EOL); | |
print(' php ' . __FILE__ . ' --instance /full/path' . PHP_EOL); | |
exit(1); | |
} |
This file contains hidden or 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 | |
// | |
// 2017-08-18 on Sugar 7.9.1.0 | |
// filename: custom/include/indexFinder.php | |
// | |
// Tool that helps retrieve and cache indexes on a per-module basis |
This file contains hidden or 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 | |
// | |
// Original work: https://gist.github.com/lblockken/78a59273f2460b36eb127a7c2ee510a1 | |
// | |
// 2017-07-31 on Sugar 7.9.1.0 with PHP 7.1 | |
// filename: custom/include/SugarXHprof/TidewaysProf.php |
This file contains hidden or 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 | |
// | |
// 2017-06-19 on Sugar 7.9.0.0 | |
// filename: custom/modules/Contacts/sugarpdf/sugarpdf.pdfmanager.php | |
// | |
// This is just an example of how to print all pdf templates of a module (Contacts) landscape instead of portrait. | |
// After this customisation is installed, and the system is repaired, all PDF templates for Contacts will be printed landscape instead of portrait |
This file contains hidden or 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 | |
if (!defined('sugarEntry') || !sugarEntry) { | |
die('Not A Valid Entry Point'); | |
} | |
require_once 'include/SugarQueue/SugarCronJobs.php'; | |
require_once 'custom/include/SugarQueue/SugarJobFilteredQueue.php'; | |
// Sample configuration: | |
// |
This file contains hidden or 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 | |
// | |
// 2017-11-23 tested on Sugar 7.9.2.0 on PHP 7.1 with the addition of: https://gist.github.com/esimonetti/a99ea05b68cd2586949944c1b24b2921 | |
// Custom implementation of Sugar redis cache, using authentication if configured and using persistent connections if configured | |
// | |
// file: custom/include/SugarCache/CustomSugarCacheRedis.php |
This file contains hidden or 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 | |
function usage($error = '') { | |
if (!empty($error)) print(PHP_EOL . 'Error: ' . $error . PHP_EOL); | |
print(' php ' . __FILE__ . ' --instance /full/path' . PHP_EOL); | |
exit(1); | |
} |