mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +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)
|
||||
- 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
|
||||
|
|
|
@ -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"];
|
||||
|
|
|
@ -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"));
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -215,19 +215,30 @@ function addFiles()
|
|||
<div class="cbSelectTitle"><?php printMLText("workflow");?>:</div>
|
||||
</td>
|
||||
<td>
|
||||
<select class="_chzn-select-deselect span9" name="workflow" data-placeholder="<?php printMLText('select_workflow'); ?>">
|
||||
<?php
|
||||
$mandatoryworkflow = $user->getMandatoryWorkflow();
|
||||
$workflows=$dms->getAllWorkflows();
|
||||
print "<option value=\"\">"."</option>";
|
||||
foreach ($workflows as $workflow) {
|
||||
print "<option value=\"".$workflow->getID()."\"";
|
||||
if($mandatoryworkflow && $mandatoryworkflow->getID() == $workflow->getID())
|
||||
echo " selected=\"selected\"";
|
||||
print ">". htmlspecialchars($workflow->getName())."</option>";
|
||||
}
|
||||
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();
|
||||
print "<option value=\"\">"."</option>";
|
||||
foreach ($workflows as $workflow) {
|
||||
print "<option value=\"".$workflow->getID()."\"";
|
||||
if($mandatoryworkflow && $mandatoryworkflow->getID() == $workflow->getID())
|
||||
echo " selected=\"selected\"";
|
||||
print ">". htmlspecialchars($workflow->getName())."</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -274,19 +274,30 @@ function checkForm()
|
|||
<div class="cbSelectTitle"><?php printMLText("workflow");?>:</div>
|
||||
</td>
|
||||
<td>
|
||||
<select class="_chzn-select-deselect span9" name="workflow" data-placeholder="<?php printMLText('select_workflow'); ?>">
|
||||
<?php
|
||||
$mandatoryworkflow = $user->getMandatoryWorkflow();
|
||||
$workflows=$dms->getAllWorkflows();
|
||||
print "<option value=\"\">"."</option>";
|
||||
foreach ($workflows as $workflow) {
|
||||
print "<option value=\"".$workflow->getID()."\"";
|
||||
if($mandatoryworkflow && $mandatoryworkflow->getID() == $workflow->getID())
|
||||
echo " selected=\"selected\"";
|
||||
print ">". htmlspecialchars($workflow->getName())."</option>";
|
||||
}
|
||||
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();
|
||||
print "<option value=\"\">"."</option>";
|
||||
foreach ($workflows as $workflow) {
|
||||
print "<option value=\"".$workflow->getID()."\"";
|
||||
if($mandatoryworkflow && $mandatoryworkflow->getID() == $workflow->getID())
|
||||
echo " selected=\"selected\"";
|
||||
print ">". htmlspecialchars($workflow->getName())."</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
Loading…
Reference in New Issue
Block a user