require_once 'modules/Studio/config.php';
/////HANDLE AJAX
if (!empty($_REQUEST['ajax'])) {
    ob_clean();
    require_once $GLOBALS['studioConfig']['ajax'][$_REQUEST['ajax']];
    sugar_cleanup(true);
}
echo "\n<p>\n";
echo get_module_title($mod_strings['LBL_MODULE_TITLE'], $mod_strings['LBL_MODULE_TITLE'], true);
echo "\n</p>\n";
$the_module = $_SESSION['studio']['module'];
require_once 'modules/Studio/ajax/relatedfiles.php';
require_once 'modules/Studio/parsers/StudioParser.php';
require_once 'modules/Studio/StudioFields.php';
unset($_SESSION['studio']['lastWizard']);
$parsers = StudioParser::getParsers('');
$parser = $parsers['default'];
if (!empty($_REQUEST['parser'])) {
    $parser = $_REQUEST['parser'];
    require_once $GLOBALS['studioConfig']['parsers'][$_REQUEST['parser']];
} else {
    require_once 'modules/Studio/parsers/' . $parser . '.php';
}
$sp = new $parser();
require_once 'modules/Studio/SugarBackup.php';
$files = $sp->getFiles($the_module);
if (empty($_SESSION['studio']['selectedFileId'])) {
    $keys = array_keys($files);
    $_SESSION['studio']['selectedFileId'] = $keys[0];
}
$studioDef = $files[$_SESSION['studio']['selectedFileId']];
예제 #2
0
 * Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
 * All Rights Reserved.
 * Contributor(s): ______________________________________.
 */
$the_module = $_SESSION['studio']['module'];
require_once 'modules/Studio/ajax/relatedfiles.php';
require_once 'modules/Studio/parsers/StudioParser.php';
require_once 'modules/Studio/StudioFields.php';
$fileDef = StudioParser::getFiles($the_module, $_SESSION['studio']['selectedFileId']);
$file = $fileDef['template_file'];
$file = StudioParser::getWorkingFile($file);
//Instantiate Bean
$the_class = $beanList[$the_module];
require_once $beanFiles[$the_class];
$the_focus = new $the_class();
$parsers = StudioParser::getParsers($file);
$parser = $parsers['default'];
if (!empty($_REQUEST['parser'])) {
    $parser = $_REQUEST['parser'];
}
require_once 'modules/Studio/parsers/' . $parser . '.php';
$sp = new $parser();
$sp->loadFile($file);
$sp->workingModule = $the_module;
$sp->parse($sp->curText);
$sp->focus =& $the_focus;
$sp->handleSave();
//save changes to the labels
if ($sp->labelEditor) {
    StudioParser::handleSaveLabels($the_module, $current_language);
}