Merge remote branch 'upstream/master' into BUG-10834

This commit is contained in:
Hector Cortez
2013-03-25 16:22:17 -04:00
7 changed files with 74 additions and 13 deletions

View File

@@ -44,6 +44,11 @@ class Admin extends Controller
// $c = new Configurations();
// $configPage = $c->getConfiguration('usersList', 'pageSize','',$_SESSION['USER_LOGGED']);
// $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
if (isset($sysConf["session.gc_maxlifetime"])) {
$sysConf["session_gc_maxlifetime"] = $sysConf["session.gc_maxlifetime"];
} else {
$sysConf["session_gc_maxlifetime"] = ini_get('session.gc_maxlifetime');
}
$this->setJSVar( 'skinsList', $skins );
$this->setJSVar( 'languagesList', $languagesList );
@@ -90,7 +95,8 @@ class Admin extends Controller
$fields = $calendarObj->getCalendarInfoE( $CalendarUid );
$fields['OLD_NAME'] = $fields['CALENDAR_NAME'];
}
if (! isset( $fields['CALENDAR_UID'] )) { //For a new Calendar
// For a new Calendar
if (! isset( $fields['CALENDAR_UID'] )) {
$fields['CALENDAR_UID'] = $CalendarUid;
$fields['OLD_NAME'] = '';
@@ -99,7 +105,8 @@ class Admin extends Controller
$fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_START'] = "09:00";
$fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_END'] = "17:00";
}
if ((isset( $_GET['cp'] )) && ($_GET['cp'] == 1)) { // Copy Calendar
// Copy Calendar
if ((isset( $_GET['cp'] )) && ($_GET['cp'] == 1)) {
$fields['CALENDAR_UID'] = G::GenerateUniqueID();
$fields['CALENDAR_NAME'] = G::LoadTranslation( "ID_COPY_OF" ) . " " . $fields['CALENDAR_NAME'];
$fields['OLD_NAME'] = $fields['CALENDAR_NAME'];

View File

@@ -86,6 +86,13 @@ class adminProxy extends HttpProxyController
$updatedConf['proxy_pass'] = G::encrypt($httpData->proxy_pass, 'proxy_pass');
}
$sessionGcMaxlifetime = ini_get('session.gc_maxlifetime');
if (($httpData->max_life_time != "") && ($sessionGcMaxlifetime != $httpData->max_life_time)) {
if (!isset($sysConf['session.gc_maxlifetime']) || ($sysConf['session.gc_maxlifetime'] != $httpData->max_life_time)) {
$updatedConf['session.gc_maxlifetime'] = $httpData->max_life_time;
}
}
if ($updateRedirector) {
if (!file_exists(PATH_HTML . 'index.html')) {
throw new Exception('The index.html file is not writable on workflow/public_html directory.');

View File

@@ -61,13 +61,30 @@ try {
switch ($type) {
case 'HTML':
//$G_PUBLISH->AddContent('xmlform', 'xmlform', 'outputdocs/outputdocs_Edit', '', $aFields , '../outputdocs/outputdocs_Save');
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->assign( 'OUT_DOC_UID', $_GET['OUT_DOC_UID'] );
$translations = G::getTranslations( Array ('ID_FILE','ID_OUT_PUT_DOC_UPLOAD_TITLE','ID_UPLOADING_FILE','ID_UPLOAD','ID_CANCEL','ID_SAVE','ID_LOAD_FROM_FILE','ID_SELECT_TEMPLATE_FILE','ID_ALERT_MESSAGE','ID_INVALID_FILE') );
// $oHeadPublisher->assign('TRANSLATIONS', $translations);
$oHeadPublisher->addExtJsScript( 'outputdocs/htmlEditor', false ); //adding a javascript file .js
G::RenderPage( 'publish', 'extJs' );
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
$fcontent = '';
$proUid = '';
$filename = '';
$title = '';
require_once 'classes/model/OutputDocument.php';
$oOutputDocument = new OutputDocument();
if (isset( $_REQUEST['OUT_DOC_UID'] )) {
$aFields = $oOutputDocument->load( $_REQUEST['OUT_DOC_UID'] );
$fcontent = $aFields['OUT_DOC_TEMPLATE'];
$proUid = $aFields['PRO_UID'];
$filename = $aFields['OUT_DOC_FILENAME'];
$title = $aFields['OUT_DOC_TITLE'];
}
$aData = Array (
'PRO_UID' => $proUid,
'OUT_DOC_TEMPLATE' => $fcontent,
'FILENAME' => $filename,
'OUT_DOC_UID'=> $_REQUEST['OUT_DOC_UID'],
'OUT_DOC_TITLE'=> $title,
);
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'outputdocs/outputdocs_Edit', '', $aData );
G::RenderPage( 'publish', 'blank' );
die();
break;
case 'JRXML':

View File

@@ -101,12 +101,26 @@ Ext.onReady(function(){
name : 'memory_limit',
fieldLabel: _('ID_MEMORY_LIMIT'),
allowBlank: false,
autoCreate: {tag: "input", type: "text", autocomplete: "off", maxlength: 15 },
value: sysConf.memory_limit,
listeners:{
change: function(){
changeSettings();
}
}
}, {
xtype: 'numberfield',
id : 'max_life_time',
name : 'max_life_time',
fieldLabel: _('ID_MAX_LIFETIME'),
// allowBlank: false,
autoCreate: {tag: "input", type: "text", autocomplete: "off", maxlength: 15 },
value: sysConf.session_gc_maxlifetime,
listeners:{
change: function(){
changeSettings();
}
}
}
]
});

View File

@@ -20,7 +20,19 @@
function cancel(){
tinyMCE.execCommand('mceRemoveControl',false,'form[OUT_DOC_TEMPLATE]');
outputdocsEditor.remove();
if (( _BROWSER.name == 'msie' ) && ( _BROWSER.version < '9' )) {
window.close();
} else {
outputdocsEditor.remove();
}
}
if (( _BROWSER.name == 'msie' ) && ( _BROWSER.version < '9' )) {
function outputdocsSave( form ) {
tinyMCE.execCommand('mceRemoveControl',false,'form[OUT_DOC_TEMPLATE]');
form.action = '../outputdocs/outputdocs_Save';
ajax_post( form.action, form, 'POST' );
window.close();
}
}
]]></JS>

View File

@@ -25,7 +25,7 @@ var outputdocsEditor;
var left = (screen.width/2)-(w/2);
var top = (screen.height/2);//-(h/2);
var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
}
////////////////////////////////////////////////////

View File

@@ -223,8 +223,13 @@ define( 'PML_WSDL_URL', PML_SERVER . '/syspmLibrary/en/green/services/wsdl' );
define( 'PML_UPLOAD_URL', PML_SERVER . '/syspmLibrary/en/green/services/uploadProcess' );
define( 'PML_DOWNLOAD_URL', PML_SERVER . '/syspmLibrary/en/green/services/download' );
$config = Bootstrap::getSystemConfiguration();
// starting session
$timelife = ini_get('session.gc_maxlifetime');
if (isset($config['session.gc_maxlifetime'])) {
$timelife = $config['session.gc_maxlifetime'];
} else {
$timelife = ini_get('session.gc_maxlifetime');
}
if (is_null($timelife)) {
$timelife = 1440;
}
@@ -232,7 +237,6 @@ ini_set('session.gc_maxlifetime', $timelife);
ini_set('session.cookie_lifetime', $timelife);
session_start();
$config = Bootstrap::getSystemConfiguration();
$e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL;
$e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all;