@@ -57,6 +57,7 @@ class System
|
|||||||
'wsdl_cache' => 1,
|
'wsdl_cache' => 1,
|
||||||
'memory_limit' => "256M",
|
'memory_limit' => "256M",
|
||||||
'time_zone' => 'America/New_York',
|
'time_zone' => 'America/New_York',
|
||||||
|
'expiration_year' => '1',
|
||||||
'memcached' => 0,
|
'memcached' => 0,
|
||||||
'memcached_server' => '',
|
'memcached_server' => '',
|
||||||
'default_skin' => 'neoclassic',
|
'default_skin' => 'neoclassic',
|
||||||
|
|||||||
@@ -64,6 +64,10 @@ class adminProxy extends HttpProxyController
|
|||||||
$updatedConf['time_zone'] = $httpData->time_zone;
|
$updatedConf['time_zone'] = $httpData->time_zone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($sysConf['expiration_year'] != $httpData->expiration_year) {
|
||||||
|
$updatedConf['expiration_year'] = $httpData->expiration_year;
|
||||||
|
}
|
||||||
|
|
||||||
$httpData->memory_limit .= 'M';
|
$httpData->memory_limit .= 'M';
|
||||||
if ($sysConf['memory_limit'] != $httpData->memory_limit) {
|
if ($sysConf['memory_limit'] != $httpData->memory_limit) {
|
||||||
$updatedConf['memory_limit'] = $httpData->memory_limit;
|
$updatedConf['memory_limit'] = $httpData->memory_limit;
|
||||||
|
|||||||
@@ -13,6 +13,16 @@ $uploadMaxSize = (int) $UPLOAD_MAX_SIZE * $mul;
|
|||||||
if ($postMaxSize < $uploadMaxSize) {
|
if ($postMaxSize < $uploadMaxSize) {
|
||||||
$uploadMaxSize = $postMaxSize;
|
$uploadMaxSize = $postMaxSize;
|
||||||
}
|
}
|
||||||
|
//Add year by expiration date
|
||||||
|
$expirationDate = 1;
|
||||||
|
$envFile = PATH_CONFIG . 'env.ini';
|
||||||
|
if (file_exists($envFile) ) {
|
||||||
|
$sysConf = System::getSystemConfiguration($envFile);
|
||||||
|
if(isset($sysConf['expiration_year']) && $sysConf['expiration_year']>0){
|
||||||
|
$expirationDate = $sysConf['expiration_year'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$languageManagement = 0;
|
$languageManagement = 0;
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
||||||
@@ -31,6 +41,7 @@ $oHeadPublisher->assign( 'MAX_FILES_SIZE', ' (' . $UPLOAD_MAX_SIZE . ') ' );
|
|||||||
$oHeadPublisher->assign('SYSTEM_TIME_ZONE', $arraySystemConfiguration['time_zone']);
|
$oHeadPublisher->assign('SYSTEM_TIME_ZONE', $arraySystemConfiguration['time_zone']);
|
||||||
$oHeadPublisher->assign('TIME_ZONE_DATA', array_map(function ($value) { return [$value, $value]; }, DateTimeZone::listIdentifiers()));
|
$oHeadPublisher->assign('TIME_ZONE_DATA', array_map(function ($value) { return [$value, $value]; }, DateTimeZone::listIdentifiers()));
|
||||||
$oHeadPublisher->assign('__SYSTEM_UTC_TIME_ZONE__', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 1 : 0);
|
$oHeadPublisher->assign('__SYSTEM_UTC_TIME_ZONE__', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 1 : 0);
|
||||||
|
$oHeadPublisher->assign('EXPIRATION_DATE', (int)$expirationDate);
|
||||||
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
|
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
|
||||||
|
|
||||||
G::RenderPage( 'publish', 'extJs' );
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
|
|||||||
@@ -28,6 +28,16 @@ $uploadMaxSize = (int) $UPLOAD_MAX_SIZE * $mul;
|
|||||||
if ($postMaxSize < $uploadMaxSize) {
|
if ($postMaxSize < $uploadMaxSize) {
|
||||||
$uploadMaxSize = $postMaxSize;
|
$uploadMaxSize = $postMaxSize;
|
||||||
}
|
}
|
||||||
|
//Add year by expiration date
|
||||||
|
$expirationDate = 1;
|
||||||
|
$envFile = PATH_CONFIG . 'env.ini';
|
||||||
|
if (file_exists($envFile) ) {
|
||||||
|
$sysConf = System::getSystemConfiguration($envFile);
|
||||||
|
if(isset($sysConf['expiration_year']) && $sysConf['expiration_year']>0){
|
||||||
|
$expirationDate = $sysConf['expiration_year'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$languageManagement = 0;
|
$languageManagement = 0;
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
||||||
@@ -51,6 +61,7 @@ $oHeadPublisher->assign( 'MODE', '' );
|
|||||||
$oHeadPublisher->assign('SYSTEM_TIME_ZONE', $arraySystemConfiguration['time_zone']);
|
$oHeadPublisher->assign('SYSTEM_TIME_ZONE', $arraySystemConfiguration['time_zone']);
|
||||||
$oHeadPublisher->assign('TIME_ZONE_DATA', array_map(function ($value) { return [$value, $value]; }, DateTimeZone::listIdentifiers()));
|
$oHeadPublisher->assign('TIME_ZONE_DATA', array_map(function ($value) { return [$value, $value]; }, DateTimeZone::listIdentifiers()));
|
||||||
$oHeadPublisher->assign('__SYSTEM_UTC_TIME_ZONE__', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 1 : 0);
|
$oHeadPublisher->assign('__SYSTEM_UTC_TIME_ZONE__', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 1 : 0);
|
||||||
|
$oHeadPublisher->assign('EXPIRATION_DATE', (int)$expirationDate);
|
||||||
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
|
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
|
||||||
|
|
||||||
G::RenderPage( 'publish', 'extJs' );
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
|
|||||||
@@ -16,6 +16,15 @@ $uploadMaxSize = (int) $UPLOAD_MAX_SIZE * $mul;
|
|||||||
if ($postMaxSize < $uploadMaxSize) {
|
if ($postMaxSize < $uploadMaxSize) {
|
||||||
$uploadMaxSize = $postMaxSize;
|
$uploadMaxSize = $postMaxSize;
|
||||||
}
|
}
|
||||||
|
//Add year by expiration date
|
||||||
|
$expirationDate = 1;
|
||||||
|
$envFile = PATH_CONFIG . 'env.ini';
|
||||||
|
if (file_exists($envFile) ) {
|
||||||
|
$sysConf = System::getSystemConfiguration($envFile);
|
||||||
|
if(isset($sysConf['expiration_year']) && $sysConf['expiration_year']>0){
|
||||||
|
$expirationDate = $sysConf['expiration_year'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$languageManagement = 0;
|
$languageManagement = 0;
|
||||||
|
|
||||||
@@ -36,6 +45,7 @@ $oHeadPublisher->assign('MAX_FILES_SIZE', ' (' . $UPLOAD_MAX_SIZE . ') ');
|
|||||||
$oHeadPublisher->assign('SYSTEM_TIME_ZONE', $arraySystemConfiguration['time_zone']);
|
$oHeadPublisher->assign('SYSTEM_TIME_ZONE', $arraySystemConfiguration['time_zone']);
|
||||||
$oHeadPublisher->assign('TIME_ZONE_DATA', array_map(function ($value) { return [$value, $value]; }, DateTimeZone::listIdentifiers()));
|
$oHeadPublisher->assign('TIME_ZONE_DATA', array_map(function ($value) { return [$value, $value]; }, DateTimeZone::listIdentifiers()));
|
||||||
$oHeadPublisher->assign('__SYSTEM_UTC_TIME_ZONE__', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 1 : 0);
|
$oHeadPublisher->assign('__SYSTEM_UTC_TIME_ZONE__', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 1 : 0);
|
||||||
|
$oHeadPublisher->assign('EXPIRATION_DATE', (int)$expirationDate);
|
||||||
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
|
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
|
||||||
|
|
||||||
G::RenderPage( 'publish', 'extJs' );
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
|
|||||||
@@ -85,6 +85,31 @@ Ext.onReady(function(){
|
|||||||
|
|
||||||
cmbTimeZone.setValue(sysConf.time_zone);
|
cmbTimeZone.setValue(sysConf.time_zone);
|
||||||
|
|
||||||
|
txtExpirationYear = new Ext.form.TextField({
|
||||||
|
xtype: 'numberfield',
|
||||||
|
id : 'expiration_year',
|
||||||
|
name : 'expiration_year',
|
||||||
|
fieldLabel: _('ID_DEFAULT_EXPIRATION_YEAR'),
|
||||||
|
allowBlank: false,
|
||||||
|
allowNegative: false,
|
||||||
|
value: 1,
|
||||||
|
maxlength: 15,
|
||||||
|
minValue: 1,
|
||||||
|
validator: function(value){
|
||||||
|
if(value > 0) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
PMExt.error( _('ID_ERROR'), _('ERROR_ONLY_POSITIVE_NUMBER'));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
listeners:{
|
||||||
|
change: function(){
|
||||||
|
changeSettings();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
txtExpirationYear.setValue(sysConf.expiration_year);
|
||||||
|
|
||||||
saveButton = new Ext.Action({
|
saveButton = new Ext.Action({
|
||||||
text : _('ID_SAVE_SETTINGS'),
|
text : _('ID_SAVE_SETTINGS'),
|
||||||
disabled : true,
|
disabled : true,
|
||||||
@@ -122,6 +147,7 @@ Ext.onReady(function(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
,txtExpirationYear
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ Ext.onReady(function () {
|
|||||||
editable : false,
|
editable : false,
|
||||||
readOnly : readMode,
|
readOnly : readMode,
|
||||||
width : 120,
|
width : 120,
|
||||||
value : (new Date().add(Date.YEAR, 1)).format("Y-m-d")
|
value : (new Date().add(Date.YEAR, EXPIRATION_DATE)).format("Y-m-d")
|
||||||
});
|
});
|
||||||
|
|
||||||
storeCalendar = new Ext.data.Store({
|
storeCalendar = new Ext.data.Store({
|
||||||
|
|||||||
Reference in New Issue
Block a user