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
Tidbit 2.0 - data generation tool for the SugarCRM application ( Benchmark Tool ) | |
Tidbit is a tool to create massive amounts of data for a SugarCRM instance. | |
Source Git: | |
https://github.com/sugarcrm/Tidbit | |
Installation: | |
https://github.com/sugarcrm/Tidbit/blob/master/README |
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
;[xdebug] | |
;zend_extension=/usr/lib/php5/20121212/xdebug.so | |
;zend_extension=/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so | |
;xdebug.auto_trace = 0 | |
;xdebug.default_enable = 1 | |
;xdebug.idekey = "PHPSTORM" | |
;xdebug.extended_info=1 | |
;xdebug.show_local_vars=1 | |
;xdebug.remote_log=/home/user/xdebug-log.txt |
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
// http://stackoverflow.com/questions/12730581/use-this-php-code-to-open-a-pdf-in-a-new-tab | |
header('Content-type: application/pdf'); | |
header('Content-Disposition: inline; filename="' . $filename . '"'); | |
header('Content-Transfer-Encoding: binary'); | |
header('Content-Length: ' . filesize($file)); | |
header('Accept-Ranges: bytes'); | |
@readfile($file); | |
exit(); |
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
sudo /opt/lampp/xampp stop | |
crontab -e | |
crontab -l | |
crontab: usage error: unrecognized option | |
usage: crontab [-u user] file | |
crontab [ -u user ] [ -i ] { -e | -l | -r } | |
(default operation is replace, per 1003.2) | |
-e (edit user's crontab) |
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
ini_set('error_reporting', E_ALL); | |
ini_set('display_errors', true); | |
ini_set('display_startup_errors', true); | |
ini_set('log_errors', 1); | |
//ini_set("error_log", "/path/to/php-error.log"); | |
ini_set('html_errors',FALSE); | |
error_log( "Hello log errors!" ); // write some hallo in log |
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
//clients/base/filters/operators/operators.php | |
//clients/base/api/FilterApi.php | |
//clients/base/layouts/filter/filter.js | |
//clients/base/layouts/filterpanel/filterpanel.js | |
$viewdefs['base']['filter']['operators'] = array( | |
'multienum' => array( | |
'$contains' => 'LBL_OPERATOR_CONTAINS', // is any of | |
'$not_contains' => 'LBL_OPERATOR_NOT_CONTAINS', | |
), |
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
// by EvilPeri | |
//custom/modules/<your module>/clients/base/fields/enum/enum.js | |
({ | |
extendsFrom: 'EnumField', | |
_render: function(){ | |
if(this.name == 'your field name here'){ | |
if(_.isEmpty(this.items)){ | |
this.setItems(); | |
return; |
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
// http://laurenthinoul.com/how-to-add-a-record-color-to-a-listview-in-sugarcrm/ | |
({ | |
extendsFrom: 'RecordlistView', | |
initialize: function (options) { | |
app.view.invokeParent(this, {type: 'view', name: 'recordlist', method: 'initialize', args: [options]}); | |
this.collection.on('data:sync:complete', function () { | |
this.renderColors(); | |
}, this); | |
}, |
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
//custom/modules/Accounts/clients/base/views/create-actions/create-actions.js | |
({ | |
// CustomCreate-actions View (base) | |
extendsFrom: 'CreateActionsView', | |
events: { | |
'change input[name=industry]':'OverrideAccountType' | |
}, | |
initialize: function (options) { | |
this._super('initialize', [options]); |
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
Read parent info in subpanel-list.js: | |
var ctx = this.context.parent, parentModelId = ctx.get("modelId"), parentModule = ctx.get("module"); | |
if(parentModule == 'Accounts'){ | |
// do some action here | |
var parentBean = app.data.createBean(parentModule, {id:parentModelId}), request = parentBean.fetch(); | |
request.xhr.done(function(){ | |
//get the field you need to verify |