/** * Initialize Export * @access private */ function __initExport($languageCode) { // Security check to ensure file is withing the web folder. Vtiger_Utils::checkFileAccessForInclusion("languages/{$languageCode}/Vtiger.php"); $this->_export_modulexml_file = fopen($this->__getManifestFilePath(), 'w'); $this->__write("<?xml version='1.0'?>\n"); }
/** * Initialize Export * @access private */ function __initExport($layoutName) { // Security check to ensure file is withing the web folder. Vtiger_Utils::checkFileAccessForInclusion("layouts/{$layoutName}/skins/vtiger/style.less"); $this->_export_modulexml_file = fopen($this->__getManifestFilePath(), 'w'); $this->__write("<?xml version='1.0'?>\n"); }
/** * Initialize Export * @access private */ function __initExport($module, $moduleInstance) { if($moduleInstance->isentitytype) { // We will be including the file, so do a security check. Vtiger_Utils::checkFileAccessForInclusion("modules/$module/$module.php"); } $this->_export_modulexml_file = fopen($this->__getManifestFilePath(), 'w'); $this->__write("<?xml version='1.0'?>\n"); }
/** * Get instance of the module class. * @param String Module name */ static function getClassInstance($modulename) { if ($modulename == 'Calendar') { $modulename = 'Activity'; } $instance = false; $filepath = "modules/{$modulename}/{$modulename}.php"; if (Vtiger_Utils::checkFileAccessForInclusion($filepath, false)) { checkFileAccessForInclusion($filepath); include_once $filepath; if (class_exists($modulename)) { $instance = new $modulename(); } } return $instance; }
<?php /*+******************************************************************************** * The contents of this file are subject to the vtiger CRM Public License Version 1.0 * ("License"); You may not use this file except in compliance with the License * The Original Code is: vtiger CRM Open Source * The Initial Developer of the Original Code is vtiger. * Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. ********************************************************************************/ include_once 'vtlib/Vtiger/Utils.php'; if (vtlib_purify($_REQUEST['module_settings']) == 'true') { $targetmodule = vtlib_purify($_REQUEST['formodule']); $targetSettingPage = "modules/{$targetmodule}/Settings.php"; if (file_exists($targetSettingPage)) { Vtiger_Utils::checkFileAccessForInclusion($targetSettingPage); require_once $targetSettingPage; } } else { $modulemanager_uploaddir = 'test/vtlib'; if (vtlib_purify($_REQUEST['module_import']) != '') { require_once 'modules/Settings/ModuleManager/Import.php'; exit; } else { if (vtlib_purify($_REQUEST['module_update']) != '') { require_once 'modules/Settings/ModuleManager/Update.php'; exit; } else { if (vtlib_purify($_REQUEST['module_import_cancel']) == 'true') { $uploadfile = vtlib_purify($_REQUEST['module_import_file']); $uploadfilename = "{$modulemanager_uploaddir}/{$uploadfile}";