View CustomAccountsRelateApi.php
<?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
View FakeLinkApi.php
<?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(
View triggerAllWorkflowsForContacts.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 saveAllContactsAndTriggerAllWorkflows.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 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>';