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 | |
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 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 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 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 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 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 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-25 on Sugar 7.9.1.0 | |
// filename: custom/modules/Accounts/clients/base/api/CustomAccountsRelateApi.php | |
// | |
// Display on the Account's Notes subpanel all its Notes and all its first level members Accounts Notes |
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 | |
// | |
// 2017-11-01 tested on Sugar 7.9.1.0 | |
// Forcing custom Sugar Cache to autoload: https://gist.github.com/esimonetti/78999f4dfbac22fd26bab8453a0ed149 | |
// | |
// file: custom/Extension/application/Ext/Include/autoload_custom_redis_cache.php | |
SugarAutoloader::addDirectory('custom/include/SugarCache/'); |
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
// Enrico Simonetti | |
// enricosimonetti.com | |
// | |
// 2017-11-24 tested on Sugar 7.9.2.0 | |
// Sample customised notifications view to increase Notifications polling and separate delays for Notifications from Meetings and Calls reminders | |
// | |
// IMPORTANT: Lowering the delay values through the configuration options will increase the frequency of the amount of requests completed to the server, for every user's open browser tab. You need to consider the server load implications and sizing requirements. | |
// | |
// file: custom/clients/base/views/notifications/notifications.js |