mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 07:22:11 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
3f6719e7aa
|
@ -256,6 +256,7 @@
|
|||
- use chosen select for custom attributes
|
||||
- color category (use first 6 chars of md5(category name) as hex color)
|
||||
- create missing preview images in category or attribute manager
|
||||
- support README of extension in different languages
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.29
|
||||
|
|
|
@ -45,7 +45,8 @@ function renderBooleanData($colname, $objdata) { /* {{{ */
|
|||
} /* }}} */
|
||||
|
||||
function getPasswordPlainData($colname, $coldata, $objdata) { /* {{{ */
|
||||
$objdata['passenc'] = seed_pass_hash($coldata);
|
||||
/* Setting 'passenc' to null will not update the password */
|
||||
$objdata['passenc'] = $coldata ? seed_pass_hash($coldata) : null;
|
||||
return $objdata;
|
||||
} /* }}} */
|
||||
|
||||
|
@ -240,7 +241,7 @@ if (isset($_FILES['userdata']) && $_FILES['userdata']['error'] == 0) {
|
|||
if($makeupdate)
|
||||
$eu->setEmail($u['email']);
|
||||
}
|
||||
if(isset($u['passenc']) && $u['passenc'] != $eu->getPwd()) {
|
||||
if(isset($u['passenc']) && !is_null($u['passenc']) && $u['passenc'] != $eu->getPwd()) {
|
||||
$log[$uhash][] = array('id'=>$eu->getLogin(), 'type'=>'success', 'msg'=> "Encrypted password of user updated. '".$u['passenc']."' != '".$eu->getPwd()."'");
|
||||
if($makeupdate)
|
||||
$eu->setPwd($u['passenc']);
|
||||
|
|
|
@ -178,6 +178,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
|
|||
function readme() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$session = $this->params['session'];
|
||||
$extdir = $this->params['extdir'];
|
||||
$extmgr = $this->params['extmgr'];
|
||||
$extname = $this->params['extname'];
|
||||
|
@ -185,9 +186,10 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
|
|||
|
||||
if(isset($extconf[$extname])) {
|
||||
$extconf = $extconf[$extname];
|
||||
if(file_exists($extdir."/".$extname."/README.md")) {
|
||||
// echo '<div style="white-space: pre-wrap; font-family: monospace; padding: 0px;">'.file_get_contents($extdir."/".$extname."/README.md")."</div>";
|
||||
$Parsedown = new Parsedown();
|
||||
$Parsedown = new Parsedown();
|
||||
if(file_exists($extdir."/".$extname."/README.".$session->getLanguage().".md")) {
|
||||
echo $Parsedown->text(file_get_contents($extdir."/".$extname."/README.".$session->getLanguage().".md"));
|
||||
} elseif(file_exists($extdir."/".$extname."/README.md")) {
|
||||
echo $Parsedown->text(file_get_contents($extdir."/".$extname."/README.md"));
|
||||
}
|
||||
}
|
||||
|
@ -197,6 +199,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
|
|||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$settings = $this->params['settings'];
|
||||
$session = $this->params['session'];
|
||||
$httproot = $this->params['httproot'];
|
||||
$extmgr = $this->params['extmgr'];
|
||||
$extdir = $this->params['extdir'];
|
||||
|
@ -237,7 +240,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
|
|||
echo "</td>";
|
||||
echo "<td nowrap>";
|
||||
echo "<div class=\"list-action\">";
|
||||
if(file_exists($extdir."/".$extname."/README.md")) {
|
||||
if(file_exists($extdir."/".$extname."/README.".$session->getLanguage().".md") || file_exists($extdir."/".$extname."/README.md")) {
|
||||
echo $this->getModalBoxLink(array('target'=>'extensionReadme', 'remote'=>'out.ExtensionMgr.php?action=readme&extensionname='.$extname, 'class'=>'', 'title'=>'<i class="fa fa-question"></i>', 'attributes'=>array('title'=>getMLText('show_extension_readme'))));
|
||||
}
|
||||
if(!empty($extconf['changelog']) && file_exists($extdir."/".$extname."/".$extconf['changelog'])) {
|
||||
|
|
|
@ -874,9 +874,12 @@ function typeahead() { /* {{{ */
|
|||
foreach($values as $v=>$c) {
|
||||
$uu = $dms->getUserByLogin($v);
|
||||
if($uu) {
|
||||
$option = array($uu->getId(), $v.' ('.$c.')');
|
||||
$option = array($uu->getId(), $v/*.' ('.$c.')'*/);
|
||||
if(isset(${$facetname}) && in_array($uu->getId(), ${$facetname}))
|
||||
$option[] = true;
|
||||
else
|
||||
$option[] = false;
|
||||
$option[] = array(array('data-subtitle', $c.' ×'));
|
||||
$options[] = $option;
|
||||
}
|
||||
}
|
||||
|
@ -884,35 +887,48 @@ function typeahead() { /* {{{ */
|
|||
foreach($values as $v=>$c) {
|
||||
$cat = $dms->getDocumentCategoryByName($v);
|
||||
if($cat) {
|
||||
$option = array($cat->getId(), $v.' ('.$c.')');
|
||||
$option = array($cat->getId(), $v/*.' ('.$c.')'*/);
|
||||
if(isset(${$facetname}) && in_array($cat->getId(), ${$facetname}))
|
||||
$option[] = true;
|
||||
else
|
||||
$option[] = false;
|
||||
$option[] = array(array('data-subtitle', $c.' ×'));
|
||||
$options[] = $option;
|
||||
}
|
||||
}
|
||||
} elseif($facetname == 'status') {
|
||||
foreach($values as $v=>$c) {
|
||||
$option = array($v, getOverallStatusText($v).' ('.$c.')');
|
||||
if(isset(${$facetname}) && in_array($v, ${$facetname}))
|
||||
$option[] = true;
|
||||
$options[] = $option;
|
||||
$option = array($v, getOverallStatusText($v)/*.' ('.$c.')'*/);
|
||||
if(isset(${$facetname}) && in_array($v, ${$facetname}))
|
||||
$option[] = true;
|
||||
else
|
||||
$option[] = false;
|
||||
$option[] = array(array('data-subtitle', $c.' ×'));
|
||||
$options[] = $option;
|
||||
}
|
||||
} elseif(substr($facetname, 0, 5) == 'attr_') {
|
||||
foreach($values as $v=>$c) {
|
||||
$option = array($v, $v.' ('.$c.')');
|
||||
if(isset($attributes[$facetname]) && in_array($v, $attributes[$facetname]))
|
||||
$option[] = true;
|
||||
$options[] = $option;
|
||||
$option = array($v, $v/*.' ('.$c.')'*/);
|
||||
if(isset($attributes[$facetname]) && in_array($v, $attributes[$facetname]))
|
||||
$option[] = true;
|
||||
else
|
||||
$option[] = false;
|
||||
$option[] = array(array('data-subtitle', $c.' ×'));
|
||||
$options[] = $option;
|
||||
}
|
||||
} else {
|
||||
foreach($values as $v=>$c) {
|
||||
$option = array($v, $v.' ('.$c.')');
|
||||
if(isset(${$facetname}) && in_array($v, ${$facetname}))
|
||||
$option[] = true;
|
||||
else
|
||||
$option[] = false;
|
||||
$option[] = array(array('data-subtitle', $c.' ×'));
|
||||
$options[] = $option;
|
||||
}
|
||||
}
|
||||
if(substr($facetname, 0, 5) == 'attr_') {
|
||||
if($options) {
|
||||
$tmp = explode('_', $facetname);
|
||||
if($attrdef = $dms->getAttributeDefinition($tmp[1]))
|
||||
$dispname = $attrdef->getName();
|
||||
|
@ -930,6 +946,7 @@ function typeahead() { /* {{{ */
|
|||
'multiple'=>$multiple
|
||||
)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$this->formField(
|
||||
getMLText($facetname),
|
||||
|
|
Loading…
Reference in New Issue
Block a user