HOR-61: new feature expiration date

This commit is contained in:
Paula V. Quispe
2016-06-02 10:23:09 -04:00
parent 005ee3ef2b
commit a922754d1a
7 changed files with 64 additions and 1 deletions

View File

@@ -13,6 +13,16 @@ $uploadMaxSize = (int) $UPLOAD_MAX_SIZE * $mul;
if ($postMaxSize < $uploadMaxSize) {
$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;
/*----------------------------------********---------------------------------*/
$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('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('EXPIRATION_DATE', (int)$expirationDate);
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
G::RenderPage( 'publish', 'extJs' );