Skip to content

Instantly share code, notes, and snippets.

Enrico Simonetti esimonetti

Block or report user

Report or block esimonetti

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@morozov
morozov / format-stmt.php
Created Aug 18, 2017
Prepared Statements Debugging Snippets
View format-stmt.php
<?php
function format_sugar_query(SugarQuery $query)
{
return format_builder(
$query->compile()
);
}
function format_builder(\Doctrine\DBAL\Query\QueryBuilder $builder)
@jhoffmann
jhoffmann / SugarCronFilteredJobs.php
Last active Jun 27, 2018
Both files go into custom/include/SugarQueue, then run a Repair to regenerate cache/file_map.php and you're good to go.
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:
//
@elchele
elchele / FakeLinkApi.php
Last active Aug 24, 2017
Customization for pulling external/ad-hoc data into a Sugar subpanel
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(
@amusarra
amusarra / HasUserRoleNameExpression.php
Last active May 1, 2019
SugarCRM 7: How to make certain fields readonly
View HasUserRoleNameExpression.php
<?php
/**
* Project: SugarCRM Logic Expression for checking User role
* Original Dev: Antonio Musarra, January 2014
* @2009-2014 Antonio Musarra <antonio.musarra[at]gmail.com>
*
* Desc: SugarCRM Logic Expression ext class
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
You can’t perform that action at this time.