Skip to content

Instantly share code, notes, and snippets.

View joebordes's full-sized avatar

Joe Bordes joebordes

View GitHub Profile
@joebordes
joebordes / gist:d793efdb9ceb5be3505f
Created July 7, 2015 20:43
coreBOS issue 56 patch
diff --git a/modules/Reports/ReportRun.php b/modules/Reports/ReportRun.php
index ecea02e..a0c4220 100755
--- a/modules/Reports/ReportRun.php
+++ b/modules/Reports/ReportRun.php
@@ -845,7 +845,11 @@ class ReportRun extends CRMEntity {
$tableColumnSql = "CAST((CONCAT(due_date,' ',time_end)) AS DATETIME)";
}
} else {
- $tableColumnSql = $selectedfields[0].".".$selectedfields[1];
+ if ($moduleName==$this->primarymodule) {
@joebordes
joebordes / IE_promise_corebos.diff
Created May 21, 2016 22:09
IE Promise polyfill for coreBOS
diff --git a/Smarty/templates/Header.tpl b/Smarty/templates/Header.tpl
index 058d4e5..db22ded 100644
--- a/Smarty/templates/Header.tpl
+++ b/Smarty/templates/Header.tpl
@@ -48,6 +48,7 @@ var gVTUserID = '{$CURRENT_USER_ID}';
<a name="top"></a>
<!-- header -->
<!-- header-vtiger crm name & RSS -->
+ <script language="JavaScript" type="text/javascript" src="include/js/promise.min.js"></script>
<script language="JavaScript" type="text/javascript" src="include/js/meld.js"></script>
@joebordes
joebordes / IE_eventonwindow_corebos.diff
Created May 21, 2016 22:30
IE load event from window
diff --git a/Smarty/templates/DetailViewUI.tpl b/Smarty/templates/DetailViewUI.tpl
index 5169434..c659348 100644
--- a/Smarty/templates/DetailViewUI.tpl
+++ b/Smarty/templates/DetailViewUI.tpl
@@ -27,8 +27,8 @@
{/if}
<div id="editarea_{$keyfldname}" style="display:none;">
<input class="detailedViewTextBox" onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'" type="text" id="txtbox_{$keyfldname}" name="{$keyfldname}" maxlength='100' value="{$keyval}"></input>
- <br><input name="button_{$keyfldname}" type="button" class="crmbutton small save" value="{$APP.LBL_SAVE_LABEL}" onclick="dtlViewAjaxSave('{$keyfldname}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');fnhide('crmspanid');event.stopPropagation();"/> {$APP.LBL_OR}
- <a href="javascript:;" onclick="hndCancel('dtlview_{$keyfldname}','editarea_{$keyfldname}','{$keyfldname}');event.stopPropagation();" class="link">{$APP.LBL_CAN
@joebordes
joebordes / coreBOSWorkflow_LoadingErrorOnConditionInIE.png
Last active May 21, 2016 22:43
IE workflow jquery error: Automation server can't create object
coreBOSWorkflow_LoadingErrorOnConditionInIE.png
@joebordes
joebordes / WebserviceDefineExpireTime.diff
Created December 19, 2016 14:46
Patch to permit defining the webservice expire time when authenticating
diff --git a/build/RESTexpiretimeparameter.sql b/build/RESTexpiretimeparameter.sql
new file mode 100644
index 0000000..dcf58de
--- /dev/null
+++ b/build/RESTexpiretimeparameter.sql
@@ -0,0 +1 @@
+INSERT INTO `vtiger_ws_operation_parameters`(`operationid`, `name`, `type`, `sequence`) VALUES ((SELECT `operationid` FROM `vtiger_ws_operation` WHERE `name`='getchallenge'),'exptime','string',2)
diff --git a/include/Webservices/AuthToken.php b/include/Webservices/AuthToken.php
index 7779348..f73c72e 100644
--- a/include/Webservices/AuthToken.php
--- vaadin-combo-box-overlay.html
+++ bower_components/vaadin-combo-box/vaadin-combo-box-overlay.html
@@ -22,7 +22,7 @@
* iron-overlay-manager.html: Polymer.IronOverlayManagerClass.prototype._applyOverlayZ
*/
z-index: 200;
- overflow: hidden;
+ overflow: visible;
}
@joebordes
joebordes / cbmc_noupdate_onempty.diff
Created February 7, 2017 17:48
coreBOS protect mailchimp update on empty email
commit 716e75e6f17be7792310c8b8d748e2484600167d
Author: Omar Llorens <omar@tsolucio.com>
Date: Tue Feb 7 08:48:42 2017 +0100
fix(Mailchimp) protect account, contacts and leads when to not update them with empty names
diff --git a/modules/Mailchimp/webhooks.class.php b/modules/Mailchimp/webhooks.class.php
index 91d3370..c29c6c4 100644
--- a/modules/Mailchimp/webhooks.class.php
+++ b/modules/Mailchimp/webhooks.class.php
@joebordes
joebordes / validate_noquoteinaccountname.diff
Created February 13, 2017 22:35
Validation: Quote in account name not permitted
diff --git a/modules/Accounts/AccountsValidation.php b/modules/Accounts/AccountsValidation.php
index edc6a9f..7377ebb 100644
--- a/modules/Accounts/AccountsValidation.php
+++ b/modules/Accounts/AccountsValidation.php
@@ -44,4 +44,8 @@ if ($blockDuplicateAccounts and isset($screen_values['accountname'])) {
die;
}
}
+if (isset($screen_values['accountname']) and strpos($screen_values['accountname'], '"')!==false) {
+ echo "Sorry, but quotes are not permitted in the account name.";
@joebordes
joebordes / notes.md
Last active August 28, 2019 18:40
coreBOS: Create PBXManager call via Webservice

This gist shows an example of coreBOS webservice call to create a PBXManager or Asterisk Integration call record.

The code attached to this gist was created using coreBOS Webservice Development Tool

It uses the coreBOS Webservice PHP Library

It omits the login steps

For this to work correctly you must be using a coreBOS version after February 23 2017

@joebordes
joebordes / RestrictedAccessFromIP.diff
Created March 7, 2017 07:12
Add access IP on Restricted access message
diff --git a/modules/Users/Users.php b/modules/Users/Users.php
index c0416f6..7ab9e57 100644
--- a/modules/Users/Users.php
+++ b/modules/Users/Users.php
@@ -336,7 +336,7 @@ class Users extends CRMEntity {
if (!in_array($the_ip,$user_ip_addresses)) {
$row['status'] = 'Inactive';
$this->authenticated = false;
- coreBOS_Session::set('login_error', getTranslatedString('ERR_INVALID_USERIPLOGIN','Users'));
+ coreBOS_Session::set('login_error', getTranslatedString('ERR_INVALID_USERIPLOGIN','Users').' ('.$the_ip.')');