mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-08-29 08:17:18 +08:00
Squashed 'public/legacy/' changes from 4f401678fd..5a66316965
5a66316965 SuiteCRM 7.12.3 Release 1cfaf51831 Fix #9454 - Avoid duplicate results in basic search 7eb52791f1 Fix #9455 - Popup metadata override removed when filtered a21463bee1 Fix #8155 - Removed Unused PDF Settings 7f3c59f382 Fix #8948 - Make Project Tasks Importable ac4a1e79a7 Fix #9191 - Add utf normalization repair command bcb784eef7 Fix #9434 - Cron notion unit test fails 2e4aa8f594 Fix #8309 - Delete button showing for users with no delete access bf5fe39148 Fix #8525 - Bulk Action label not showing for users without delete access 1a45a93b5c Fix #9398 - Consistently store dropdowns in $app_list_strings rather than $GLOBALS 664b2d5c74 Fix #9406 - Validation displayed static message isn't correct de192fa845 Fix #9271 - Primary Email property is kept after ading an extra Email address 206db24eaa Fix #9378 - Filter by Email1 Field Through the API 6c39d73580 Fix #9312 - Declaring object within StudioClass to remove Strict Warnings be2044b341 Fix #9387 - Correct Variable Names 7e3c96d5b4 Fix #9387 - Clean Cron Historic and Failed Jobs b3e0556482 Fix #9387 - Display Actual Job Result in Subpanel 90b4e0423a Fix issue #9380 where date action in workflow fails to save Add check on if value is array, if is array don't attempt date formatting 864d614945 Fix #9408 - adding fix for deleting emails 7b442f10ca Merge next into suite 8 b522a5acf3 [Legacy] Meeting Module Styling Fixes 4e4d4e7d86 [Legacy] Admin Import Styling Fixes e320acd63c [Legacy] Popup Selector Styling Fixes 60acfc36f5 [Legacy] Backup Modules Styling Fixes 73cc52ce14 [Legacy] Jotpad Dashlet Styling Fixes 0128df2e63 [Legacy] User Name Longtext styling fixes f12c72e8f6 [Legacy] Diagnostic Tool Whitespace Styling Fixes 841b16e033 [Legacy] Dashboard Dashlet Styling Fixes e274de5a58 [Legacy] Scheduler Styling Fixes 0c330bc280 [Legacy] Reports Subpanels Styling Fixes 0730d433b2 [Legacy] Meeting Popup Selector Styling Fixes a22626df09 [Legacy] Bump version to 8.0.0 ebde6fb8cc [Legacy] Apply set-timezone styling ot the the users set-timezone page 55f1e360df [Legacy] Add name mapping for SetTimezone action 44fa660c65 [Legacy] Define summary templates for contacts, leads, prospects f363b741f9 [Legacy] Change Contacts detailviewdefs to use full name 8afde55218 [Legacy] Fix .htaccess build to take the full CRM url into account 8373995c26 [Legacy] Admin diagnostic tool styling fixes 03593b259c [Legacy] Disable upgrade wizard in admin 66c9fe4d8f [Legacy] Remove lucene and AOD_index 21f9844286 [Legacy] Fix event invite mod_strings handling 04bdfd8975 [Legacy] Forgot Password Page Styling Fixes ba459af407 [Legacy] fix redirect from projects subpanel 0f19a141d1 [Legacy] Add Default Link Item Mapper - add relate module injection on backend bean field_defs efc2083eaf [Legacy] Email Body Styling Fixes 648a1d9350 Merge next into suite 8 a0cfd72ab3 [Legacy] Remove deprecated spots module 103fd1076f [Legacy] Fix capitalized url on user profile calendar options 97fca254bd [Legacy] Re-add user module reset password modal 864c35c4ad [Legacy] Remove echo on user save 169a15a6c9 [Legacy] Close user action dropdown on password reset e8c400ab24 [Legacy] Fix user triggered password reset e38f48c6d4 [Legacy] Fix password recovery templates setup on install 927969c9a3 [Legacy] Bump version to 8.0.0-rc.2 b27584577d [Legacy] UserProfile Settings Modal Styling Fixes 2aba88dfe8 [Legacy] Meetings Styling Fixes 13d743e598 [Legacy] Password & System Settings Action Button Fixes cfb0bcc86d [Legacy] User Setup Modal Styling Fixes d05f3aa4f5 [Legacy] Fix legacy widget acl definitions e469e337f8 [Legacy] Suite 8 extensions to legacy plugins 41e84b1d17 [Legacy] Override server variables when doing kernel bypass 7f5d03f280 Merge commit '75ea167930
' into suite7merge c5f43d6c88 [Legacy] Popup Selector Styling Fixes 0445c1c0ab [Legacy] update install language label eb3fe0472b [Legacy] Dashlet Settings Modal Styling Fixes 6f0918b73d [Legacy] User Profile Mobile Styling Fixes 5af790f7fa [Legacy] Add acls calculation on legacy list data calls 096a59a7cf [Legacy] Get list of visible modules from module name mapper c2d618e631 Fix valid module check aa79de3a31 [Legacy] add widget acl metadata - update acl config for top widget 315b554b7e [Legacy] Subpanels Action Button Styling Fixes c87e66a262 remove photo widgets for contacts and leads 433940a72f [Legacy] Admin Release Styling Fixes c0a1378873 Suite8 ChangeLog ModalPopup Styling Fixes aa484f3f9e [Legacy] Add close menu label 8f81b47c65 [Legacy] Add not module selected label 36a0b05eb2 [Legacy] Add parent type ApiBeanMapper 7e02d1d23c [Legacy] Fix username display for unauthorized users 2ea8f210a1 [Legacy] DetailView Header Title Overlaps fixes 2a25edd6c4 [Legacy] Fix htaccess generation 34500ba791 Fix Date Filed for Targets 211ce6bfbb [Legacy] Remove Button Hover Fixes 223adf26bc [Legacy] Reports footer button removed fixes c567777afe [Legacy] Reports Styling Fixes 6f71ed31c2 [Legacy] Maps Button Position Fixes c5d5936c22 [Legacy] Add Tab Dashlet Sapcing Fixes 018c11c562 [Legacy] Dashlet Setting Modal Label Fix & Button Fixes 9645c68ca6 [Legacy] Activity Stream Post Button Hover color fixes 445ab52dae [Legacy] Bump version to 8.0.0-rc e10b872b21 [Legacy] Remove license from install app strings e5c21ca68c Merge commit 'dd455a1c2d
' into legacy_update_2 3886e3cfa6 Fix ignore system checks valitation 415cdd57b0 [Legacy] Add install labels 70ae186de5 [Legacy] add new install labels 7e05e69580 [Legacy] add install validator class 4c4ed83f3d [Legacy] Add Label for Subpanel Edit Line Action 17d8f4e7e9 [Legacy] Dashboard Mobile Styling Fixes abd914702a [Legacy] History Subpanel Button Styling Fixes 34a0dac449 [Legacy] Workflow Stying Fixes 32c4827895 [Legacy] Convert Lead Styling Fixes f1ca14c009 [Legacy] Roles Styling Fixes 3dbdce8055 [Legacy] Admin Modules label font fixes 36a38a1c44 [Legacy] HomePage Mobile Fixes a5b451ab12 update legacy handlers to apply new logic considering - base actions - action resolvers - fix url navigation issue in classic view 87e6e239ce [Legacy] Module framework - move suite 8 module config to legacy ee973e74f6 [Legacy] Add support for more metadata on listviewdefs ad312c45fd [Legacy] Add Support for all modules with parent css classes a409d81e2b [Legacy] Security Group Styling Fixes 5171ae319f [Legacy] Password Management Mobile Fixes d0eca8193d [Leagcy] Email Settings Fixes 766af5f4e6 [Legacy] Products Modules Buttons fixes 99ec9e30f9 [Legacy] OAUTH2 Clients and tokens fixes 54c962a532 [Legacy] adapt legacy install scripts to work with Suite8 install d6f20e38e6 [Legacy] add labels for S8 Installer 83b00b6a94 [Legacy] Add widget not found label 3ac807db61 Merge commit '114b895b6d
' into merge_develop 1feeb409f8 [Legacy] Email Action DropDown Styling Fixes git-subtree-dir: public/legacy git-subtree-split: 5a663169652b57bb561de74a7e3a8051c9330a83
This commit is contained in:
parent
41c2374a54
commit
588534d022
160 changed files with 2854 additions and 6446 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -13,8 +13,6 @@ custom/modulebuilder/*
|
|||
custom/working/*
|
||||
custom/modules/*/Ext/
|
||||
custom/modules/unified_search_modules_display.php
|
||||
# Ignore AOD indexes
|
||||
modules/AOD_Index/Index/*
|
||||
install/status.json
|
||||
# Ignore PDF Fonts
|
||||
modules/AOS_PDF_Templates/PDF_Lib/ttfontdata/
|
||||
|
|
|
@ -146,12 +146,12 @@ class ModuleService
|
|||
= 'FROM email_addresses JOIN email_addr_bean_rel ON email_addresses.id = email_addr_bean_rel.email_address_id JOIN '
|
||||
. $selectedModule . ' ON ' . $selectedModule
|
||||
. '.id = email_addr_bean_rel.bean_id ';
|
||||
$modifiedWhere = str_replace('accounts.email1',
|
||||
$modifiedWhere = str_replace($selectedModule.'.email1',
|
||||
'email_addresses.email_address', $where);
|
||||
$where = $modifiedWhere;
|
||||
|
||||
// Sets and adds deleted to the query
|
||||
if ($deleted === 0) {
|
||||
if ($deleted === false) {
|
||||
$whereAuto = '' . $bean->table_name . ' .deleted=0';
|
||||
} else {
|
||||
$whereAuto = '' . $bean->table_name . ' .deleted=1';
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
<?php
|
||||
|
||||
global $legacyRoute;
|
||||
|
||||
if (isset($legacyRoute['script-name'], $legacyRoute['request-uri'])) {
|
||||
$_SERVER['SCRIPT_NAME'] = $legacyRoute['script-name'];
|
||||
$_SERVER['REQUEST_URI'] = $legacyRoute['request-uri'];
|
||||
}
|
||||
|
||||
chdir('../');
|
||||
require_once __DIR__ . '/Core/app.php';
|
||||
$app->run();
|
||||
|
|
|
@ -120,6 +120,7 @@ class ModuleInstaller
|
|||
$tasks = array(
|
||||
'pre_execute',
|
||||
'install_copy',
|
||||
'install_copy_core_extensions',
|
||||
'install_extensions',
|
||||
'install_images',
|
||||
'install_dcactions',
|
||||
|
@ -189,14 +190,15 @@ class ModuleInstaller
|
|||
echo '</div>';
|
||||
}
|
||||
$selectedActions = array(
|
||||
'clearTpls',
|
||||
'clearJsFiles',
|
||||
'clearDashlets',
|
||||
'clearVardefs',
|
||||
'clearJsLangFiles',
|
||||
'rebuildAuditTables',
|
||||
'repairDatabase',
|
||||
);
|
||||
'clearTpls',
|
||||
'clearJsFiles',
|
||||
'clearDashlets',
|
||||
'clearVardefs',
|
||||
'clearJsLangFiles',
|
||||
'rebuildAuditTables',
|
||||
'repairDatabase',
|
||||
);
|
||||
|
||||
VardefManager::clearVardef();
|
||||
global $beanList, $beanFiles, $moduleList;
|
||||
if (file_exists('custom/application/Ext/Include/modules.ext.php')) {
|
||||
|
@ -300,6 +302,7 @@ class ModuleInstaller
|
|||
$this->modules = get_module_dir_list();
|
||||
}
|
||||
}
|
||||
|
||||
public function uninstall_copy()
|
||||
{
|
||||
if (!empty($this->installdefs['copy'])) {
|
||||
|
@ -315,20 +318,69 @@ class ModuleInstaller
|
|||
$this->copy_path($backup_path, $cp['to'], $backup_path, true);
|
||||
/* END - RESTORE POINT - by MR. MILK August 31, 2005 02:22:18 PM */
|
||||
}
|
||||
$backup_path = clean_path(remove_file_extension(urldecode(hashToFile($_REQUEST['install_file'])))."-restore");
|
||||
$backup_path = clean_path(remove_file_extension(urldecode(hashToFile($_REQUEST['install_file']))) . "-restore");
|
||||
if (file_exists($backup_path)) {
|
||||
rmdir_recursive($backup_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function install_copy_core_extensions()
|
||||
{
|
||||
$coreExtensionPath = __DIR__ . '/../../../extensions/';
|
||||
if (isset($this->installdefs['copy_core_extensions'])) {
|
||||
|
||||
$backup_path = clean_path(remove_file_extension(urldecode($_REQUEST['install_file'])) . "-restore");
|
||||
|
||||
foreach ($this->installdefs['copy_core_extensions'] as $cp) {
|
||||
$GLOBALS['log']->debug("Copying core extensions..." . $cp['from'] . " to " . $cp['to']);
|
||||
/* BEGIN - RESTORE POINT - by MR. MILK August 31, 2005 02:22:11 PM */
|
||||
//$this->copy_path($cp['from'], $cp['to']);
|
||||
$this->copy_path($cp['from'], $cp['to'], $backup_path, false, $coreExtensionPath);
|
||||
/* END - RESTORE POINT - by MR. MILK August 31, 2005 02:22:18 PM */
|
||||
}
|
||||
}
|
||||
$this->clear_core_cache();
|
||||
}
|
||||
|
||||
public function uninstall_copy_core_extensions()
|
||||
{
|
||||
$coreExtensionPath = __DIR__ . '/../../../extensions/';
|
||||
if (!empty($this->installdefs['copy_core_extensions'])) {
|
||||
foreach ($this->installdefs['copy_core_extensions'] as $cp) {
|
||||
$cp['to'] = clean_path(str_replace('<basepath>', $coreExtensionPath, $cp['to']));
|
||||
$cp['from'] = clean_path(str_replace('<basepath>', $this->base_dir, $cp['from']));
|
||||
$GLOBALS['log']->debug('Unlink ' . $cp['to']);
|
||||
/* BEGIN - RESTORE POINT - by MR. MILK August 31, 2005 02:22:11 PM */
|
||||
//rmdir_recursive($cp['to']);
|
||||
|
||||
$backup_path = clean_path(remove_file_extension(urldecode(hashToFile($_REQUEST['install_file']))) . "-restore/" . $cp['to']);
|
||||
$this->uninstall_new_files($cp, $backup_path, $coreExtensionPath);
|
||||
$this->copy_path($backup_path, $cp['to'], $backup_path, true, $coreExtensionPath);
|
||||
/* END - RESTORE POINT - by MR. MILK August 31, 2005 02:22:18 PM */
|
||||
}
|
||||
$backup_path = clean_path(remove_file_extension(urldecode(hashToFile($_REQUEST['install_file']))) . "-restore");
|
||||
if (file_exists($backup_path)) {
|
||||
rmdir_recursive($backup_path);
|
||||
}
|
||||
}
|
||||
|
||||
$this->clear_core_cache();
|
||||
}
|
||||
|
||||
public function clear_core_cache()
|
||||
{
|
||||
$coreCachePath = __DIR__ . '/../../../cache/';
|
||||
rmdir_recursive($coreCachePath);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Removes any files that were added by the loaded module. If the files already existed prior to install
|
||||
* it will be handled by copy_path with the uninstall parameter.
|
||||
*
|
||||
*/
|
||||
public function uninstall_new_files($cp, $backup_path)
|
||||
public function uninstall_new_files($cp, $backup_path, $toBasePath = '')
|
||||
{
|
||||
$zip_files = $this->dir_get_files($cp['from'], $cp['from']);
|
||||
$backup_files = $this->dir_get_files($backup_path, $backup_path);
|
||||
|
@ -336,6 +388,11 @@ class ModuleInstaller
|
|||
//if it's not a backup then it is probably a new file but we'll check that it is not in the md5.files first
|
||||
if (!isset($backup_files[$k])) {
|
||||
$to = $cp['to'] . $k;
|
||||
|
||||
if ($toBasePath !== '') {
|
||||
$to = $this->updateToPathWithBasePath($to, $toBasePath);
|
||||
}
|
||||
|
||||
//if it's not a sugar file then we remove it otherwise we can't restor it
|
||||
if (!$this->ms->sugarFileExists($to)) {
|
||||
$GLOBALS['log']->debug('ModuleInstaller[uninstall_new_file] deleting file ' . $to);
|
||||
|
@ -347,11 +404,17 @@ class ModuleInstaller
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
$to = $cp['to'];
|
||||
if ($toBasePath !== '') {
|
||||
$to = $this->updateToPathWithBasePath($to, $toBasePath);
|
||||
}
|
||||
|
||||
//lets check if the directory is empty if it is we will delete it as well
|
||||
$files_remaining = $this->dir_file_count($cp['to']);
|
||||
if (file_exists($cp['to']) && $files_remaining == 0) {
|
||||
$GLOBALS['log']->debug('ModuleInstaller[uninstall_new_file] deleting directory ' . $cp['to']);
|
||||
rmdir_recursive($cp['to']);
|
||||
$files_remaining = $this->dir_file_count($to);
|
||||
if (file_exists($to) && $files_remaining == 0) {
|
||||
$GLOBALS['log']->debug('ModuleInstaller[uninstall_new_file] deleting directory ' . $to);
|
||||
rmdir_recursive($to);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1232,11 +1295,12 @@ class ModuleInstaller
|
|||
}
|
||||
|
||||
/* BEGIN - RESTORE POINT - by MR. MILK August 31, 2005 02:22:18 PM */
|
||||
public function copy_path($from, $to, $backup_path='', $uninstall=false)
|
||||
public function copy_path($from, $to, $backup_path = '', $uninstall = false, $toBasePath = '')
|
||||
{
|
||||
//function copy_path($from, $to){
|
||||
/* END - RESTORE POINT - by MR. MILK August 31, 2005 02:22:18 PM */
|
||||
$to = str_replace('<basepath>', $this->base_dir, $to);
|
||||
|
||||
$to = $this->replaceBasePath($to, $toBasePath);
|
||||
|
||||
if (!$uninstall) {
|
||||
$from = str_replace('<basepath>', $this->base_dir, $from);
|
||||
|
@ -1645,6 +1709,7 @@ class ModuleInstaller
|
|||
'pre_uninstall',
|
||||
'uninstall_relationships',
|
||||
'uninstall_copy',
|
||||
'uninstall_copy_core_extensions',
|
||||
'uninstall_dcactions',
|
||||
'uninstall_dashlets',
|
||||
'uninstall_connectors',
|
||||
|
@ -2554,6 +2619,38 @@ class ModuleInstaller
|
|||
}
|
||||
sugar_die("Unknown method ModuleInstaller::$name called");
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $to
|
||||
* @param $toBasePath
|
||||
* @return string|string[]
|
||||
*/
|
||||
protected function updateToPathWithBasePath($to, $toBasePath)
|
||||
{
|
||||
if (strpos($to, '<basepath>') !== false) {
|
||||
$to = str_replace('<basepath>', $toBasePath, $to);
|
||||
} else {
|
||||
$to = $toBasePath . $to;
|
||||
}
|
||||
|
||||
return $to;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $to
|
||||
* @param $toBasePath
|
||||
* @return string|string[]
|
||||
*/
|
||||
protected function replaceBasePath($to, $toBasePath)
|
||||
{
|
||||
if ($toBasePath !== '') {
|
||||
$to = $this->updateToPathWithBasePath($to, $toBasePath);
|
||||
} else {
|
||||
$to = str_replace('<basepath>', $this->base_dir, $to);
|
||||
}
|
||||
|
||||
return $to;
|
||||
}
|
||||
}
|
||||
|
||||
function UpdateSystemTabs($action, $installed_modules)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<img width="180px" height="41px" src="https://suitecrm.com/wp-content/uploads/2017/12/logo.png" align="right" />
|
||||
</a>
|
||||
|
||||
# SuiteCRM 7.12.2
|
||||
# SuiteCRM 7.12.3
|
||||
|
||||
[](https://github.com/salesagility/suitecrm/blob/hotfix/LICENSE.txt)
|
||||
[](https://github.com/salesagility/SuiteCRM-Core/issues)
|
||||
|
|
75
files.md5
Executable file → Normal file
75
files.md5
Executable file → Normal file
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
// created: 2021-12-15 17:00:00
|
||||
// created: 2022-01-26 17:00:00
|
||||
$md5_string = array (
|
||||
'./Api/Core/Config/ApiConfig.php' => '69a1e7b3d7755a2a63499a16ddae81cf',
|
||||
'./Api/Core/Config/slim.php' => 'b134e68765e6a1403577e2a5a06322b8',
|
||||
|
@ -92,7 +92,7 @@ $md5_string = array (
|
|||
'./Api/V8/Service/ListViewService.php' => '69fcf4e8e6f036469ff1fdfeca76166d',
|
||||
'./Api/V8/Service/LogoutService.php' => '937c253d87b4a72dbd888fec102cb613',
|
||||
'./Api/V8/Service/MetaService.php' => '43e410fc841e4da937174d73e027179a',
|
||||
'./Api/V8/Service/ModuleService.php' => 'ba557ee15d50edb935ad3e6fdfbbacfa',
|
||||
'./Api/V8/Service/ModuleService.php' => '9927065a680531cd230d7c1dd6fce8ee',
|
||||
'./Api/V8/Service/RelationshipService.php' => '967752c956232952c32bba807498315d',
|
||||
'./Api/V8/Service/UserPreferencesService.php' => '7329c91b00f4db576bd18f58ca950186',
|
||||
'./Api/V8/Service/UserService.php' => '54213fb8c6df4d8b4dc470a48ca961be',
|
||||
|
@ -115,7 +115,7 @@ $md5_string = array (
|
|||
'./ModuleInstall/PackageManager/tpls/PackageManagerLicense.tpl' => 'df5e267d1df5ce08fb9406e42d5b4816',
|
||||
'./ModuleInstall/PackageManager/tpls/PackageManagerScripts.tpl' => '98e396c0aa57329731fda19c790fffb2',
|
||||
'./ModuleInstall/extensions.php' => '094f4650261f6efbab1b90b119829388',
|
||||
'./README.md' => 'ecdc892452414ccb5cb20142ad118de4',
|
||||
'./README.md' => 'b9d83b3570f46a4e80c328aaf7e184b6',
|
||||
'./RoboFile.php' => '045b82c1df69553824d0e4ffcce6e03c',
|
||||
'./SugarSecurity.php' => '47e316b2d408e8c5192c8ea4a4f921b3',
|
||||
'./TreeData.php' => '32873e20cb5fd33f9d1cdaf18c3cac5c',
|
||||
|
@ -504,8 +504,8 @@ $md5_string = array (
|
|||
'./Zend/Validate/Ip.php' => 'e313ef824309253dcfab90ff1d38ac86',
|
||||
'./Zend/Version.php' => 'e313ef824309253dcfab90ff1d38ac86',
|
||||
'./campaign_tracker.php' => '321e43ca8b664e6ca57ae5589e8c0667',
|
||||
'./composer.json' => '66202f4ba0f73ed829684da3a9a28423',
|
||||
'./composer.lock' => '5d5dddb6ad175a807cf4b7496e64604d',
|
||||
'./composer.json' => '45611132765c8a37f3f61374a71e3a1f',
|
||||
'./composer.lock' => 'fdd7ac81eaeb78690e9426415645f1ff',
|
||||
'./cron.php' => '0b8b6bd839a2232a8da074b31feaa708',
|
||||
'./crossdomain.xml' => '24b7711640c652b21aa89c9d83d6ec13',
|
||||
'./data/BeanFactory.php' => '84b7c36b6a59ea8c5c4069659cc72950',
|
||||
|
@ -592,7 +592,7 @@ $md5_string = array (
|
|||
'./include/Imap/ImapTestSettingsEntryHandler.php' => '3292a309c3331e60ab13f48c56e672c8',
|
||||
'./include/Imap.php' => '0f93494ddbae70f85acdcbac5e92dbc5',
|
||||
'./include/ImapInterface.php' => '1cc17060f7768a0e299fafdd66410baa',
|
||||
'./include/InlineEditing/InlineEditing.php' => '95864a199590f0e31ce66745da7a1d1f',
|
||||
'./include/InlineEditing/InlineEditing.php' => '556f91cf67cb17620fb42a5bd607b7a6',
|
||||
'./include/InlineEditing/inlineEditing.js' => 'ebc8c66cf49a2bcc77265461a120fe3c',
|
||||
'./include/JSON.php' => '7cff996ad7e96ff1583e0837f5070f29',
|
||||
'./include/JsonApiErrorObject.php' => 'bd82e5413b53492f73cb66fa0fe35316',
|
||||
|
@ -606,7 +606,7 @@ $md5_string = array (
|
|||
'./include/ListView/ListViewColumnsFilterLink.tpl' => 'f72bf5e08fb157aaa12151efb71ffd50',
|
||||
'./include/ListView/ListViewDCMenu.tpl' => 'b65d91f4e0974fb3bad725c4a10dbd38',
|
||||
'./include/ListView/ListViewData.php' => '13fd111566fabfe310ca2df58c19820e',
|
||||
'./include/ListView/ListViewDisplay.php' => '7737eb0185150aaa36609d2352b23d73',
|
||||
'./include/ListView/ListViewDisplay.php' => '516709b2a7e1d11ab5193369ecd1d7d8',
|
||||
'./include/ListView/ListViewEval.tpl' => '15d45a3ed170599634d26860dc2e9e56',
|
||||
'./include/ListView/ListViewFacade.php' => '9b0f0b4cec02511bebbc62beef368744',
|
||||
'./include/ListView/ListViewGeneric.tpl' => '225d86344ddc00b4b00bd6716d23ac12',
|
||||
|
@ -680,11 +680,11 @@ $md5_string = array (
|
|||
'./include/Pear/Crypt_Blowfish/Blowfish/DefaultKey.php' => '71c33c848e1219ea3cfad5795f02f3cd',
|
||||
'./include/Pear/Crypt_Blowfish/Blowfish.php' => '0c73a6dbf2fa10ae60ecb7dde76c67eb',
|
||||
'./include/Pear/Crypt_Blowfish/license.txt' => 'a45bb1bbeed9e26b26c5763df1d3913d',
|
||||
'./include/Popups/PopupSmarty.php' => '6d61a9f0c32c67aca68fa014c93b36fa',
|
||||
'./include/Popups/PopupSmarty.php' => '7f37169149cfce47e441eb3ce43f3661',
|
||||
'./include/Popups/Popup_picker.php' => 'efc16459685cc015a472689ca0ab3886',
|
||||
'./include/Popups/tpls/PopupGeneric.tpl' => '6de12bee73b200444038e28217cdb0e2',
|
||||
'./include/Popups/tpls/footer.tpl' => 'fe184f626507e4834c6fc442d140fffc',
|
||||
'./include/Popups/tpls/header.tpl' => '9d78bc4303063a37d330c0451f473304',
|
||||
'./include/Popups/tpls/header.tpl' => '92ce3e74f5bd5b70c2aae5cd1195308e',
|
||||
'./include/QuickSearchDefaults.php' => '47ec9bb09aff02c67cd905b5df063830',
|
||||
'./include/RefreshDatabase.php' => '2f8393d844bd4f327b6880b349fd7dd7',
|
||||
'./include/SearchForm/SearchForm.php' => '4837b9f89087085c3ad8b546099fa2cd',
|
||||
|
@ -698,6 +698,9 @@ $md5_string = array (
|
|||
'./include/SearchForm/tpls/footerPopup.tpl' => '794cb10105e35b7b34a5efef5c9e6385',
|
||||
'./include/SearchForm/tpls/header.tpl' => '2d1c49e167dbeb93e8e03ec79c1fec2c',
|
||||
'./include/SearchForm/tpls/headerPopup.tpl' => '49f913824175dafd993fbc8a1bf7923c',
|
||||
'./include/Services/Batch/BatchJob.php' => 'bada8d2023e3824673b3a709a54e76f7',
|
||||
'./include/Services/NormalizeRecords/NormalizeRecords.php' => 'a0d64b3a4d41c72d4f00dad0b0d62f7d',
|
||||
'./include/Services/NormalizeRecords/NormalizeRecordsSchedulerJob.php' => '8931bcef83a853868bd8f0dc934818d1',
|
||||
'./include/Smarty/plugins/block.minify.php' => 'a4a8771c5a8a48c7ab030b0b552957dd',
|
||||
'./include/Smarty/plugins/block.nocache.php' => '66bb941778de43b9e52d06a47becb9f5',
|
||||
'./include/Smarty/plugins/block.textformat.php' => 'f4e1cc15997ff132066f5e4e09e92054',
|
||||
|
@ -847,7 +850,7 @@ $md5_string = array (
|
|||
'./include/SugarDependentDropdown/SugarDependentDropdown.php' => 'b1b2e97806792338acdeb661fc68cacf',
|
||||
'./include/SugarDependentDropdown/javascript/SugarDependentDropdown.js' => '14748d0133b9731b97c11b95e3713489',
|
||||
'./include/SugarDependentDropdown/metadata/dependentDropdown.php' => 'deb131d92c6a4447d8265600ba46e9b2',
|
||||
'./include/SugarEmailAddress/SugarEmailAddress.js' => 'edeac61482387059c2c18ec30846e318',
|
||||
'./include/SugarEmailAddress/SugarEmailAddress.js' => 'def2d76e0bee474993ae52ce8bafe7c0',
|
||||
'./include/SugarEmailAddress/SugarEmailAddress.php' => '141b5619a3476eaef690ae6adba2a126',
|
||||
'./include/SugarEmailAddress/getEmailAddressWidget.php' => '732df9ab640f7e9713d81a2a2c5579d0',
|
||||
'./include/SugarEmailAddress/templates/forDetailView.tpl' => 'f40f05d1278c144c7e7fd4a1e9e77eb4',
|
||||
|
@ -1188,9 +1191,9 @@ $md5_string = array (
|
|||
'./include/SugarObjects/templates/sale/vardefs.php' => '0594cbe418f268edf893cced47b022f3',
|
||||
'./include/SugarObjects/translated_prefix.php' => 'ba8e90a225dfa38f779119b10c366d40',
|
||||
'./include/SugarPHPMailer.php' => 'f3e4df19eab7a1ec3023c62dc383a85e',
|
||||
'./include/SugarQueue/SugarCronJobs.php' => '1cb6aa2aa673b6f959379ae6b5be7c3b',
|
||||
'./include/SugarQueue/SugarCronJobs.php' => 'ee32b208de3d393fa352f4f578a5b746',
|
||||
'./include/SugarQueue/SugarCronRemoteJobs.php' => '07feac4c96f9cb8c0e00a8d9f075f841',
|
||||
'./include/SugarQueue/SugarJobQueue.php' => 'bbe33270efa7f356ebea2bb036eedba1',
|
||||
'./include/SugarQueue/SugarJobQueue.php' => 'ed2f9154587957a89b85121039a05fed',
|
||||
'./include/SugarSQLValidate.php' => '828ff22182a14e36e275062bd0d6af2d',
|
||||
'./include/SugarTheme/SugarSprites.php' => 'e5fdd274f9638e62a43fe7947aa848e8',
|
||||
'./include/SugarTheme/SugarTheme.php' => '65b7b0151114cd5a2295d9fd5563d332',
|
||||
|
@ -1727,7 +1730,7 @@ $md5_string = array (
|
|||
'./include/javascript/quickCompose.js' => '047d7eea0263fa0c2cd9bdb53ecf6258',
|
||||
'./include/javascript/quicksearch.js' => '97475c83c2614b54f3a0dd63edb2dfb2',
|
||||
'./include/javascript/report_additionals.js' => '094fef2462c9d640ee3ef4dc7af613d0',
|
||||
'./include/javascript/sugar_3.js' => 'f262f2b4a08214829e9f29152f05152e',
|
||||
'./include/javascript/sugar_3.js' => '37dafba08d7a447439882819e54de1e1',
|
||||
'./include/javascript/sugar_connection_event_listener.js' => 'c8a148e865988e17f9b0328de44803a7',
|
||||
'./include/javascript/sugar_yui_overrides.js' => 'd99ea792b967d53cef54e0b870acdd88',
|
||||
'./include/javascript/sugarwidgets/SugarYUILoader.js' => '959d552199b65eab09ed534ade65b064',
|
||||
|
@ -2443,7 +2446,7 @@ $md5_string = array (
|
|||
'./include/utils/recaptcha_utils.php' => '73f5eddf707788c1dff4b7d07dc82656',
|
||||
'./include/utils/security_utils.php' => 'e953d0b673df3df313ecf1ac975e8f57',
|
||||
'./include/utils/sugar_file_utils.php' => '1c1915cad8c88feb0edbf5bbaee106c4',
|
||||
'./include/utils.php' => '056c6cb9c2a210087be1b89558cfd63f',
|
||||
'./include/utils.php' => 'f9f3e4dbf04fc441c8c7e2dd56cfd0c7',
|
||||
'./include/vCard.php' => '44052bbedcdaba3fdf67cfc10a112e75',
|
||||
'./include/ytree/ExtNode.php' => '000d4ccbdb6e0a7628c636128781b5e3',
|
||||
'./include/ytree/JQueryTree.php' => '3712d2224b93818b990b876f8405b745',
|
||||
|
@ -2586,7 +2589,7 @@ $md5_string = array (
|
|||
'./jssource/src_files/include/SugarCharts/Jit/js/Jit/jit.js' => 'df8355ccd2772130088b1fb667650271',
|
||||
'./jssource/src_files/include/SugarCharts/Jit/js/mySugarCharts.js' => '2f84790497e288fd89ba307560f09c5f',
|
||||
'./jssource/src_files/include/SugarDependentDropdown/javascript/SugarDependentDropdown.js' => '5ac4fce0d1493f514c531c0dcc7b7ed9',
|
||||
'./jssource/src_files/include/SugarEmailAddress/SugarEmailAddress.js' => '0391c648fd9875ac2143030a97758088',
|
||||
'./jssource/src_files/include/SugarEmailAddress/SugarEmailAddress.js' => '7fbc299c2611654de572274cb52307e3',
|
||||
'./jssource/src_files/include/SugarFields/Fields/Address/SugarFieldAddress.js' => 'db716b6f16be88fa2ef807e2784e4fcc',
|
||||
'./jssource/src_files/include/SugarFields/Fields/Collection/SugarFieldCollection.js' => '340c33ba887d216fc45a7d5ebf57b2e4',
|
||||
'./jssource/src_files/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js' => 'a40673ad62e3fd095b9b48e8b55093a6',
|
||||
|
@ -2616,7 +2619,7 @@ $md5_string = array (
|
|||
'./jssource/src_files/include/javascript/quickCompose.js' => '31c8e3efcf325c0c805018587fa585cb',
|
||||
'./jssource/src_files/include/javascript/quicksearch.js' => '0329400df3d1b8e4eab0765f8fe9f2e4',
|
||||
'./jssource/src_files/include/javascript/report_additionals.js' => 'baca991df446eaf401dda47d1685fad1',
|
||||
'./jssource/src_files/include/javascript/sugar_3.js' => '6589fafd0dff4c08c88184cf31627990',
|
||||
'./jssource/src_files/include/javascript/sugar_3.js' => '1013320f0f4e078b999641d94e979fb6',
|
||||
'./jssource/src_files/include/javascript/sugar_connection_event_listener.js' => '431e88e62c5a7005693189d1e9d8e916',
|
||||
'./jssource/src_files/include/javascript/sugar_yui_overrides.js' => 'efbf74aa5e7d0af070ae7faab7725538',
|
||||
'./jssource/src_files/include/javascript/sugarwidgets/SugarYUILoader.js' => 'abc59adf77cf85c0424dbcb6c356bee8',
|
||||
|
@ -2833,7 +2836,7 @@ $md5_string = array (
|
|||
'./lib/Robo/Plugin/Commands/CodeCoverageCommands.php' => '1a96a8253828178473f3e26b454d07ba',
|
||||
'./lib/Robo/Plugin/Commands/CodingStandardCommands.php' => '0c2e3276cfb188500172ec7d503926ba',
|
||||
'./lib/Robo/Plugin/Commands/ElasticSearchCommands.php' => '33c6a2dfff8e0a3624d7ad4f42059bf9',
|
||||
'./lib/Robo/Plugin/Commands/RepairCommands.php' => '390c3712dee990b71a260a6151e0f6df',
|
||||
'./lib/Robo/Plugin/Commands/RepairCommands.php' => 'ae90c86f61172c980cdc9a62f4e82ac8',
|
||||
'./lib/Robo/Plugin/Commands/TestEnvironmentCommands.php' => '88bf24915b2b7c5ef1fa3abafac00eb6',
|
||||
'./lib/Robo/Plugin/Commands/TestRunCommands.php' => '82b9f964491714ac90e918deb98874ee',
|
||||
'./lib/Robo/Plugin/Commands/UpgradeCommands.php' => '70ce6c722f812d8ea6460dbab872d7cd',
|
||||
|
@ -2841,7 +2844,7 @@ $md5_string = array (
|
|||
'./lib/Robo/Traits/RoboTrait.php' => '4959bc9e6576b42dd50e09673a6ce7d1',
|
||||
'./lib/Robo/config.php' => 'e466635f4002d1ae74aabf0bc28165be',
|
||||
'./lib/Search/AOD/LuceneSearchEngine.php' => '7a589c07fae355ad81ba1893e40e1bb9',
|
||||
'./lib/Search/BasicSearch/BasicSearchEngine.php' => '1d2c5e21d8bc06a90c9df7ad30607685',
|
||||
'./lib/Search/BasicSearch/BasicSearchEngine.php' => '1f6ecd5faa8a58cd6d2e06da6ca35cd3',
|
||||
'./lib/Search/ElasticSearch/ElasticSearchClientBuilder.php' => '4743c29fa00cb5d4025c974af7b79156',
|
||||
'./lib/Search/ElasticSearch/ElasticSearchEngine.php' => '89b2b27ef2c5dd8e7482360a8e499bfc',
|
||||
'./lib/Search/ElasticSearch/ElasticSearchHooks.php' => '8898cc8d7cec43f13352397be9397f3e',
|
||||
|
@ -3642,7 +3645,7 @@ $md5_string = array (
|
|||
'./modules/AOW_WorkFlow/Dashlets/AOW_WorkFlowDashlet/AOW_WorkFlowDashlet.meta.php' => '307d5c5c4e36070f26fcd7019a7c3ce7',
|
||||
'./modules/AOW_WorkFlow/Dashlets/AOW_WorkFlowDashlet/AOW_WorkFlowDashlet.php' => '9b68831e41b81207bf2e3a1a42b266b2',
|
||||
'./modules/AOW_WorkFlow/Menu.php' => 'bda4b71d876e065f7661bce4a91bde57',
|
||||
'./modules/AOW_WorkFlow/aow_utils.php' => '0f06117126fbfe5cc6fa498a6ddbb4b8',
|
||||
'./modules/AOW_WorkFlow/aow_utils.php' => '5e07a03b0697f9b596c5a8a6f5cddb4b',
|
||||
'./modules/AOW_WorkFlow/controller.php' => '80bf5d8ed3fec47f72320c318719e630',
|
||||
'./modules/AOW_WorkFlow/language/en_us.lang.php' => '3257fefa8880da77ef4c90c08fab9dad',
|
||||
'./modules/AOW_WorkFlow/metadata/SearchFields.php' => '125fca8f181fd8c4fbb159fd71096bd7',
|
||||
|
@ -3761,6 +3764,7 @@ $md5_string = array (
|
|||
'./modules/Administration/RepairJSFile.php' => '6cb9e4b58abafc8396003ed3437b3927',
|
||||
'./modules/Administration/RepairSeedUsers.php' => '81c156caf343411e4620f78a964165c3',
|
||||
'./modules/Administration/RepairUploadFolder.php' => '97c12972e1e1e95289b11e2c7b6ee215',
|
||||
'./modules/Administration/RepairUtfEncoding.php' => 'd0b01ff836abe132b18ce4f923942bdf',
|
||||
'./modules/Administration/RepairXSS.php' => 'eaf951746f27ec97888300a58efd7c8a',
|
||||
'./modules/Administration/Save.php' => 'd6749485322bf9c956460084be84aa8f',
|
||||
'./modules/Administration/Search/Controller.php' => 'c2c30ace2e9f962779dbfbcb18567955',
|
||||
|
@ -3786,7 +3790,7 @@ $md5_string = array (
|
|||
'./modules/Administration/SyncInboundEmailAccounts.php' => '12d7e813df836c9791c0335e4f04bbe5',
|
||||
'./modules/Administration/Updater.html' => '41dafda58b09eb9893644d0e6b13499f',
|
||||
'./modules/Administration/Updater.php' => '8c6ed7adff356877fd3a52525e42f7fe',
|
||||
'./modules/Administration/Upgrade.php' => '421dd6e8e39e641bb072d107c9bffccd',
|
||||
'./modules/Administration/Upgrade.php' => 'f6c184f9c7de11b52c9120a121a9682e',
|
||||
'./modules/Administration/UpgradeAccess.php' => '518f0ddc85cb427d55161878f2432761',
|
||||
'./modules/Administration/UpgradeFields.php' => 'd74cb90a6a24cae3c0b96a97a74d4d62',
|
||||
'./modules/Administration/UpgradeHistory.php' => '14ba994d7b1d5eccfc4520855a0c4036',
|
||||
|
@ -3805,7 +3809,7 @@ $md5_string = array (
|
|||
'./modules/Administration/index.tpl' => 'e2267cd142b9509c13eaed32180e5e88',
|
||||
'./modules/Administration/javascript/Administration.js' => '3548a43145e0b00b880d50fce62126f6',
|
||||
'./modules/Administration/javascript/Async.js' => '7cda344ae778c0633b8941dcc6fd2bd6',
|
||||
'./modules/Administration/language/en_us.lang.php' => '6551f061129b2b8e07e79e585921970b',
|
||||
'./modules/Administration/language/en_us.lang.php' => 'c87032b4ab17ef84ebadba8fdcff2b74',
|
||||
'./modules/Administration/metadata/SearchFields.php' => '678fb87cfc3b3e95d7e7ea8a72d8da16',
|
||||
'./modules/Administration/metadata/adminpaneldefs.php' => 'f4a4741b7165c657d017869bdc10bc67',
|
||||
'./modules/Administration/ncc_config.php' => '643e7a46ad14a6aed7431c6679362b95',
|
||||
|
@ -3819,6 +3823,9 @@ $md5_string = array (
|
|||
'./modules/Administration/templates/RebuildConfig.tpl' => '48dc46b7bb990f5ac7f08089abe762ae',
|
||||
'./modules/Administration/templates/RebuildSprites.tpl' => '912be3ffbaef06b505dd4ff246dd5033',
|
||||
'./modules/Administration/templates/RepairDatabase.tpl' => '679065785b1579d266abd55b7ea73fdc',
|
||||
'./modules/Administration/templates/RepairUtfEncoding.tpl' => '495072c5440ed3daeb78e1fa677a15f0',
|
||||
'./modules/Administration/templates/RepairUtfEncodingStatus.tpl' => 'c6aacbb022cd46af969c5f86b7c4da21',
|
||||
'./modules/Administration/templates/RepairUtfEncodingSyncStatus.tpl' => 'ca89d245ab9d0a60c726d2f464126256',
|
||||
'./modules/Administration/templates/RepairXSS.tpl' => 'a694a530311524c860865c970d90192b',
|
||||
'./modules/Administration/templates/ShortcutBar.tpl' => '9f9ce796937525328d4c947077486974',
|
||||
'./modules/Administration/templates/SyncInboundEmailAccounts.tpl' => '9667d27fe5d32e17fccfc1b5740d5a32',
|
||||
|
@ -4243,7 +4250,7 @@ $md5_string = array (
|
|||
'./modules/Configurator/UploadFileCheck.php' => '06156db94d3826806ddbe1645c8b67f9',
|
||||
'./modules/Configurator/action_view_map.php' => '6c5dabbf48acf9dd009f60a17fecf657',
|
||||
'./modules/Configurator/controller.php' => 'f295ce1c2b46b0720de4717312a28d87',
|
||||
'./modules/Configurator/language/en_us.lang.php' => '8f52040964f4b19526f75bd50e0d0013',
|
||||
'./modules/Configurator/language/en_us.lang.php' => 'da79efe6028535003c5f9af8ea191682',
|
||||
'./modules/Configurator/metadata/SugarpdfSettingsdefs.php' => 'ca8649f8b1554e8aec32fe8440ff781e',
|
||||
'./modules/Configurator/tpls/EditView.tpl' => '95db9efe07fce13f8f4c20437028116e',
|
||||
'./modules/Configurator/tpls/SugarpdfSettings.tpl' => 'c97732698b0ba12862887d64a3aa6c6c',
|
||||
|
@ -4587,7 +4594,7 @@ $md5_string = array (
|
|||
'./modules/EmailTemplates/EditViewMain.html' => 'fc194c55bf297753a57d7e14b8303685',
|
||||
'./modules/EmailTemplates/EmailTemplate.css' => '35fde7e2b6e4dd8ac8727d019f242938',
|
||||
'./modules/EmailTemplates/EmailTemplate.js' => '6d1f82028af8d7a22bb9748f4599f973',
|
||||
'./modules/EmailTemplates/EmailTemplate.php' => '73a85c5540f6464697984a957bbccf05',
|
||||
'./modules/EmailTemplates/EmailTemplate.php' => '7e47245abb26d5cfd65d5e73883513ba',
|
||||
'./modules/EmailTemplates/EmailTemplateData.php' => '12cdbfc95fc7fba127ea8e82cb5a277a',
|
||||
'./modules/EmailTemplates/EmailTemplateFormBase.php' => 'eda7d4bd84521e2aa557a975270b355c',
|
||||
'./modules/EmailTemplates/EmailTemplateParser.php' => '73b44dc40b3671955f86b43622669289',
|
||||
|
@ -4946,7 +4953,7 @@ $md5_string = array (
|
|||
'./modules/Import/Importer.php' => 'c4bf3967c463f929acff62fa541cc664',
|
||||
'./modules/Import/Menu.php' => '776e6242c638410abd3290c9387e134e',
|
||||
'./modules/Import/UsersLastImport.php' => 'a1c22f45aa62094045f32acbcba0ba8d',
|
||||
'./modules/Import/controller.php' => '461f26cd01bc94f0fa0f17608183120b',
|
||||
'./modules/Import/controller.php' => 'c0238f4ab8ce515d8f1e6e5f64a0c81a',
|
||||
'./modules/Import/language/en_us.lang.php' => '41328cd1de165898134141618e777774',
|
||||
'./modules/Import/maps/ImportMap.php' => 'f8a79c733d4ec686203476e5930c0670',
|
||||
'./modules/Import/maps/ImportMapAct.php' => '15401c409712de8a08e3dfc7f95df8a0',
|
||||
|
@ -5186,7 +5193,7 @@ $md5_string = array (
|
|||
'./modules/ModuleBuilder/parsers/ParserFactory.php' => '9f49fbae9d8aadc97257d4cf18672978',
|
||||
'./modules/ModuleBuilder/parsers/StandardField.php' => '4cbf549bc313959427dc126e9afe01e7',
|
||||
'./modules/ModuleBuilder/parsers/constants.php' => '01917f1fa30ccbaabf69cf03f3a37946',
|
||||
'./modules/ModuleBuilder/parsers/parser.dropdown.php' => 'b7a832a37f1d550b3b88492082dbc13e',
|
||||
'./modules/ModuleBuilder/parsers/parser.dropdown.php' => 'adfd8f59d8b6072d2aabee8f2ec68ceb',
|
||||
'./modules/ModuleBuilder/parsers/parser.label.php' => 'b026e2f0249fe89f848312ece6d1ca1d',
|
||||
'./modules/ModuleBuilder/parsers/parser.modifylayoutview.php' => 'f69b0f61304ac1a038a9ee4fc5e64faf',
|
||||
'./modules/ModuleBuilder/parsers/parser.modifylistview.php' => '7b370f6ed426a6e1be2f6b0fa422eb76',
|
||||
|
@ -5272,7 +5279,7 @@ $md5_string = array (
|
|||
'./modules/ModuleBuilder/views/view.main.php' => '074e242f1ac78fcfa427dcebc90b0115',
|
||||
'./modules/ModuleBuilder/views/view.module.php' => 'c30c29ca234963b5784d3799979273d9',
|
||||
'./modules/ModuleBuilder/views/view.modulefield.php' => '07ff9a38f0c5499befc6f13ad2a75930',
|
||||
'./modules/ModuleBuilder/views/view.modulefields.php' => '6f6d1c266572fb475abd004e0ec68767',
|
||||
'./modules/ModuleBuilder/views/view.modulefields.php' => '33c0acc4a282b810f7e2915966338d30',
|
||||
'./modules/ModuleBuilder/views/view.modulelabels.php' => 'b4fa12db216d215dd43d30c69a7feba0',
|
||||
'./modules/ModuleBuilder/views/view.package.php' => '98f14929cf217186a081488380427c5a',
|
||||
'./modules/ModuleBuilder/views/view.popupview.php' => 'fd818423e7b49d9a39c746be70091967',
|
||||
|
@ -5452,7 +5459,7 @@ $md5_string = array (
|
|||
'./modules/Project/SubPanelView.php' => 'af95a6ef52973f660100c71164dd42fe',
|
||||
'./modules/Project/action_view_map.php' => 'bfb14b59f2e972e576ab76d3d5aceac0',
|
||||
'./modules/Project/chart.php' => '02539a509ab925faa9a81ccf04a9c058',
|
||||
'./modules/Project/controller.php' => '76888c230e8c8b12b5e43cec7dcc8ac9',
|
||||
'./modules/Project/controller.php' => 'fd5b709ce4807535582234f064f7b1d7',
|
||||
'./modules/Project/css/style.css' => 'f46ccefd03710380a8079bede95341ce',
|
||||
'./modules/Project/css/style_chart.css' => '233f2a964aeed0a7a4db10aaa8397a5b',
|
||||
'./modules/Project/delete_project_tasks.php' => '1c2dab740529a1e5a2fbc0e0ce7965d9',
|
||||
|
@ -5509,18 +5516,18 @@ $md5_string = array (
|
|||
'./modules/ProjectTask/Dashlets/MyProjectTaskDashlet/MyProjectTaskDashlet.php' => '8788f8c2f040ed5e661e565a826c203f',
|
||||
'./modules/ProjectTask/Delete.php' => '04587ba7508224ebfd7616ea8b1c082a',
|
||||
'./modules/ProjectTask/Forms.html' => '285171af66aa2fc32dc0e2ea3566649b',
|
||||
'./modules/ProjectTask/Menu.php' => 'eae05eb5785811dd18acf256f49d1a57',
|
||||
'./modules/ProjectTask/Menu.php' => '1f78da32ae7b9fcf7535d39370bc6538',
|
||||
'./modules/ProjectTask/MyProjectTasks.html' => '0844b05b334752964c11bbd6a3e144af',
|
||||
'./modules/ProjectTask/MyProjectTasks.php' => 'f953c060173f44b6ba21c03021572762',
|
||||
'./modules/ProjectTask/Popup_picker.html' => '9e6300b58fc0f9b1fc56648134bff4ef',
|
||||
'./modules/ProjectTask/ProjectTask.js' => 'd64793062468c67b5a64ec0bea53dd48',
|
||||
'./modules/ProjectTask/ProjectTask.php' => '472269f52d743a0f277014056330b173',
|
||||
'./modules/ProjectTask/ProjectTask.php' => '4b9bba394508c5717eeba392c7ab98d5',
|
||||
'./modules/ProjectTask/ProjectTaskQuickCreate.php' => '1ee71963d5ea4d00677dba5ae0d406b5',
|
||||
'./modules/ProjectTask/Save.php' => '9136fd1f440b024a7ede43a78136cf09',
|
||||
'./modules/ProjectTask/SubPanelView.html' => 'c53cc28a2ff53155f2270aee9825201a',
|
||||
'./modules/ProjectTask/SubPanelView.php' => 'c9debabdb5ba2a751ef2f3c27a876e80',
|
||||
'./modules/ProjectTask/field_arrays.php' => 'a009072f64c6a323a41c9c754984bf20',
|
||||
'./modules/ProjectTask/language/en_us.lang.php' => '104d1df7fab817d7e6697944161cf3d4',
|
||||
'./modules/ProjectTask/language/en_us.lang.php' => '999dd418feafc239f8491d9f45aae52f',
|
||||
'./modules/ProjectTask/metadata/SearchFields.php' => 'bee41b7465f34efe9f71ab075dc69425',
|
||||
'./modules/ProjectTask/metadata/acldefs.php' => '62fad39b11df9ca9550c4173a651c454',
|
||||
'./modules/ProjectTask/metadata/additionalDetails.php' => 'd0f0a7b5ae3b50ea102ecadb94d531f2',
|
||||
|
@ -5664,7 +5671,7 @@ $md5_string = array (
|
|||
'./modules/Schedulers/Save.php' => 'f074612e8858b16ed63efc57aa47c689',
|
||||
'./modules/Schedulers/Scheduler.php' => '32fea0faf54fc7fd0b72f779c12d6d9a',
|
||||
'./modules/Schedulers/Schedulers.js' => '873697808ad38308416065af9fbb8a2f',
|
||||
'./modules/Schedulers/_AddJobsHere.php' => 'ec6d31550e833d51fcfb1581df9ecdb6',
|
||||
'./modules/Schedulers/_AddJobsHere.php' => '46277b3392cf6695b77990fb6771f386',
|
||||
'./modules/Schedulers/field_arrays.php' => 'e2671fc2306b56af3562b1b092ae05af',
|
||||
'./modules/Schedulers/language/en_us.lang.php' => '6d1b614f0c5c5bff502f2f0db921e54e',
|
||||
'./modules/Schedulers/metadata/SearchFields.php' => '89dec0da90e39ab857fcd1bbf6c3423a',
|
||||
|
@ -5681,7 +5688,7 @@ $md5_string = array (
|
|||
'./modules/SchedulersJobs/SchedulersJob.php' => 'de4b877af6e1f139022f24914016a082',
|
||||
'./modules/SchedulersJobs/field_arrays.php' => 'ccc694be0178a6318076df1a62b82753',
|
||||
'./modules/SchedulersJobs/language/en_us.lang.php' => '213c773d3b36dfdc0b2932d936fe091b',
|
||||
'./modules/SchedulersJobs/metadata/subpanels/default.php' => '3cbee2fa23885f2938c4bc6a5cbd4b12',
|
||||
'./modules/SchedulersJobs/metadata/subpanels/default.php' => '40952b491d66cd328be1237e7dc0750c',
|
||||
'./modules/SchedulersJobs/vardefs.php' => 'd0606930f15664bf4b40846afead6d3d',
|
||||
'./modules/SecurityGroups/AssignGroups.php' => 'd27ab498ec58d4e232b7f7ec607e410c',
|
||||
'./modules/SecurityGroups/Forms.php' => 'd41d8cd98f00b204e9800998ecf8427e',
|
||||
|
@ -5746,7 +5753,7 @@ $md5_string = array (
|
|||
'./modules/Spots/vardefs.php' => '5e4d751e31f3684b35e34af55d53be25',
|
||||
'./modules/Spots/views/view.edit.php' => 'be1fbcd8c6b5871b18244cdb7ef02bb3',
|
||||
'./modules/Spots/views/view.list.php' => '0d9934545e44b644cb8f65f33a908004',
|
||||
'./modules/Studio/DropDowns/DropDownHelper.php' => '82a0ffca2c383beee6dc52cb81a48185',
|
||||
'./modules/Studio/DropDowns/DropDownHelper.php' => '459e0789955425379aeae7314e581b10',
|
||||
'./modules/Studio/DropDowns/EditView.php' => 'fc1f1181fe3ecf9d446078ef3998a912',
|
||||
'./modules/Studio/DropDowns/EditView.tpl' => '1daa9d2575cfd5788576f7c8f06940a5',
|
||||
'./modules/Studio/Forms.php' => 'f1b9c09d71cbf6919f46b99b9a0286d3',
|
||||
|
@ -6328,7 +6335,7 @@ $md5_string = array (
|
|||
'./soap.php' => 'e28988c2e0b8e2c484587b537a710525',
|
||||
'./sugar_version.json' => 'bdfbcefae2f9af559bef6a36367df7bb',
|
||||
'./sugar_version.php' => 'db7b6c8d51f87879fce1e6172eedfbed',
|
||||
'./suitecrm_version.php' => 'cc4bc58fefbbe53ff0744c20358fa0fa',
|
||||
'./suitecrm_version.php' => '4c7d3c4f6802cc2a615832b2c09f8c8e',
|
||||
'./themes/SuiteP/css/Dawn/color-palette.scss' => 'e64677d79e1d68c069bdc2dc661c4f99',
|
||||
'./themes/SuiteP/css/Dawn/icons.scss' => 'd59f8c5855e7a8df09542a663835a196',
|
||||
'./themes/SuiteP/css/Dawn/select.ico' => '22393ad23f16c3f1462455bae8f20279',
|
||||
|
|
|
@ -345,6 +345,9 @@ function saveField($field, $id, $module, $value)
|
|||
require_once('modules/Leads/LeadFormBase.php');
|
||||
$bean->$field = $value;
|
||||
$bean->account_id = LeadFormBase::handleLeadAccountName($bean);
|
||||
// Fix #9408 Allow deleting an email address from inline Edit
|
||||
} else if($bean->field_defs[$field]['function']['name']=='getEmailAddressWidget'){
|
||||
$bean->$field = empty($value) ? ' ' : $value;
|
||||
} else {
|
||||
$bean->$field = $value;
|
||||
}
|
||||
|
@ -384,13 +387,27 @@ function saveField($field, $id, $module, $value)
|
|||
|
||||
function getDisplayValue($bean, $field, $method = "save")
|
||||
{
|
||||
global $log;
|
||||
|
||||
if (file_exists("custom/modules/Accounts/metadata/listviewdefs.php")) {
|
||||
$metadata = require("custom/modules/Accounts/metadata/listviewdefs.php");
|
||||
} else {
|
||||
$metadata = require("modules/Accounts/metadata/listviewdefs.php");
|
||||
}
|
||||
|
||||
if (!$bean->ACLAccess('view')) {
|
||||
$log->security("getDisplayValue - trying to access unauthorized view/module");
|
||||
throw new BadMethodCallException('Unauthorized');
|
||||
}
|
||||
|
||||
$fieldlist[$field] = $bean->getFieldDefinition($field);
|
||||
$isSensitive = !empty($fieldlist[$field]['sensitive']);
|
||||
$notApiVisible = !empty($fieldlist[$field]['api-visible']);
|
||||
|
||||
if ($isSensitive || $notApiVisible){
|
||||
$log->security("getDisplayValue - trying to access sensitive field");
|
||||
throw new BadMethodCallException('Unauthorized');
|
||||
}
|
||||
|
||||
if (is_array($listViewDefs)) {
|
||||
$fieldlist[$field] = array_merge($fieldlist[$field], $listViewDefs);
|
||||
|
|
|
@ -52,11 +52,6 @@ class ListViewDisplay
|
|||
public $show_mass_update_form = false;
|
||||
public $show_action_dropdown = true;
|
||||
|
||||
/**
|
||||
* @var bool Show Bulk Action button as Delete link
|
||||
*/
|
||||
public $show_action_dropdown_as_delete = false;
|
||||
|
||||
public $rowCount;
|
||||
public $mass = null;
|
||||
public $seed;
|
||||
|
@ -341,17 +336,8 @@ class ListViewDisplay
|
|||
}
|
||||
}
|
||||
} else {
|
||||
// delete
|
||||
if (
|
||||
ACLController::checkAccess($this->seed->module_dir, 'delete', true)
|
||||
&& $this->delete
|
||||
) {
|
||||
if ($this->show_action_dropdown_as_delete) {
|
||||
$menuItems[] = $this->buildDeleteLink($location);
|
||||
} else {
|
||||
$menuItems[] = $this->buildBulkActionButton($location);
|
||||
}
|
||||
}
|
||||
// Bulk Action label
|
||||
$menuItems[] = $this->buildBulkActionButton($location);
|
||||
|
||||
// Compose email
|
||||
if (isset($this->email) && $this->email === true) {
|
||||
|
@ -402,10 +388,12 @@ class ListViewDisplay
|
|||
|
||||
|
||||
if (
|
||||
$this->delete
|
||||
&& !$this->show_action_dropdown_as_delete
|
||||
$this->delete &&
|
||||
ACLController::checkAccess($this->seed->module_dir, 'delete', true)
|
||||
) {
|
||||
$menuItems[] = $this->buildDeleteLink($location);
|
||||
} else {
|
||||
$menuItems[] = "<a style='display:none'></a>";
|
||||
}
|
||||
}
|
||||
$link = array(
|
||||
|
|
|
@ -681,13 +681,6 @@ class SugarController
|
|||
$this->bean->save(!empty($this->bean->notify_on_save));
|
||||
}
|
||||
|
||||
|
||||
public function action_spot()
|
||||
{
|
||||
$this->view = 'spot';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Specify what happens after the save has occurred.
|
||||
*/
|
||||
|
|
|
@ -64,7 +64,6 @@ $action_view_map['dc'] = 'dc';
|
|||
$action_view_map['dcajax'] = 'dcajax';
|
||||
$action_view_map['quick'] = 'quick';
|
||||
$action_view_map['quickcreate'] = 'quickcreate';
|
||||
$action_view_map['spot'] = 'spot';
|
||||
$action_view_map['gs'] = 'gs';
|
||||
$action_view_map['inlinefield'] = 'inlinefield';
|
||||
$action_view_map['inlinefieldsave'] = 'inlinefieldsave';
|
||||
|
|
|
@ -249,6 +249,7 @@ class PopupSmarty extends ListViewSmarty
|
|||
$this->th->ss->assign('footerTpl', $this->footerTpl);
|
||||
$this->th->ss->assign('ASSOCIATED_JAVASCRIPT_DATA', 'var associated_javascript_data = '.$json->encode($associated_row_data). '; var is_show_fullname = '.$is_show_fullname.';');
|
||||
$this->th->ss->assign('module', $this->seed->module_dir);
|
||||
$this->th->ss->assign('metadata', empty($_REQUEST['metadata']) ? '' : $_REQUEST['metadata']);
|
||||
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
|
||||
$this->th->ss->assign('request_data', $request_data);
|
||||
|
|
|
@ -72,6 +72,7 @@ function clearAll() {
|
|||
<input type="hidden" name="module" value="{$module}" />
|
||||
<input type="hidden" name="action" value="Popup" />
|
||||
<input type="hidden" name="query" value="true" />
|
||||
<input type="hidden" name="metadata" value="{$metadata}" />
|
||||
<input type="hidden" name="func_name" value="" />
|
||||
<input type="hidden" name="request_data" value="{$request_data}" />
|
||||
<input type="hidden" name="populate_parent" value="false" />
|
||||
|
|
372
include/Services/Batch/BatchJob.php
Normal file
372
include/Services/Batch/BatchJob.php
Normal file
|
@ -0,0 +1,372 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/../../../modules/SchedulersJobs/SchedulersJob.php';
|
||||
|
||||
abstract class BatchJob implements RunnableSchedulerJob
|
||||
{
|
||||
/**
|
||||
* @var $job SchedulersJob
|
||||
*/
|
||||
protected $job;
|
||||
|
||||
/**
|
||||
* @var $batchSize int
|
||||
*/
|
||||
protected $batchSize = 100;
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function setJob(SchedulersJob $job)
|
||||
{
|
||||
$this->job = $job;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function run($data)
|
||||
{
|
||||
$data = $data ?? [];
|
||||
|
||||
if (is_string($data)) {
|
||||
$data = json_decode(html_entity_decode($data), true, 512, JSON_THROW_ON_ERROR);
|
||||
}
|
||||
|
||||
if (!$this->shouldRun($data)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->init();
|
||||
|
||||
if (empty($data['tracking'])) {
|
||||
$data['tracking'] = $this->setupTracking();
|
||||
}
|
||||
|
||||
$batchSize = $this->getBatchSize($data);
|
||||
[$type, $recordIds, $data] = $this->getNextBatch($data, $batchSize);
|
||||
|
||||
if (empty($recordIds)) {
|
||||
$this->markComplete();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
$data = $this->processBatch($type, $data, $recordIds);
|
||||
|
||||
$this->updateTrackingTable($type, $data, $recordIds);
|
||||
$this->updateJobStatus($data);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get job key
|
||||
* @return string
|
||||
*/
|
||||
abstract public function getJobKey(): string;
|
||||
|
||||
/**
|
||||
* Get job key
|
||||
* @return array
|
||||
*/
|
||||
abstract protected function setupTracking(): array;
|
||||
|
||||
/**
|
||||
* Should run
|
||||
* @return bool
|
||||
*/
|
||||
abstract protected function shouldRun(): bool;
|
||||
|
||||
/**
|
||||
* Do initial setup
|
||||
*/
|
||||
abstract protected function init(): void;
|
||||
|
||||
/**
|
||||
* @param string $type
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
abstract protected function getAllIdsInGroup(string $type, array $data): array;
|
||||
|
||||
/**
|
||||
* @param string $type
|
||||
* @param array $data
|
||||
* @param array $ids
|
||||
* @return array
|
||||
*/
|
||||
abstract protected function processBatch(string $type, array $data, array $ids): array;
|
||||
|
||||
/**
|
||||
* Get tracking table name
|
||||
* @param string $type
|
||||
* @return string
|
||||
*/
|
||||
protected function getTrackingTableName(string $type): string
|
||||
{
|
||||
return 'tmp_' . strtolower(str_replace('-', '_', $this->getJobKey())) . '_' . strtolower($type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create and initialize tracking table with all ids to process
|
||||
* @param string $table
|
||||
* @param array $ids
|
||||
*/
|
||||
protected function initTrackingTable(string $table, array $ids): void
|
||||
{
|
||||
global $db;
|
||||
|
||||
$fields = [
|
||||
'id' => [
|
||||
'name' => 'id',
|
||||
'type' => 'varchar',
|
||||
],
|
||||
'status' => [
|
||||
'name' => 'status',
|
||||
'type' => 'varchar',
|
||||
'isnull' => true
|
||||
],
|
||||
];
|
||||
|
||||
$db->createTableParams($table, $fields, []);
|
||||
|
||||
$chunkSize = 2500;
|
||||
$recordIds = array_chunk($ids, $chunkSize, true);
|
||||
|
||||
$baseQuery = "INSERT INTO " . $table . " (id) VALUES ";
|
||||
|
||||
foreach ($recordIds as $chunk) {
|
||||
|
||||
$query = $baseQuery . '("' . implode('") , ("', $chunk) . '")';
|
||||
|
||||
$db->query($query);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete ids table
|
||||
* @param string $table
|
||||
*/
|
||||
protected function deleteTrackingTable(string $table): void
|
||||
{
|
||||
global $db;
|
||||
|
||||
$db->dropTableName($table);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update tracking table with ids that have been processed
|
||||
* @param string $type
|
||||
* @param array $data
|
||||
* @param array $recordIds
|
||||
*/
|
||||
protected function updateTrackingTable(string $type, array $data, array $recordIds): void
|
||||
{
|
||||
global $db;
|
||||
|
||||
$trackingTable = $data['tracking'][$type]['table'] ?? '';
|
||||
|
||||
$sql = "UPDATE $trackingTable SET status = 'processed' WHERE id IN ('" . implode("' , '", $recordIds) . "') ";
|
||||
|
||||
$db->query($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Batch of ids to process
|
||||
* @param string $trackingTable
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
protected function getIdsBatch(string $trackingTable, array $data): array
|
||||
{
|
||||
global $db;
|
||||
|
||||
$batchSize = $this->getBatchSize($data);
|
||||
|
||||
$query = "SELECT id FROM $trackingTable WHERE status is null";
|
||||
$start = 0;
|
||||
$count = $batchSize;
|
||||
|
||||
$result = $db->limitQuery($query, $start, $count);
|
||||
|
||||
$ids = [];
|
||||
$row = $db->fetchByAssoc($result, false);
|
||||
|
||||
while (!empty($row)) {
|
||||
if (!empty($row['id'])) {
|
||||
$ids[] = $row['id'];
|
||||
}
|
||||
|
||||
$row = $db->fetchByAssoc($result);
|
||||
|
||||
}
|
||||
|
||||
return $ids;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @param string $group
|
||||
* @return array
|
||||
*/
|
||||
protected function getGroupBatchInfo(array $data, string $group): array
|
||||
{
|
||||
return $data['tracking'][$group] ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @return int
|
||||
*/
|
||||
protected function getBatchSize(array $data): int
|
||||
{
|
||||
$batchSize = $this->batchSize;
|
||||
if (!empty($data['batchSize']) && is_numeric($data['batchSize'])) {
|
||||
$batchSize = (int)$data['batchSize'];
|
||||
}
|
||||
|
||||
return $batchSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $data
|
||||
* @param int $batchSize
|
||||
* @return array
|
||||
*/
|
||||
protected function getNextBatch($data, int $batchSize): array
|
||||
{
|
||||
$groups = array_keys($data['tracking']);
|
||||
$type = '';
|
||||
$recordIds = [];
|
||||
|
||||
foreach ($groups as $group) {
|
||||
$groupStatus = $data['tracking'][$group]['status'] ?? 'queued';
|
||||
|
||||
if ($groupStatus === 'done' || $groupStatus === 'no-records') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$currentDataSet = $this->getGroupBatchInfo($data, $group);
|
||||
|
||||
$trackingTable = $currentDataSet['table'] ?? '';
|
||||
$updatedCount = $this->getUpdatedCount($currentDataSet);
|
||||
|
||||
if ($trackingTable === '') {
|
||||
$ids = $this->getAllIdsInGroup($group, $data);
|
||||
|
||||
if (empty($ids)) {
|
||||
$data['tracking'][$group]['status'] = 'no-records';
|
||||
continue;
|
||||
}
|
||||
|
||||
$trackingTable = $this->getTrackingTableName($group);
|
||||
$this->initTrackingTable($trackingTable, $ids);
|
||||
|
||||
$data['tracking'][$group]['total'] = count($ids);
|
||||
$data['tracking'][$group]['table'] = $trackingTable;
|
||||
|
||||
$idChunks = array_chunk($ids, $batchSize);
|
||||
$recordIds = $idChunks[0];
|
||||
}
|
||||
|
||||
if (empty($recordIds)) {
|
||||
$recordIds = $this->getIdsBatch($trackingTable, $data);
|
||||
}
|
||||
|
||||
if (!empty($recordIds)) {
|
||||
$data['tracking'][$group]['status'] = 'in-progress';
|
||||
$data['tracking'][$group]['updated_count'] = $updatedCount + count($recordIds);
|
||||
$type = $group;
|
||||
break;
|
||||
}
|
||||
|
||||
// no more ids for current group, delete table
|
||||
if (!empty($data['tracking'][$group]['table']) && empty($data['keepTracking'])) {
|
||||
$this->deleteTrackingTable($data['tracking'][$group]['table']);
|
||||
}
|
||||
|
||||
$data['tracking'][$group]['status'] = 'done';
|
||||
}
|
||||
|
||||
return [$type, $recordIds, $data];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get updated count
|
||||
* @param $currentDataSet
|
||||
* @return int
|
||||
*/
|
||||
protected function getUpdatedCount($currentDataSet): int
|
||||
{
|
||||
$updatedCount = 0;
|
||||
if (!empty($currentDataSet['updated_count']) && is_numeric($currentDataSet['updated_count'])) {
|
||||
$updatedCount = (int)$currentDataSet['updated_count'];
|
||||
}
|
||||
|
||||
return $updatedCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update job status and data
|
||||
* @param $data
|
||||
*/
|
||||
protected function updateJobStatus($data): void
|
||||
{
|
||||
$this->job->data = json_encode($data, JSON_THROW_ON_ERROR);
|
||||
$this->job->status = 'queued';
|
||||
$this->job->postponeJob(null, 5);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark complete
|
||||
*/
|
||||
protected function markComplete(): void
|
||||
{
|
||||
$this->job->resolveJob(SchedulersJob::JOB_SUCCESS);
|
||||
}
|
||||
}
|
554
include/Services/NormalizeRecords/NormalizeRecords.php
Normal file
554
include/Services/NormalizeRecords/NormalizeRecords.php
Normal file
|
@ -0,0 +1,554 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
|
||||
require_once __DIR__ .'/../../../modules/SchedulersJobs/SchedulersJob.php';
|
||||
require_once __DIR__ .'/../Batch/BatchJob.php';
|
||||
|
||||
|
||||
class NormalizeRecords extends BatchJob
|
||||
{
|
||||
public const UTF_REPAIR_FROM = '2021-04-27 00:00:01';
|
||||
public const SYSTEM_SETTING_KEY = 'utf_normalization_executed';
|
||||
public const SYSTEM_SETTING_MODE_KEY = 'utf_normalization_execution_mode';
|
||||
public const SYSTEM_SETTING_CATEGORY = 'system';
|
||||
public const REPAIR_STATUS_IN_PROGRESS = 'in_progress';
|
||||
public const REPAIR_STATUS_REPAIRED = 'repaired';
|
||||
public const REPAIR_STATUS_FAILURE = 'failed';
|
||||
public const EXECUTION_MODE_SYNC = 'sync';
|
||||
public const EXECUTION_MODE_ASYNC = 'async';
|
||||
|
||||
/**
|
||||
* Run record normalization process
|
||||
* @param array $data $repairFrom
|
||||
* @param bool $echo
|
||||
* @return array
|
||||
*/
|
||||
public function runAll($data, $echo = false): array
|
||||
{
|
||||
$this->init();
|
||||
|
||||
$repairStatus = self::getRepairStatus();
|
||||
|
||||
if ($repairStatus === self::REPAIR_STATUS_REPAIRED) {
|
||||
return [
|
||||
'success' => true,
|
||||
'messages' => [
|
||||
'Repair already executed'
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
if ($repairStatus === self::REPAIR_STATUS_IN_PROGRESS) {
|
||||
return [
|
||||
'success' => true,
|
||||
'messages' => [
|
||||
'Repair already in progress'
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
self::setRepairStatus(self::REPAIR_STATUS_IN_PROGRESS);
|
||||
self::setExecutionMode(self::EXECUTION_MODE_SYNC);
|
||||
|
||||
$tracking = $this->setupTracking();
|
||||
$moduleList = array_keys($tracking);
|
||||
|
||||
$chunkSize = 2500;
|
||||
$time_start = microtime(true);
|
||||
|
||||
$repairFrom = $data['repair_from'] ?? '';
|
||||
$messages = [];
|
||||
foreach ($moduleList as $type) {
|
||||
|
||||
$this->debugLog("Starting repair module $type");
|
||||
$this->echoOutput($echo, "Starting repair module $type");
|
||||
|
||||
$ids = $this->getAllIdsInRange($type, $repairFrom);
|
||||
|
||||
if (empty($ids)) {
|
||||
$this->debugLog("No ids found for module $type");
|
||||
$this->echoOutput($echo, "No ids found for module $type");
|
||||
continue;
|
||||
}
|
||||
|
||||
$idChunks = array_chunk($ids, $chunkSize, true);
|
||||
|
||||
foreach ($idChunks as $key => $idChunk) {
|
||||
$this->debugLog("Repair $type - chunk $key");
|
||||
$this->echoOutput($echo, "Repair $type - chunk $key");
|
||||
$result = $this->repairChunk($type, $idChunk, $messages);
|
||||
$messages = $result['messages'] ?? [];
|
||||
}
|
||||
|
||||
$this->debugLog("Finished repair for module $type");
|
||||
$this->echoOutput($echo, "Finished repair for module $type");
|
||||
|
||||
}
|
||||
|
||||
self::setRepairStatus(self::REPAIR_STATUS_REPAIRED);
|
||||
|
||||
$mem_peak = round(memory_get_peak_usage() / 1024 / 1024);
|
||||
$this->debugLog("$mem_peak MB memory usage peak");
|
||||
$messages[] = "Memory usage peak: $mem_peak MB";
|
||||
|
||||
$time_end = microtime(true);
|
||||
$execution_time = ($time_end - $time_start) / 60;
|
||||
$this->debugLog("Total Execution Time: $execution_time Mins");
|
||||
$messages[] = "Total Execution Time: $execution_time Mins";
|
||||
|
||||
return [
|
||||
'success' => true,
|
||||
'messages' => $messages
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getJobKey(): string
|
||||
{
|
||||
return 'utf-normalize';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
protected function init(): void
|
||||
{
|
||||
global $current_language, $sugar_config, $current_user, $db;
|
||||
|
||||
if (empty($current_language)) {
|
||||
$current_language = $sugar_config['default_language'];
|
||||
}
|
||||
|
||||
$app_list_strings = return_app_list_strings_language($current_language);
|
||||
$app_strings = return_application_language($current_language);
|
||||
|
||||
$current_user = BeanFactory::newBean('Users');
|
||||
$current_user->getSystemUser();
|
||||
|
||||
$db::setQueryLimit(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
protected function shouldRun(): bool
|
||||
{
|
||||
$repairStatus = self::getRepairStatus() ?? '';
|
||||
if ($repairStatus === self::REPAIR_STATUS_REPAIRED) {
|
||||
$this->job->resolveJob(SchedulersJob::JOB_FAILURE, 'Normalization can only be executed once');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
self::setRepairStatus(self::REPAIR_STATUS_IN_PROGRESS);
|
||||
self::setExecutionMode(self::EXECUTION_MODE_ASYNC);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get repair status
|
||||
* @return string
|
||||
*/
|
||||
public static function getRepairStatus(): string
|
||||
{
|
||||
return self::getConfigEntry(self::SYSTEM_SETTING_KEY);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set repair status
|
||||
* @param string $status
|
||||
*/
|
||||
public static function setRepairStatus(string $status): void
|
||||
{
|
||||
self::setConfigEntry(self::SYSTEM_SETTING_KEY, $status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get execution mode
|
||||
* @return string
|
||||
*/
|
||||
public static function getExecutionMode(): string
|
||||
{
|
||||
return self::getConfigEntry(self::SYSTEM_SETTING_MODE_KEY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set repair status
|
||||
* @param string $mode
|
||||
*/
|
||||
public static function setExecutionMode(string $mode): void
|
||||
{
|
||||
self::setConfigEntry(self::SYSTEM_SETTING_MODE_KEY, $mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if repair from is valid
|
||||
* @param string $repairFrom
|
||||
* @return bool
|
||||
*/
|
||||
public static function isValidRepairFrom(string $repairFrom): bool
|
||||
{
|
||||
global $timedate;
|
||||
|
||||
if (!preg_match("/^\d\d\d\d-\d\d-\d\d$/", $repairFrom)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$repairFromDateTime = $timedate->fromDbDate($repairFrom);
|
||||
|
||||
if (empty($repairFromDateTime)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get entry
|
||||
* @param string $key
|
||||
* @return mixed|string
|
||||
*/
|
||||
protected static function getConfigEntry(string $key)
|
||||
{
|
||||
/** @var Administration $administration */
|
||||
$administration = BeanFactory::getBean('Administration');
|
||||
$result = $administration->retrieveSettings('system');
|
||||
|
||||
if ($result === null) {
|
||||
throw new RuntimeException('Problem while fetching admin settings');
|
||||
}
|
||||
|
||||
$settingKey = self::SYSTEM_SETTING_CATEGORY . '_' . $key;
|
||||
|
||||
if (empty($administration->settings[$settingKey])) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $administration->settings[$settingKey] ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Set config entry
|
||||
* @param string $key
|
||||
* @param string $value
|
||||
*/
|
||||
protected static function setConfigEntry(string $key, string $value): void
|
||||
{
|
||||
/** @var Administration $administration */
|
||||
$administration = BeanFactory::getBean('Administration');
|
||||
$administration->saveSetting(self::SYSTEM_SETTING_CATEGORY, $key, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
protected function setupTracking(): array
|
||||
{
|
||||
// Populate the $moduleList variable to target only specific modules
|
||||
$moduleList = [];
|
||||
if (empty($moduleList)) {
|
||||
$moduleList = $GLOBALS["moduleList"];
|
||||
$moduleList[] = 'Users';
|
||||
}
|
||||
|
||||
$tracking = [];
|
||||
|
||||
foreach ($moduleList as $module) {
|
||||
|
||||
if (empty($GLOBALS["beanList"][$module])){
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($module === 'Home') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$tracking[$module] = [
|
||||
'table' => '',
|
||||
'total' => '',
|
||||
'status' => 'queued',
|
||||
'updated_count' => ''
|
||||
];
|
||||
}
|
||||
|
||||
return $tracking;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
protected function getAllIdsInGroup(string $type, array $data): array
|
||||
{
|
||||
$repairFrom = $data['repair_from'] ?? '';
|
||||
|
||||
return $this->getAllIdsInRange($type, $repairFrom);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
protected function processBatch(string $type, array $data, array $ids): array
|
||||
{
|
||||
$result = $this->repairChunk($type, $ids);
|
||||
|
||||
$currentCount = $data['tracking'][$type]['normalize_count'] ?? 0;
|
||||
$count = $result['normalize_count'] ?? 0;
|
||||
$data['tracking'][$type]['normalize_count'] = $currentCount + $count;
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
protected function markComplete(): void
|
||||
{
|
||||
self::setRepairStatus(self::REPAIR_STATUS_REPAIRED);
|
||||
parent::markComplete();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all potentially affected records as an array of Ids
|
||||
*
|
||||
* @param $type
|
||||
* @param string $repairFrom
|
||||
* @return array
|
||||
*/
|
||||
protected function getAllIdsInRange($type, string $repairFrom): array
|
||||
{
|
||||
global $db;
|
||||
$bean = BeanFactory::getBean($type);
|
||||
if ($bean === false) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$tableName = $bean->table_name;
|
||||
|
||||
if (empty($repairFrom)) {
|
||||
$repairFrom = self::UTF_REPAIR_FROM;
|
||||
}
|
||||
|
||||
$sql = "SELECT id FROM $tableName WHERE (date_entered >= '$repairFrom') OR (date_modified >= '$repairFrom') AND ( deleted != 1 );";
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
$ids = [];
|
||||
while ($row = $db->fetchByAssoc($result)) {
|
||||
$ids[] = $row['id'];
|
||||
}
|
||||
|
||||
return $ids;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $type
|
||||
* @param array $ids
|
||||
* @param array $messages
|
||||
* @return array
|
||||
*/
|
||||
protected function repairChunk(string $type, array $ids, array $messages = []): array
|
||||
{
|
||||
$result = [
|
||||
'normalize_count' => 0
|
||||
];
|
||||
$fieldList = $this->getRepairableFieldNames($type);
|
||||
$this->debugLog("$type " . count($ids) . " records checked");
|
||||
$this->debugLog("Processing $type");
|
||||
|
||||
$i = 0;
|
||||
|
||||
$records = $this->getRecordChunk($ids, $type);
|
||||
foreach ($records as $row) {
|
||||
|
||||
$normalized = $this->repairStringValues($row, $fieldList);
|
||||
if (!$normalized) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$bean = BeanFactory::getBean($type);
|
||||
$bean->populateFromRow($row);
|
||||
$bean->update_date_modified = false;
|
||||
$bean->update_modified_by = false;
|
||||
$bean->processed = true;
|
||||
$bean->notify_inworkflow = false;
|
||||
$bean->save(false);
|
||||
$this->debugLog("$type - " . $bean->id . " normalized");
|
||||
++$i;
|
||||
if ($i % 100 === 0) {
|
||||
$this->debugLog("$i records have been saved");
|
||||
}
|
||||
}
|
||||
$messages[] = "$type " . $i . " records normalized";
|
||||
$result['normalize_count'] = $i;
|
||||
$this->debugLog("$type " . $i . " records normalized");
|
||||
|
||||
$result['messages'] = $messages;
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check and Normalize values from database row
|
||||
* which exist in the $fieldList array
|
||||
*
|
||||
* @param $row
|
||||
* @param array $fieldList
|
||||
* @return bool
|
||||
*/
|
||||
protected function repairStringValues(&$row, array $fieldList): bool
|
||||
{
|
||||
$normalized = false;
|
||||
foreach ($fieldList as $fieldName) {
|
||||
if (!empty($row[$fieldName])) {
|
||||
|
||||
// Check if normalization is required
|
||||
if (normalizer_is_normalized($row[$fieldName], Normalizer::FORM_C)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//debugLog("Pre : $row[$fieldName]");
|
||||
$row[$fieldName] = Normalizer::normalize($row[$fieldName], Normalizer::FORM_C);
|
||||
//debugLog("Post: $row[$fieldName]");
|
||||
$normalized = true;
|
||||
}
|
||||
}
|
||||
|
||||
return $normalized;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an array of text fields to be repaired
|
||||
* from a specific bean
|
||||
*
|
||||
* @param $type
|
||||
* @return array
|
||||
*/
|
||||
protected function getRepairableFieldNames($type): array
|
||||
{
|
||||
$bean = BeanFactory::getBean($type);
|
||||
if ($bean === false) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$repairableTypes = ['enum', 'longtext', 'name', 'text', 'varchar'];
|
||||
$varDefFields = $bean->getFieldDefinitions();
|
||||
|
||||
$fieldList = array();
|
||||
foreach ($varDefFields as $field) {
|
||||
if (in_array($field['type'], $repairableTypes, true)) {
|
||||
$fieldList[] = $field['name'];
|
||||
}
|
||||
}
|
||||
|
||||
return $fieldList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a chunk of records in an array
|
||||
* $chunk is an array of record ids to retrive
|
||||
*
|
||||
* @param array $chunk
|
||||
* @param $type
|
||||
* @return array
|
||||
*/
|
||||
protected function getRecordChunk(array $chunk, $type): array
|
||||
{
|
||||
global $db;
|
||||
|
||||
$bean = BeanFactory::getBean($type);
|
||||
$join = $bean->getCustomJoin();
|
||||
|
||||
$sql = "SELECT * FROM $bean->table_name ";
|
||||
$sql .= $join['join'];
|
||||
$sql .= "WHERE id IN ('" . implode("','", $chunk) . "');";
|
||||
|
||||
$result = $db->query($sql);
|
||||
$records = [];
|
||||
$row = $db->fetchByAssoc($result);
|
||||
while (!empty($row)) {
|
||||
$records[] = $row;
|
||||
$row = $db->fetchByAssoc($result);
|
||||
}
|
||||
|
||||
if (empty($records)) {
|
||||
$this->debugLog("No records retrieved for bean type " . $type);
|
||||
$this->debugLog("" . $sql);
|
||||
}
|
||||
|
||||
return $records;
|
||||
}
|
||||
|
||||
/**
|
||||
* Log debug message
|
||||
* @param $string
|
||||
*/
|
||||
protected function debugLog($string): void
|
||||
{
|
||||
global $log;
|
||||
|
||||
$log->info("[utf-normalize]" . $string);
|
||||
}
|
||||
|
||||
/**
|
||||
* Echo output
|
||||
* @param bool $echo
|
||||
* @param string $string
|
||||
*/
|
||||
protected function echoOutput(bool $echo, string $string): void
|
||||
{
|
||||
if (empty($echo)){
|
||||
return;
|
||||
}
|
||||
|
||||
echo '<div>' . $string. '</div>';
|
||||
ob_flush();
|
||||
flush();
|
||||
}
|
||||
|
||||
}
|
39
modules/Spots/views/view.list.php → include/Services/NormalizeRecords/NormalizeRecordsSchedulerJob.php
Executable file → Normal file
39
modules/Spots/views/view.list.php → include/Services/NormalizeRecords/NormalizeRecordsSchedulerJob.php
Executable file → Normal file
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
|
@ -42,17 +43,43 @@ if (!defined('sugarEntry') || !sugarEntry) {
|
|||
die('Not A Valid Entry Point');
|
||||
}
|
||||
|
||||
require_once 'modules/Spots/SpotsListViewSmarty.php';
|
||||
require_once __DIR__ .'/../../SugarQueue/SugarJobQueue.php';
|
||||
require_once __DIR__ .'/../../../modules/SchedulersJobs/SchedulersJob.php';
|
||||
require_once __DIR__ .'/NormalizeRecords.php';
|
||||
|
||||
class SpotsViewList extends ViewList
|
||||
|
||||
class NormalizeRecordsSchedulerJob extends SchedulersJob
|
||||
{
|
||||
public function __construct()
|
||||
|
||||
public $name = 'Repair field encoding';
|
||||
public $target = 'class::NormalizeRecords';
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
*/
|
||||
public static function scheduleJob(array $data): void
|
||||
{
|
||||
parent::__construct();
|
||||
NormalizeRecords::getRepairStatus();
|
||||
|
||||
$job = new self();
|
||||
|
||||
$job->name = 'repair utf encoding';
|
||||
$job->data = json_encode(array_merge(['partial' => true], $data), JSON_THROW_ON_ERROR);
|
||||
$job->assigned_user_id = 1;
|
||||
|
||||
$queue = new SugarJobQueue();
|
||||
/** @noinspection PhpParamsInspection */
|
||||
$queue->submitJob($job);
|
||||
|
||||
NormalizeRecords::setRepairStatus(NormalizeRecords::REPAIR_STATUS_IN_PROGRESS);
|
||||
}
|
||||
|
||||
public function preDisplay()
|
||||
/**
|
||||
* Get Scheduler job bean
|
||||
* @return SugarBean
|
||||
*/
|
||||
public static function getJob(): SugarBean
|
||||
{
|
||||
$this->lv = new SpotsListViewSmarty();
|
||||
return BeanFactory::getBean('SchedulersJobs', 'repair-utf-encoding');
|
||||
}
|
||||
}
|
|
@ -50,8 +50,9 @@ if(/emailAddress\d+$/.test(targetEl.id)&&isValidEmail(targetEl.value)&&!this.ver
|
|||
this.freezeEvent(e);}}},getEvent:function(event){return(event?event:window.event);},getEventElement:function(e){return(e.srcElement?e.srcElement:(e.target?e.target:e.currentTarget));},freezeEvent:function(e){if(e.preventDefault)e.preventDefault();e.returnValue=false;e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();return false;},addEmailAddress:function(tableId,address,primaryFlag,replyToFlag,optOutFlag,invalidFlag,emailId,optInFlag){_eaw=this;if(_eaw.addInProgress){return;}
|
||||
_eaw.addInProgress=true;if(!address){address="";}
|
||||
var lineContainer=$('.template.email-address-line-container').clone();lineContainer.removeClass('template');lineContainer.removeClass('hidden');lineContainer.attr('id',this.module+_eaw.id+'emailAddressRow'+_eaw.totalEmailAddresses);lineContainer.attr('name',this.module+_eaw.id+'emailAddressRow'+_eaw.totalEmailAddresses);$(lineContainer).appendTo('.email-address-lines-container');var tabIndexCount=0;if(typeof(SUGAR.TabFields)!='undefined'&&typeof(SUGAR.TabFields['email1'])!='undefined'){tabIndexCount=SUGAR.TabFields['email1'];}
|
||||
var emailField=lineContainer.find('input[type=email]');emailField.attr('name',this.module+_eaw.id+'emailAddress'+_eaw.totalEmailAddresses);emailField.attr('id',this.module+_eaw.id+'emailAddress'+_eaw.totalEmailAddresses);emailField.attr('tabindex',tabIndexCount);emailField.attr('enabled',"true");emailField.attr('value',address);emailField.eaw=_eaw;emailField.on('blur',function(e){emailField.eaw.retrieveEmailAddress(e);});emailField.on('keydown',function(e){emailField.eaw.handleKeyDown(e);});var removeButton=lineContainer.find('button#email-address-remove-button');removeButton.attr('name',_eaw.totalEmailAddresses);removeButton.attr('id',this.module+_eaw.id+"removeButton"+_eaw.totalEmailAddresses);removeButton.attr('tabindex',tabIndexCount);removeButton.attr('enabled',"true");removeButton.attr('data-row',this.module+_eaw.id+'emailAddressRow'+_eaw.totalEmailAddresses);removeButton.attr('module-id',_eaw.id);removeButton.attr('module-email-id',_eaw.totalEmailAddresses);removeButton.attr('module',this.module);removeButton.click(_eaw.removeEmailAddress);var recordId=lineContainer.find('input#record-id');recordId.attr('name',this.module+_eaw.id+"emailAddressId"+_eaw.totalEmailAddresses);recordId.attr('id',this.module+_eaw.id+'emailAddressId'+_eaw.totalEmailAddresses);recordId.attr('value',typeof(emailId)!='undefined'?emailId:'');recordId.attr('enabled',"true");var primaryCheckbox=lineContainer.find('input#email-address-primary-flag');primaryCheckbox.attr('name',_eaw.module+'0emailAddressPrimaryFlag');primaryCheckbox.attr('id',this.module+_eaw.id+'emailAddressPrimaryFlag');primaryCheckbox.attr('value',this.module+_eaw.id+'emailAddress');primaryCheckbox.attr('tabindex',tabIndexCount);primaryCheckbox.attr('enabled',"true");primaryCheckbox.attr("checked",(primaryFlag=='1'));if(_eaw.totalEmailAddresses==0&&primaryFlag!='1'){primaryCheckbox.prop("checked",true);}
|
||||
var emailField=lineContainer.find('input[type=email]');emailField.attr('name',this.module+_eaw.id+'emailAddress'+_eaw.totalEmailAddresses);emailField.attr('id',this.module+_eaw.id+'emailAddress'+_eaw.totalEmailAddresses);emailField.attr('tabindex',tabIndexCount);emailField.attr('enabled',"true");emailField.attr('value',address);emailField.eaw=_eaw;emailField.on('blur',function(e){emailField.eaw.retrieveEmailAddress(e);});emailField.on('keydown',function(e){emailField.eaw.handleKeyDown(e);});var removeButton=lineContainer.find('button#email-address-remove-button');removeButton.attr('name',_eaw.totalEmailAddresses);removeButton.attr('id',this.module+_eaw.id+"removeButton"+_eaw.totalEmailAddresses);removeButton.attr('tabindex',tabIndexCount);removeButton.attr('enabled',"true");removeButton.attr('data-row',this.module+_eaw.id+'emailAddressRow'+_eaw.totalEmailAddresses);removeButton.attr('module-id',_eaw.id);removeButton.attr('module-email-id',_eaw.totalEmailAddresses);removeButton.attr('module',this.module);removeButton.click(_eaw.removeEmailAddress);var recordId=lineContainer.find('input#record-id');recordId.attr('name',this.module+_eaw.id+"emailAddressId"+_eaw.totalEmailAddresses);recordId.attr('id',this.module+_eaw.id+'emailAddressId'+_eaw.totalEmailAddresses);recordId.attr('value',typeof(emailId)!='undefined'?emailId:'');recordId.attr('enabled',"true");var primaryPreviousValue=$("input[name='"+_eaw.module+"0emailAddressPrimaryFlag']:checked").val();var primaryCheckbox=lineContainer.find('input#email-address-primary-flag');primaryCheckbox.attr('name',_eaw.module+'0emailAddressPrimaryFlag');primaryCheckbox.attr('id',this.module+_eaw.id+'emailAddressPrimaryFlag');primaryCheckbox.attr('value',this.module+_eaw.id+'emailAddress');primaryCheckbox.attr('tabindex',tabIndexCount);primaryCheckbox.attr('enabled',"true");primaryCheckbox.attr("checked",(primaryFlag=='1'));if(_eaw.totalEmailAddresses==0&&primaryFlag!='1'){primaryCheckbox.prop("checked",true);}
|
||||
if(this.module=='Users'&&primaryCheckbox.attr("checked")){removeButton.prop('disabled',true);}
|
||||
if(!primaryFlag&&primaryPreviousValue){$('input[value="'+primaryPreviousValue+'"].email-address-primary-flag').prop("checked",true);}
|
||||
var replyToCheckbox=lineContainer.find('input#email-address-reply-to-flag');if(replyToCheckbox.length==1){replyToCheckbox.attr('name',this.module+_eaw.id+'emailAddressReplyToFlag');replyToCheckbox.attr('id',this.module+_eaw.id+'emailAddressReplyToFlag'+_eaw.totalEmailAddresses);replyToCheckbox.attr('value',this.module+_eaw.id+'emailAddress'+_eaw.totalEmailAddresses);replyToCheckbox.attr('tabindex',tabIndexCount);replyToCheckbox.attr('enabled',"true");replyToCheckbox.eaw=_eaw;replyToCheckbox.prop("checked",(replyToFlag=='1'));_eaw.replyToFlagObject[replyToCheckbox.attr('id')]=(replyToFlag=='1');}
|
||||
var optOutCheckbox=lineContainer.find('input#email-address-opt-out-flag');if(optOutCheckbox.length==1){optOutCheckbox.attr('name',this.module+_eaw.id+'emailAddressOptOutFlag[]');optOutCheckbox.attr('id',this.module+_eaw.id+'emailAddressOptOutFlag'+_eaw.totalEmailAddresses);optOutCheckbox.attr('value',this.module+_eaw.id+'emailAddress'+_eaw.totalEmailAddresses);optOutCheckbox.attr('tabindex',tabIndexCount);optOutCheckbox.attr('enabled',"true");optOutCheckbox.eaw=_eaw;optOutCheckbox.prop("checked",(optOutFlag=='1'));}
|
||||
var invalidCheckbox=lineContainer.find('input#email-address-invalid-flag');if(invalidCheckbox.length==1){invalidCheckbox.attr('name',this.module+_eaw.id+'emailAddressInvalidFlag[]');invalidCheckbox.attr('id',this.module+_eaw.id+'emailAddressInvalidFlag'+_eaw.totalEmailAddresses);invalidCheckbox.attr('value',this.module+_eaw.id+'emailAddress'+_eaw.totalEmailAddresses);invalidCheckbox.attr('tabindex',tabIndexCount);invalidCheckbox.attr('enabled',"true");invalidCheckbox.eaw=_eaw;invalidCheckbox.prop("checked",(invalidFlag=='1'));}
|
||||
|
|
|
@ -211,10 +211,12 @@ class SugarCronJobs
|
|||
$GLOBALS['log']->fatal("Job runs too frequently, throttled to protect the system.");
|
||||
return;
|
||||
}
|
||||
// clean old stale jobs
|
||||
// clean stale jobs
|
||||
if (!$this->queue->cleanup()) {
|
||||
$this->jobFailed();
|
||||
}
|
||||
// delete expired jobs
|
||||
$this->queue->clearHistoricJobs();
|
||||
// run schedulers
|
||||
if (!$this->disable_schedulers) {
|
||||
$this->queue->runSchedulers();
|
||||
|
|
|
@ -55,6 +55,7 @@ class SugarJobQueue
|
|||
* @var int
|
||||
*/
|
||||
public $jobTries = 5;
|
||||
|
||||
/**
|
||||
* Job running timeout - longer than that, job is failed by force
|
||||
* @var int
|
||||
|
@ -67,6 +68,20 @@ class SugarJobQueue
|
|||
*/
|
||||
protected $job_queue_table;
|
||||
|
||||
/**
|
||||
* Success History Lifetime
|
||||
* Defines the time in days for successful cron jobs to remain before deletion
|
||||
* @var int
|
||||
*/
|
||||
|
||||
public $success_lifetime = 30; // 30 days
|
||||
/**
|
||||
* Failure History Lifetime
|
||||
* Defines the time in days for failed cron jobs to remain before deletion
|
||||
* @var int
|
||||
*/
|
||||
public $failure_lifetime = 180; // 180 days
|
||||
|
||||
/**
|
||||
* DB connection
|
||||
* @var DBManager
|
||||
|
@ -84,6 +99,12 @@ class SugarJobQueue
|
|||
if (!empty($GLOBALS['sugar_config']['jobs']['timeout'])) {
|
||||
$this->timeout = $GLOBALS['sugar_config']['jobs']['timeout'];
|
||||
}
|
||||
if (!empty($GLOBALS['sugar_config']['jobs']['failure_lifetime'])) {
|
||||
$this->failure_lifetime = $GLOBALS['sugar_config']['jobs']['failure_lifetime'];
|
||||
}
|
||||
if (!empty($GLOBALS['sugar_config']['jobs']['success_lifetime'])) {
|
||||
$this->success_lifetime = $GLOBALS['sugar_config']['jobs']['success_lifetime'];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -167,24 +188,46 @@ class SugarJobQueue
|
|||
}
|
||||
|
||||
/**
|
||||
* Remove old jobs that still are marked as running
|
||||
* Cleanup old, failed or long running jobs
|
||||
* Forcefully remove jobs that are marked as running when they exceed the timeout value
|
||||
* @return bool true if no failed job discovered, false if some job were failed
|
||||
*/
|
||||
public function cleanup()
|
||||
{
|
||||
// fail jobs that are too old
|
||||
$ret = true;
|
||||
// bsitnikovski@sugarcrm.com bugfix #56144: Scheduler Bug
|
||||
$date = $this->db->convert($this->db->quoted($GLOBALS['timedate']->getNow()->modify("-{$this->timeout} seconds")->asDb()), 'datetime');
|
||||
$res = $this->db->query("SELECT id FROM {$this->job_queue_table} WHERE status='".SchedulersJob::JOB_STATUS_RUNNING."' AND date_modified <= $date");
|
||||
$date = $this->db->convert($GLOBALS['timedate']->getNow()->modify("-{$this->timeout} seconds")->asDb(), 'datetime');
|
||||
$sql = "SELECT id FROM {$this->job_queue_table} WHERE status='".SchedulersJob::JOB_STATUS_RUNNING."' AND date_modified <= '{$date}'";
|
||||
$res = $this->db->query($sql);
|
||||
while ($row = $this->db->fetchByAssoc($res)) {
|
||||
$this->resolveJob($row["id"], SchedulersJob::JOB_FAILURE, translate('ERR_TIMEOUT', 'SchedulersJobs'));
|
||||
$ret = false;
|
||||
}
|
||||
// TODO: soft-delete old done jobs?
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks jobs for deletion that have exceeded their history lifetime
|
||||
* Uses different values for successful and failed jobs
|
||||
*/
|
||||
public function clearHistoricJobs()
|
||||
{
|
||||
// Process successful jobs
|
||||
$date = $this->db->convert($GLOBALS['timedate']->getNow()->modify("-{$this->success_lifetime} days")->asDb(), 'datetime');
|
||||
$sql = "SELECT id FROM {$this->job_queue_table} WHERE status='".SchedulersJob::JOB_STATUS_DONE."' AND resolution='".SchedulersJob::JOB_SUCCESS."' AND date_modified <= '{$date}'";
|
||||
$res = $this->db->query($sql);
|
||||
while ($row = $this->db->fetchByAssoc($res)) {
|
||||
$this->deleteJob($row["id"]);
|
||||
}
|
||||
|
||||
// Process failed jobs
|
||||
$date = $this->db->convert($GLOBALS['timedate']->getNow()->modify("-{$this->failure_lifetime} days")->asDb(), 'datetime');
|
||||
$sql = "SELECT id FROM {$this->job_queue_table} WHERE status='".SchedulersJob::JOB_STATUS_DONE."' AND resolution!='".SchedulersJob::JOB_SUCCESS."' AND date_modified <= '{$date}'";
|
||||
$res = $this->db->query($sql);
|
||||
while ($row = $this->db->fetchByAssoc($res)) {
|
||||
$this->deleteJob($row["id"]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Nuke all jobs from the queue
|
||||
*/
|
||||
|
|
|
@ -197,7 +197,7 @@ break;case'teamset':var table_element_id=formname+'_'+form[validate[formname][i]
|
|||
break;}}
|
||||
if(!has_primary){isError=true;var field_id=form[validate[formname][i][nameIndex]].name+'_collection_'+input_elements[0].value;add_error_style(formname,field_id,SUGAR.language.get('app_strings','ERR_NO_PRIMARY_TEAM_SPECIFIED'));}}
|
||||
break;case'error':isError=true;add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]);break;}
|
||||
if(typeof validate[formname][i][jstypeIndex]!='undefined'){switch(validate[formname][i][jstypeIndex]){case'callback':if(typeof validate[formname][i][callbackIndex]=='function'){var result=validate[formname][i][callbackIndex](formname,validate[formname][i][nameIndex]);if(result==false){isError=true;add_error_style(formname,validate[formname][i][nameIndex],requiredTxt+" "+validate[formname][i][msgIndex]);}}
|
||||
if(typeof validate[formname][i][jstypeIndex]!='undefined'){switch(validate[formname][i][jstypeIndex]){case'callback':if(typeof validate[formname][i][callbackIndex]=='function'){var result=validate[formname][i][callbackIndex](formname,validate[formname][i][nameIndex]);if(result==false){isError=true;add_error_style(formname,validate[formname][i][nameIndex],invalidTxt+" "+validate[formname][i][msgIndex]);}}
|
||||
break;case'range':if(!inRange(trim(form[validate[formname][i][nameIndex]].value),validate[formname][i][minIndex],validate[formname][i][maxIndex])){isError=true;var lbl_validate_range=SUGAR.language.get('app_strings','LBL_VALIDATE_RANGE');if(typeof validate[formname][i][minIndex]=='number'&&typeof validate[formname][i][maxIndex]=='number'){add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+" value "+form[validate[formname][i][nameIndex]].value+" "+lbl_validate_range+" ("+validate[formname][i][minIndex]+" - "+validate[formname][i][maxIndex]+")");}
|
||||
else if(typeof validate[formname][i][minIndex]=='number'){add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+" "+SUGAR.language.get('app_strings','MSG_SHOULD_BE')+' '+validate[formname][i][minIndex]+' '+SUGAR.language.get('app_strings','MSG_OR_GREATER'));}
|
||||
else if(typeof validate[formname][i][maxIndex]=='number'){add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+" "+SUGAR.language.get('app_strings','MSG_IS_MORE_THAN')+' '+validate[formname][i][maxIndex]);}}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3593,20 +3593,6 @@ $app_list_strings['moduleList']['TemplateEditor'] = 'Template Part Editor';
|
|||
$app_strings['LBL_CONFIRM_CANCEL_INLINE_EDITING'] = "You have clicked away from the field you were editing without saving it. Click ok if you're happy to lose your change, or cancel if you would like to continue editing";
|
||||
$app_strings['LBL_LOADING_ERROR_INLINE_EDITING'] = "There was an error loading the field. Your session may have timed out. Please log in again to fix this";
|
||||
|
||||
//SuiteSpots
|
||||
$app_list_strings['spots_areas'] = array(
|
||||
'getSalesSpotsData' => 'Sales',
|
||||
'getAccountsSpotsData' => 'Accounts',
|
||||
'getLeadsSpotsData' => 'Leads',
|
||||
'getServiceSpotsData' => 'Service',
|
||||
'getMarketingSpotsData' => 'Marketing',
|
||||
'getMarketingActivitySpotsData' => 'Marketing Activity',
|
||||
'getActivitiesSpotsData' => 'Activities',
|
||||
'getQuotesSpotsData' => 'Quotes'
|
||||
);
|
||||
|
||||
$app_list_strings['moduleList']['Spots'] = 'Spots';
|
||||
|
||||
$app_list_strings['moduleList']['AOBH_BusinessHours'] = 'Business Hours';
|
||||
$app_list_strings['business_hours_list']['0'] = '12am';
|
||||
$app_list_strings['business_hours_list']['1'] = '1am';
|
||||
|
@ -3848,6 +3834,7 @@ $app_strings['LBL_PHOTO'] = 'Photo';
|
|||
$app_strings['LBL_CASE_UPDATES'] = 'Case Updates';
|
||||
$app_strings['LBL_CASE_UPDATE_SUBMITTED'] = 'Case Update Submitted';
|
||||
$app_strings['LBL_SUMMARY_DEFAULT'] = "{{fields.name.value}}";
|
||||
$app_strings['LBL_SUMMARY_PERSON'] = "{{fields.salutation.value}} {{fields.first_name.value}} {{fields.last_name.value}}";
|
||||
$app_strings['LBL_CREATE'] = 'Create';
|
||||
$app_strings['LBL_SAVED_FILTER_SAVED'] = 'Filter successfully saved';
|
||||
$app_strings['LBL_FILTER_ID_NOT_DEFINED'] = 'Filter id not defined';
|
||||
|
|
|
@ -86,8 +86,6 @@ $moduleList[] = 'Bugs';
|
|||
$moduleList[] = 'ResourceCalendar';
|
||||
$moduleList[] = 'AOBH_BusinessHours';
|
||||
|
||||
$moduleList[] = 'Spots';
|
||||
|
||||
// this list defines all of the module names and bean names in the app
|
||||
// to create a new module's bean class, add the bean definition here
|
||||
$beanList = [];
|
||||
|
@ -153,7 +151,6 @@ $beanList['EmailText'] = 'EmailText';
|
|||
$beanList['Relationships'] = 'Relationship';
|
||||
$beanList['Employees'] = 'Employee';
|
||||
|
||||
$beanList['Spots'] = 'Spots';
|
||||
$beanList['AOBH_BusinessHours'] = 'AOBH_BusinessHours';
|
||||
|
||||
// this list defines all of the files that contain the SugarBean class definitions from $beanList
|
||||
|
@ -222,7 +219,6 @@ $beanFiles['EmailText'] = 'modules/EmailText/EmailText.php';
|
|||
|
||||
$beanFiles['Configurator'] = 'modules/Configurator/Configurator.php';
|
||||
|
||||
$beanFiles['Spots'] = 'modules/Spots/Spots.php';
|
||||
$beanFiles['AOBH_BusinessHours'] = 'modules/AOBH_BusinessHours/AOBH_BusinessHours.php';
|
||||
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
require_once __DIR__ . '/FieldMappers/AssignedUserMapper.php';
|
||||
require_once __DIR__ . '/LinkMappers/LinkMapperInterface.php';
|
||||
require_once __DIR__ . '/LinkMappers/EmailAddressLinkMapper.php';
|
||||
require_once __DIR__ . '/LinkMappers/DefaultLinkMapper.php';
|
||||
require_once __DIR__ . '/TypeMappers/FullNameMapper.php';
|
||||
require_once __DIR__ . '/TypeMappers/ParentMapper.php';
|
||||
require_once __DIR__ . '/TypeMappers/DateMapper.php';
|
||||
|
@ -77,6 +78,8 @@ class ApiBeanMapper
|
|||
$this->linkMappers[EmailAddressLinkMapper::getRelateModule()] = [];
|
||||
$this->linkMappers[EmailAddressLinkMapper::getRelateModule()]['all'] = new EmailAddressLinkMapper();
|
||||
$this->moduleMappers[CaseUpdatesMappers::getModule()] = new CaseUpdatesMappers();
|
||||
$this->linkMappers[DefaultLinkMapper::getRelateModule()] = [];
|
||||
$this->linkMappers[DefaultLinkMapper::getRelateModule()]['all'] = new DefaultLinkMapper();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -85,6 +88,8 @@ class ApiBeanMapper
|
|||
*/
|
||||
public function toApi(SugarBean $bean): array
|
||||
{
|
||||
$bean->field_defs = $this->mapLinkedModule($bean);
|
||||
|
||||
$arr = [];
|
||||
|
||||
$arr['module_name'] = $bean->module_name ?? '';
|
||||
|
@ -129,6 +134,8 @@ class ApiBeanMapper
|
|||
{
|
||||
require_once __DIR__ . '/../../../include/SugarFields/SugarFieldHandler.php';
|
||||
|
||||
$bean->field_defs = $this->mapLinkedModule($bean);
|
||||
|
||||
foreach ($bean->field_defs as $field => $properties) {
|
||||
if (!isset($values[$field])) {
|
||||
continue;
|
||||
|
@ -312,11 +319,12 @@ class ApiBeanMapper
|
|||
*/
|
||||
protected function setValue(
|
||||
SugarBean $bean,
|
||||
$field,
|
||||
array &$arr,
|
||||
array $definition,
|
||||
string $alternativeName = ''
|
||||
): void {
|
||||
$field,
|
||||
array &$arr,
|
||||
array $definition,
|
||||
string $alternativeName = ''
|
||||
): void
|
||||
{
|
||||
$name = $field;
|
||||
|
||||
if (!empty($alternativeName)) {
|
||||
|
@ -353,7 +361,6 @@ class ApiBeanMapper
|
|||
$name = $definition['name'] ?? '';
|
||||
|
||||
$linkMapper = $this->getLinkMapper($module, $relateModule, $name);
|
||||
|
||||
if ($linkMapper === null) {
|
||||
return;
|
||||
}
|
||||
|
@ -415,7 +422,7 @@ class ApiBeanMapper
|
|||
return $moduleMappers->getLinkMapper($relateModule, $field);
|
||||
}
|
||||
|
||||
$moduleLinkMappers = $this->linkMappers[$relateModule] ?? [];
|
||||
$moduleLinkMappers = $this->linkMappers[$relateModule] ?? $this->linkMappers['default'] ?? [];
|
||||
|
||||
return $moduleLinkMappers[$field] ?? $moduleLinkMappers['all'] ?? null;
|
||||
}
|
||||
|
@ -475,8 +482,6 @@ class ApiBeanMapper
|
|||
$rName = $bean->field_defs[$field]['rname'] ?? '';
|
||||
$value = $values[$field][$rName] ?? '';
|
||||
$values[$field] = $value;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -498,4 +503,105 @@ class ApiBeanMapper
|
|||
$typeMapper->toBean($bean, $values, $field, $field);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param SugarBean $bean
|
||||
* @return array
|
||||
*/
|
||||
public function mapLinkedModule(SugarBean $bean): array
|
||||
{
|
||||
$beanModule = $bean->module_name;
|
||||
if (empty($beanModule)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$field_defs = $bean->field_defs;
|
||||
if (empty($field_defs)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$beanObject = BeanFactory::newBean($beanModule);
|
||||
if ($beanObject === null) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$beanObject->load_relationships();
|
||||
if (empty($beanObject)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
foreach ($field_defs as $fieldName => $fieldDefinition) {
|
||||
|
||||
//skip, if module property already exists in fieldDefinition
|
||||
$module = $fieldDefinition['module'] ?? '';
|
||||
if (!empty($module)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$type = $fieldDefinition['type'] ?? '';
|
||||
if ($type !== 'link') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$relationship = $fieldDefinition['relationship'] ?? '';
|
||||
if (empty($relationship)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$name = $fieldDefinition['name'] ?? '';
|
||||
if (empty($name)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!property_exists($beanObject, $name)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!property_exists($beanObject->$name, 'relationship')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!property_exists($beanObject->$name->relationship, 'def')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$relationshipMetadata = $beanObject->$name->relationship->def;
|
||||
if (empty($relationshipMetadata)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->injectRelatedModule($fieldDefinition, $relationshipMetadata, $beanModule);
|
||||
|
||||
$field_defs[$fieldName] = $fieldDefinition;
|
||||
}
|
||||
|
||||
return $field_defs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $fieldDefinition
|
||||
* @param array $relationshipMetadata
|
||||
* @param string $beanModule
|
||||
* @return void
|
||||
* @desc this function retrieves the related module for the link type field.
|
||||
* this information is required to link the relationship between the two modules
|
||||
*/
|
||||
public function injectRelatedModule(array &$fieldDefinition, array $relationshipMetadata, string $beanModule): void
|
||||
{
|
||||
if (empty($relationshipMetadata)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$lhsModule = $relationshipMetadata['lhs_module'] ?? '';
|
||||
$rhsModule = $relationshipMetadata['rhs_module'] ?? '';
|
||||
|
||||
if ($lhsModule === $beanModule) {
|
||||
$fieldDefinition['module'] = $rhsModule;
|
||||
}
|
||||
|
||||
if ($rhsModule === $beanModule) {
|
||||
$fieldDefinition['module'] = $lhsModule;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
/**
|
||||
* SuiteCRM is a customer relationship management program developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2021 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SALESAGILITY, SALESAGILITY DISCLAIMS THE
|
||||
* WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see http://www.gnu.org/licenses.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License
|
||||
* version 3, these Appropriate Legal Notices must retain the display of the
|
||||
* "Supercharged by SuiteCRM" logo. If the display of the logos is not reasonably
|
||||
* feasible for technical reasons, the Appropriate Legal Notices must display
|
||||
* the words "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/LineItemMapper.php';
|
||||
|
||||
class DefaultLinkMapper extends LineItemMapper
|
||||
{
|
||||
public const MODULE = 'default';
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getField(): string
|
||||
{
|
||||
return 'all';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getRelateModule(): string
|
||||
{
|
||||
return self::MODULE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getModule(): string
|
||||
{
|
||||
return 'default';
|
||||
}
|
||||
|
||||
}
|
|
@ -123,10 +123,17 @@ abstract class LineItemMapper implements LinkMapperInterface
|
|||
return;
|
||||
}
|
||||
|
||||
if(!empty($bean->field_defs[$name]) && $bean->field_defs[$name]['type'] === 'link') {
|
||||
$bean->field_defs[$name]['line-item'] = true;
|
||||
}
|
||||
|
||||
$definition = $this->getDefinition($bean, $name);
|
||||
|
||||
$module = $definition['module'] ?? '';
|
||||
$isLineItem = $this->isLineItem($bean, $name);
|
||||
|
||||
unset($bean->field_defs[$name]['line-item']);
|
||||
|
||||
if (!$isLineItem || $module === '') {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ class DefaultLineItemsSaveHandler implements LineItemsSaveHandlerInterface
|
|||
$relationship = $lineItemDefinition['relationship'] ?? '';
|
||||
$joinFieldsDefinitions = $this->getJoinFieldDefinitions($bean, $relationship);
|
||||
|
||||
if ($relationship === '' || !$bean->load_relationship($relationship)) {
|
||||
if ($lineItemDefinition['type'] !== 'link' || !$bean->load_relationship($field)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -82,11 +82,11 @@ class DefaultLineItemsSaveHandler implements LineItemsSaveHandlerInterface
|
|||
}
|
||||
|
||||
if ($entry->deleted) {
|
||||
$this->remove($bean, $entry, $relationship, $removalType);
|
||||
$this->remove($bean, $entry, $field, $removalType);
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->add($bean, $entry, $relationship, $joinFieldsDefinitions);
|
||||
$this->add($bean, $entry, $field, $joinFieldsDefinitions);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -94,10 +94,10 @@ class DefaultLineItemsSaveHandler implements LineItemsSaveHandlerInterface
|
|||
* Remove Line Item
|
||||
* @param SugarBean $bean
|
||||
* @param SugarBean $entry
|
||||
* @param string $relationship
|
||||
* @param string $linkField
|
||||
* @param string $removalType
|
||||
*/
|
||||
protected function remove(SugarBean $bean, SugarBean $entry, string $relationship, string $removalType): void
|
||||
protected function remove(SugarBean $bean, SugarBean $entry, string $linkField, string $removalType): void
|
||||
{
|
||||
if ($removalType === 'delete') {
|
||||
$entry->mark_deleted($entry->id);
|
||||
|
@ -106,7 +106,7 @@ class DefaultLineItemsSaveHandler implements LineItemsSaveHandlerInterface
|
|||
}
|
||||
|
||||
/** @var Link2 $link */
|
||||
$link = $bean->$relationship;
|
||||
$link = $bean->$linkField;
|
||||
|
||||
$link->remove([$entry]);
|
||||
}
|
||||
|
@ -115,14 +115,14 @@ class DefaultLineItemsSaveHandler implements LineItemsSaveHandlerInterface
|
|||
* Add line item
|
||||
* @param SugarBean $bean
|
||||
* @param SugarBean $entry
|
||||
* @param string $relationship
|
||||
* @param string $linkField
|
||||
* @param array $joinFieldsDefinitions
|
||||
*/
|
||||
protected function add(SugarBean $bean, SugarBean $entry, string $relationship, array $joinFieldsDefinitions): void
|
||||
protected function add(SugarBean $bean, SugarBean $entry, string $linkField, array $joinFieldsDefinitions): void
|
||||
{
|
||||
$joinFields = $this->getJoinFields($bean, $joinFieldsDefinitions);
|
||||
/** @var Link2 $link */
|
||||
$link = $bean->$relationship;
|
||||
$link = $bean->$linkField;
|
||||
|
||||
$link->add([$entry], $joinFields);
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ class LineItemsSaveHandlers
|
|||
|
||||
$handlers = $this->registry[$module] ?? $this->registry['default'] ?? [];
|
||||
|
||||
$moduleHandlers = $handlers[$relateModule] ?? null;
|
||||
$moduleHandlers = $handlers[$relateModule] ?? $handlers['default'] ?? null;
|
||||
|
||||
if (empty($moduleHandlers)) {
|
||||
return null;
|
||||
|
|
|
@ -41,6 +41,7 @@ $action_name_map = [
|
|||
'Step1' => 'step1',
|
||||
'Step2' => 'step2',
|
||||
'ComposeView' => 'compose',
|
||||
'SetTimezone' => 'set-timezone',
|
||||
'WizardHome' => 'wizard-home',
|
||||
'WizardEmailSetup' => 'wizard-email-setup',
|
||||
'CampaignDiagnostic' => 'diagnostic',
|
||||
|
|
|
@ -150,10 +150,6 @@ $module_name_map = [
|
|||
'frontend' => 'business-hours',
|
||||
'core' => 'BusinessHours'
|
||||
],
|
||||
'Spots' => [
|
||||
'frontend' => 'spots',
|
||||
'core' => 'Spots'
|
||||
],
|
||||
'SecurityGroups' => [
|
||||
'frontend' => 'security-groups',
|
||||
'core' => 'SecurityGroups'
|
||||
|
|
|
@ -216,6 +216,13 @@ function make_sugar_config(&$sugar_config)
|
|||
'html',
|
||||
'htm',
|
||||
) : $upload_badext,
|
||||
'valid_image_ext' => [
|
||||
'gif',
|
||||
'png',
|
||||
'jpg',
|
||||
'jpeg',
|
||||
'svg'
|
||||
],
|
||||
'upload_dir' => $upload_dir, // this must be set!!
|
||||
'upload_maxsize' => empty($upload_maxsize) ? 30000000 : $upload_maxsize,
|
||||
'allowed_preview' => [
|
||||
|
@ -471,6 +478,13 @@ function get_sugar_config_defaults(): array
|
|||
'htm',
|
||||
'phtml',
|
||||
],
|
||||
'valid_image_ext' => [
|
||||
'gif',
|
||||
'png',
|
||||
'jpg',
|
||||
'jpeg',
|
||||
'svg'
|
||||
],
|
||||
'upload_maxsize' => 30000000,
|
||||
'import_max_execution_time' => 3600,
|
||||
// 'use_php_code_json' => returnPhpJsonStatus(),
|
||||
|
@ -5984,3 +5998,66 @@ function set_session_name(){
|
|||
session_name($sessionName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if has valid image extension
|
||||
* @param string $fieldName
|
||||
* @param string $value
|
||||
* @return bool
|
||||
*/
|
||||
function has_valid_image_extension($fieldName, $name)
|
||||
{
|
||||
global $sugar_config;
|
||||
|
||||
$validExtensions = [
|
||||
'gif',
|
||||
'png',
|
||||
'jpg',
|
||||
'jpeg',
|
||||
'svg'
|
||||
];
|
||||
|
||||
if (isset($sugar_config['valid_image_ext']) && is_array($sugar_config['valid_image_ext'])){
|
||||
$validExtensions = $sugar_config['valid_image_ext'];
|
||||
}
|
||||
|
||||
return has_valid_extension($fieldName, $name, $validExtensions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if has valid extension
|
||||
* @param string $fieldName
|
||||
* @param string $name
|
||||
* @param array $validExtensions
|
||||
* @return bool
|
||||
*/
|
||||
function has_valid_extension($fieldName, $name, $validExtensions)
|
||||
{
|
||||
|
||||
if ($name === '.' || empty($name)) {
|
||||
LoggerManager::getLogger()->security("Invalid ext $fieldName : '$name'.");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$validExtensions = array_map('strtolower', $validExtensions);
|
||||
|
||||
$parts = explode('.', $name);
|
||||
|
||||
if (empty($parts)) {
|
||||
LoggerManager::getLogger()->security("Invalid ext $fieldName : '$name'.");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$ext = array_pop($parts);
|
||||
$trimmedValue = preg_replace('/.*\.([^\.]+)$/', '\1', $ext);
|
||||
|
||||
if (!in_array(strtolower($trimmedValue), $validExtensions, true)) {
|
||||
LoggerManager::getLogger()->security("Invalid $fieldName: '$name'.");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -978,7 +978,12 @@ function handleHtaccess()
|
|||
}
|
||||
$htaccess_file = '.htaccess';
|
||||
$contents = '';
|
||||
$basePath = '/legacy';
|
||||
$basePath = parse_url($sugar_config['site_url'], PHP_URL_PATH);
|
||||
if (empty($basePath)) {
|
||||
$basePath = '/legacy/';
|
||||
} else {
|
||||
$basePath .= 'legacy/';
|
||||
}
|
||||
$cacheDir = $sugar_config['cache_dir'];
|
||||
|
||||
$restrict_str = <<<EOQ
|
||||
|
|
|
@ -513,7 +513,6 @@ FP;
|
|||
$enabled_tabs[] = 'Calendar';
|
||||
$enabled_tabs[] = 'Documents';
|
||||
$enabled_tabs[] = 'Emails';
|
||||
$enabled_tabs[] = 'Spots';
|
||||
$enabled_tabs[] = 'Campaigns';
|
||||
$enabled_tabs[] = 'Calls';
|
||||
$enabled_tabs[] = 'Meetings';
|
||||
|
|
|
@ -45,11 +45,12 @@ if (!defined('sugarEntry') || !sugarEntry) {
|
|||
require __DIR__ . '/../../config.php';
|
||||
|
||||
global $current_language;
|
||||
global $mod_strings;
|
||||
|
||||
if (file_exists(__DIR__ . '/../language/' . $current_language . '.lang.php')) {
|
||||
require_once __DIR__ . '/../language/' . $current_language . '.lang.php';
|
||||
require __DIR__ . '/../language/' . $current_language . '.lang.php';
|
||||
} else {
|
||||
require_once __DIR__ . '/../language/en_us.lang.php';
|
||||
require __DIR__ . '/../language/en_us.lang.php';
|
||||
}
|
||||
|
||||
global $sugar_config;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
(function () {
|
||||
(function () {
|
||||
//Do not double define
|
||||
if (SUGAR.EmailAddressWidget) return;
|
||||
|
||||
|
@ -284,6 +284,8 @@
|
|||
recordId.attr('value', typeof(emailId) != 'undefined' ? emailId : '');
|
||||
recordId.attr('enabled', "true");
|
||||
|
||||
// Fix #9271 - Keeping record of primary email, after adding secondary
|
||||
var primaryPreviousValue = $("input[name='"+ _eaw.module + "0emailAddressPrimaryFlag']:checked").val();
|
||||
|
||||
// Primary checkbox
|
||||
var primaryCheckbox = lineContainer.find('input#email-address-primary-flag');
|
||||
|
@ -304,6 +306,11 @@
|
|||
removeButton.prop('disabled', true);
|
||||
}
|
||||
|
||||
// Fix #9271 - Keeping record of primary email, after adding secondary
|
||||
if (!primaryFlag && primaryPreviousValue) {
|
||||
$('input[value="'+primaryPreviousValue+'"].email-address-primary-flag').prop("checked", true);
|
||||
}
|
||||
|
||||
// Reply to checkbox
|
||||
var replyToCheckbox = lineContainer.find('input#email-address-reply-to-flag');
|
||||
if (replyToCheckbox.length == 1) {
|
||||
|
|
|
@ -1098,7 +1098,7 @@ function validate_form(formname, startsWith) {
|
|||
var result = validate[formname][i][callbackIndex](formname, validate[formname][i][nameIndex]);
|
||||
if (result == false) {
|
||||
isError = true;
|
||||
add_error_style(formname, validate[formname][i][nameIndex], requiredTxt + " " + validate[formname][i][msgIndex]);
|
||||
add_error_style(formname, validate[formname][i][nameIndex], invalidTxt + " " + validate[formname][i][msgIndex]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -41,9 +41,10 @@
|
|||
namespace SuiteCRM\Robo\Plugin\Commands;
|
||||
|
||||
use DBManagerFactory;
|
||||
use NormalizeRecords;
|
||||
use NormalizeRecordsSchedulerJob;
|
||||
use RepairAndClear;
|
||||
use Robo\Tasks as RoboTasks;
|
||||
use RuntimeException;
|
||||
use VardefManager;
|
||||
|
||||
/**
|
||||
|
@ -82,7 +83,7 @@ class RepairCommands extends RoboTasks
|
|||
$focus = new $bean_name();
|
||||
|
||||
if (isset($focus->disable_vardefs) && $focus->disable_vardefs === false && isset($focus->module_dir)) {
|
||||
include 'modules/'.$focus->module_dir.'/vardefs.php';
|
||||
include 'modules/' . $focus->module_dir . '/vardefs.php';
|
||||
$sql = $db->repairTable($focus, !$opts['no-execute']);
|
||||
|
||||
if (!empty($sql)) {
|
||||
|
@ -96,6 +97,7 @@ class RepairCommands extends RoboTasks
|
|||
if (!$opts['no-execute']) {
|
||||
$this->say('Database synchronized with vardefs!');
|
||||
$this->say("Executed queries: {$total}");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -104,7 +106,6 @@ class RepairCommands extends RoboTasks
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This Robo task rebuilds the CRM extension files found in custom/Extension.
|
||||
*
|
||||
|
@ -152,4 +153,108 @@ class RepairCommands extends RoboTasks
|
|||
}
|
||||
$this->say('Relationships rebuilt!');
|
||||
}
|
||||
|
||||
/**
|
||||
* Repairs record normalization
|
||||
* @param array $opts optional command line arguments
|
||||
* @option bool $sync-run - Set if you want to do a synchronous execution. All records will be normalized in one go
|
||||
* @option string $repair-from - define minimum create/modified date of records to be repaired. Format yyyy-mm-dd. Default: 2021-04-27
|
||||
* @option bool $keep-tracking - Skip deleting tracking table
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function repairNormalizeRecordEncoding(array $opts = ['sync-run' => false])
|
||||
{
|
||||
require_once __DIR__ . '/../../../../include/Services/NormalizeRecords/NormalizeRecords.php';
|
||||
|
||||
$repairStatus = NormalizeRecords::getRepairStatus();
|
||||
|
||||
if ($repairStatus === NormalizeRecords::REPAIR_STATUS_REPAIRED) {
|
||||
$this->say('Repair already executed. Aborting');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ($repairStatus === NormalizeRecords::REPAIR_STATUS_IN_PROGRESS) {
|
||||
$this->say('Repair is in progress. Aborting');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$syncRun = $opts['sync-run'] ?? false;
|
||||
|
||||
$this->say("You're about to run record encoding normalization.");
|
||||
|
||||
if ($syncRun === false) {
|
||||
$this->say("By default this action will add a job to the job queue. It will normalize records in batches. This requires cron to be configured.");
|
||||
$this->say("If you want to normalize all records synchronously re-run this command with --sync-run");
|
||||
} else {
|
||||
$this->say("Running in synchronous mode. All records going to be repaired in one go.");
|
||||
}
|
||||
|
||||
$this->say("The data on your tables is going to be updated.");
|
||||
$this->say("Please make sure to backup your database before you run this action.");
|
||||
|
||||
$proceed = $this->askDefault(
|
||||
"Are you sure you want to proceed? [y/N]", 'N'
|
||||
);
|
||||
|
||||
if (strtolower($proceed) !== 'y') {
|
||||
$this->say('Aborting.');
|
||||
return;
|
||||
}
|
||||
|
||||
$data = [];
|
||||
|
||||
$repairFrom = $opts['repair-from'] ?? null;
|
||||
if ($repairFrom === null) {
|
||||
$repairFrom = NormalizeRecords::UTF_REPAIR_FROM;
|
||||
} elseif (NormalizeRecords::isValidRepairFrom($repairFrom)) {
|
||||
$repairFrom .= ' 00:00:01';
|
||||
} elseif (!NormalizeRecords::isValidRepairFrom($repairFrom)) {
|
||||
$this->say("Provided --repair-from value '$repairFrom' not valid");
|
||||
$this->say("Aborting.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$data['repair_from'] = $repairFrom;
|
||||
|
||||
if ($syncRun === true) {
|
||||
$this->say("Running in synchronous mode.");
|
||||
$this->say("This action will take a while. Please check SuiteCRM logs for progress information.");
|
||||
$normalize = new NormalizeRecords();
|
||||
$result = $normalize->runAll($data);
|
||||
|
||||
if ($result['success'] === true) {
|
||||
$this->say("Normalize records successfully executed");
|
||||
} else {
|
||||
$this->say("Error while running normalize records");
|
||||
}
|
||||
|
||||
if (empty($result['messages'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($result['messages'] as $message) {
|
||||
$this->say($message);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->say("Running in asynchronous mode.");
|
||||
$this->say("Adding job to job queue.");
|
||||
|
||||
if (!empty($opts['keep-tracking'])){
|
||||
$data['keepTracking'] = true;
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/../../../../include/Services/NormalizeRecords/NormalizeRecordsSchedulerJob.php';
|
||||
NormalizeRecordsSchedulerJob::scheduleJob($data);
|
||||
|
||||
NormalizeRecords::setRepairStatus(NormalizeRecords::REPAIR_STATUS_IN_PROGRESS);
|
||||
NormalizeRecords::setExecutionMode(NormalizeRecords::EXECUTION_MODE_SYNC);
|
||||
|
||||
$this->say('Normalize records job scheduled. Please make sure you have cron configured.');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,178 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2021 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
namespace SuiteCRM\Search\AOD;
|
||||
|
||||
use ACLController;
|
||||
use BeanFactory;
|
||||
use SecurityGroup;
|
||||
use stdClass;
|
||||
use SugarBean;
|
||||
use SuiteCRM\Exception\Exception;
|
||||
use SuiteCRM\Search\SearchEngine;
|
||||
use SuiteCRM\Search\SearchQuery;
|
||||
use SuiteCRM\Search\SearchResults;
|
||||
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
|
||||
/**
|
||||
* Class LuceneSearchEngine
|
||||
* @package SuiteCRM\Search\AOD
|
||||
*/
|
||||
class LuceneSearchEngine extends SearchEngine
|
||||
{
|
||||
/** @var bool|SugarBean */
|
||||
private $index;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->index = BeanFactory::getBean("AOD_Index")->getIndex();
|
||||
}
|
||||
|
||||
/**
|
||||
* Search function run when user goes to Show All and runs a search again. This outputs the search results
|
||||
* calling upon the various listview display functions for each module searched on.
|
||||
*
|
||||
* @param SearchQuery $query
|
||||
*
|
||||
* @return SearchResults
|
||||
* @throws Exception
|
||||
*/
|
||||
public function search(SearchQuery $query): SearchResults
|
||||
{
|
||||
$queryString = $query->getSearchString();
|
||||
|
||||
$start = microtime(true);
|
||||
$hits = $this->runLucene($queryString);
|
||||
$results = $this->parseHits($hits);
|
||||
$end = microtime(true);
|
||||
$elapsed = $end - $start;
|
||||
|
||||
return new SearchResults($results['modules'], true, $elapsed, count($results['hits']));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $queryString
|
||||
* @return array
|
||||
*/
|
||||
private function runLucene(string $queryString): array
|
||||
{
|
||||
$cachePath = 'cache/modules/AOD_Index/QueryCache/' . md5($queryString);
|
||||
if (is_file($cachePath)) {
|
||||
$mTime = filemtime($cachePath);
|
||||
if ($mTime > (time() - 5 * 60)) {
|
||||
$hits = unserialize(sugar_file_get_contents($cachePath));
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($hits)) {
|
||||
$hits = $this->newHit($queryString);
|
||||
}
|
||||
|
||||
return $hits;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $queryString
|
||||
* @return array
|
||||
*/
|
||||
private function newHit(string $queryString): array
|
||||
{
|
||||
global $current_user;
|
||||
|
||||
$tmphits = $this->index->find($queryString);
|
||||
$hits = [];
|
||||
foreach ($tmphits as $hit) {
|
||||
$bean = BeanFactory::getBean($hit->record_module, $hit->record_id);
|
||||
if (empty($bean)) {
|
||||
continue;
|
||||
}
|
||||
if ($bean->bean_implements('ACL') && !is_admin($current_user)) {
|
||||
$in_group = SecurityGroup::groupHasAccess($bean->module_dir, $bean->id, 'list');
|
||||
$is_owner = $bean->isOwner($current_user->id);
|
||||
$access = ACLController::checkAccess($bean->module_dir, 'list', $is_owner, 'module', $in_group);
|
||||
if (!$access) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$newHit = new stdClass;
|
||||
$newHit->record_module = $hit->record_module;
|
||||
$newHit->record_id = $hit->record_id;
|
||||
$hits[] = $newHit;
|
||||
}
|
||||
$this->cacheQuery($queryString, $hits);
|
||||
|
||||
return $hits;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $hits
|
||||
* @return array
|
||||
*/
|
||||
private function parseHits(array $hits): array
|
||||
{
|
||||
$searchResults = [];
|
||||
|
||||
foreach ($hits as $hit) {
|
||||
$recordModule = $hit->record_module;
|
||||
$searchResults[$recordModule][] = $hit->record_id;
|
||||
}
|
||||
|
||||
return [
|
||||
'hits' => $hits,
|
||||
'modules' => $searchResults
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $queryString
|
||||
* @param array $resArray
|
||||
*/
|
||||
private function cacheQuery(string $queryString, array $resArray): void
|
||||
{
|
||||
$file = create_cache_directory('modules/AOD_Index/QueryCache/' . md5($queryString));
|
||||
$out = serialize($resArray);
|
||||
sugar_file_put_contents_atomic($file, $out);
|
||||
}
|
||||
}
|
|
@ -47,19 +47,20 @@ use DBManagerFactory;
|
|||
use JsonSchema\Exception\RuntimeException;
|
||||
use ListViewData;
|
||||
use LoggerManager;
|
||||
use SugarBean;
|
||||
use SuiteCRM\Exception\Exception;
|
||||
use SuiteCRM\Search\SearchEngine;
|
||||
use SuiteCRM\Search\SearchModules;
|
||||
use SuiteCRM\Search\SearchQuery;
|
||||
use SuiteCRM\Search\SearchResults;
|
||||
use VardefManager;
|
||||
use SuiteCRM\Search\SearchModules;
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
|
||||
/**
|
||||
* Class BasicAndAodEngine
|
||||
* Class BasicSearchEngine
|
||||
*/
|
||||
class BasicSearchEngine extends SearchEngine
|
||||
{
|
||||
|
@ -234,7 +235,9 @@ class BasicSearchEngine extends SearchEngine
|
|||
$where = '';
|
||||
}
|
||||
|
||||
$listData = $listViewData->getListViewData($seed, $where, 0, -1, [], $params);
|
||||
$filter_fields = $this->buildFilterFields($seed);
|
||||
|
||||
$listData = $listViewData->getListViewData($seed, $where, 0, -1, $filter_fields, $params);
|
||||
|
||||
$moduleCounts[$moduleName] = $listData['pageData']['offsets']['total'];
|
||||
|
||||
|
@ -249,4 +252,38 @@ class BasicSearchEngine extends SearchEngine
|
|||
'modules' => $moduleResults
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Build filter fields for list view data search
|
||||
* @param SugarBean $bean
|
||||
* @return array
|
||||
*/
|
||||
protected function buildFilterFields(SugarBean $bean): array
|
||||
{
|
||||
$parsedFilterFields = array();
|
||||
$excludedRelationshipFields = array();
|
||||
|
||||
foreach ($bean->field_defs as $fieldName => $fieldDefinition) {
|
||||
$type = $fieldDefinition['type'] ?? '';
|
||||
$listShow = $fieldDefinition['list-show'] ?? true;
|
||||
if ($type === 'link' || $listShow === false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$linkType = $fieldDefinition['link_type'] ?? '';
|
||||
if ($linkType === 'relationship_info') {
|
||||
$excludedRelationshipFields[] = $fieldName;
|
||||
$relationshipFields = $fieldDefinition['relationship_fields'] ?? [];
|
||||
if (!empty($relationshipFields)) {
|
||||
foreach ($relationshipFields as $relationshipField) {
|
||||
$excludedRelationshipFields[] = $relationshipField;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$parsedFilterFields[] = $fieldName;
|
||||
}
|
||||
|
||||
return array_diff($parsedFilterFields, $excludedRelationshipFields);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -231,14 +231,7 @@ class SearchQuery implements JsonSerializable
|
|||
$defaultEngine = $sugar_config['search']['defaultEngine'];
|
||||
|
||||
if ($defaultEngine === 'BasicAndAodEngine') {
|
||||
$luceneSearch = !empty($sugar_config['aod']['enable_aod']);
|
||||
|
||||
if (array_key_exists('showGSDiv', $_REQUEST) || !empty($_REQUEST['search_fallback'])) {
|
||||
// Search from vanilla sugar search or request for the same
|
||||
$luceneSearch = false;
|
||||
}
|
||||
|
||||
return $luceneSearch ? 'LuceneSearchEngine' : 'BasicSearchEngine';
|
||||
return 'BasicSearchEngine';
|
||||
}
|
||||
|
||||
return (string)$sugar_config['search']['defaultEngine'];
|
||||
|
|
|
@ -43,7 +43,6 @@ if (!defined('sugarEntry') || !sugarEntry) {
|
|||
die('Not A Valid Entry Point');
|
||||
}
|
||||
|
||||
use SuiteCRM\Search\AOD\LuceneSearchEngine;
|
||||
use SuiteCRM\Search\BasicSearch\BasicSearchEngine;
|
||||
use SuiteCRM\Search\ElasticSearch\ElasticSearchEngine;
|
||||
use SuiteCRM\Search\Exceptions\SearchEngineNotFoundException;
|
||||
|
@ -69,11 +68,6 @@ class SearchWrapper
|
|||
'FQN' => BasicSearchEngine::class,
|
||||
'filepath' => 'lib/Search/BasicSearch/BasicSearchEngine.php'
|
||||
],
|
||||
'LuceneSearchEngine' => [
|
||||
'name' => 'LuceneSearchEngine',
|
||||
'FQN' => LuceneSearchEngine::class,
|
||||
'filepath' => 'lib/Search/AOD/LuceneSearchEngine.php'
|
||||
],
|
||||
];
|
||||
|
||||
/** @var string Path to the folder where to load custom engines from */
|
||||
|
|
|
@ -736,17 +736,17 @@ class AOR_Report extends Basic
|
|||
$html .= '<td nowrap="nowrap" align="right" class="paginationChangeButtons" width="1%">';
|
||||
if ($offset == 0) {
|
||||
$html .= "<button type='button' id='listViewStartButton_top' name='listViewStartButton' title='Start' class='list-view-pagination-button' disabled='disabled'>
|
||||
<span class='suitepicon suitepicon-action-first'></span>
|
||||
".SugarThemeRegistry::current()->getImage('paginate_first')."
|
||||
</button>
|
||||
<button type='button' id='listViewPrevButton_top' name='listViewPrevButton' class='list-view-pagination-button' title='Previous' disabled='disabled'>
|
||||
<span class='suitepicon suitepicon-action-left'></span>
|
||||
".SugarThemeRegistry::current()->getImage('paginate_previous')."
|
||||
</button>";
|
||||
} else {
|
||||
$html .= "<button type='button' id='listViewStartButton_top' name='listViewStartButton' title='Start' class='list-view-pagination-button' onclick='changeReportPage(\"" . $this->id . '",0,"' . $group_value . '","' . $tableIdentifier . "\")'>
|
||||
<span class='suitepicon suitepicon-action-first'></span>
|
||||
".SugarThemeRegistry::current()->getImage('paginate_first')."
|
||||
</button>
|
||||
<button type='button' id='listViewPrevButton_top' name='listViewPrevButton' class='list-view-pagination-button' title='Previous' onclick='changeReportPage(\"" . $this->id . '",' . $previous_offset . ',"' . $group_value . '","' . $tableIdentifier . "\")'>
|
||||
<span class='suitepicon suitepicon-action-left'></span>
|
||||
".SugarThemeRegistry::current()->getImage('paginate_previous')."
|
||||
</button>";
|
||||
}
|
||||
$html .= '</td><td style="vertical-align:middle" nowrap="nowrap" width="1%" class="paginationActionButtons">';
|
||||
|
@ -754,17 +754,17 @@ class AOR_Report extends Basic
|
|||
$html .= '</td><td nowrap="nowrap" align="right" class="paginationActionButtons" width="1%">';
|
||||
if ($next_offset < $total_rows) {
|
||||
$html .= "<button type='button' id='listViewNextButton_top' name='listViewNextButton' title='Next' class='list-view-pagination-button' onclick='changeReportPage(\"" . $this->id . '",' . $next_offset . ',"' . $group_value . '","' . $tableIdentifier . "\")'>
|
||||
<span class='suitepicon suitepicon-action-right'></span>
|
||||
".SugarThemeRegistry::current()->getImage('paginate_next')."
|
||||
</button>
|
||||
<button type='button' id='listViewEndButton_top' name='listViewEndButton' title='End' class='list-view-pagination-button' onclick='changeReportPage(\"" . $this->id . '",' . $last_offset . ',"' . $group_value . '","' . $tableIdentifier . "\")'>
|
||||
<span class='suitepicon suitepicon-action-last'></span>
|
||||
".SugarThemeRegistry::current()->getImage('paginate_last')."
|
||||
</button>";
|
||||
} else {
|
||||
$html .= "<button type='button' id='listViewNextButton_top' name='listViewNextButton' title='Next' class='list-view-pagination-button' disabled='disabled'>
|
||||
<span class='suitepicon suitepicon-action-right'></span>
|
||||
".SugarThemeRegistry::current()->getImage('paginate_next')."
|
||||
</button>
|
||||
<button type='button' id='listViewEndButton_top' name='listViewEndButton' title='End' class='list-view-pagination-button' disabled='disabled'>
|
||||
<span class='suitepicon suitepicon-action-last'></span>
|
||||
".SugarThemeRegistry::current()->getImage('paginate_last')."
|
||||
</button>";
|
||||
}
|
||||
|
||||
|
|
|
@ -946,7 +946,8 @@ function fixUpFormatting($module, $field, $value)
|
|||
switch ($bean->field_defs[$field]['type']) {
|
||||
case 'datetime':
|
||||
case 'datetimecombo':
|
||||
if (empty($value)) {
|
||||
// If value is array, don't attempt to convert to DB format
|
||||
if (empty($value) || is_array($value)) {
|
||||
break;
|
||||
}
|
||||
if ($value == 'NULL') {
|
||||
|
@ -959,7 +960,8 @@ function fixUpFormatting($module, $field, $value)
|
|||
}
|
||||
break;
|
||||
case 'date':
|
||||
if (empty($value)) {
|
||||
// If value is array, don't attempt to convert to DB format
|
||||
if (empty($value) || is_array($value)) {
|
||||
break;
|
||||
}
|
||||
if ($value == 'NULL') {
|
||||
|
|
153
modules/Administration/RepairUtfEncoding.php
Normal file
153
modules/Administration/RepairUtfEncoding.php
Normal file
|
@ -0,0 +1,153 @@
|
|||
<?php
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
global $current_user, $mod_strings, $app_strings, $log;
|
||||
|
||||
if (!is_admin($current_user)) {
|
||||
echo $app_strings['ERR_NOT_ADMIN'];
|
||||
return;
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/../../include/Services/NormalizeRecords/NormalizeRecords.php';
|
||||
|
||||
$repairStatus = NormalizeRecords::getRepairStatus();
|
||||
|
||||
if ($repairStatus === NormalizeRecords::REPAIR_STATUS_REPAIRED || $repairStatus === NormalizeRecords::REPAIR_STATUS_IN_PROGRESS) {
|
||||
$mode = NormalizeRecords::getExecutionMode();
|
||||
|
||||
$smarty = new Sugar_Smarty();
|
||||
$smarty->assign('MOD', $mod_strings);
|
||||
$smarty->assign('status', $repairStatus);
|
||||
$smarty->assign('mode', $mode);
|
||||
$smarty->display('modules/Administration/templates/RepairUtfEncodingStatus.tpl');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// the initial settings for the template variables to fill
|
||||
$wasRepaired = '';
|
||||
$config_file_ready = false;
|
||||
$lbl_rebuild_config = $mod_strings['LBL_REBUILD_CONFIG'];
|
||||
$btn_rebuild_config = $mod_strings['BTN_REBUILD_CONFIG'];
|
||||
$disable_config_rebuild = 'disabled="disabled"';
|
||||
|
||||
// only do the rebuild if config file checks out and user has posted back
|
||||
if (!empty($_POST['perform_rebuild_utf_encoding'])) {
|
||||
$data = [];
|
||||
|
||||
$syncRun = !empty($_POST['syncRun']);
|
||||
$keepTrackingTables = !empty($_POST['keepTrackingTables']);
|
||||
|
||||
$repairFrom = $_POST['repairFrom'] ?? null;
|
||||
if ($repairFrom === null) {
|
||||
$repairFrom = NormalizeRecords::UTF_REPAIR_FROM;
|
||||
} elseif (NormalizeRecords::isValidRepairFrom($repairFrom)) {
|
||||
$repairFrom .= ' 00:00:01';
|
||||
} elseif (!NormalizeRecords::isValidRepairFrom($repairFrom)) {
|
||||
$smarty = new Sugar_Smarty();
|
||||
$smarty->assign('MOD', $mod_strings);
|
||||
$smarty->assign('invalid_repair_from', true);
|
||||
$smarty->display('modules/Administration/templates/RepairUtfEncoding.tpl');
|
||||
return;
|
||||
}
|
||||
|
||||
$data['repair_from'] = $repairFrom;
|
||||
|
||||
if ($syncRun === true) {
|
||||
$smarty = new Sugar_Smarty();
|
||||
$smarty->assign('MOD', $mod_strings);
|
||||
$smarty->assign('status', 'in_progress');
|
||||
$smarty->assign('mode', NormalizeRecords::EXECUTION_MODE_SYNC);
|
||||
$smarty->display('modules/Administration/templates/RepairUtfEncodingSyncStatus.tpl');
|
||||
ob_flush();
|
||||
flush();
|
||||
|
||||
$normalize = new NormalizeRecords();
|
||||
$result = $normalize->runAll($data, true);
|
||||
|
||||
echo '<h3 class="pt-0">' . $mod_strings['LBL_RESULT'] . '</h3>';
|
||||
|
||||
if ($result['success'] === true) {
|
||||
echo '<div>' . $mod_strings['LBL_NORMALIZE_SUCCESS']. '</div>';
|
||||
} else {
|
||||
echo '<div>' . $mod_strings['LBL_NORMALIZE_FAILURE']. '</div>';
|
||||
}
|
||||
|
||||
if (empty($result['messages'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($result['messages'] as $message) {
|
||||
echo '<div>' . $message . '</div>';
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!empty($keepTrackingTables)){
|
||||
$data['keepTracking'] = true;
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/../../include/Services/NormalizeRecords/NormalizeRecordsSchedulerJob.php';
|
||||
NormalizeRecordsSchedulerJob::scheduleJob($data);
|
||||
|
||||
NormalizeRecords::setRepairStatus(NormalizeRecords::REPAIR_STATUS_IN_PROGRESS);
|
||||
NormalizeRecords::setExecutionMode(NormalizeRecords::EXECUTION_MODE_SYNC);
|
||||
|
||||
$smarty = new Sugar_Smarty();
|
||||
$smarty->assign('MOD', $mod_strings);
|
||||
$smarty->assign('status', 'in_progress');
|
||||
$smarty->assign('mode', NormalizeRecords::EXECUTION_MODE_ASYNC);
|
||||
$smarty->display('modules/Administration/templates/RepairUtfEncodingStatus.tpl');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isset($_REQUEST['perform_rebuild_utf_encoding'])) {
|
||||
$smarty = new Sugar_Smarty();
|
||||
$smarty->assign('MOD', $mod_strings);
|
||||
$smarty->assign('invalid_repair_from', false);
|
||||
$smarty->display('modules/Administration/templates/RepairUtfEncoding.tpl');
|
||||
}
|
|
@ -67,14 +67,12 @@ class Controller extends AbstractController
|
|||
public function doSave(): void
|
||||
{
|
||||
$searchEngine = filter_input(INPUT_POST, 'search-engine', FILTER_SANITIZE_STRING);
|
||||
$aod = $searchEngine === 'BasicAndAodEngine';
|
||||
|
||||
SearchConfigurator::make()
|
||||
->setEngine($searchEngine)
|
||||
->save();
|
||||
|
||||
SearchModules::saveGlobalSearchSettings();
|
||||
$this->doSaveAODConfig($aod);
|
||||
|
||||
if ($this->isAjax()) {
|
||||
$this->yieldJson(['status' => 'success']);
|
||||
|
@ -82,23 +80,4 @@ class Controller extends AbstractController
|
|||
|
||||
$this->redirect('index.php?module=Administration&action=index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the configuration getting data from POST.
|
||||
* @param bool $enabled
|
||||
*/
|
||||
public function doSaveAODConfig(bool $enabled): void
|
||||
{
|
||||
$cfg = new Configurator();
|
||||
|
||||
if (!array_key_exists('aod', $cfg->config)) {
|
||||
$cfg->config['aod'] = [
|
||||
'enable_aod' => '',
|
||||
];
|
||||
}
|
||||
|
||||
$cfg->config['aod']['enable_aod'] = $enabled;
|
||||
|
||||
$cfg->saveConfig();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,13 +65,11 @@ class View extends AbstractView
|
|||
$this->smarty->assign('selectedEngine', SearchWrapper::getDefaultEngine());
|
||||
|
||||
$legacyEngines = [
|
||||
'BasicSearchEngine' => translate('LBL_BASIC_SEARCH_ENGINE'),
|
||||
'BasicAndAodEngine' => translate('LBL_BASIC_AND_AOD_ENGINE'),
|
||||
'BasicSearchEngine' => translate('LBL_BASIC_SEARCH_ENGINE')
|
||||
];
|
||||
|
||||
$engines = $this->getEngines();
|
||||
$engines = array_merge($legacyEngines, $engines);
|
||||
unset($engines['LuceneSearchEngine']);
|
||||
|
||||
$this->smarty->assign('engines', [
|
||||
translate('LBL_SEARCH_WRAPPER_ENGINES') => $engines
|
||||
|
|
|
@ -162,4 +162,8 @@ if (strpos($server_software, 'Microsoft-IIS') === false) {
|
|||
<td scope="row"><?php echo SugarThemeRegistry::current()->getImage('Repair', 'align="absmiddle" border="0"', null, null, '.gif', $mod_strings['LBL_REPAIR_UPLOAD_FOLDER']); ?> <a href="./index.php?module=Administration&action=RepairUploadFolder"><?php echo $mod_strings['LBL_REPAIR_UPLOAD_FOLDER']; ?></a></td>
|
||||
<td> <?php echo $mod_strings['LBL_REPAIR_UPLOAD_FOLDER_DESC'] ; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td scope="row"><?php echo SugarThemeRegistry::current()->getImage('Repair', 'align="absmiddle" border="0"', null, null, '.gif', $mod_strings['LBL_REPAIR_UPLOAD_FOLDER']); ?> <a href="./index.php?module=Administration&action=RepairUtfEncoding"><?php echo $mod_strings['LBL_REPAIR_UTF_ENCODING']; ?></a></td>
|
||||
<td> <?php echo $mod_strings['LBL_REPAIR_UTF_ENCODING_DESC'] ; ?> </td>
|
||||
</tr>
|
||||
</table></p>
|
||||
|
|
|
@ -874,7 +874,6 @@ $mod_strings = array(
|
|||
'LBL_AOS_SETTINGS' => 'Sales Module Settings',
|
||||
'LBL_AOS_DAYS' => 'days',
|
||||
'LBL_CHANGE_SETTINGS' => 'Change settings for Quotes, Contracts and Invoices',
|
||||
'LBL_CHANGE_SETTINGS_AOD' => 'Change settings for Advanced OpenDiscovery',
|
||||
'LBL_CHANGE_SETTINGS_AOP' => 'Change settings for Cases and the Cases Portal',
|
||||
|
||||
'LBL_MANAGE_SECURITYGROUPS_TITLE' => 'Security Suite Group Management',
|
||||
|
@ -965,7 +964,6 @@ $mod_strings = array(
|
|||
// Search Engines Translations
|
||||
'LBL_SEARCH_WRAPPER_ENGINES' => 'Search Engines',
|
||||
'LBL_BASIC_SEARCH_ENGINE' => 'Basic Search',
|
||||
'LBL_BASIC_AND_AOD_ENGINE' => 'Basic + Advanced Search',
|
||||
'LBL_ELASTIC_SEARCH_ENGINE' => 'Elasticsearch Engine',
|
||||
'LBL_SIMPLE_SQL_SEARCH_ENGINE' => 'Simple SQL Search Engine',
|
||||
|
||||
|
@ -985,8 +983,39 @@ $mod_strings = array(
|
|||
'LBL_AJAX_SUBMIT_FAIL' => 'An error has occurred while saving the settings.',
|
||||
|
||||
'LBL_ADMIN_TOOLS_TITLE' => 'Admin Tools',
|
||||
'LBL_ADMIN_TOOLS_HEADER_DESC' => 'Repair, upgrade and run diagnosis on your SuiteCRM instance',
|
||||
'LBL_ADMIN_TOOLS_HEADER_DESC' => 'Repair, backup and run diagnosis on your SuiteCRM instance',
|
||||
'LBL_WORKFLOW_MANAGER' => 'Workflow Manager',
|
||||
'LBL_WORKFLOW_MANAGER_DESC' => 'Manage, Add, delete or change Workflow processes',
|
||||
|
||||
|
||||
'LBL_WARNING' => 'Warning',
|
||||
'LBL_ERROR' => 'Error',
|
||||
'LBL_SUBMIT' => 'Submit',
|
||||
'LBL_REPAIR_UTF_ENCODING' => 'Repair utf encoding',
|
||||
'LBL_REPAIR_UTF_ENCODING_DESC' => 'Repair records with wrongly encoded utf characters',
|
||||
'LBL_REPAIR_UTF_ENCODING_DATA_WARNING' => 'The data on your tables is going to be updated.',
|
||||
'LBL_REPAIR_UTF_ENCODING_BACKUP_WARNING' => 'Please make sure to backup your database before you run this action.',
|
||||
'LBL_REPAIR_UTF_ENCODING_SYNC_WARNING' => 'By default this action will add a job to the job queue. It will normalize records in batches. This requires cron to be configured.',
|
||||
'LBL_REPAIR_UTF_ENCODING_ASYNC_WARNING' => 'Running in asynchronous mode. A job should have been added to the job queue. It will normalize records in batches. This requires cron to be configured.',
|
||||
'LBL_REPAIR_UTF_ENCODING_ASYNC_PROGRESS_CHECK' => "For progress information, please check the data on the job_queue table entry with name 'repair utf encoding' ",
|
||||
'LBL_REPAIR_UTF_ENCODING_SYNC_PROGRESS_CHECK' => "Running in synchronous mode. This action will take a while. For progress information, please check SuiteCRM logs. Check logs with '[utf-normalize]'",
|
||||
'LBL_KEEP_TRACKING_TABLES' => 'Keep Tracking tables',
|
||||
'LBL_REPAIR_FROM_DATE' => 'Repair from',
|
||||
'LBL_REPAIR_UTF_ENCODING_REPAIR_FROM_INVALID' => 'Provided \'Repair from\' value is not valid',
|
||||
'LBL_SYNC_RUN' => 'Run Repair Synchronously?',
|
||||
'LBL_SYNC_RUNNING' => 'Running in sync mode',
|
||||
'LBL_SYNC_RUNNING_INFORMATION_OUTPUT' => 'Do not move away from this page/view. Result information will be displayed.',
|
||||
'LBL_SYNC_RUNNING_INFORMATION_LOGS' => "You can also check SuiteCRM logs for more information. Check logs with '[utf-normalize]'",
|
||||
'LBL_SYNC_LONG_EXECUTION_WARNING' => 'This action will take a while.',
|
||||
'LBL_SYNC_RUN_DESC' => 'Check to run action in synchronous mode. This action will take a while. Please check SuiteCRM logs for progress information. Check logs with \'[utf-normalize]\'',
|
||||
'LBL_NORMALIZE_SUCCESS' => 'Normalize records successfully executed',
|
||||
'LBL_NORMALIZE_FAILURE' => 'Error while running normalize records',
|
||||
'LBL_EXECUTION_STATUS' => 'Execution Status',
|
||||
'LBL_EXECUTION_MODE' => 'Execution Mode',
|
||||
'LBL_IN_PROGRESS' => 'In Progress',
|
||||
'LBL_REPAIRED' => 'Repaired',
|
||||
'LBL_SYNCHRONOUS' => 'Synchronous',
|
||||
'LBL_ASYNCHRONOUS' => 'Asynchronous',
|
||||
'LBL_OUTPUT' => 'OUTPUT',
|
||||
'LBL_RESULT' => 'Result'
|
||||
);
|
||||
|
|
|
@ -319,15 +319,6 @@ $admin_option_defs['Administration']['module_loader'] = [
|
|||
'./index.php?module=Administration&action=UpgradeWizard&view=module',
|
||||
'module-loader'
|
||||
];
|
||||
if (!defined('TEMPLATE_URL')) {
|
||||
$admin_option_defs['Administration']['upgrade_wizard'] = [
|
||||
'Upgrade',
|
||||
'LBL_UPGRADE_WIZARD_TITLE',
|
||||
'LBL_UPGRADE_WIZARD',
|
||||
'./index.php?module=UpgradeWizard&action=index',
|
||||
'upgrade-wizard'
|
||||
];
|
||||
}
|
||||
|
||||
$admin_group_header[] = ['LBL_ADMIN_TOOLS_TITLE', '', false, $admin_option_defs, 'LBL_ADMIN_TOOLS_HEADER_DESC'];
|
||||
|
||||
|
|
75
modules/Spots/metadata/detailviewdefs.php → modules/Administration/templates/RepairUtfEncoding.tpl
Executable file → Normal file
75
modules/Spots/metadata/detailviewdefs.php → modules/Administration/templates/RepairUtfEncoding.tpl
Executable file → Normal file
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
{*
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
|
@ -37,39 +37,46 @@
|
|||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
$module_name = 'Spots';
|
||||
$viewdefs[$module_name]['DetailView'] = array(
|
||||
'templateMeta' => array('form' => array('buttons' => array('EDIT', 'DUPLICATE', 'DELETE', 'FIND_DUPLICATES',
|
||||
)),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
),
|
||||
*}
|
||||
|
||||
'panels' => array(
|
||||
<div class="view" style="min-height: calc(100vh - 200px)">
|
||||
<h2 class="pt-0">{$MOD.LBL_REPAIR_UTF_ENCODING}</h2>
|
||||
<div class="alert alert-warning sm" role="alert">
|
||||
<h4 class="alert-heading">{$MOD.LBL_WARNING}</h4>
|
||||
<p>{$MOD.LBL_REPAIR_UTF_ENCODING_DATA_WARNING}</p>
|
||||
<p>{$MOD.LBL_REPAIR_UTF_ENCODING_BACKUP_WARNING}</p>
|
||||
<p>{$MOD.LBL_REPAIR_UTF_ENCODING_SYNC_WARNING}</p>
|
||||
</div>
|
||||
|
||||
array(
|
||||
'name',
|
||||
'assigned_user_name',
|
||||
),
|
||||
{if $invalid_repair_from eq true}
|
||||
<div class="alert alert-danger sm" role="alert">
|
||||
<h4 class="alert-heading">{$MOD.LBL_ERROR}</h4>
|
||||
<p>{$MOD.LBL_REPAIR_UTF_ENCODING_REPAIR_FROM_INVALID}</p>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
array(
|
||||
array(
|
||||
'name' => 'date_entered',
|
||||
'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
|
||||
'label' => 'LBL_DATE_ENTERED',
|
||||
),
|
||||
array(
|
||||
'name' => 'date_modified',
|
||||
'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
|
||||
'label' => 'LBL_DATE_MODIFIED',
|
||||
),
|
||||
),
|
||||
|
||||
array(
|
||||
'description',
|
||||
),
|
||||
),
|
||||
);
|
||||
<form name="RepairUtfEncoding" method="post" action="index.php">
|
||||
<input type="hidden" name="module" value="Administration">
|
||||
<input type="hidden" name="action" value="RepairUtfEncoding">
|
||||
<input type="hidden" name="return_module" value="Administration">
|
||||
<input type="hidden" name="return_action" value="RepairUtfEncoding">
|
||||
<input type="hidden" name="perform_rebuild_utf_encoding" value="true">
|
||||
<div class="other view container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-3" >{$MOD.LBL_SYNC_RUN}</div>
|
||||
<div class="col-sm-9"><input type="checkbox" name="syncRun" value="true"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-3" >{$MOD.LBL_KEEP_TRACKING_TABLES}</div>
|
||||
<div class="col-sm-9"><input type="checkbox" name="keepTrackingTables" value="true"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-3" >{$MOD.LBL_REPAIR_FROM_DATE}</div>
|
||||
<div class="col-sm-3"><input type="date" name="repairFrom" class="form-control" value="2021-04-27"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-3"><input type="submit" name="button" value="{$MOD.LBL_SUBMIT}"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
52
modules/Spots/SpotsListViewSmarty.php → modules/Administration/templates/RepairUtfEncodingStatus.tpl
Executable file → Normal file
52
modules/Spots/SpotsListViewSmarty.php → modules/Administration/templates/RepairUtfEncodingStatus.tpl
Executable file → Normal file
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
{*
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
|
@ -37,20 +37,46 @@
|
|||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
*}
|
||||
|
||||
require_once 'include/ListView/ListViewSmarty.php';
|
||||
<div class="view" style="min-height: calc(100vh - 200px)">
|
||||
<h2 class="pt-0">{$MOD.LBL_REPAIR_UTF_ENCODING}</h2>
|
||||
|
||||
class SpotsListViewSmarty extends ListViewSmarty
|
||||
{
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<strong>{$MOD.LBL_EXECUTION_STATUS}</strong>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<span class="label label-warning">{if $status eq 'in_progress'} {$MOD.LBL_IN_PROGRESS} {else} {$MOD.LBL_REPAIRED} {/if}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<strong>{$MOD.LBL_EXECUTION_MODE}</strong>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<span class="label label-warning">{if $mode eq 'sync'} {$MOD.LBL_SYNCHRONOUS} {else} {$MOD.LBL_ASYNCHRONOUS} {/if}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
{if $mode eq 'async'}
|
||||
<hr/>
|
||||
<div class="alert alert-warning sm" role="alert">
|
||||
<h4 class="alert-heading">{$MOD.LBL_WARNING}</h4>
|
||||
{if $status eq 'in_progress'}<p>{$MOD.LBL_REPAIR_UTF_ENCODING_ASYNC_WARNING}</p> {/if}
|
||||
<p>{$MOD.LBL_REPAIR_UTF_ENCODING_ASYNC_PROGRESS_CHECK}</p>
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
|
||||
}
|
||||
{if $mode eq 'sync' && $status eq 'in_progress' }
|
||||
<hr/>
|
||||
<div class="alert alert-warning sm" role="alert">
|
||||
<h4 class="alert-heading">{$MOD.LBL_WARNING}</h4>
|
||||
<p>{$MOD.LBL_REPAIR_UTF_ENCODING_SYNC_PROGRESS_CHECK}</p>
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
</div>
|
66
modules/Spots/metadata/editviewdefs.php → modules/Administration/templates/RepairUtfEncodingSyncStatus.tpl
Executable file → Normal file
66
modules/Spots/metadata/editviewdefs.php → modules/Administration/templates/RepairUtfEncodingSyncStatus.tpl
Executable file → Normal file
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
{*
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
|
@ -37,40 +37,40 @@
|
|||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
$module_name = 'Spots';
|
||||
$viewdefs[$module_name]['EditView'] = array(
|
||||
'templateMeta' => array(
|
||||
*}
|
||||
|
||||
'form' => array(
|
||||
'hidden' => array(
|
||||
0 => '<input type="hidden" name="config" value="{$fields.config.value}">',
|
||||
),
|
||||
),
|
||||
<div class="view" >
|
||||
<h2 class="pt-0">{$MOD.LBL_REPAIR_UTF_ENCODING}</h2>
|
||||
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
'includes' => array(
|
||||
0 => array(
|
||||
'file' => 'modules/Favorites/favorites.js'
|
||||
)
|
||||
)
|
||||
),
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<strong>{$MOD.LBL_EXECUTION_STATUS}</strong>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<span class="label label-warning">{$MOD.LBL_IN_PROGRESS}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<strong>{$MOD.LBL_EXECUTION_MODE}</strong>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<span class="label label-warning">{$MOD.LBL_SYNCHRONOUS}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
'panels' => array(
|
||||
'default' => array(
|
||||
{if $mode eq 'sync'}
|
||||
<hr/>
|
||||
<div class="alert alert-warning sm" role="alert">
|
||||
<h4 class="alert-heading">{$MOD.LBL_WARNING}</h4>
|
||||
<p>{$MOD.LBL_SYNC_LONG_EXECUTION_WARNING}</p>
|
||||
<p>{$MOD.LBL_SYNC_RUNNING_INFORMATION_OUTPUT}</p>
|
||||
<p>{$MOD.LBL_SYNC_RUNNING_INFORMATION_LOGS}</p>
|
||||
</div>
|
||||
|
||||
array(
|
||||
'name', 'type',
|
||||
),
|
||||
{/if}
|
||||
</div>
|
||||
<h3 class="pt-0">{$MOD.LBL_OUTPUT}</h3>
|
||||
|
||||
array(
|
||||
'configurationGUI',
|
||||
),
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
);
|
|
@ -207,7 +207,7 @@ array(
|
|||
]
|
||||
],
|
||||
'acls' => [
|
||||
'Case' => ['view', 'list']
|
||||
'Cases' => ['view', 'list']
|
||||
]
|
||||
],
|
||||
[
|
||||
|
@ -253,7 +253,7 @@ array(
|
|||
]
|
||||
],
|
||||
'acls' => [
|
||||
'Case' => ['view', 'list'],
|
||||
'Cases' => ['view', 'list'],
|
||||
'Accounts' => ['view', 'list']
|
||||
]
|
||||
],
|
||||
|
|
|
@ -202,143 +202,6 @@ $mod_strings = array(
|
|||
'LBL_IMPORT_MAX_RECORDS' => 'Import - Maximum Number of Rows:',
|
||||
'LBL_IMPORT_MAX_RECORDS_HELP' => 'Specify how many rows are allowed within import files.<br>If the number of rows in an import file exceeds this number, the user will be alerted.<br>If no number is entered, an unlimited number of rows are allowed.',
|
||||
'vCAL_HELP' => 'Use this setting to determine the number of months in advance of the current date that Free/Busy information for calls and meetings is published.<BR>To turn Free/Busy publishing off, enter "0". The minimum is 1 month; the maximum is 12 months.',
|
||||
'LBL_PDFMODULE_NAME' => 'PDF Settings',
|
||||
'SUITEPDF_BASIC_SETTINGS' => 'Document Properties',
|
||||
'SUITEPDF_ADVANCED_SETTINGS' => 'Advanced Settings',
|
||||
'SUITEPDF_LOGO_SETTINGS' => 'Images',
|
||||
|
||||
'PDF_AUTHOR' => 'Author',
|
||||
'PDF_AUTHOR_INFO' => 'The Author appears in the document properties.',
|
||||
|
||||
'PDF_HEADER_LOGO' => 'For Quotes PDF Documents',
|
||||
'PDF_HEADER_LOGO_INFO' => 'This image appears in the default Header in Quotes PDF Documents.',
|
||||
|
||||
'PDF_NEW_HEADER_LOGO' => 'Select New Image for Quotes',
|
||||
'PDF_NEW_HEADER_LOGO_INFO' => 'The file format can be either .jpg or .png. (Only .jpg for EZPDF)<BR>The recommended size is 867x60 px.',
|
||||
|
||||
'PDF_SMALL_HEADER_LOGO' => 'For Reports PDF Documents',
|
||||
'PDF_SMALL_HEADER_LOGO_INFO' => 'This image appears in the default Header in Reports PDF Documents.<br> This image also appears in the top left-hand corner of the SuiteCRM application.',
|
||||
|
||||
'PDF_NEW_SMALL_HEADER_LOGO' => 'Select New Image for Reports',
|
||||
'PDF_NEW_SMALL_HEADER_LOGO_INFO' => 'The file format can be either .jpg or .png. (Only .jpg for EZPDF)<BR>The recommended size is 212x40 px.',
|
||||
|
||||
'PDF_FILENAME' => 'Default Filename',
|
||||
'PDF_FILENAME_INFO' => 'Default filename for the generated PDF files',
|
||||
|
||||
'PDF_TITLE' => 'Title',
|
||||
'PDF_TITLE_INFO' => 'The Title appears in the document properties.',
|
||||
|
||||
'PDF_SUBJECT' => 'Subject',
|
||||
'PDF_SUBJECT_INFO' => 'The Subject appears in the document properties.',
|
||||
|
||||
'PDF_KEYWORDS' => 'Keyword(s)',
|
||||
'PDF_KEYWORDS_INFO' => 'Associate Keywords with the document, generally in the form "keyword1 keyword2..."',
|
||||
|
||||
'PDF_COMPRESSION' => 'Compression',
|
||||
'PDF_COMPRESSION_INFO' => 'Activates or deactivates page compression. <br>When activated, the internal representation of each page is compressed, which leads to a compression ratio of about 2 for the resulting document.',
|
||||
|
||||
'PDF_JPEG_QUALITY' => 'JPEG Quality (1-100)',
|
||||
'PDF_JPEG_QUALITY_INFO' => 'Set the default JPEG compression quality (1-100)',
|
||||
|
||||
'PDF_PDF_VERSION' => 'PDF Version',
|
||||
'PDF_PDF_VERSION_INFO' => 'Set the PDF version (check PDF reference for valid values).',
|
||||
|
||||
'PDF_PROTECTION' => 'Document Protection',
|
||||
'PDF_PROTECTION_INFO' => 'Set document protection<br>- copy: copy text and images to the clipboard<br>- print: print the document<br>- modify: modify it (except for annotations and forms)<br>- annot-forms: add annotations and forms<br>Note: the protection against modification is for people who have the full Acrobat product.',
|
||||
|
||||
'PDF_USER_PASSWORD' => 'User Password',
|
||||
'PDF_USER_PASSWORD_INFO' => 'If you don\\\'t set any password, the document will open as usual. <br>If you set a user password, the PDF viewer will ask for it before displaying the document. <br>The master password, if different from the user one, can be used to get full access.',
|
||||
|
||||
'PDF_OWNER_PASSWORD' => 'Owner Password',
|
||||
'PDF_OWNER_PASSWORD_INFO' => 'If you don\\\'t set any password, the document will open as usual. <br>If you set a user password, the PDF viewer will ask for it before displaying the document. <br>The master password, if different from the user one, can be used to get full access.',
|
||||
|
||||
'PDF_ACL_ACCESS' => 'Access Control',
|
||||
'PDF_ACL_ACCESS_INFO' => 'Default Access Control for the PDF generation.',
|
||||
|
||||
'K_CELL_HEIGHT_RATIO' => 'Cell Height Ratio',
|
||||
'K_CELL_HEIGHT_RATIO_INFO' => 'If the height of a cell is smaller than (Font Height x Cell Height Ratio), then (Font Height x Cell Height Ratio) is used as the cell height.<br>(Font Height x Cell Height Ratio) is also used as the height of the cell when no height is define.',
|
||||
|
||||
'K_SMALL_RATIO' => 'Small Font Factor',
|
||||
'K_SMALL_RATIO_INFO' => 'Reduction factor for small font.',
|
||||
|
||||
'PDF_IMAGE_SCALE_RATIO' => 'Image scale ratio',
|
||||
'PDF_IMAGE_SCALE_RATIO_INFO' => 'Ratio used to scale the images',
|
||||
|
||||
'PDF_UNIT' => 'Unit',
|
||||
'PDF_UNIT_INFO' => 'document unit of measure',
|
||||
'PDF_GD_WARNING' => 'You do not have the GD library installed for PHP. Without the GD library installed, only JPEG logos can be displayed in PDF documents.',
|
||||
'ERR_EZPDF_DISABLE' => 'Warning : The EZPDF class is disabled from the config table and it set as the PDF class. Please "Save" this form to set TCPDF as the PDF Class and return in a stable state.',
|
||||
'LBL_IMG_RESIZED' => "(resized for display)",
|
||||
|
||||
|
||||
'LBL_FONTMANAGER_BUTTON' => 'PDF Font Manager',
|
||||
'LBL_FONTMANAGER_TITLE' => 'PDF Font Manager',
|
||||
'LBL_FONT_BOLD' => 'Bold',
|
||||
'LBL_FONT_ITALIC' => 'Italic',
|
||||
'LBL_FONT_BOLDITALIC' => 'Bold/Italic',
|
||||
'LBL_FONT_REGULAR' => 'Regular',
|
||||
|
||||
'LBL_FONT_TYPE_CID0' => 'CID-0',
|
||||
'LBL_FONT_TYPE_CORE' => 'Core',
|
||||
'LBL_FONT_TYPE_TRUETYPE' => 'TrueType',
|
||||
'LBL_FONT_TYPE_TYPE1' => 'Type1',
|
||||
'LBL_FONT_TYPE_TRUETYPEU' => 'TrueTypeUnicode',
|
||||
|
||||
'LBL_FONT_LIST_NAME' => 'Name',
|
||||
'LBL_FONT_LIST_FILENAME' => 'Filename',
|
||||
'LBL_FONT_LIST_TYPE' => 'Type',
|
||||
'LBL_FONT_LIST_STYLE' => 'Style',
|
||||
'LBL_FONT_LIST_STYLE_INFO' => 'Style of the font',
|
||||
'LBL_FONT_LIST_ENC' => 'Encoding',
|
||||
'LBL_FONT_LIST_EMBEDDED' => 'Embedded',
|
||||
'LBL_FONT_LIST_EMBEDDED_INFO' => 'Check to embed the font into the PDF file',
|
||||
'LBL_FONT_LIST_CIDINFO' => 'CID Information',
|
||||
'LBL_FONT_LIST_CIDINFO_INFO' => 'Examples :
|
||||
<ul><li>.
|
||||
Chinese Traditional :<br>.
|
||||
<pre>\$enc=\'UniCNS-UTF16-H\';<br>.
|
||||
\$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'CNS1\',\'Supplement\'=>0);<br>.
|
||||
include(\'include/tcpdf/fonts/uni2cid_ac15.php\');</pre>.
|
||||
</li><li>.
|
||||
Chinese Simplified :<br>.
|
||||
<pre>\$enc=\'UniGB-UTF16-H\';<br>.
|
||||
\$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'GB1\',\'Supplement\'=>2);<br>.
|
||||
include(\'include/tcpdf/fonts/uni2cid_ag15.php\');</pre>.
|
||||
</li><li>.
|
||||
Korean :<br>.
|
||||
<pre>\$enc=\'UniKS-UTF16-H\';<br>.
|
||||
\$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'Korea1\',\'Supplement\'=>0);<br>.
|
||||
include(\'include/tcpdf/fonts/uni2cid_ak12.php\');</pre>.
|
||||
</li><li>.
|
||||
Japanese :<br>.
|
||||
<pre>\$enc=\'UniJIS-UTF16-H\';<br>.
|
||||
\$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'Japan1\',\'Supplement\'=>5);<br>.
|
||||
include(\'include/tcpdf/fonts/uni2cid_aj16.php\');</pre>.
|
||||
</li></ul>.
|
||||
More help : www.tcpdf.org',
|
||||
'LBL_FONT_LIST_FILESIZE' => 'Font Size (KB)',
|
||||
'LBL_ADD_FONT' => 'Add a font',
|
||||
'LBL_BACK' => 'Back',
|
||||
'LBL_REMOVE' => 'Remove',
|
||||
'LBL_JS_CONFIRM_DELETE_FONT' => 'Are you sure that you want to delete this font?',
|
||||
|
||||
'LBL_ADDFONT_TITLE' => 'Add a PDF Font',
|
||||
'LBL_PDF_ENCODING_TABLE' => 'Encoding Table',
|
||||
'LBL_PDF_ENCODING_TABLE_INFO' => 'Name of the encoding table.<br>This option is ignored for TrueType Unicode, OpenType Unicode and symbolic fonts.<br>The encoding defines the association between a code (from 0 to 255) and a character contained in the font.<br>The first 128 are fixed and correspond to ASCII.',
|
||||
'LBL_PDF_FONT_FILE' => 'Font File',
|
||||
'LBL_PDF_FONT_FILE_INFO' => '.ttf or .otf or .pfb file',
|
||||
'LBL_PDF_METRIC_FILE' => 'Metric File',
|
||||
'LBL_PDF_METRIC_FILE_INFO' => '.afm or .ufm file',
|
||||
'LBL_ADD_FONT_BUTTON' => 'Add',
|
||||
'JS_ALERT_PDF_WRONG_EXTENSION' => 'This file do not have a good file extension.',
|
||||
|
||||
'ERR_MISSING_CIDINFO' => 'The field CID Information cannot be empty.',
|
||||
'LBL_ADDFONTRESULT_TITLE' => 'Result of the add font process',
|
||||
'LBL_STATUS_FONT_SUCCESS' => 'SUCCESS : The font has been added to SuiteCRM.',
|
||||
'LBL_STATUS_FONT_ERROR' => 'ERROR : The font has not been added. Look at the log below.',
|
||||
|
||||
// Font manager
|
||||
'ERR_PDF_NO_UPLOAD' => 'Error during the upload of the font or metric file.',
|
||||
|
||||
// Wizard
|
||||
//Wizard Scenarios
|
||||
|
|
|
@ -171,6 +171,10 @@ $viewdefs ['Contacts'] =
|
|||
),
|
||||
),
|
||||
),
|
||||
'summaryTemplates' => [
|
||||
'edit' => 'LBL_SUMMARY_PERSON',
|
||||
'detail' => 'LBL_SUMMARY_PERSON',
|
||||
],
|
||||
'topWidget' => [
|
||||
'type' => 'statistics',
|
||||
'options' => [
|
||||
|
@ -218,16 +222,10 @@ $viewdefs ['Contacts'] =
|
|||
array(
|
||||
0 =>
|
||||
array(
|
||||
'name' => 'first_name',
|
||||
'comment' => 'First name of the contact',
|
||||
'label' => 'LBL_FIRST_NAME',
|
||||
),
|
||||
1 =>
|
||||
array(
|
||||
'name' => 'last_name',
|
||||
'comment' => 'Last name of the contact',
|
||||
'label' => 'LBL_LAST_NAME',
|
||||
'name' => 'full_name',
|
||||
'label' => 'LBL_NAME',
|
||||
),
|
||||
1 => '',
|
||||
),
|
||||
1 =>
|
||||
array(
|
||||
|
|
|
@ -905,7 +905,7 @@ class EmailTemplate extends SugarBean
|
|||
|
||||
private function repairEntryPointImages()
|
||||
{
|
||||
global $sugar_config;
|
||||
global $sugar_config, $log;
|
||||
|
||||
// repair the images url at entry points, change to a public direct link for remote email clients..
|
||||
|
||||
|
@ -914,8 +914,17 @@ class EmailTemplate extends SugarBean
|
|||
$regex = '#<img[^>]*[\s]+src=[\s]*["\'](' . preg_quote($siteUrl) . '\/index\.php\?entryPoint=download&type=Notes&id=([a-f0-9]{8}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{12})&filename=.+?)["\']#si';
|
||||
|
||||
if (preg_match($regex, $html, $match)) {
|
||||
|
||||
$splits = explode('.', $match[1]);
|
||||
|
||||
$fileExtension = end($splits);
|
||||
|
||||
$toFile = $match[2] . '.' . $fileExtension;
|
||||
if (is_string($toFile) && !has_valid_image_extension('repair-entrypoint-images-fileext', $toFile)){
|
||||
$log->error("repairEntryPointImages | file with invalid extension '$toFile'");
|
||||
return;
|
||||
}
|
||||
|
||||
$this->makePublicImage($match[2], $fileExtension);
|
||||
$newSrc = $sugar_config['site_url'] . '/public/' . $match[2] . '.' . $fileExtension;
|
||||
$this->body_html = to_html(str_replace($match[1], $newSrc, $html));
|
||||
|
|
|
@ -535,6 +535,7 @@ div#content {
|
|||
|
||||
.emailSettings tr td:first-child {
|
||||
padding-right: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.emailSettings tr td:nth-child(2) {
|
||||
|
|
|
@ -3406,17 +3406,17 @@
|
|||
var dlg = SE.settings.settingsDialog = new YAHOO.widget.Dialog("settingsDialog", {
|
||||
modal: true,
|
||||
visible: false,
|
||||
fixedcenter: false,
|
||||
fixedcenter: true,
|
||||
draggable: true,
|
||||
constraintoviewport: false
|
||||
constraintoviewport: true
|
||||
});
|
||||
dlg.showEvent.subscribe(function () {
|
||||
var el = this.element;
|
||||
var viewH = YAHOO.util.Dom.getViewportHeight();
|
||||
if (this.header && el && viewH - 50 < el.clientHeight) {
|
||||
if (this.header && el && viewH - 150 < el.clientHeight) {
|
||||
var body = this.header.nextElementSibling;
|
||||
body.style.overflow = "auto";
|
||||
body.style.height = (viewH - 50) + "px";
|
||||
body.style.height = (viewH - 150) + "px";
|
||||
}
|
||||
}, dlg);
|
||||
dlg.setHeader(app_strings.LBL_EMAIL_SETTINGS);
|
||||
|
@ -3452,11 +3452,10 @@
|
|||
|
||||
tp.appendTo(dlg.body);
|
||||
}
|
||||
|
||||
SE.settings.settingsDialog.center();
|
||||
SE.settings.settingsDialog.show();
|
||||
SE.folders.lazyLoadSettings(user);
|
||||
SE.accounts.lazyLoad(user);
|
||||
$(window).scrollLeft(0);
|
||||
},
|
||||
|
||||
|
||||
|
@ -3547,3 +3546,5 @@ function setSigEditButtonVisibility() {
|
|||
deleteButt.style.visibility = "hidden";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
<table border="0" cellspacing="0" cellpadding="0" class="edit view">
|
||||
<tr>
|
||||
<td>
|
||||
<td colspan="2">
|
||||
<h4>{$mod_strings.LBL_EMAIL_SETTINGS_INBOUND}</h4>
|
||||
</td>
|
||||
<td style="vertical-align:bottom;"><a href="javascript:void(0);" id="prefill_gmail_defaults_link"
|
||||
|
|
|
@ -387,6 +387,10 @@ class FP_eventsController extends SugarController
|
|||
$invite_count = 0; //used to count the number of emails sent
|
||||
$error_count = 0; //used to count the number of failed email attempts
|
||||
|
||||
$acceptLabel = $mod_strings['LBL_ACCEPT_LINK'];
|
||||
$declineLabel = $mod_strings['LBL_DECLINE_LINK'];
|
||||
$event_mod_strings = $mod_strings;
|
||||
|
||||
|
||||
//loop through related contacts
|
||||
foreach ($event->fp_events_contacts->getBeans() as $contact) {
|
||||
|
@ -398,8 +402,8 @@ class FP_eventsController extends SugarController
|
|||
if ($status == null || $status == '' || $status == 'Not Invited') {
|
||||
$invite_count ++;
|
||||
//set email links
|
||||
$event->link = "<a href='".$sugar_config['site_url']."/index.php?entryPoint=responseEntryPoint&event=".$event->id."&delegate=".$contact->id."&type=c&response=accept'>{$mod_strings['LBL_ACCEPT_LINK']}</a>";
|
||||
$event->link_declined = "<a href='".$sugar_config['site_url']."/index.php?entryPoint=responseEntryPoint&event=".$event->id."&delegate=".$contact->id."&type=c&response=decline'>{$mod_strings['LBL_DECLINE_LINK']}</a>";
|
||||
$event->link = "<a href='".$sugar_config['site_url']."/index.php?entryPoint=responseEntryPoint&event=".$event->id."&delegate=".$contact->id."&type=c&response=accept'>{$acceptLabel}</a>";
|
||||
$event->link_declined = "<a href='".$sugar_config['site_url']."/index.php?entryPoint=responseEntryPoint&event=".$event->id."&delegate=".$contact->id."&type=c&response=decline'>{$declineLabel}</a>";
|
||||
|
||||
//Get the TO name and e-mail address for the message
|
||||
$rcpt_name = $contact->first_name . ' ' . $contact->last_name;
|
||||
|
@ -411,7 +415,7 @@ class FP_eventsController extends SugarController
|
|||
|
||||
//check email template is set, if not return error
|
||||
if ($emailTemp->id == '') {
|
||||
SugarApplication::appendErrorMessage($mod_strings['LBL_ERROR_MSG_5']);
|
||||
SugarApplication::appendErrorMessage($event_mod_strings['LBL_ERROR_MSG_5']);
|
||||
SugarApplication::redirect("index.php?module=FP_events&return_module=FP_events&action=DetailView&record=".$event->id);
|
||||
die();
|
||||
}
|
||||
|
@ -462,8 +466,8 @@ class FP_eventsController extends SugarController
|
|||
$invite_count ++;
|
||||
|
||||
//set email links
|
||||
$event->link = "<a href='".$sugar_config['site_url']."/index.php?entryPoint=responseEntryPoint&event=".$event->id."&delegate=".$target->id."&type=t&response=accept'>{$mod_strings['LBL_ACCEPT_LINK']}</a>";
|
||||
$event->link_declined = "<a href='".$sugar_config['site_url']."/index.php?entryPoint=responseEntryPoint&event=".$event->id."&delegate=".$target->id."&type=t&response=decline'>{$mod_strings['LBL_DECLINE_LINK']}</a>";
|
||||
$event->link = "<a href='".$sugar_config['site_url']."/index.php?entryPoint=responseEntryPoint&event=".$event->id."&delegate=".$target->id."&type=t&response=accept'>{$acceptLabel}</a>";
|
||||
$event->link_declined = "<a href='".$sugar_config['site_url']."/index.php?entryPoint=responseEntryPoint&event=".$event->id."&delegate=".$target->id."&type=t&response=decline'>{$declineLabel}</a>";
|
||||
|
||||
//Get the TO name and e-mail address for the message
|
||||
$rcpt_name = $target->first_name . ' ' . $target->last_name;
|
||||
|
@ -518,8 +522,8 @@ class FP_eventsController extends SugarController
|
|||
if ($status == null || $status == '' || $status == 'Not Invited') {
|
||||
$invite_count ++;
|
||||
//set email links
|
||||
$event->link = "<a href='".$sugar_config['site_url']."/index.php?entryPoint=responseEntryPoint&event=".$event->id."&delegate=".$lead->id."&type=l&response=accept'>{$mod_strings['LBL_ACCEPT_LINK']}</a>";
|
||||
$event->link_declined = "<a href='".$sugar_config['site_url']."/index.php?entryPoint=responseEntryPoint&event=".$event->id."&delegate=".$lead->id."&type=l&response=decline'>{$mod_strings['LBL_DECLINE_LINK']}</a>";
|
||||
$event->link = "<a href='".$sugar_config['site_url']."/index.php?entryPoint=responseEntryPoint&event=".$event->id."&delegate=".$lead->id."&type=l&response=accept'>{$acceptLabel}</a>";
|
||||
$event->link_declined = "<a href='".$sugar_config['site_url']."/index.php?entryPoint=responseEntryPoint&event=".$event->id."&delegate=".$lead->id."&type=l&response=decline'>{$declineLabel}</a>";
|
||||
|
||||
//Get the TO name and e-mail address for the message
|
||||
$rcpt_name = $lead->first_name . ' ' . $lead->last_name;
|
||||
|
@ -565,26 +569,26 @@ class FP_eventsController extends SugarController
|
|||
}
|
||||
//Redirect with error message if all linked contacts have already been invited
|
||||
if ($invite_count == 0) {
|
||||
SugarApplication::appendErrorMessage($mod_strings['LBL_ERROR_MSG_1']);
|
||||
SugarApplication::appendErrorMessage($event_mod_strings['LBL_ERROR_MSG_1']);
|
||||
SugarApplication::redirect("index.php?module=FP_events&return_module=FP_events&action=DetailView&record=".$event->id);
|
||||
}
|
||||
//Redirect if all emails fail to send
|
||||
if ($error_count == $delegate_count) {
|
||||
$_SESSION['user_error_message'] = array();//clear the error message array
|
||||
SugarApplication::appendErrorMessage($mod_strings['LBL_ERROR_MSG_2'].$delegate_count);
|
||||
SugarApplication::appendErrorMessage($event_mod_strings['LBL_ERROR_MSG_2'].$delegate_count);
|
||||
SugarApplication::redirect("index.php?module=FP_events&return_module=FP_events&action=DetailView&record=".$event->id);
|
||||
} elseif ($error_count > 0 && $error_count <= 10) {//redirect with failed email count.
|
||||
$_SESSION['user_error_message'] = array();
|
||||
SugarApplication::appendErrorMessage($error_count.$mod_strings['LBL_ERROR_MSG_4']);
|
||||
SugarApplication::appendErrorMessage($error_count.$event_mod_strings['LBL_ERROR_MSG_4']);
|
||||
SugarApplication::redirect("index.php?module=FP_events&return_module=FP_events&action=DetailView&record=".$event->id);
|
||||
}
|
||||
// Redirect with error count if failed email attempts are greater than 10
|
||||
elseif ($error_count > 10) {
|
||||
$_SESSION['user_error_message'] = array();
|
||||
SugarApplication::appendErrorMessage($mod_strings['LBL_ERROR_MSG_3']);
|
||||
SugarApplication::appendErrorMessage($event_mod_strings['LBL_ERROR_MSG_3']);
|
||||
SugarApplication::redirect("index.php?module=FP_events&return_module=FP_events&action=DetailView&record=".$event->id);
|
||||
} else {
|
||||
SugarApplication::appendErrorMessage($mod_strings['LBL_SUCCESS_MSG']);
|
||||
SugarApplication::appendErrorMessage($event_mod_strings['LBL_SUCCESS_MSG']);
|
||||
SugarApplication::redirect("index.php?module=FP_events&return_module=FP_events&action=DetailView&record=".$event->id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -146,6 +146,16 @@ class ImportController extends SugarController
|
|||
return;
|
||||
}
|
||||
|
||||
if (isset($fileName) && !hasValidFileName('import_refresh_mapping_file_name', str_replace('upload://', '', $fileName))) {
|
||||
LoggerManager::getLogger()->fatal('Invalid importFile file name');
|
||||
return;
|
||||
}
|
||||
|
||||
if (strpos($fileName, 'phar://') !== false) {
|
||||
LoggerManager::getLogger()->fatal('Invalid importFile file path');
|
||||
return;
|
||||
}
|
||||
|
||||
$delim = $_REQUEST['delim'];
|
||||
|
||||
if ($delim === '\t') {
|
||||
|
|
|
@ -39,9 +39,6 @@
|
|||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
*}
|
||||
|
||||
{$INSTRUCTION}
|
||||
|
@ -70,8 +67,6 @@
|
|||
{include file='modules/Import/tpls/confirm_table.tpl'}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<table cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="left" colspan="4" style="background: transparent;">
|
||||
|
@ -84,8 +79,8 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="overflow: auto; width: 1056px;">
|
||||
<table border=0 class="edit view noBorder" style="display: none;" id="importOptions">
|
||||
<div style="overflow: auto; width: 100%;">
|
||||
<table border=0 class="edit view noBorder" style="display: none;margin-bottom: 1em;" id="importOptions">
|
||||
<tr>
|
||||
<td scope="col">
|
||||
<span><label for="importlocale_charset">{$MOD.LBL_CHARSET}</label></span>
|
||||
|
|
|
@ -58,7 +58,6 @@
|
|||
padding-right:30px;
|
||||
}
|
||||
|
||||
|
||||
-->
|
||||
</style>
|
||||
{/literal}
|
||||
|
@ -91,12 +90,12 @@
|
|||
|
||||
<div class="hr"></div>
|
||||
<div>
|
||||
<table border="0" cellpadding="30" id="importTable" style="width:60% !important;">
|
||||
<table border="0" cellpadding="30" id="importTable" style="width:100% !important;margin-top:1em;">
|
||||
<tr>
|
||||
<td width="40%" colspan="2">
|
||||
<table id="DupeCheck" class="themeSettings edit view noBorder" style='margin-bottom:0px;' border="0" cellspacing="10" cellpadding="0" width = '100%'>
|
||||
<table id="DupeCheck" class="themeSettings edit view noBorder" style='margin-bottom:11px;' border="0" cellspacing="10" cellpadding="0" width = '100%'>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<td align="right" width="1%">
|
||||
<div id="enabled_div" class="enabled_tab_workarea">
|
||||
</div>
|
||||
</td>
|
||||
|
@ -110,10 +109,14 @@
|
|||
</tr>
|
||||
</table>
|
||||
<div class="hr"></div>
|
||||
<span><strong><label for="save_map_as">{$MOD.LBL_SAVE_MAPPING_AS}</label></strong> {sugar_help text=$MOD.LBL_SAVE_MAPPING_HELP}</span>
|
||||
<span >
|
||||
<input type="text" name="save_map_as" id="save_map_as" value="" style="width: 20em" maxlength="254">
|
||||
</span>
|
||||
<span>
|
||||
<strong>
|
||||
<label style="margin-top: 2em; "for="save_map_as">{$MOD.LBL_SAVE_MAPPING_AS}</label>
|
||||
</strong> {sugar_help text=$MOD.LBL_SAVE_MAPPING_HELP}
|
||||
</span>
|
||||
<span >
|
||||
<input type="text" name="save_map_as" id="save_map_as" value="" style="width: 20em" maxlength="254">
|
||||
</span>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
|
|
|
@ -45,14 +45,14 @@
|
|||
<style>
|
||||
#tabListContainer ul.subpanelTablist li a.current
|
||||
{
|
||||
padding-left: 10px;
|
||||
padding-left: 0px;
|
||||
}
|
||||
div.resultsTable {
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
padding-top: 20px;
|
||||
position: relative;
|
||||
}
|
||||
div.resultsTable {
|
||||
overflow: auto;
|
||||
width: 1056px;
|
||||
padding-top: 20px;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
{/literal}
|
||||
|
||||
|
|
|
@ -51,8 +51,6 @@
|
|||
color: #FFFFFF;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
|
||||
{/literal}
|
||||
</style>
|
||||
{if $ERROR != ''}
|
||||
|
@ -80,7 +78,9 @@
|
|||
<td align="left" scope="row" colspan="3"><h3>{$MOD.LBL_STEP_MODULE} </h3></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><select tabindex='4' name='admin_import_module' id='admin_import_module'>{$IMPORTABLE_MODULES_OPTIONS}</select></td>
|
||||
<td>
|
||||
<select style='margin-bottom: 1em; 'tabindex='4' name='admin_import_module' id='admin_import_module'>{$IMPORTABLE_MODULES_OPTIONS}</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" scope="row" colspan="3"><div class="hr"> </div></td>
|
||||
|
|
|
@ -73,16 +73,23 @@
|
|||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||
<tr>
|
||||
<td align="left" scope="row" colspan="4" style="padding-left: 10px;">{$SAMPLE_URL} {sugar_help text=$MOD.LBL_SAMPLE_URL_HELP}</td>
|
||||
<td align="left" scope="row" colspan="4" style="padding-top: 0.5em;">{$SAMPLE_URL} {sugar_help text=$MOD.LBL_SAMPLE_URL_HELP}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td scope="row" colspan="4"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td scope="row" colspan="4"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" scope="row" colspan="3"><div><label for="userfile">{$MOD.LBL_SELECT_FILE}</label></div> <div><input type="hidden" /><input size="20" id="userfile" name="userfile" type="file"/>{sugar_help text=$MOD.LBL_FILE_UPLOAD_WIDGET_HELP}</div> <div><span class="small">{$APP.LBL_LOGGER_VALID_FILENAME_CHARACTERS}</span></div></td>
|
||||
<td align="left" scope="row" colspan="3">
|
||||
<div>
|
||||
<label for="userfile">{$MOD.LBL_SELECT_FILE}</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="hidden" /><input size="20" id="userfile" name="userfile" type="file"/>{sugar_help text=$MOD.LBL_FILE_UPLOAD_WIDGET_HELP}
|
||||
</div>
|
||||
<div style="margin-bottom: 0.5em;">
|
||||
<span class="small">{$APP.LBL_LOGGER_VALID_FILENAME_CHARACTERS}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td scope="row" colspan="4"><div class="hr"> </div></td>
|
||||
|
@ -107,7 +114,6 @@
|
|||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||
{foreach from=$custom_mappings item=item name=custommappings}
|
||||
{capture assign=mapping_label}{$MOD.LBL_CUSTOM_MAPPING_}{$item|upper}{/capture}
|
||||
|
|
|
@ -39,16 +39,12 @@
|
|||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
*}
|
||||
|
||||
{$CSS}
|
||||
|
||||
{$INSTRUCTION}
|
||||
|
||||
|
||||
<form enctype="multipart/form-data" real_id="importstep3" id="importstep3" name="importstep3" method="POST" action="index.php">
|
||||
<input type="hidden" name="module" value="Import">
|
||||
<input type="hidden" name="previous_action" value="Confirm">
|
||||
|
@ -76,7 +72,6 @@
|
|||
<input type="hidden" name="importlocale_default_locale_name_format" value="{$smarty.request.importlocale_default_locale_name_format}">
|
||||
<input type="hidden" name="from_admin_wizard" value="{$smarty.request.from_admin_wizard}">
|
||||
|
||||
<br>
|
||||
{if $NOTETEXT != ''}
|
||||
<p>
|
||||
<input title="{$MOD.LBL_SHOW_ADVANCED_OPTIONS}" id="toggleNotes" class="button" type="button"
|
||||
|
@ -91,6 +86,7 @@
|
|||
|
||||
<div class="hr"></div>
|
||||
|
||||
<br>
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="100%" id="importTable" class="detail view">
|
||||
{foreach from=$rows key=key item=item name=rows}
|
||||
|
|
|
@ -553,8 +553,7 @@ class ImportViewStep3 extends ImportView
|
|||
|
||||
#importNotes ul{
|
||||
margin: 0px;
|
||||
margin-top: 10px;
|
||||
padding-left: 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
@ -137,6 +137,10 @@ $viewdefs ['Leads'] =
|
|||
),
|
||||
),
|
||||
),
|
||||
'summaryTemplates' => [
|
||||
'edit' => 'LBL_SUMMARY_PERSON',
|
||||
'detail' => 'LBL_SUMMARY_PERSON',
|
||||
],
|
||||
'topWidget' => [
|
||||
'type' => 'statistics',
|
||||
'options' => [
|
||||
|
|
|
@ -71,7 +71,6 @@
|
|||
$action_view_map['dcajax'] = 'dcajax';
|
||||
$action_view_map['quick'] = 'quick';
|
||||
$action_view_map['quickcreate'] = 'quickcreate';
|
||||
$action_view_map['spot'] = 'spot';
|
||||
$action_view_map['inlinefield'] = 'inlinefield';
|
||||
$action_view_map['inlinefieldsave'] = 'inlinefieldsave';
|
||||
$action_view_map['pluginlist'] = 'plugins';
|
||||
|
|
|
@ -118,7 +118,7 @@ require_once('modules/ModuleBuilder/parsers/ModuleBuilderParser.php');
|
|||
$pattern_match = '/\s*\$app_list_strings\s*\[\s*\''.$dropdown_name.'\'\s*\]\[\s*\''.$key.'\'\s*\]\s*=\s*[\'\"]{1}.*?[\'\"]{1};\s*/ism';
|
||||
$contents = preg_replace($pattern_match, "\n", $contents);
|
||||
//add the new ones
|
||||
$contents .= "\n\$GLOBALS['app_list_strings']['$dropdown_name']['$key']=" . var_export_helper($value) . ";";
|
||||
$contents .= "\n\$app_list_strings['$dropdown_name']['$key']=" . var_export_helper($value) . ";";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -206,12 +206,17 @@ require_once('modules/ModuleBuilder/parsers/ModuleBuilderParser.php');
|
|||
return $sub;
|
||||
}
|
||||
|
||||
public function getPatternMatch($dropdown_name)
|
||||
public function getPatternMatchGlobal($dropdown_name)
|
||||
{
|
||||
return '/\s*\$GLOBALS\s*\[\s*\'app_list_strings\s*\'\s*\]\[\s*\''
|
||||
. $dropdown_name.'\'\s*\]\s*=\s*array\s*\([^\)]*\)\s*;\s*/ism';
|
||||
}
|
||||
|
||||
public function getPatternMatch($dropdown_name)
|
||||
{
|
||||
return '/\s*\$app_list_strings\s*\[\s*\''.$dropdown_name.'\'\s*\]\s*=\s*array\s*\([^\)]*\)\s*;\s*/ism';
|
||||
}
|
||||
|
||||
public function getNewCustomContents($dropdown_name, $dropdown, $lang)
|
||||
{
|
||||
$contents = return_custom_app_list_strings_file_contents($lang);
|
||||
|
@ -219,8 +224,9 @@ require_once('modules/ModuleBuilder/parsers/ModuleBuilderParser.php');
|
|||
if (empty($contents)) {
|
||||
$contents = "<?php";
|
||||
}
|
||||
$contents = preg_replace($this->getPatternMatchGlobal($dropdown_name), "\n", $contents);
|
||||
$contents = preg_replace($this->getPatternMatch($dropdown_name), "\n", $contents);
|
||||
$contents .= "\n\$GLOBALS['app_list_strings']['$dropdown_name']=" . var_export_helper($dropdown) . ";";
|
||||
$contents .= "\n\$app_list_strings['$dropdown_name']=" . var_export_helper($dropdown) . ";";
|
||||
return $contents;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,7 +106,6 @@ class ViewModulefields extends SugarView
|
|||
$customFieldsData[$def['name']] = $def['custom'];
|
||||
}
|
||||
}
|
||||
$studioClass->mbvardefs->vardefs['fields'] = $f;
|
||||
$smarty->assign('module', $studioClass);
|
||||
|
||||
$package = new stdClass;
|
||||
|
|
|
@ -95,7 +95,7 @@ array(
|
|||
],
|
||||
],
|
||||
'acls' => [
|
||||
'Opportunity' => ['view', 'list']
|
||||
'Opportunities' => ['view', 'list']
|
||||
]
|
||||
],
|
||||
'sidebarWidgets' => [
|
||||
|
@ -150,7 +150,7 @@ array(
|
|||
[
|
||||
'type' => 'history-timeline',
|
||||
'acls' => [
|
||||
'Opportunity' => ['view', 'list']
|
||||
'Opportunities' => ['view', 'list']
|
||||
]
|
||||
],
|
||||
],
|
||||
|
|
|
@ -62,7 +62,7 @@ $viewdefs['Opportunities'] = [
|
|||
]
|
||||
],
|
||||
'acls' => [
|
||||
'Opportunity' => ['view', 'list']
|
||||
'Opportunities' => ['view', 'list']
|
||||
]
|
||||
]
|
||||
]
|
||||
|
|
|
@ -129,6 +129,17 @@ if (isset($_REQUEST['save_type']) || isset($_REQUEST['duplicateSave']) && $_REQU
|
|||
}
|
||||
}
|
||||
|
||||
if (!empty($_REQUEST['return_module']) && !empty($_REQUEST['return_action'])) {
|
||||
$_REQUEST['return_url'] = "index.php?module=" . $_REQUEST['return_module'] . "&action=record";
|
||||
|
||||
$returnId = !empty($_REQUEST['return_id']) ? $_REQUEST['return_id'] : $return_id;
|
||||
if (!empty($returnId)) {
|
||||
$_REQUEST['return_url'] .= "&record=" . $returnId;
|
||||
}
|
||||
|
||||
handleRedirect($return_id, $_REQUEST['return_module']);
|
||||
}
|
||||
|
||||
if ($sugarbean->is_template) {
|
||||
header("Location: index.php?action=ProjectTemplatesDetailView&module=Project&record=$return_id&return_module=Project&return_action=ProjectTemplatesEditView");
|
||||
} else {
|
||||
|
|
|
@ -347,12 +347,12 @@ class ProjectController extends SugarController
|
|||
//Get specified dates and users
|
||||
$start = $_POST['start'];
|
||||
//$end = $_POST['end'];
|
||||
$projects = explode(',', $_POST['projects']);
|
||||
$users = explode(',', $_POST['users']);
|
||||
$contacts = explode(',', $_POST['contacts']);
|
||||
$month = $_POST['month'];
|
||||
$projects = explode(',', $db->quote($_POST['projects']));
|
||||
$users = explode(',', $db->quote($_POST['users']));
|
||||
$contacts = explode(',', $db->quote($_POST['contacts']));
|
||||
$month = is_numeric($_POST['month']) ? $_POST['month'] : '1' ;
|
||||
$flag = $_POST['flag'];
|
||||
$chart_type = $_POST['chart_type'];
|
||||
$chart_type = $db->quote($_POST['chart_type']);
|
||||
//$type = $_POST['type'];
|
||||
|
||||
$start = new DateTime($start);
|
||||
|
|
|
@ -66,3 +66,11 @@ if (ACLController::checkAccess('ProjectTask', 'list', true)) {
|
|||
$module_menu[] = array('index.php?module=ProjectTask&action=index',
|
||||
$mod_strings['LNK_PROJECT_TASK_LIST'], 'View_Project_Tasks');
|
||||
}
|
||||
// Import Project Task
|
||||
if (ACLController::checkAccess('ProjectTask', 'import', true)) {
|
||||
$module_menu[] = array(
|
||||
'index.php?module=Import&action=Step1&import_module=ProjectTask&return_module=ProjectTask&return_action=index',
|
||||
isset($mod_strings['LBL_IMPORT_PROJECT_TASKS']) ? $mod_strings['LBL_IMPORT_PROJECT_TASKS'] : '',
|
||||
'Import'
|
||||
);
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ class ProjectTask extends SugarBean
|
|||
public $parent_task_id;
|
||||
public $predecessors;
|
||||
public $priority;
|
||||
public $importable = true;
|
||||
|
||||
// related information
|
||||
public $assigned_user_name;
|
||||
|
|
|
@ -79,6 +79,7 @@ $mod_strings = array(
|
|||
'LBL_ACTUAL_EFFORT' => 'Actual Effort (hrs):',
|
||||
'LBL_UTILIZATION' => 'Utilization (%):',
|
||||
'LBL_DELETED' => 'Deleted:',
|
||||
'LBL_IMPORT_PROJECT_TASKS' => 'Import Project Tasks',
|
||||
|
||||
'LBL_LIST_NAME' => 'Name',
|
||||
'LBL_LIST_PARENT_NAME' => 'Project',
|
||||
|
|
|
@ -127,6 +127,10 @@ array(
|
|||
),
|
||||
),
|
||||
),
|
||||
'summaryTemplates' => [
|
||||
'edit' => 'LBL_SUMMARY_PERSON',
|
||||
'detail' => 'LBL_SUMMARY_PERSON',
|
||||
],
|
||||
'panels' =>
|
||||
array(
|
||||
'lbl_prospect_information' =>
|
||||
|
|
|
@ -904,30 +904,6 @@ class Scheduler extends SugarBean
|
|||
$sched7->catch_up = '0';
|
||||
$sched7->save();
|
||||
|
||||
$sched8 = BeanFactory::newBean('Schedulers');
|
||||
$sched8->name = $mod_strings['LBL_OOTB_LUCENE_INDEX'];
|
||||
$sched8->job = 'function::aodIndexUnindexed';
|
||||
$sched8->date_time_start = create_date(2015, 1, 1) . ' ' . create_time(0, 0, 1);
|
||||
$sched8->date_time_end = null;
|
||||
$sched8->job_interval = "0::0::*::*::*";
|
||||
$sched8->status = 'Active';
|
||||
$sched8->created_by = '1';
|
||||
$sched8->modified_user_id = '1';
|
||||
$sched8->catch_up = '0';
|
||||
$sched8->save();
|
||||
|
||||
$sched9 = BeanFactory::newBean('Schedulers');
|
||||
$sched9->name = $mod_strings['LBL_OOTB_OPTIMISE_INDEX'];
|
||||
$sched9->job = 'function::aodOptimiseIndex';
|
||||
$sched9->date_time_start = create_date(2015, 1, 1) . ' ' . create_time(0, 0, 1);
|
||||
$sched9->date_time_end = null;
|
||||
$sched9->job_interval = "0::*/3::*::*::*";
|
||||
$sched9->status = 'Active';
|
||||
$sched9->created_by = '1';
|
||||
$sched9->modified_user_id = '1';
|
||||
$sched9->catch_up = '0';
|
||||
$sched9->save();
|
||||
|
||||
$sched12 = BeanFactory::newBean('Schedulers');
|
||||
$sched12->name = $mod_strings['LBL_OOTB_SEND_EMAIL_REMINDERS'];
|
||||
$sched12->job = 'function::sendEmailReminders';
|
||||
|
|
|
@ -45,6 +45,8 @@ if (!defined('sugarEntry') || !sugarEntry) {
|
|||
die('Not A Valid Entry Point');
|
||||
}
|
||||
|
||||
require_once 'include/Services/NormalizeRecords/NormalizeRecords.php';
|
||||
|
||||
/**
|
||||
* Set up an array of Jobs with the appropriate metadata
|
||||
* 'jobName' => array (
|
||||
|
|
|
@ -52,7 +52,6 @@ $mod_strings = array(
|
|||
'LBL_OOTB_PRUNE' => 'Prune Database on 1st of Month',
|
||||
'LBL_OOTB_TRACKER' => 'Prune Tracker Tables',
|
||||
'LBL_OOTB_SUITEFEEDS' => 'Prune SuiteCRM Feed Tables',
|
||||
'LBL_OOTB_OPTIMISE_INDEX' => 'Optimise AOD Index',
|
||||
'LBL_OOTB_SEND_EMAIL_REMINDERS' => 'Run Email Reminder Notifications',
|
||||
'LBL_OOTB_CLEANUP_QUEUE' => 'Clean Jobs Queue',
|
||||
'LBL_OOTB_REMOVE_DOCUMENTS_FROM_FS' => 'Removal of documents from filesystem',
|
||||
|
@ -151,8 +150,6 @@ $mod_strings = array(
|
|||
'LBL_CLEANJOBQUEUE' => 'Cleanup Job Queue',
|
||||
'LBL_REMOVEDOCUMENTSFROMFS' => 'Removal of documents from filesystem',
|
||||
|
||||
'LBL_AODOPTIMISEINDEX' => 'Optimise Advanced OpenDiscovery Index',
|
||||
'LBL_AODINDEXUNINDEXED' => 'Index unindexed documents',
|
||||
'LBL_POLLMONITOREDINBOXESAOP' => 'AOP Poll Monitored Inboxes',
|
||||
'LBL_AORRUNSCHEDULEDREPORTS' => 'Run scheduled reports',
|
||||
'LBL_PROCESSAOW_WORKFLOW' => 'Process AOW Workflow',
|
||||
|
|
|
@ -60,6 +60,11 @@ $subpanel_layout = array(
|
|||
'width' => '10%',
|
||||
'sortable' => true,
|
||||
),
|
||||
'resolution' => array(
|
||||
'vname' => 'LBL_RESOLUTION',
|
||||
'width' => '10%',
|
||||
'sortable' => true,
|
||||
),
|
||||
'execute_time' => array(
|
||||
'vname' => 'LBL_EXECUTE_TIME',
|
||||
'width' => '10%',
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2019 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
|
||||
$dashletStrings['SpotsDashlet'] = array(
|
||||
'LBL_TITLE' => 'Spots',
|
||||
'LBL_DESCRIPTION' => 'Spots report of your data',
|
||||
'LBL_SAVING' => 'Saving Spots...',
|
||||
'LBL_SAVED' => 'Saved',
|
||||
'LBL_CONFIGURE_TITLE' => 'Title',
|
||||
'LBL_SPOTS_TO_LOAD' => 'Spots to Load',
|
||||
'LBL_NO_SPOTS_SELECTED' => 'No spots selected for display',
|
||||
'LBL_SPOTS_POINTED_DELETED' => 'This spot has been deleted',
|
||||
'LBL_SHOW_UI' => 'Show UI',
|
||||
'LBL_NAME' => 'Name',
|
||||
);
|
|
@ -1,50 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
|
||||
global $app_strings, $current_language;
|
||||
|
||||
$dashletMeta['SpotsDashlet'] = array('title' => 'LBL_TITLE', // array index in language pack
|
||||
'description' => 'LBL_DESCRIPTION', // array index in language pack
|
||||
'icon' => 'themes/default/images/icon_SpotsDashlet_32.gif',
|
||||
'category' => 'Tools', );
|
|
@ -1,212 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
require_once 'include/Dashlets/Dashlet.php';
|
||||
|
||||
class SpotsDashlet extends Dashlet
|
||||
{
|
||||
public $pivotId;
|
||||
public $showGui;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @global string current language
|
||||
*
|
||||
* @param guid $id id for the current dashlet (assigned from Home module)
|
||||
* @param array $def options saved for this dashlet
|
||||
*/
|
||||
public function __construct($id, $def)
|
||||
{
|
||||
$this->loadLanguage('SpotsDashlet', 'modules/Spots/Dashlets/'); // load the language strings here
|
||||
|
||||
$this->isRefreshable = false;
|
||||
|
||||
if (!empty($def['spotId'])) {
|
||||
$this->spotId = $def['spotId'];
|
||||
} else {
|
||||
$this->spotId = '';
|
||||
}
|
||||
|
||||
if (!empty($def['showGui']) && $def['showGui'] === 'on') {
|
||||
$this->showGui = 1;
|
||||
} else {
|
||||
$this->showGui = 0;
|
||||
}
|
||||
|
||||
parent::__construct($id); // call parent constructor
|
||||
|
||||
$this->isConfigurable = true; // dashlet is configurable
|
||||
$this->hasScript = true; // dashlet has javascript attached to it
|
||||
|
||||
// if no custom title, use default
|
||||
if (empty($def['title'])) {
|
||||
$this->title = $this->dashletStrings['LBL_TITLE'];
|
||||
} else {
|
||||
$this->title = $def['title'];
|
||||
}
|
||||
}
|
||||
|
||||
public function checkIfSpotHasBeenDeleted($spotId)
|
||||
{
|
||||
$spotBean = BeanFactory::getBean('Spots', $spotId);
|
||||
|
||||
return $spotBean === false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the dashlet.
|
||||
*
|
||||
* @return string html to display dashlet
|
||||
*/
|
||||
public function display()
|
||||
{
|
||||
|
||||
//As the dashlet may point to a pivot that has been marked as deleted, check this here
|
||||
|
||||
if (is_null($this->spotId) || $this->spotId === '') {
|
||||
return parent::display('').'<span style="margin-left:10px;" class="dashletAnalyticMessage">'.$this->dashletStrings['LBL_NO_SPOTS_SELECTED'].'</span><br />'; // return parent::display for title and such
|
||||
} else {
|
||||
if ($this->checkIfSpotHasBeenDeleted($this->spotId)) {
|
||||
return parent::display('').'<span style="margin-left:10px;" class="dashletAnalyticMessage">'.$this->dashletStrings['LBL_SPOTS_POINTED_DELETED'].'</span><br />'; // return parent::display for title and such
|
||||
}
|
||||
|
||||
$ss = new Sugar_Smarty();
|
||||
$ss->assign('id', $this->id);
|
||||
$ss->assign('showUI', $this->showGui);
|
||||
$ss->assign('spotToLoad', $this->spotId);
|
||||
|
||||
$spot = BeanFactory::getBean('Spots', $this->spotId);
|
||||
|
||||
$ss->assign('config', $spot->config);
|
||||
$ss->assign('type', $spot->type);
|
||||
|
||||
$str = $ss->fetch('modules/Spots/Dashlets/SpotsDashlet/SpotsDashlet.tpl');
|
||||
|
||||
return parent::display().$str.'<br />'; // return parent::display for title and such
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the javascript for the dashlet.
|
||||
*
|
||||
* @return string javascript to use with this dashlet
|
||||
*/
|
||||
public function displayScript()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the configuration form for the dashlet.
|
||||
*
|
||||
* @return string html to display form
|
||||
*/
|
||||
public function displayOptions()
|
||||
{
|
||||
global $app_strings;
|
||||
|
||||
$ss = new Sugar_Smarty();
|
||||
$ss->assign('titleLbl', $this->dashletStrings['LBL_CONFIGURE_TITLE']);
|
||||
$ss->assign('saveLbl', $app_strings['LBL_SAVE_BUTTON_LABEL']);
|
||||
$ss->assign('spotToLoadTitleLbl', $this->dashletStrings['LBL_SPOTS_TO_LOAD']);
|
||||
$ss->assign('showUILbl', $this->dashletStrings['LBL_SHOW_UI']);
|
||||
$ss->assign('title', $this->title);
|
||||
$ss->assign('id', $this->id);
|
||||
$ss->assign('showUI', $this->showGui);
|
||||
$ss->assign('spotToLoad', $this->spotId);
|
||||
|
||||
$ss->assign('spots', $this->getSpotsList());
|
||||
|
||||
return parent::displayOptions().$ss->fetch('modules/Spots/Dashlets/SpotsDashlet/SpotsDashletOptions.tpl');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a json_encoded string of the available spots names.
|
||||
*
|
||||
*
|
||||
* @return json_encoded string of the list of available spots names
|
||||
*/
|
||||
public function getSpotsList()
|
||||
{
|
||||
$spotBean = BeanFactory::getBean('Spots');
|
||||
$beanList = $spotBean->get_full_list('name');
|
||||
$returnArray = [];
|
||||
if (!is_null($beanList)) {
|
||||
foreach ($beanList as $b) {
|
||||
$bean = new stdClass();
|
||||
$bean->type = $b->type;
|
||||
$bean->config = htmlspecialchars_decode($b->config);
|
||||
$bean->name = $b->name;
|
||||
$bean->id = $b->id;
|
||||
$returnArray[] = $bean;
|
||||
}
|
||||
}
|
||||
|
||||
return json_encode($returnArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* called to filter out $_REQUEST object when the user submits the configure dropdown.
|
||||
*
|
||||
* @param array $req $_REQUEST
|
||||
*
|
||||
* @return array filtered options to save
|
||||
*/
|
||||
public function saveOptions($req)
|
||||
{
|
||||
$options = array();
|
||||
$options['title'] = $_REQUEST['title'];
|
||||
if (isset($_REQUEST['showGui'])) {
|
||||
$options['showGui'] = $_REQUEST['showGui'];
|
||||
} else {
|
||||
$options['showGui'] = '';
|
||||
}
|
||||
if (isset($_REQUEST['spots'])) {
|
||||
$options['spotId'] = $_REQUEST['spots'];
|
||||
} else {
|
||||
$options['spotId'] = '';
|
||||
}
|
||||
|
||||
return $options;
|
||||
}
|
||||
}
|
|
@ -1,107 +0,0 @@
|
|||
{*
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
*}
|
||||
<link rel="stylesheet" type="text/css" href="include/javascript/c3/c3.min.css">
|
||||
<script type="text/javascript" src="include/javascript/touchPunch/jquery.ui.touch-punch.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="include/javascript/pivottable/pivot.css">
|
||||
<script type="text/javascript" src="include/javascript/suitespots/suitespots.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
$(function () {
|
||||
$('#bootstrap-container').removeClass('col-sm-9 col-sm-offset-3 col-md-10');
|
||||
var renderers = $.extend($.pivotUtilities.renderers, $.pivotUtilities.c3_renderers);
|
||||
|
||||
var template = {
|
||||
renderers: renderers
|
||||
}
|
||||
function getDataForPivot(element, config, type, showUI)
|
||||
{
|
||||
$.getJSON("index.php",
|
||||
{
|
||||
'module': 'Spots',
|
||||
{/literal}
|
||||
'action': type,
|
||||
{literal}
|
||||
'to_pdf':1
|
||||
},
|
||||
function (data) {
|
||||
{/literal}
|
||||
if("derivedAttributes" in config)
|
||||
delete config["derivedAttributes"];
|
||||
$(element)
|
||||
.pivotUI(data,$.extend(config,template),true);
|
||||
|
||||
if(showUI !== "1")
|
||||
hideUI(element);
|
||||
|
||||
{literal}
|
||||
|
||||
});
|
||||
}
|
||||
function hideUI(element)
|
||||
{
|
||||
//This is to ascertain if the pivot ui is laying out the column options horizontally or vertically
|
||||
//It is vertically for larger data sets. This allows us to hide the pivot ui appropriately
|
||||
var columnLayout = $(element+" table.pvtUi tr td:nth-child(3)").length;
|
||||
|
||||
if(columnLayout > 0)
|
||||
$(element+" table.pvtUi tbody tr:lt(1),"+element+" table.pvtUi tbody tr:eq(1) td:lt(2)").hide();
|
||||
else
|
||||
$(element+" table.pvtUi tbody tr:lt(2),"+element+" table.pvtUi tbody tr:nth-child(3) td:nth-child(1)").hide();
|
||||
|
||||
}
|
||||
{/literal}
|
||||
getDataForPivot(".output-{$id}",JSON.parse($(".config-{$id}").val()),$(".type-{$id}").val(), $(".showUI-{$id}").val());
|
||||
|
||||
{literal}
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
<input type="hidden" class="config-{$id}" value="{$config}">
|
||||
<input type="hidden" class="type-{$id}" value="{$type}">
|
||||
<input type="hidden" class="showUI-{$id}" value="{$showUI}">
|
||||
<div class="output-{$id}"></div>
|
||||
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
{*
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
*}
|
||||
|
||||
<div style='width: 500px'>
|
||||
<form name='configure_{$id}' action="index.php" method="post" onSubmit='return SUGAR.dashlets.postForm("configure_{$id}", SUGAR.mySugar.uncoverPage);'>
|
||||
<input type='hidden' name='id' value='{$id}'>
|
||||
<input type='hidden' name='module' value='Home'>
|
||||
<input type='hidden' name='action' value='ConfigureDashlet'>
|
||||
<input type='hidden' name='to_pdf' value='true'>
|
||||
<input type='hidden' name='configure' value='true'>
|
||||
<table width="400" cellpadding="0" cellspacing="0" border="0" class="edit view" align="center">
|
||||
<tr>
|
||||
<td valign='top' nowrap class='dataLabel'>{$titleLbl}</td>
|
||||
<td valign='top' class='dataField'>
|
||||
<input class="text" name="title" size='20' value='{$title}'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td scope='row'>{$spotToLoadTitleLbl}</td>
|
||||
<td>
|
||||
<select name="spots" id="spots-{$id}">
|
||||
</select>
|
||||
<script type="text/javascript">
|
||||
|
||||
{literal}
|
||||
|
||||
$(function() {
|
||||
{/literal}
|
||||
var options = "";
|
||||
$({$spots}).each(function(i,e)
|
||||
{literal}
|
||||
{
|
||||
{/literal}
|
||||
if("{$spotToLoad}" !==e.id)
|
||||
options+="<option value='"+ e.id+"'>"+ e.name+"</option>";
|
||||
else
|
||||
options+="<option value='"+ e.id+"' selected>"+ e.name+"</option>";
|
||||
{literal}
|
||||
});
|
||||
{/literal}
|
||||
$('#spots-{$id}').empty().append(options);
|
||||
{literal}
|
||||
});
|
||||
|
||||
{/literal}
|
||||
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td scope='row'>
|
||||
<label for="showGui{$id}">{$showUILbl}</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type='checkbox' id='showGui{$id}' name='showGui' {if $showUI}checked='checked'{/if}>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" colspan="2">
|
||||
<input type='submit' class='button' value='{$saveLbl}'>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
|
@ -1,54 +0,0 @@
|
|||
<?php
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
/*
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
global $mod_strings, $app_strings, $sugar_config;
|
||||
|
||||
if (ACLController::checkAccess('Spots', 'edit', true)) {
|
||||
$module_menu[]=array("index.php?module=Spots&action=EditView", $mod_strings['LNK_SPOT_CREATE'],"Create", 'Spots');
|
||||
}
|
||||
if (ACLController::checkAccess('Spots', 'list', true)) {
|
||||
$module_menu[]=array("index.php?module=Spots&action=index", $mod_strings['LNK_SPOT_LIST'],"List", 'Spots');
|
||||
}
|
||||
|
||||
;
|
|
@ -1,48 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
function displaySpots()
|
||||
{
|
||||
global $mod_strings, $app_strings;
|
||||
$sugar_smarty = new Sugar_Smarty();
|
||||
$sugar_smarty->assign('MOD', $mod_strings);
|
||||
$sugar_smarty->assign('APP', $app_strings);
|
||||
|
||||
return $sugar_smarty->fetch('modules/Spots/tpl/ShowSpots.tpl');
|
||||
}
|
|
@ -1,293 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
class Spots extends Basic
|
||||
{
|
||||
public $new_schema = true;
|
||||
public $module_dir = 'Spots';
|
||||
public $object_name = 'Spots';
|
||||
public $table_name = 'spots';
|
||||
public $importable = false;
|
||||
public $disable_row_level_security = true; // to ensure that modules created and deployed under CE will continue to function under team security if the instance is upgraded to PRO
|
||||
|
||||
public $id;
|
||||
public $name;
|
||||
public $date_entered;
|
||||
public $date_modified;
|
||||
public $modified_user_id;
|
||||
public $modified_by_name;
|
||||
public $created_by;
|
||||
public $created_by_name;
|
||||
public $description;
|
||||
public $deleted;
|
||||
public $created_by_link;
|
||||
public $modified_user_link;
|
||||
public $assigned_user_id;
|
||||
public $assigned_user_name;
|
||||
public $assigned_user_link;
|
||||
public $SecurityGroups;
|
||||
public $config;
|
||||
public $type;
|
||||
|
||||
public function bean_implements($interface)
|
||||
{
|
||||
switch ($interface) {
|
||||
case 'ACL': return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function fill_in_additional_detail_fields()
|
||||
{
|
||||
$this->config = htmlspecialchars(json_encode($this->replaceKeyValueWithLabel(htmlspecialchars_decode($this->config))));
|
||||
parent::fill_in_additional_detail_fields(); // TODO: Change the autogenerated stub
|
||||
}
|
||||
|
||||
/**
|
||||
*This replaces the label values in the config with the corresponding keys (to make language agnostic).
|
||||
*/
|
||||
public function save($check_notify = false)
|
||||
{
|
||||
$type = $_REQUEST['type'];
|
||||
$name = $_REQUEST['name'];
|
||||
$config = htmlspecialchars_decode($_REQUEST['config']);
|
||||
$jsonConfig = json_decode($config, true);
|
||||
|
||||
$colsLabels = array();
|
||||
$rowsLabels = array();
|
||||
if (isset($jsonConfig['cols']) && count($jsonConfig['cols']) > 0) {
|
||||
$colsLabels = $this->getKeysForLabels($type, $jsonConfig['cols']);
|
||||
$jsonConfig['cols'] = $colsLabels;
|
||||
}
|
||||
if (isset($jsonConfig['rows']) && count($jsonConfig['rows']) > 0) {
|
||||
$rowsLabels = $this->getKeysForLabels($type, $jsonConfig['rows']);
|
||||
$jsonConfig['rows'] = $rowsLabels;
|
||||
}
|
||||
|
||||
//Set the key value for the inclusions / exclusions
|
||||
if (isset($jsonConfig['exclusions']) && count($jsonConfig['exclusions']) > 0) {
|
||||
foreach ($jsonConfig['exclusions'] as $key => $value) {
|
||||
$newKey = $this->getKeyForLabel($type, $key);
|
||||
|
||||
$jsonConfig['exclusions'][reset($newKey)] = $jsonConfig['exclusions'][$key];
|
||||
unset($jsonConfig['exclusions'][$key]);
|
||||
//Check that this is an array with 1 element
|
||||
if (count($newKey) !== 1) {
|
||||
$this->logSpotsErrorWithKeyMatching($type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($jsonConfig['inclusions']) && count($jsonConfig['inclusions']) > 0) {
|
||||
foreach ($jsonConfig['inclusions'] as $key => $value) {
|
||||
$newKey = $this->getKeyForLabel($type, $key);
|
||||
|
||||
$jsonConfig['inclusions'][reset($newKey)] = $jsonConfig['inclusions'][$key];
|
||||
unset($jsonConfig['inclusions'][$key]);
|
||||
//Check that this is an array with 1 element
|
||||
if (count($newKey) !== 1) {
|
||||
$this->logSpotsErrorWithKeyMatching($type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($jsonConfig['inclusionsInfo']) && count($jsonConfig['inclusionsInfo']) > 0) {
|
||||
foreach ($jsonConfig['inclusionsInfo'] as $key => $value) {
|
||||
$newKey = $this->getKeyForLabel($type, $key);
|
||||
|
||||
$jsonConfig['inclusionsInfo'][reset($newKey)] = $jsonConfig['inclusionsInfo'][$key];
|
||||
unset($jsonConfig['inclusionsInfo'][$key]);
|
||||
//Check that this is an array with 1 element
|
||||
if (count($newKey) !== 1) {
|
||||
$this->logSpotsErrorWithKeyMatching($type);
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->config = json_encode($jsonConfig);
|
||||
|
||||
return parent::save($check_notify);
|
||||
}
|
||||
|
||||
/**
|
||||
*This parses the spots config and replaces the key values with the appropriate, language-specific labels.
|
||||
*
|
||||
* @param string $config the configuration file for the spot
|
||||
*
|
||||
* @return string is the config file with the label values in place of the key names
|
||||
*/
|
||||
public function replaceKeyValueWithLabel($config)
|
||||
{
|
||||
//Strings are loaded this way as the dashlet mod_strings was set to Home
|
||||
$spotStrings = return_module_language($GLOBALS['current_language'], 'Spots');
|
||||
|
||||
$jsonConfig = json_decode($config, true);
|
||||
if (isset($jsonConfig['cols']) && count($jsonConfig['cols']) > 0) {
|
||||
foreach ($jsonConfig['cols'] as $k => $v) {
|
||||
$jsonConfig['cols'][$k] = $spotStrings[$v];
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($jsonConfig['rows']) && count($jsonConfig['rows']) > 0) {
|
||||
foreach ($jsonConfig['rows'] as $k => $v) {
|
||||
$jsonConfig['rows'][$k] = $spotStrings[$v];
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($jsonConfig['exclusions']) && count($jsonConfig['exclusions']) > 0) {
|
||||
foreach ($jsonConfig['exclusions'] as $key => $value) {
|
||||
$newKey = $spotStrings[$key];
|
||||
|
||||
$jsonConfig['exclusions'][$newKey] = $jsonConfig['exclusions'][$key];
|
||||
unset($jsonConfig['exclusions'][$key]);
|
||||
}
|
||||
} elseif (isset($jsonConfig['exclusions']) && count($jsonConfig['exclusions']) == 0) {
|
||||
$jsonConfig['exclusions'] = new stdClass();
|
||||
}
|
||||
|
||||
if (isset($jsonConfig['inclusions']) && count($jsonConfig['inclusions']) > 0) {
|
||||
foreach ($jsonConfig['inclusions'] as $key => $value) {
|
||||
$newKey = $spotStrings[$key];
|
||||
$jsonConfig['inclusions'][$newKey] = $jsonConfig['inclusions'][$key];
|
||||
unset($jsonConfig['inclusions'][$key]);
|
||||
}
|
||||
} elseif (isset($jsonConfig['inclusions']) && count($jsonConfig['inclusions']) == 0) {
|
||||
$jsonConfig['inclusions'] = new stdClass();
|
||||
}
|
||||
|
||||
if (isset($jsonConfig['inclusionsInfo']) && count($jsonConfig['inclusionsInfo']) > 0) {
|
||||
foreach ($jsonConfig['inclusionsInfo'] as $key => $value) {
|
||||
$newKey = $spotStrings[$key];
|
||||
$jsonConfig['inclusionsInfo'][$newKey] = $jsonConfig['inclusionsInfo'][$key];
|
||||
unset($jsonConfig['inclusionsInfo'][$key]);
|
||||
}
|
||||
} elseif (isset($jsonConfig['inclusionsInfo']) && count($jsonConfig['inclusionsInfo']) == 0) {
|
||||
$jsonConfig['inclusionsInfo'] = new stdClass();
|
||||
}
|
||||
|
||||
return $jsonConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
*This returns the keys for the provided labels (to allow for translation of the saved spots configurations).
|
||||
*
|
||||
* @param string $type the type spot, e.g. accounts / leads, etc.
|
||||
* @param array $items the labels that the key is requested for
|
||||
*
|
||||
* @return array $keys is the array of matching key values for the label items
|
||||
*/
|
||||
public function getKeysForLabels($type, $items)
|
||||
{
|
||||
$keys = array();
|
||||
foreach ($items as $i) {
|
||||
$key = $this->getKeyForLabel($type, $i);
|
||||
//Check that the returned array has only 1 element, else there is a potential error
|
||||
//Log error and return empty keys
|
||||
//Error if 0 || >1
|
||||
$countOfMatches = count($key);
|
||||
if ($countOfMatches !== 1) {
|
||||
$this->logSpotsErrorWithKeyMatching($type);
|
||||
|
||||
return array();
|
||||
} else {
|
||||
$keys[] = reset($key);
|
||||
}
|
||||
}
|
||||
|
||||
return $keys;
|
||||
}
|
||||
|
||||
/**
|
||||
*This logs an error when there is <> 1 matching keys for a label.
|
||||
*
|
||||
* @param string $type the type spot, e.g. accounts / leads, etc.
|
||||
*/
|
||||
public function logSpotsErrorWithKeyMatching($type)
|
||||
{
|
||||
global $mod_strings;
|
||||
$GLOBALS['log']->error($mod_strings['LBL_AN_DUPLICATE_LABEL_FOR_SUBAREA'].' '.$type);
|
||||
}
|
||||
|
||||
/**
|
||||
*This returns the key for the provided label (to allow for translation of the saved spots configurations).
|
||||
*
|
||||
* @param string $type the type spot, e.g. accounts / leads, etc.
|
||||
* @param string $label the label that the key is requested for
|
||||
*
|
||||
* @return array $matches is the array of matching key values (if <> 1, then there is an issue matching this)
|
||||
*/
|
||||
public function getKeyForLabel($type, $label)
|
||||
{
|
||||
global $mod_strings;
|
||||
$labelPrefix = '';
|
||||
switch ($type) {
|
||||
case 'getAccountsSpotsData':
|
||||
$labelPrefix = 'LBL_AN_ACCOUNTS_';
|
||||
break;
|
||||
case 'getLeadsSpotsData':
|
||||
$labelPrefix = 'LBL_AN_LEADS_';
|
||||
break;
|
||||
case 'getSalesSpotsData':
|
||||
$labelPrefix = 'LBL_AN_SALES_';
|
||||
break;
|
||||
case 'getServiceSpotsData':
|
||||
$labelPrefix = 'LBL_AN_SERVICE_';
|
||||
break;
|
||||
case 'getActivitiesSpotsData':
|
||||
$labelPrefix = 'LBL_AN_ACTIVITIES_';
|
||||
break;
|
||||
case 'getMarketingSpotsData':
|
||||
$labelPrefix = 'LBL_AN_MARKETING_';
|
||||
break;
|
||||
case 'getMarketingActivitySpotsData':
|
||||
$labelPrefix = 'LBL_AN_MARKETINGACTIVITY';
|
||||
break;
|
||||
case 'getQuotesSpotsData':
|
||||
$labelPrefix = 'LBL_AN_QUOTES_';
|
||||
break;
|
||||
}
|
||||
$allMatchingLabels = array_keys($mod_strings, $label);
|
||||
|
||||
$matches = array_filter($allMatchingLabels, function ($e) use ($labelPrefix) {
|
||||
return strpos($e, $labelPrefix) !== false;
|
||||
});
|
||||
|
||||
return $matches;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,184 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2019 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
|
||||
$mod_strings = array(
|
||||
'LBL_ASSIGNED_TO_ID' => 'Assigned User Id',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Assigned to',
|
||||
'LBL_SECURITYGROUPS' => 'Security Groups',
|
||||
'LBL_SECURITYGROUPS_SUBPANEL_TITLE' => 'Security Groups',
|
||||
'LBL_ID' => 'ID',
|
||||
'LBL_DATE_ENTERED' => 'Date Created',
|
||||
'LBL_DATE_MODIFIED' => 'Date Modified',
|
||||
'LBL_MODIFIED' => 'Modified By',
|
||||
'LBL_MODIFIED_NAME' => 'Modified By Name',
|
||||
'LBL_CREATED' => 'Created By',
|
||||
'LBL_DESCRIPTION' => 'Description',
|
||||
'LBL_DELETED' => 'Deleted',
|
||||
'LBL_NAME' => 'Name',
|
||||
'LBL_CREATED_USER' => 'Created by User',
|
||||
'LBL_MODIFIED_USER' => 'Modified by User',
|
||||
'LBL_LIST_NAME' => 'Name',
|
||||
'LBL_EDIT_BUTTON' => 'Edit',
|
||||
'LBL_REMOVE' => 'Remove',
|
||||
'LBL_LIST_FORM_TITLE' => 'Pivot List',
|
||||
'LBL_MODULE_NAME' => 'Pivot',
|
||||
'LBL_MODULE_TITLE' => 'Pivot',
|
||||
'LBL_HOMEPAGE_TITLE' => 'My Pivot',
|
||||
'LNK_NEW_RECORD' => 'Create Pivot',
|
||||
'LNK_LIST' => 'View Pivot',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Search Pivot',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE' => 'View History',
|
||||
'LBL_ACTIVITIES_SUBPANEL_TITLE' => 'Activities',
|
||||
'LBL_NEW_FORM_TITLE' => 'New Pivot',
|
||||
'LBL_CONFIG' => 'Config',
|
||||
'LBL_TYPE' => 'Area for Analysis',
|
||||
'LNK_SPOT_LIST' => 'View Spots',
|
||||
'LNK_SPOT_CREATE' => 'Create Spot',
|
||||
|
||||
//Analytics
|
||||
'LBL_AN_CONFIGURATION' => 'Configuration',
|
||||
|
||||
'LBL_AN_UNSUPPORTED_DB' => 'Sorry, Suite Spots are currently configured for MySQL and MS SQL only',
|
||||
|
||||
//Analytics labels for accounts pivot
|
||||
'LBL_AN_ACCOUNTS_ACCOUNT_NAME' => 'Name',
|
||||
'LBL_AN_ACCOUNTS_ACCOUNT_TYPE' => 'Account Type',
|
||||
'LBL_AN_ACCOUNTS_ACCOUNT_INDUSTRY' => 'Industry',
|
||||
'LBL_AN_ACCOUNTS_ACCOUNT_BILLING_COUNTRY' => 'Billing Country',
|
||||
|
||||
//Analytics labels for leads pivot
|
||||
'LBL_AN_LEADS_ASSIGNED_USER' => 'Assigned User',
|
||||
'LBL_AN_LEADS_STATUS' => 'Status',
|
||||
'LBL_AN_LEADS_LEAD_SOURCE' => 'Lead Source',
|
||||
'LBL_AN_LEADS_CAMPAIGN_NAME' => 'Campaign Name',
|
||||
'LBL_AN_LEADS_YEAR' => 'Year',
|
||||
'LBL_AN_LEADS_QUARTER' => 'Quarter',
|
||||
'LBL_AN_LEADS_MONTH' => 'Month',
|
||||
'LBL_AN_LEADS_WEEK' => 'Week',
|
||||
'LBL_AN_LEADS_DAY' => 'Day',
|
||||
|
||||
//Analytics labels for sales pivot
|
||||
'LBL_AN_SALES_ACCOUNT_NAME' => 'Account Name',
|
||||
'LBL_AN_SALES_OPPORTUNITY_NAME' => 'Opportunity Name',
|
||||
'LBL_AN_SALES_ASSIGNED_USER' => 'Assigned User',
|
||||
'LBL_AN_SALES_OPPORTUNITY_TYPE' => 'OpportunityType',
|
||||
'LBL_AN_SALES_LEAD_SOURCE' => 'Lead Source',
|
||||
'LBL_AN_SALES_AMOUNT' => 'Amount',
|
||||
'LBL_AN_SALES_STAGE' => 'Sales Stage',
|
||||
'LBL_AN_SALES_PROBABILITY' => 'Probability',
|
||||
'LBL_AN_SALES_DATE' => 'Sales Date',
|
||||
'LBL_AN_SALES_QUARTER' => 'Sales Quarter',
|
||||
'LBL_AN_SALES_MONTH' => 'Sales Month',
|
||||
'LBL_AN_SALES_WEEK' => 'Sales Week',
|
||||
'LBL_AN_SALES_DAY' => 'Sales Day',
|
||||
'LBL_AN_SALES_YEAR' => 'Sales Year',
|
||||
'LBL_AN_SALES_CAMPAIGN' => 'Campaign',
|
||||
|
||||
//Analytics labels for service pivot
|
||||
'LBL_AN_SERVICE_ACCOUNT_NAME' => 'Account Name',
|
||||
'LBL_AN_SERVICE_STATE' => 'State',
|
||||
'LBL_AN_SERVICE_STATUS' => 'Status',
|
||||
'LBL_AN_SERVICE_PRIORITY' => 'Priority',
|
||||
'LBL_AN_SERVICE_CREATED_DAY' => 'Created Day',
|
||||
'LBL_AN_SERVICE_CREATED_WEEK' => 'Created Week',
|
||||
'LBL_AN_SERVICE_CREATED_MONTH' => 'Created Month',
|
||||
'LBL_AN_SERVICE_CREATED_QUARTER' => 'Created Quarter',
|
||||
'LBL_AN_SERVICE_CREATED_YEAR' => 'Created Year',
|
||||
'LBL_AN_SERVICE_CONTACT_NAME' => 'Contact Name',
|
||||
'LBL_AN_SERVICE_ASSIGNED_TO' => 'Assigned User',
|
||||
|
||||
//Analytics labels for the activities pivot
|
||||
'LBL_AN_ACTIVITIES_TYPE' => 'Type',
|
||||
'LBL_AN_ACTIVITIES_NAME' => 'Name',
|
||||
'LBL_AN_ACTIVITIES_STATUS' => 'Status',
|
||||
'LBL_AN_ACTIVITIES_ASSIGNED_TO' => 'Assigned User',
|
||||
|
||||
//Analytics labels for the marketing pivot
|
||||
'LBL_AN_MARKETING_STATUS' => 'Status',
|
||||
'LBL_AN_MARKETING_TYPE' => 'Type',
|
||||
'LBL_AN_MARKETING_BUDGET' => 'Budget',
|
||||
'LBL_AN_MARKETING_EXPECTED_COST' => 'Expected Cost',
|
||||
'LBL_AN_MARKETING_EXPECTED_REVENUE' => 'Expected Revenue',
|
||||
'LBL_AN_MARKETING_OPPORTUNITY_NAME' => 'Opportunity Name',
|
||||
'LBL_AN_MARKETING_OPPORTUNITY_AMOUNT' => 'Opportunity Amount',
|
||||
'LBL_AN_MARKETING_OPPORTUNITY_SALES_STAGE' => 'Opportunity Sales Stage',
|
||||
'LBL_AN_MARKETING_OPPORTUNITY_ASSIGNED_TO' => 'Opportunity Assigned To',
|
||||
'LBL_AN_MARKETING_ACCOUNT_NAME' => 'Account Name',
|
||||
|
||||
//Analytics labels for the marketing activities pivot
|
||||
'LBL_AN_MARKETINGACTIVITY_CAMPAIGN_NAME' => 'Campaign Name',
|
||||
'LBL_AN_MARKETINGACTIVITY_ACTIVITY_DATE' => 'Activity Date',
|
||||
'LBL_AN_MARKETINGACTIVITY_ACTIVITY_TYPE' => 'Activity Type',
|
||||
'LBL_AN_MARKETINGACTIVITY_RELATED_TYPE' => 'Related Type',
|
||||
'LBL_AN_MARKETINGACTIVITY_RELATED_ID' => 'Related ID',
|
||||
|
||||
//Analytics labels for the quotes pivot
|
||||
'LBL_AN_QUOTES_OPPORTUNITY_NAME' => 'Opportunity Name',
|
||||
'LBL_AN_QUOTES_OPPORTUNITY_TYPE' => 'Opportunity Type',
|
||||
'LBL_AN_QUOTES_OPPORTUNITY_LEAD_SOURCE' => 'Opportunity Lead Source',
|
||||
'LBL_AN_QUOTES_OPPORTUNITY_SALES_STAGE' => 'Opportunity Sales Stage',
|
||||
'LBL_AN_QUOTES_ACCOUNT_NAME' => 'Account Name',
|
||||
'LBL_AN_QUOTES_CONTACT_NAME' => 'Contact Name',
|
||||
'LBL_AN_QUOTES_ITEM_NAME' => 'Item Name',
|
||||
'LBL_AN_QUOTES_ITEM_TYPE' => 'Item Type',
|
||||
'LBL_AN_QUOTES_ITEM_CATEGORY' => 'Item Category',
|
||||
'LBL_AN_QUOTES_ITEM_QTY' => 'Item Qty',
|
||||
'LBL_AN_QUOTES_ITEM_LIST_PRICE' => 'Item List Price',
|
||||
'LBL_AN_QUOTES_ITEM_SALE_PRICE' => 'Item Sale Price',
|
||||
'LBL_AN_QUOTES_ITEM_COST_PRICE' => 'Item Cost Price',
|
||||
'LBL_AN_QUOTES_ITEM_DISCOUNT_PRICE' => 'Item Discount Price',
|
||||
'LBL_AN_QUOTES_ITEM_DISCOUNT_AMOUNT' => 'Discount Amount',
|
||||
'LBL_AN_QUOTES_ITEM_TOTAL' => 'Item Total',
|
||||
'LBL_AN_QUOTES_GRAND_TOTAL' => 'Grand Total',
|
||||
'LBL_AN_QUOTES_ASSIGNED_TO' => 'Assigned User',
|
||||
'LBL_AN_QUOTES_DATE_CREATED' => 'Date Created',
|
||||
'LBL_AN_QUOTES_DAY_CREATED' => 'Day Created',
|
||||
'LBL_AN_QUOTES_WEEK_CREATED' => 'Week Created',
|
||||
'LBL_AN_QUOTES_MONTH_CREATED' => 'Month Created',
|
||||
'LBL_AN_QUOTES_QUARTER_CREATED' => 'Quarter Created',
|
||||
'LBL_AN_QUOTES_YEAR_CREATED' => 'Year Created',
|
||||
|
||||
//Error message when there are multiple values for the label
|
||||
'LBL_AN_DUPLICATE_LABEL_FOR_SUBAREA' => 'Error ascertaining the label for the pivot sub-area',
|
||||
);
|
|
@ -1,66 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
$module_name = 'Spots';
|
||||
$searchFields[$module_name] =
|
||||
array(
|
||||
'name' => array('query_type' => 'default'),
|
||||
'current_user_only' => array('query_type' => 'default', 'db_field' => array('assigned_user_id'), 'my_items' => true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'),
|
||||
'assigned_user_id' => array('query_type' => 'default'),
|
||||
'favorites_only' => array(
|
||||
'query_type'=>'format',
|
||||
'operator' => 'subquery',
|
||||
'checked_only' => true,
|
||||
'subquery' => "SELECT favorites.parent_id FROM favorites
|
||||
WHERE favorites.deleted = 0
|
||||
and favorites.parent_type = 'Spots'
|
||||
and favorites.assigned_user_id = '{1}'",
|
||||
'db_field'=>array('id')),
|
||||
//Range Search Support
|
||||
'range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
|
||||
'start_range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
|
||||
'end_range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
|
||||
'range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
|
||||
'start_range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
|
||||
'end_range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
|
||||
//Range Search Support
|
||||
);
|
|
@ -1,64 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
|
||||
global $current_user;
|
||||
|
||||
$dashletData['SpotsDashlet']['searchFields'] = array('date_entered' => array('default' => ''),
|
||||
'date_modified' => array('default' => ''),
|
||||
'assigned_user_id' => array('type' => 'assigned_user_name',
|
||||
'default' => $current_user->name, ), );
|
||||
$dashletData['SpotsDashlet']['columns'] = array('name' => array('width' => '40',
|
||||
'label' => 'LBL_LIST_NAME',
|
||||
'link' => true,
|
||||
'default' => true, ),
|
||||
'date_entered' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_ENTERED',
|
||||
'default' => true, ),
|
||||
'date_modified' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_MODIFIED', ),
|
||||
'created_by' => array('width' => '8',
|
||||
'label' => 'LBL_CREATED', ),
|
||||
'assigned_user_name' => array('width' => '8',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER', ),
|
||||
);
|
|
@ -1,64 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
|
||||
$module_name = 'Spots';
|
||||
$listViewDefs[$module_name] = array(
|
||||
'NAME' => array(
|
||||
'width' => '32',
|
||||
'label' => 'LBL_NAME',
|
||||
'default' => true,
|
||||
'link' => true, ),
|
||||
'TYPE' => array(
|
||||
'width' => '32',
|
||||
'label' => 'LBL_TYPE',
|
||||
'default' => true,
|
||||
),
|
||||
'DATE_ENTERED' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_DATE_ENTERED',
|
||||
'default' => true, ),
|
||||
'CREATED_BY_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_CREATED',
|
||||
'default' => true, ),
|
||||
);
|
|
@ -1,55 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
/*
|
||||
* Created on August 2 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
$module_name = 'Spots';
|
||||
$metafiles[$module_name] = array(
|
||||
'detailviewdefs' => 'modules/'.$module_name.'/metadata/detailviewdefs.php',
|
||||
'editviewdefs' => 'modules/'.$module_name.'/metadata/editviewdefs.php',
|
||||
'listviewdefs' => 'modules/'.$module_name.'/metadata/listviewdefs.php',
|
||||
'searchdefs' => 'modules/'.$module_name.'/metadata/searchdefs.php',
|
||||
'popupdefs' => 'modules/'.$module_name.'/metadata/popupdefs.php',
|
||||
'searchfields' => 'modules/'.$module_name.'/metadata/SearchFields.php',
|
||||
);
|
|
@ -1,54 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
$module_name = 'Spots';
|
||||
$object_name = 'Spots';
|
||||
$_module_name = 'Spots';
|
||||
$popupMeta = array('moduleMain' => $module_name,
|
||||
'varName' => $object_name,
|
||||
'orderBy' => $_module_name.'.name',
|
||||
'whereClauses' => array('name' => $_module_name.'.name',
|
||||
),
|
||||
'searchInputs' => array($_module_name.'_number', 'name', 'priority', 'status'),
|
||||
|
||||
);
|
|
@ -1,60 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
$module_name = 'Spots';
|
||||
$viewdefs[$module_name]['QuickCreate'] = array(
|
||||
'templateMeta' => array('maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
),
|
||||
|
||||
'panels' => array(
|
||||
'default' => array(
|
||||
|
||||
array(
|
||||
'name',
|
||||
'assigned_user_name',
|
||||
),
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
);
|
|
@ -1,85 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
/*
|
||||
* Created on May 29, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
$module_name = 'Spots';
|
||||
$searchdefs[$module_name] = array(
|
||||
'templateMeta' => array(
|
||||
'maxColumns' => '3',
|
||||
'maxColumnsBasic' => '4',
|
||||
'widths' => array(
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
),
|
||||
),
|
||||
'layout' => array(
|
||||
'basic_search' => array(
|
||||
'name' => array(
|
||||
'name' => 'current_user_only',
|
||||
'label' => 'LBL_CURRENT_USER_FILTER',
|
||||
'type' => 'bool'
|
||||
),
|
||||
|
||||
'favorites_only' => array(
|
||||
'name' => 'favorites_only',
|
||||
'label' => 'LBL_FAVORITES_FILTER',
|
||||
'type' => 'bool',
|
||||
),
|
||||
),
|
||||
'advanced_search' => array(
|
||||
'name' => array(
|
||||
'name' => 'assigned_user_id',
|
||||
'label' => 'LBL_ASSIGNED_TO',
|
||||
'type' => 'enum',
|
||||
'function' => array(
|
||||
'name' => 'get_user_array',
|
||||
'params' => array(
|
||||
false
|
||||
)
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue