Files
luos/workflow/engine/methods/setup/appCacheViewConf.php

37 lines
1.2 KiB
PHP
Raw Normal View History

<?php
2020-04-09 17:45:04 -04:00
/**
* Rebuilding the cases list cache and changing the MySQL credentials
*
* @see processWorkspace()
*
* @link https://wiki.processmaker.com/3.2/Clearing_the_Case_List_Cache
*/
2020-04-09 17:45:04 -04:00
use ProcessMaker\Core\Installer;
2020-04-09 17:45:04 -04:00
global $RBAC;
$RBAC->requirePermissions('PM_SETUP');
// Define the content of the case list cache builder
$headPublisher = headPublisher::getSingleton();
$headPublisher->addExtJsScript('setup/appCacheViewConf', false); //adding a javascript file .js
$headPublisher->addContent('setup/appCacheViewConf'); //adding a html file .html.
// Get some configurations
$conf = new Configurations();
$conf->loadConfig($x, 'APP_CACHE_VIEW_ENGINE', '', '', '', '');
$lang = isset($conf->aConfig['LANG']) ? $conf->aConfig['LANG'] : 'en';
// Assign the language configured
$headPublisher->assign('currentLang', $lang);
// Get the mysql version
$mysqlVersion = getMysqlVersion();
$maxMysqlVersion = InstallerModule::MYSQL_VERSION_MAXIMUM_SUPPORTED;
if (version_compare($mysqlVersion, $maxMysqlVersion, '<')) {
$userNameMaxLength = 16;
} else {
2020-04-09 17:45:04 -04:00
$userNameMaxLength = 32;
}
2020-04-09 17:45:04 -04:00
$headPublisher->assign('userNameMaxLength', $userNameMaxLength);
2020-04-09 17:45:04 -04:00
G::RenderPage('publish', 'extJs');