diff --git a/CHANGELOG b/CHANGELOG index c7845affc..785fc9273 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -28,6 +28,10 @@ - set encoding of terms when adding document to full text index (Bug #66) - droped support for myisam database engine - 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 diff --git a/op/op.AddDocument.php b/op/op.AddDocument.php index 32fdd3a30..7bb10c6b1 100644 --- a/op/op.AddDocument.php +++ b/op/op.AddDocument.php @@ -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"]; 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(isset($_POST["dropfolderfileform1"]) && $_POST["dropfolderfileform1"]) { $fullfile = $settings->_dropFolderDir.'/'.$user->getLogin().'/'.$_POST["dropfolderfileform1"]; diff --git a/op/op.UpdateDocument.php b/op/op.UpdateDocument.php index 277ee883a..6d749c39d 100644 --- a/op/op.UpdateDocument.php +++ b/op/op.UpdateDocument.php @@ -168,6 +168,8 @@ if ($_FILES['userfile']['error'] == 0) { } } + $workflow = $user->getMandatoryWorkflow(); + if(isset($_POST["attributes"]) && $_POST["attributes"]) { $attributes = $_POST["attributes"]; foreach($attributes as $attrdefid=>$attribute) { @@ -184,7 +186,7 @@ if ($_FILES['userfile']['error'] == 0) { $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) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); } diff --git a/op/op.UsrMgr.php b/op/op.UsrMgr.php index e05d01aad..52ebacadf 100644 --- a/op/op.UsrMgr.php +++ b/op/op.UsrMgr.php @@ -202,9 +202,12 @@ else if ($action == "edituser") { if($settings->_passwordStrength) { $ps = new Password_Strength(); $ps->set_password($_POST["pwd"]); - $ps->calculate(); + if($settings->_passwordStrengthAlgorithm == 'simple') + $ps->simple_calculate(); + else + $ps->calculate(); $score = $ps->get_score(); - if($score > $settings->_passwordStrength) { + if($score >= $settings->_passwordStrength) { $editedUser->setPwd(md5($pwd)); $editedUser->setPwdExpiration($pwdexpiration); } else { diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index 7bb6aa4a3..3cefbbb67 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -215,19 +215,30 @@ function addFiles()
:
- + + + diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php index 537e44a07..913d87102 100644 --- a/views/bootstrap/class.UpdateDocument.php +++ b/views/bootstrap/class.UpdateDocument.php @@ -274,19 +274,30 @@ function checkForm()
:
- + + +