View indexFinder.php
<?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
View TidewaysProf.php
<?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
View detail.hbs
{{!--
// Enrico Simonetti
// enricosimonetti.com
//
// 2017-06-20 on Sugar 7.9.0.0
// filename: custom/clients/base/fields/pdfaction/detail.hbs
//
// Allow for landscape pdf template printing for all modules aside Quotes, Reports and Projects
View sugarpdf.pdfmanager.php
<?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
View SugarCronFilteredJobs.php
<?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:
//
View CustomSugarCacheRedis.php
<?php
// Enrico Simonetti
// enricosimonetti.com
//
// 2017-04-12 tested on Sugar 7.8.2.0
// Custom implementation of Sugar redis cache, using authentication if configured
//
// file: custom/include/SugarCache/CustomSugarCacheRedis.php
// additional config: $sugar_config['external_cache']['redis']['auth'] = '<your redis auth password>';
View SugarScript.php
<?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);
}
View afterLoginUsers.php
<?php
// Enrico Simonetti
// enricosimonetti.com
// custom/logichooks/modules/Users/afterLoginUsers.php
class afterLoginUsers
{
public function callAfterLogin($bean, $event, $args)
View afterEntryPoint.php
<?php
// Enrico Simonetti
// enricosimonetti.com
// custom/logichooks/application/afterEntryPoint.php
class afterEntryPoint
{
public function disableActivityStream($event, $arguments)
View SugarACLLock.php
<?php
//
// Enrico Simonetti
// enricosimonetti.com
//
// 2016-05-08 on Sugar 7.7.0.0
// file: custom/data/acl/SugarACLLock.php
//
// ACL to lock record in certain conditions. Always allow admin users and specific user ids