Merge branch 'master' of bitbucket.org:colosa/processmaker
This commit is contained in:
@@ -78,7 +78,7 @@ CREATE TABLE `RBAC_USERS`
|
||||
(
|
||||
`USR_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`USR_USERNAME` VARCHAR(100) default '' NOT NULL,
|
||||
`USR_PASSWORD` VARCHAR(32) default '' NOT NULL,
|
||||
`USR_PASSWORD` VARCHAR(128) default '' NOT NULL,
|
||||
`USR_FIRSTNAME` VARCHAR(50) default '' NOT NULL,
|
||||
`USR_LASTNAME` VARCHAR(50) default '' NOT NULL,
|
||||
`USR_EMAIL` VARCHAR(100) default '' NOT NULL,
|
||||
|
||||
@@ -12,7 +12,7 @@ if (CLI2) {
|
||||
Download and install an addon
|
||||
EOT
|
||||
);
|
||||
CLI::taskRun(run_addon_install);
|
||||
CLI::taskRun(run_addon_core_install);
|
||||
} else {
|
||||
pake_desc("install addon");
|
||||
pake_task("addon-install");
|
||||
@@ -28,8 +28,8 @@ CLI::taskArg('workspace', false);
|
||||
CLI::taskArg('hash', false);
|
||||
CLI::taskRun("change_hash");
|
||||
|
||||
//function run_addon_install($args, $opts) {
|
||||
function run_addon_install($args)
|
||||
//function run_addon_core_install($args, $opts) {
|
||||
function run_addon_core_install($args)
|
||||
{
|
||||
try {
|
||||
if (!extension_loaded("mysql")) {
|
||||
|
||||
@@ -447,7 +447,7 @@ function run_workspace_restore($args, $opts) {
|
||||
$workspace = array_key_exists("workspace", $opts) ? $opts['workspace'] : NULL;
|
||||
$overwrite = array_key_exists("overwrite", $opts);
|
||||
$multiple = array_key_exists("multiple", $opts);
|
||||
$dstWorkspace = $args[1];
|
||||
$dstWorkspace = isset($args[1]) ? $args[1] : null;
|
||||
if(!empty($multiple)){
|
||||
if(!Bootstrap::isLinuxOs()){
|
||||
CLI::error("This is not a Linux enviroment, cannot use this multiple [-m] feature.\n");
|
||||
|
||||
@@ -62,6 +62,13 @@ class workspaceTools
|
||||
*/
|
||||
public function upgrade($first = false, $buildCacheView = false, $workSpace = SYS_SYS, $onedb = false, $lang = 'en')
|
||||
{
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Verify enterprise old...\n");
|
||||
$this->verifyEnterprise($workSpace);
|
||||
$stop = microtime(true);
|
||||
$final = $stop - $start;
|
||||
CLI::logging("<*> Verify took $final seconds.\n");
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Updating database...\n");
|
||||
$this->upgradeDatabase($onedb);
|
||||
@@ -1630,5 +1637,60 @@ class workspaceTools
|
||||
G::LoadClass("enterprise");
|
||||
enterpriseClass::setHashPassword($response);
|
||||
}
|
||||
|
||||
public function verifyEnterprise ($workspace)
|
||||
{
|
||||
$this->initPropel( true );
|
||||
$pathBackup = PATH_DATA . 'backups';
|
||||
if (!file_exists($pathBackup)) {
|
||||
G::mk_dir($pathBackup, 0777);
|
||||
}
|
||||
$pathNewFile = PATH_DATA . 'backups' . PATH_SEP . 'enterpriseBackup';
|
||||
$pathDirectoryEnterprise = PATH_CORE . 'plugins' . PATH_SEP . 'enterprise';
|
||||
$pathFileEnterprise = PATH_CORE . 'plugins' . PATH_SEP . 'enterprise.php';
|
||||
|
||||
if (!file_exists($pathDirectoryEnterprise) && !file_exists(PATH_PLUGIN . 'enterprise.php')) {
|
||||
CLI::logging(" Without changes... \n");
|
||||
return true;
|
||||
}
|
||||
CLI::logging(" Migrating Enterprise Core version...\n");
|
||||
if (!file_exists($pathNewFile)) {
|
||||
CLI::logging(" Creating folder in $pathNewFile\n");
|
||||
G::mk_dir($newDiretory, 0777);
|
||||
}
|
||||
$shared_stat = stat(PATH_DATA);
|
||||
if (file_exists($pathDirectoryEnterprise)) {
|
||||
CLI::logging(" Copying Enterprise Directory to $pathNewFile...\n");
|
||||
|
||||
if ($shared_stat !== false) {
|
||||
workspaceTools::dirPerms($pathDirectoryEnterprise, $shared_stat['uid'], $shared_stat['gid'], $shared_stat['mode']);
|
||||
} else {
|
||||
CLI::logging(CLI::error("Could not get shared folder permissions, workspace permissions couldn't be changed") . "\n");
|
||||
}
|
||||
if (G::recursive_copy($pathDirectoryEnterprise, $pathNewFile . PATH_SEP. 'enterprise')) {
|
||||
CLI::logging(" Removing $pathDirectoryEnterprise...\n");
|
||||
G::rm_dir($pathDirectoryEnterprise);
|
||||
} else {
|
||||
CLI::logging(CLI::error(" Error: Failure to copy from $pathDirectoryEnterprise...\n"));
|
||||
}
|
||||
if (file_exists($pathDirectoryEnterprise)) {
|
||||
CLI::logging(CLI::info(" Remove manually $pathDirectoryEnterprise...\n"));
|
||||
}
|
||||
}
|
||||
if (file_exists($pathFileEnterprise)) {
|
||||
CLI::logging(" Copying Enterprise.php file to $pathNewFile...\n");
|
||||
if ($shared_stat !== false) {
|
||||
workspaceTools::dirPerms($pathFileEnterprise, $shared_stat['uid'], $shared_stat['gid'], $shared_stat['mode']);
|
||||
} else {
|
||||
CLI::logging(CLI::error("Could not get shared folder permissions, workspace permissions couldn't be changed") . "\n");
|
||||
}
|
||||
CLI::logging(" Removing $pathFileEnterprise...\n");
|
||||
copy($pathFileEnterprise , $pathNewFile. PATH_SEP . 'enterprise.php');
|
||||
G::rm_dir($pathFileEnterprise);
|
||||
if (file_exists($pathFileEnterprise)) {
|
||||
CLI::logging(CLI::info(" Remove manually $pathFileEnterprise...\n"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class AddonsManager extends BaseAddonsManager
|
||||
*/
|
||||
|
||||
public function getDownloadFilename()
|
||||
{
|
||||
{
|
||||
$filename = $this->getAddonDownloadFilename();
|
||||
if (!isset($filename) || empty($filename)) {
|
||||
$filename = "download.tar";
|
||||
@@ -37,7 +37,7 @@ class AddonsManager extends BaseAddonsManager
|
||||
}
|
||||
|
||||
public function getDownloadDirectory()
|
||||
{
|
||||
{
|
||||
$dir = PATH_DATA . "upgrade/{$this->getStoreId()}_{$this->getAddonName()}";
|
||||
if (!file_exists($dir)) {
|
||||
mkdir($dir, 0777, true);
|
||||
@@ -52,7 +52,7 @@ class AddonsManager extends BaseAddonsManager
|
||||
* if file exists but md5 for the download is not available.
|
||||
*/
|
||||
public function checkDownload()
|
||||
{
|
||||
{
|
||||
$filename = $this->getDownloadFilename();
|
||||
if (!file_exists($filename)) {
|
||||
return false;
|
||||
@@ -70,7 +70,7 @@ class AddonsManager extends BaseAddonsManager
|
||||
* @return bool true if is of type 'plugin', false otherwise
|
||||
*/
|
||||
public function isPlugin()
|
||||
{
|
||||
{
|
||||
return ($this->getAddonType() == 'plugin');
|
||||
}
|
||||
|
||||
@@ -166,17 +166,17 @@ class AddonsManager extends BaseAddonsManager
|
||||
return (null);
|
||||
}
|
||||
|
||||
///////
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$details = $oPluginRegistry->getPluginDetails($this->getAddonName() . ".php");
|
||||
$v = (!($details == null))? $details->iVersion : null;
|
||||
|
||||
if ($v != "") {
|
||||
return ($v);
|
||||
}
|
||||
|
||||
if (file_exists(PATH_PLUGINS . $this->getAddonName() . PATH_SEP . "VERSION")) {
|
||||
return (trim(file_get_contents(PATH_PLUGINS . $this->getAddonName() . PATH_SEP . "VERSION")));
|
||||
}
|
||||
|
||||
///////
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$details = $oPluginRegistry->getPluginDetails($this->getAddonName() . ".php");
|
||||
|
||||
$v = (!($details == null))? $details->iVersion : null;
|
||||
return ($v);
|
||||
} else {
|
||||
if ($this->getAddonType() == "core") {
|
||||
throw new Exception("Addon type \"" . $this->getAddonType() . "\" unsupported");
|
||||
|
||||
@@ -1012,6 +1012,7 @@ CREATE TABLE `FIELDS`
|
||||
`FLD_NULL` TINYINT default 1 NOT NULL,
|
||||
`FLD_AUTO_INCREMENT` TINYINT default 0 NOT NULL,
|
||||
`FLD_KEY` TINYINT default 0 NOT NULL,
|
||||
`FLD_TABLE_INDEX` TINYINT default 0 NOT NULL,
|
||||
`FLD_FOREIGN_KEY` TINYINT default 0 NOT NULL,
|
||||
`FLD_FOREIGN_KEY_TABLE` VARCHAR(32) default '' NOT NULL,
|
||||
`FLD_DYN_NAME` VARCHAR(128) default '',
|
||||
|
||||
@@ -100,7 +100,7 @@ if ($fields['AUTH_SOURCE_PROVIDER'] == 'ldap') {
|
||||
G::LoadClass("pmFunctions");
|
||||
|
||||
$data = executeQuery("DESCRIBE USERS");
|
||||
$fieldSet = array("USR_UID", "USR_USERNAME", "USR_PASSWORD", "USR_EMAIL", "USR_CREATE_DATE", "USR_UPDATE_DATE", "USR_COUNTRY", "USR_CITY", "USR_LOCATION", "DEP_UID", "USR_RESUME", "USR_ROLE", "USR_REPORTS_TO", "USR_REPLACED_BY", "USR_UX");
|
||||
$fieldSet = array("USR_UID", "USR_USERNAME", "USR_PASSWORD", "USR_CREATE_DATE", "USR_UPDATE_DATE", "USR_COUNTRY", "USR_CITY", "USR_LOCATION", "DEP_UID", "USR_RESUME", "USR_ROLE", "USR_REPORTS_TO", "USR_REPLACED_BY", "USR_UX");
|
||||
$attributes = null;
|
||||
|
||||
foreach ($data as $value) {
|
||||
|
||||
@@ -55,7 +55,7 @@ if (file_exists( PATH_PLUGINS . $fields['AUTH_SOURCE_PROVIDER'] . PATH_SEP . $fi
|
||||
G::LoadClass("pmFunctions");
|
||||
|
||||
$data = executeQuery("DESCRIBE USERS");
|
||||
$fieldSet = array("USR_UID", "USR_USERNAME", "USR_PASSWORD", "USR_EMAIL", "USR_CREATE_DATE", "USR_UPDATE_DATE", "USR_COUNTRY", "USR_CITY", "USR_LOCATION", "DEP_UID", "USR_RESUME", "USR_ROLE", "USR_REPORTS_TO", "USR_REPLACED_BY", "USR_UX");
|
||||
$fieldSet = array("USR_UID", "USR_USERNAME", "USR_PASSWORD", "USR_CREATE_DATE", "USR_UPDATE_DATE", "USR_COUNTRY", "USR_CITY", "USR_LOCATION", "DEP_UID", "USR_RESUME", "USR_ROLE", "USR_REPORTS_TO", "USR_REPLACED_BY", "USR_UX");
|
||||
$attributes = null;
|
||||
|
||||
foreach ($data as $value) {
|
||||
|
||||
@@ -27,7 +27,7 @@ function runBgProcessmaker($task, $log)
|
||||
|
||||
$elem = array_shift($data); //delete first element
|
||||
|
||||
run_addon_install($data);
|
||||
run_addon_core_install($data);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
@@ -374,7 +374,7 @@ Ext.onReady(function () {
|
||||
renderer: function (value, metaData, record, rowIndex, colIndex, store)
|
||||
{
|
||||
var arrayMatch = [];
|
||||
var newValue = value;
|
||||
var newValue = _(value);
|
||||
|
||||
if ((arrayMatch = /^\*\*(.+)\*\*$/.exec(value))) {
|
||||
newValue = _(arrayMatch[1]);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<td class="FormTitle" colspan="2" align="">{$form.TITLE}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel" width="{$form_labelWidth}">{$INP_DOC_TITLE}</td>
|
||||
<td class="FormLabel" width="{$form_labelWidth}"><font color="red">* </font>{$INP_DOC_TITLE}</td>
|
||||
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.INP_DOC_TITLE} </td> //-->
|
||||
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.INP_DOC_TITLE}</td>
|
||||
</tr>
|
||||
@@ -57,13 +57,13 @@
|
||||
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.INP_DOC_TAGS}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel" width="{$form_labelWidth}">{$INP_DOC_TYPE_FILE}</td>
|
||||
<td class="FormLabel" width="{$form_labelWidth}"><font color="red">* </font>{$INP_DOC_TYPE_FILE}</td>
|
||||
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.INP_DOC_TYPE_FILE} </td> //-->
|
||||
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.INP_DOC_TYPE_FILE}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='FormLabel' width="{$form_labelWidth}">{$INP_DOC_MAX_FILESIZE}</td>
|
||||
<td class='FormLabel' width="{$form_labelWidth}"><font color="red">* </font>{$INP_DOC_MAX_FILESIZE}</td>
|
||||
<td class='FormFieldContent' >{$form.INP_DOC_MAX_FILESIZE} {$form.INP_DOC_MAX_FILESIZE_UNIT} {$INP_DOC_UPLOAD_MAX_FILESIZE_LABEL} {$form.INP_DOC_UPLOAD_MAX_FILESIZE_LABEL}</td>
|
||||
</tr>
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</div>
|
||||
<div class="FormRequiredTextMessage"><font color="red">* </font>{php}echo (G::LoadTranslation('ID_REQUIRED_FIELD'));{/php}</div>
|
||||
<div class="boxBottom"><div class="a"></div><div class="b"></div><div class="c"></div></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
<INP_DOC_TAGS type="textpm" size="30" maxlength="200" showVars="1" process="@#PRO_UID" symbol="@#" validate="Tag">
|
||||
<en><![CDATA[Tags]]></en>
|
||||
</INP_DOC_TAGS>
|
||||
<INP_DOC_TYPE_FILE type="text" maxlength="200" size="37" colWidth="200" titleAlign="left" align="left" hint="To verify that the content of the file is the correct according to its extension, it is necessary to enable the FILEINFO extension, if this is not enabled only the extension will be verified." dataCompareField="T.CON_VALUE" dataCompareType="contains">
|
||||
<en><![CDATA[Allowed file extensions (use *.* to allow any extension)]]></en>
|
||||
<INP_DOC_TYPE_FILE type="text" defaultvalue="*.*" maxlength="200" size="37" colWidth="200" titleAlign="left" align="left" hint="To verify that the content of the file is the correct according to its extension, it is necessary to enable the FILEINFO extension, if this is not enabled only the extension will be verified." dataCompareField="T.CON_VALUE" dataCompareType="contains">
|
||||
<en><![CDATA[Allowed file extensions (Use *.* to allow any extension)]]></en>
|
||||
</INP_DOC_TYPE_FILE>
|
||||
|
||||
<INP_DOC_MAX_FILESIZE type="text" defaultvalue="0" maxlength="10" size="8" mode="edit">
|
||||
|
||||
@@ -52,7 +52,7 @@ var currentPagedTable = @#PAGED_TABLE_ID;
|
||||
|
||||
maxFilesize = maxFilesize * ((maxFilesizeUnit == "MB")? 1024 * 1024 : 1024);
|
||||
|
||||
if (maxFilesize != "" && maxFilesize != 0) {
|
||||
if (getField("INP_DOC_MAX_FILESIZE").value != "") {
|
||||
if(maxFilesize > 0) {
|
||||
if(maxFilesize > uploadMaxFilesize) {
|
||||
new leimnud.module.app.alert().make({label: _("ID_SIZE_VERY_LARGE_PERMITTED")});
|
||||
@@ -60,6 +60,10 @@ var currentPagedTable = @#PAGED_TABLE_ID;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
alert('@G::LoadTranslation(ID_INPUT_DOC_MAX_FILESIZE_REQUIRED)');
|
||||
maxFilesize.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user