mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 05:31:42 +00:00
Merge branch 'develop' into hooks
This commit is contained in:
commit
f753d9fa47
|
@ -28,6 +28,10 @@
|
||||||
- set encoding of terms when adding document to full text index (Bug #66)
|
- set encoding of terms when adding document to full text index (Bug #66)
|
||||||
- droped support for myisam database engine
|
- droped support for myisam database engine
|
||||||
- add support for connecting to ldap servers without anonymous bind
|
- add support for connecting to ldap servers without anonymous bind
|
||||||
|
- if user has a mandatory workflow, don't him/her set a workflow on
|
||||||
|
insert/update of a document
|
||||||
|
- fixed calculation of password strength when simple password strength
|
||||||
|
is set and user data is saved (Bug #69)
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Changes in version 4.2.2
|
Changes in version 4.2.2
|
||||||
|
|
|
@ -88,11 +88,6 @@ foreach($attributes_version as $attrdefid=>$attribute) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(isset($_POST["workflow"]))
|
|
||||||
$workflow = $dms->getWorkflow($_POST["workflow"]);
|
|
||||||
else
|
|
||||||
$workflow = null;
|
|
||||||
|
|
||||||
$reqversion = (int)$_POST["reqversion"];
|
$reqversion = (int)$_POST["reqversion"];
|
||||||
if ($reqversion<1) $reqversion=1;
|
if ($reqversion<1) $reqversion=1;
|
||||||
|
|
||||||
|
@ -184,6 +179,14 @@ foreach ($res as $r){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!$workflow = $user->getMandatoryWorkflow()) {
|
||||||
|
if(isset($_POST["workflow"]))
|
||||||
|
$workflow = $dms->getWorkflow($_POST["workflow"]);
|
||||||
|
else
|
||||||
|
$workflow = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if($settings->_dropFolderDir) {
|
if($settings->_dropFolderDir) {
|
||||||
if(isset($_POST["dropfolderfileform1"]) && $_POST["dropfolderfileform1"]) {
|
if(isset($_POST["dropfolderfileform1"]) && $_POST["dropfolderfileform1"]) {
|
||||||
$fullfile = $settings->_dropFolderDir.'/'.$user->getLogin().'/'.$_POST["dropfolderfileform1"];
|
$fullfile = $settings->_dropFolderDir.'/'.$user->getLogin().'/'.$_POST["dropfolderfileform1"];
|
||||||
|
|
|
@ -168,6 +168,8 @@ if ($_FILES['userfile']['error'] == 0) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$workflow = $user->getMandatoryWorkflow();
|
||||||
|
|
||||||
if(isset($_POST["attributes"]) && $_POST["attributes"]) {
|
if(isset($_POST["attributes"]) && $_POST["attributes"]) {
|
||||||
$attributes = $_POST["attributes"];
|
$attributes = $_POST["attributes"];
|
||||||
foreach($attributes as $attrdefid=>$attribute) {
|
foreach($attributes as $attrdefid=>$attribute) {
|
||||||
|
@ -184,7 +186,7 @@ if ($_FILES['userfile']['error'] == 0) {
|
||||||
$attributes = array();
|
$attributes = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
$contentResult=$document->addContent($comment, $user, $userfiletmp, basename($userfilename), $fileType, $userfiletype, $reviewers, $approvers, $version=0, $attributes);
|
$contentResult=$document->addContent($comment, $user, $userfiletmp, basename($userfilename), $fileType, $userfiletype, $reviewers, $approvers, $version=0, $attributes, $workflow);
|
||||||
if (is_bool($contentResult) && !$contentResult) {
|
if (is_bool($contentResult) && !$contentResult) {
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured"));
|
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -202,9 +202,12 @@ else if ($action == "edituser") {
|
||||||
if($settings->_passwordStrength) {
|
if($settings->_passwordStrength) {
|
||||||
$ps = new Password_Strength();
|
$ps = new Password_Strength();
|
||||||
$ps->set_password($_POST["pwd"]);
|
$ps->set_password($_POST["pwd"]);
|
||||||
|
if($settings->_passwordStrengthAlgorithm == 'simple')
|
||||||
|
$ps->simple_calculate();
|
||||||
|
else
|
||||||
$ps->calculate();
|
$ps->calculate();
|
||||||
$score = $ps->get_score();
|
$score = $ps->get_score();
|
||||||
if($score > $settings->_passwordStrength) {
|
if($score >= $settings->_passwordStrength) {
|
||||||
$editedUser->setPwd(md5($pwd));
|
$editedUser->setPwd(md5($pwd));
|
||||||
$editedUser->setPwdExpiration($pwdexpiration);
|
$editedUser->setPwdExpiration($pwdexpiration);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -215,9 +215,17 @@ function addFiles()
|
||||||
<div class="cbSelectTitle"><?php printMLText("workflow");?>:</div>
|
<div class="cbSelectTitle"><?php printMLText("workflow");?>:</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<select class="_chzn-select-deselect span9" name="workflow" data-placeholder="<?php printMLText('select_workflow'); ?>">
|
|
||||||
<?php
|
<?php
|
||||||
$mandatoryworkflow = $user->getMandatoryWorkflow();
|
$mandatoryworkflow = $user->getMandatoryWorkflow();
|
||||||
|
if($mandatoryworkflow) {
|
||||||
|
?>
|
||||||
|
<?php echo $mandatoryworkflow->getName(); ?>
|
||||||
|
<input type="hidden" name="workflow" value="<?php echo $mandatoryworkflow->getID(); ?>">
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<select class="_chzn-select-deselect span9" name="workflow" data-placeholder="<?php printMLText('select_workflow'); ?>">
|
||||||
|
<?php
|
||||||
$workflows=$dms->getAllWorkflows();
|
$workflows=$dms->getAllWorkflows();
|
||||||
print "<option value=\"\">"."</option>";
|
print "<option value=\"\">"."</option>";
|
||||||
foreach ($workflows as $workflow) {
|
foreach ($workflows as $workflow) {
|
||||||
|
@ -228,6 +236,9 @@ function addFiles()
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -274,9 +274,17 @@ function checkForm()
|
||||||
<div class="cbSelectTitle"><?php printMLText("workflow");?>:</div>
|
<div class="cbSelectTitle"><?php printMLText("workflow");?>:</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<select class="_chzn-select-deselect span9" name="workflow" data-placeholder="<?php printMLText('select_workflow'); ?>">
|
|
||||||
<?php
|
<?php
|
||||||
$mandatoryworkflow = $user->getMandatoryWorkflow();
|
$mandatoryworkflow = $user->getMandatoryWorkflow();
|
||||||
|
if($mandatoryworkflow) {
|
||||||
|
?>
|
||||||
|
<?php echo $mandatoryworkflow->getName(); ?>
|
||||||
|
<input type="hidden" name="workflow" value="<?php echo $mandatoryworkflow->getID(); ?>">
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<select class="_chzn-select-deselect span9" name="workflow" data-placeholder="<?php printMLText('select_workflow'); ?>">
|
||||||
|
<?php
|
||||||
$workflows=$dms->getAllWorkflows();
|
$workflows=$dms->getAllWorkflows();
|
||||||
print "<option value=\"\">"."</option>";
|
print "<option value=\"\">"."</option>";
|
||||||
foreach ($workflows as $workflow) {
|
foreach ($workflows as $workflow) {
|
||||||
|
@ -287,6 +295,9 @@ function checkForm()
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user