Merged in release/3.2.2 (pull request #6026)
Release/3.2.2 Approved-by: Paula Quispe <paula.quispe@processmaker.com>
This commit is contained in:
@@ -113,6 +113,32 @@ class Common
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Maintained for compatibility reasons with the plugin DataReportingTool
|
||||
* @deprecated 3.2.2, by backward compatibility because it is used in plugins enterprise
|
||||
*
|
||||
*/
|
||||
public static function getLastVersion($pattern, $flag = 0)
|
||||
{
|
||||
$files = glob($pattern, $flag);
|
||||
$maxVersion = 0;
|
||||
|
||||
$pattern = str_replace("*", '([0-9\.]+)', basename($pattern));
|
||||
|
||||
foreach ($files as $file) {
|
||||
$filename = basename($file);
|
||||
|
||||
if (preg_match('/'.$pattern.'/', $filename, $match)) {
|
||||
|
||||
if ($maxVersion < $match[1]) {
|
||||
$maxVersion = $match[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $maxVersion;
|
||||
}
|
||||
|
||||
public static function mk_dir($strPath, $rights = 0777)
|
||||
{
|
||||
$folder_path = array($strPath);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Maveriks;
|
||||
|
||||
use Bootstrap;
|
||||
use Maveriks\Util;
|
||||
use ProcessMaker\Core\System;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
@@ -485,10 +486,11 @@ class WebApplication
|
||||
// Change storage path
|
||||
app()->useStoragePath(realpath(PATH_DATA));
|
||||
app()->make(Kernel::class)->bootstrap();
|
||||
error_reporting(error_reporting() & ~E_STRICT & ~E_DEPRECATED);
|
||||
|
||||
\Bootstrap::setLanguage();
|
||||
Bootstrap::setLanguage();
|
||||
|
||||
\Bootstrap::LoadTranslationObject((defined("SYS_LANG")) ? SYS_LANG : "en");
|
||||
Bootstrap::LoadTranslationObject((defined("SYS_LANG")) ? SYS_LANG : "en");
|
||||
|
||||
if (empty($workspace)) {
|
||||
return true;
|
||||
@@ -585,6 +587,11 @@ class WebApplication
|
||||
|
||||
define('TIME_ZONE', ini_get('date.timezone'));
|
||||
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$attributes = $oPluginRegistry->getAttributes();
|
||||
Bootstrap::LoadTranslationPlugins(defined('SYS_LANG') ? SYS_LANG : "en", $attributes);
|
||||
// Initialization functions plugins
|
||||
$oPluginRegistry->init();
|
||||
//Return
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user