mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-08-29 08:17:18 +08:00
5750e66a06 SuiteCRM 7.12.6 Release d80ca53e48 Update jquery UI to v1.13.1 cacf7aa247 Upgrade jstree to v3.3.12 2c95a4c083 Update Wysiwyg field to work with the new version of TinyMCE 9c487fa43c Update email/template views to work with new versions of TinyMCE 7bcbf2a737 Upgrade TinyMCE to version 5.10 63b89fbd4f Fix #9494 - Force displaying line breaks to textarea fields 63dc9adf21 Fix #9530 - Fatal error on rendering page after upload 59d0b42cf0 Fix Module Builder Acceptance Tests 29f18cf248 Fix AOR_Report unit tests ccbb40ca4a Fix scrm-core#87 - Prevent disabling the default lang 4c83fe64a3 Fix #9437 - Use application setCookie across the app b293490c65 Fix #9437 - Change cookie_path handling 4e8924e549 Fix #3157 - Add default option to enable session_gc 120e948307 Fix #9438 - Adding Action keyword to fieldname exception e037232900 Fix #8599 - Auto-close message boxes in ModuleBuilder 277d40b61a Fix #9435 - Dropdown doesn't return empty selected value git-subtree-dir: public/legacy git-subtree-split: 5750e66a060310494cc12b074062ffd36658bc1e
64 lines
2.7 KiB
PHP
Executable file
64 lines
2.7 KiB
PHP
Executable file
<?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".
|
|
*/
|
|
|
|
$field = $_REQUEST['field'];
|
|
$removeFile = "upload://{$_REQUEST[$field . '_record_id'] }_" . $field;
|
|
$bean = BeanFactory::getBean($_REQUEST['module'], $_REQUEST[$field . "_record_id"]);
|
|
|
|
if (!$bean->ACLAccess('save')){
|
|
throw new RuntimeException('Not authorized');
|
|
}
|
|
|
|
if (file_exists($removeFile)) {
|
|
if (!unlink($removeFile)) {
|
|
$GLOBALS['log']->error("*** Could not unlink() file: [ {$removeFile} ]");
|
|
} else {
|
|
$bean->$field = '';
|
|
$bean->save();
|
|
echo "true";
|
|
}
|
|
} else {
|
|
$bean->$field = '';
|
|
$bean->save();
|
|
echo 'true';
|
|
}
|