init
This commit is contained in:
28
modules/EcmStockDocIns/PDFLanguagesSave.php
Executable file
28
modules/EcmStockDocIns/PDFLanguagesSave.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
global $current_user;
|
||||
if(!is_admin($current_user)) {
|
||||
ACLController::displayNoAccess();
|
||||
return;
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['ecmlanguage']) && $_REQUEST['ecmlanguage'] != '' && isset($_REQUEST['pdflanguagelist']) && $_REQUEST['pdflanguagelist'] != '') {
|
||||
|
||||
require_once('modules/EcmTexts/EcmText.php');
|
||||
$json = getJSONobj();
|
||||
$pdfll = $json->decode(htmlspecialchars_decode($_REQUEST['pdflanguagelist']));
|
||||
|
||||
global $app_list_strings;
|
||||
foreach($app_list_strings['ecmlanguages_dom'] as $key => $value) {
|
||||
if(isset($pdfll[$key]) && count($pdfll[$key]) > 0)
|
||||
EcmText::SaveText(null,null,'EcmStockDocIns',$key,$pdfll[$key]);
|
||||
}
|
||||
|
||||
echo 'Saved';
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user