Merge branch 'seeddms-4.3.x' into seeddms-5.0.x

This commit is contained in:
Uwe Steinmann 2015-08-19 09:24:05 +02:00
commit cde8e830f5
15 changed files with 104 additions and 66 deletions

View File

@ -7,6 +7,8 @@
- timeout for external commands for creating fulltext index can be set
- add translations for korean, croation, ukrainian
- file can be submitted with approval/review
- alternative full text search engine without dependency on Zend
- much faster user manager
--------------------------------------------------------------------------------
Changes in version 4.3.19

View File

@ -836,35 +836,42 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
/* The owner of the document has unrestricted access */
if ($user->getID() == $this->_ownerID) return M_ALL;
/* The guest users do not have more than read access */
if ($user->isGuest()) {
$mode = $this->getDefaultAccess();
if ($mode >= M_READ) return M_READ;
else return M_NONE;
}
/* Check ACLs */
$accessList = $this->getAccessList();
if (!$accessList) return false;
foreach ($accessList["users"] as $userAccess) {
if ($userAccess->getUserID() == $user->getID()) {
return $userAccess->getMode();
$mode = $userAccess->getMode();
if ($user->isGuest()) {
if ($mode >= M_READ) $mode = M_READ;
}
return $mode;
}
}
/* Get the highest right defined by a group */
$result = 0;
foreach ($accessList["groups"] as $groupAccess) {
if ($user->isMemberOfGroup($groupAccess->getGroup())) {
if ($groupAccess->getMode() > $result)
$result = $groupAccess->getMode();
// return $groupAccess->getMode();
if($accessList['groups']) {
$mode = 0;
foreach ($accessList["groups"] as $groupAccess) {
if ($user->isMemberOfGroup($groupAccess->getGroup())) {
if ($groupAccess->getMode() > $mode)
$mode = $groupAccess->getMode();
}
}
if($mode) {
if ($user->isGuest()) {
if ($mode >= M_READ) $mode = M_READ;
}
return $mode;
}
}
if($result)
return $result;
$result = $this->getDefaultAccess();
return $result;
$mode = $this->getDefaultAccess();
if ($user->isGuest()) {
if ($mode >= M_READ) $mode = M_READ;
}
return $mode;
} /* }}} */
/**

View File

@ -1107,41 +1107,48 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
if(!$user)
return M_NONE;
/* Admins have full access */
/* Administrators have unrestricted access */
if ($user->isAdmin()) return M_ALL;
/* User has full access if he/she is the owner of the document */
/* The owner of the document has unrestricted access */
if ($user->getID() == $this->_ownerID) return M_ALL;
/* Guest has read access by default, if guest login is allowed at all */
if ($user->isGuest()) {
$mode = $this->getDefaultAccess();
if ($mode >= M_READ) return M_READ;
else return M_NONE;
}
/* check ACLs */
/* Check ACLs */
$accessList = $this->getAccessList();
if (!$accessList) return false;
foreach ($accessList["users"] as $userAccess) {
if ($userAccess->getUserID() == $user->getID()) {
return $userAccess->getMode();
$mode = $userAccess->getMode();
if ($user->isGuest()) {
if ($mode >= M_READ) $mode = M_READ;
}
return $mode;
}
}
/* Get the highest right defined by a group */
$result = 0;
foreach ($accessList["groups"] as $groupAccess) {
if ($user->isMemberOfGroup($groupAccess->getGroup())) {
if ($groupAccess->getMode() > $result)
$result = $groupAccess->getMode();
// return $groupAccess->getMode();
if($accessList['groups']) {
$mode = 0;
foreach ($accessList["groups"] as $groupAccess) {
if ($user->isMemberOfGroup($groupAccess->getGroup())) {
if ($groupAccess->getMode() > $mode)
$mode = $groupAccess->getMode();
}
}
if($mode) {
if ($user->isGuest()) {
if ($mode >= M_READ) $mode = M_READ;
}
return $mode;
}
}
if($result)
return $result;
$result = $this->getDefaultAccess();
return $result;
$mode = $this->getDefaultAccess();
if ($user->isGuest()) {
if ($mode >= M_READ) $mode = M_READ;
}
return $mode;
} /* }}} */
/**

View File

@ -849,5 +849,23 @@ clean workflow log when a document version was deleted
- add method SeedDMS_Core_DMS::getDuplicateDocumentContent()
</notes>
</release>
<release>
<date>2015-06-26</date>
<time>16:45:59</time>
<version>
<release>4.3.19</release>
<api>4.3.19</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes>
- add optional paramter $noclean to clearAccessList(), setDefaultAccess(), setInheritAccess()
- clearAccessList() will clean up the notifier list
- new method cleanNotifyList()
</notes>
</release>
</changelog>
</package>

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// Translators: Admin (685), kreml (455)
// Translators: Admin (688), kreml (455)
$text = array(
'accept' => 'Přijmout',
@ -473,7 +473,7 @@ URL: [url]',
'home_folder' => 'Domácí složka',
'hourly' => 'Hodinově',
'hours' => 'hodiny',
'hr_HR' => '',
'hr_HR' => 'Chorvatština',
'human_readable' => 'Bežně čitelný archív',
'hu_HU' => 'Maďarština',
'id' => 'ID',
@ -536,7 +536,7 @@ URL: [url]',
'keep_doc_status' => 'Zachovat stav dokumentu',
'keywords' => 'Klíčová slova',
'keyword_exists' => 'Klíčové slovo už existuje',
'ko_KR' => '',
'ko_KR' => 'Korejština',
'language' => 'Jazyk',
'lastaccess' => 'Poslední přístup',
'last_update' => 'Naposledy aktualizoval',
@ -1252,7 +1252,7 @@ URL: [url]',
'tuesday' => 'Úterý',
'tuesday_abbr' => 'Út',
'type_to_search' => 'Zadejte hledaný výraz',
'uk_UA' => '',
'uk_UA' => 'Ukrajnština',
'under_folder' => 'Ve složce',
'unknown_attrdef' => 'Neznámá definice atributu',
'unknown_command' => 'Příkaz nebyl rozpoznán.',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// Translators: Admin (974), jeromerobert (50), lonnnew (9)
// Translators: Admin (975), jeromerobert (50), lonnnew (9)
$text = array(
'accept' => 'Accepter',
@ -473,7 +473,7 @@ URL: [url]',
'home_folder' => '',
'hourly' => 'Une fois par heure',
'hours' => 'heures',
'hr_HR' => '',
'hr_HR' => 'Croate',
'human_readable' => 'Archive au format lisible',
'hu_HU' => 'Hongrois',
'id' => 'ID',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// Translators: Admin (560), ribaz (1019)
// Translators: Admin (562), ribaz (1019)
$text = array(
'accept' => 'Elfogad',
@ -473,7 +473,7 @@ URL: [url]',
'home_folder' => '',
'hourly' => 'Óra',
'hours' => 'óra',
'hr_HR' => '',
'hr_HR' => 'Horvát',
'human_readable' => 'Felhasználó által olvasható archívum',
'hu_HU' => 'Magyar',
'id' => 'ID',
@ -1257,7 +1257,7 @@ URL: [url]',
'tuesday' => 'Kedd',
'tuesday_abbr' => 'Ke',
'type_to_search' => 'Adja meg a keresendő kifejezést',
'uk_UA' => '',
'uk_UA' => 'Ukrán',
'under_folder' => 'Mappában',
'unknown_attrdef' => 'Ismeretlen tulajdonság meghatározás',
'unknown_command' => 'Parancs nem ismerhető fel.',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// Translators: Admin (1492), s.pnt (26)
// Translators: Admin (1494), s.pnt (26)
$text = array(
'accept' => 'Accetta',
@ -479,7 +479,7 @@ URL: [url]',
'home_folder' => 'Cartella Utente',
'hourly' => 'Ogni ora',
'hours' => 'ore',
'hr_HR' => '',
'hr_HR' => 'Croato',
'human_readable' => 'Archivio per uso esterno',
'hu_HU' => 'Ungherese',
'id' => 'ID',
@ -542,7 +542,7 @@ URL: [url]',
'keep_doc_status' => 'Mantieni lo stato del documento',
'keywords' => 'Parole-chiave',
'keyword_exists' => 'Parola-chiave già presente',
'ko_KR' => '',
'ko_KR' => 'Coreano',
'language' => 'Lingua',
'lastaccess' => 'Ultimo accesso',
'last_update' => 'Ultima modifica',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// Translators: Admin (935), daivoc (356)
// Translators: Admin (935), daivoc (359)
$text = array(
'accept' => '동의',
@ -478,7 +478,7 @@ URL: [url]',
'home_folder' => '홈 폴더',
'hourly' => '시간별',
'hours' => '시간',
'hr_HR' => '',
'hr_HR' => '크로아티아어',
'human_readable' => '가독력',
'hu_HU' => '헝가리어',
'id' => 'ID',
@ -1020,8 +1020,8 @@ URL : [url]',
'settings_firstDayOfWeek_desc' => '요일의 첫날',
'settings_footNote' => 'Foot Note',
'settings_footNote_desc' => '메시지는 모든 페이지 하단에 표시',
'settings_fullSearchEngine' => '',
'settings_fullSearchEngine_desc' => '',
'settings_fullSearchEngine' => '전체 텍스트 검색 엔진',
'settings_fullSearchEngine_desc' => '전체 텍스트 검색에 사용되는 방법을 설정합니다.',
'settings_fullSearchEngine_vallucene' => 'Zend Lucene',
'settings_fullSearchEngine_valsqlitefts' => 'SQLiteFTS',
'settings_guestID' => 'Guest ID',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// Translators: Admin (887), flaviove (627), lfcristofoli (352)
// Translators: Admin (889), flaviove (627), lfcristofoli (352)
$text = array(
'accept' => 'Aceitar',
@ -472,7 +472,7 @@ URL: [url]',
'home_folder' => '',
'hourly' => 'De hora em hora',
'hours' => 'horas',
'hr_HR' => '',
'hr_HR' => 'Croata',
'human_readable' => 'Human readable archive',
'hu_HU' => 'Húngaro',
'id' => 'ID',
@ -535,7 +535,7 @@ URL: [url]',
'keep_doc_status' => 'Mantenha status do documento',
'keywords' => 'Palavras-chave',
'keyword_exists' => 'Keyword already exists',
'ko_KR' => '',
'ko_KR' => 'Coreano',
'language' => 'Idioma',
'lastaccess' => 'Último acesso',
'last_update' => 'última versão',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// Translators: Admin (1093), tmichelfelder (106)
// Translators: Admin (1096), tmichelfelder (106)
$text = array(
'accept' => 'Godkänn',
@ -466,7 +466,7 @@ URL: [url]',
'home_folder' => '',
'hourly' => 'timvis',
'hours' => 'timmar',
'hr_HR' => '',
'hr_HR' => 'Kroatiska',
'human_readable' => 'Arkiv som är läsbart av användare',
'hu_HU' => 'ungerska',
'id' => 'ID',
@ -529,7 +529,7 @@ URL: [url]',
'keep_doc_status' => 'Bibehåll dokumentstatus',
'keywords' => 'Nyckelord',
'keyword_exists' => 'Nyckelordet finns redan',
'ko_KR' => '',
'ko_KR' => 'Koreanska',
'language' => 'Språk',
'lastaccess' => '',
'last_update' => 'Senast uppdaterat',
@ -707,7 +707,7 @@ URL: [url]',
'pt_BR' => 'portugisiska (BR)',
'quota' => 'Kvot',
'quota_exceeded' => 'Din minneskvot har överskridits med [bytes].',
'quota_is_disabled' => '',
'quota_is_disabled' => 'Kvot stöd är för närvarande inaktiverad i inställningarna. Ställa in en användarkvot kommer att ha någon effekt förrän den är aktiverad igen.',
'quota_warning' => 'Din maximala minneskvot har överskridits med [bytes]. Ta bort dokument eller tidigare versioner.',
'receipt_log' => '',
'receipt_summary' => '',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// Translators: Admin (587), fengjohn (5)
// Translators: Admin (589), fengjohn (5)
$text = array(
'accept' => '接受',
@ -403,7 +403,7 @@ URL: [url]',
'home_folder' => '',
'hourly' => '',
'hours' => '',
'hr_HR' => '',
'hr_HR' => '克罗地亚人',
'human_readable' => '可读存档',
'hu_HU' => '匈牙利语',
'id' => '序号',
@ -466,7 +466,7 @@ URL: [url]',
'keep_doc_status' => '',
'keywords' => '关键字',
'keyword_exists' => '关键字已存在',
'ko_KR' => '',
'ko_KR' => '韩国人',
'language' => '语言',
'lastaccess' => '',
'last_update' => '上次更新',

View File

@ -40,6 +40,9 @@ if(!$settings->_enableFullSearch) {
if(isset($_GET['create']) && $_GET['create'] == 1) {
if(isset($_GET['confirm']) && $_GET['confirm'] == 1) {
$index = $indexconf['Indexer']::create($settings->_luceneDir);
if(!$index) {
UI::exitError(getMLText("admin_tools"),getMLText("no_fulltextindex"));
}
$indexconf['Indexer']::init($settings->_stopWordsFile);
} else {
header('Location: out.CreateIndex.php');

View File

@ -31,7 +31,7 @@ require_once("class.Bootstrap.php");
*/
class SeedDMS_View_Settings extends SeedDMS_Bootstrap_Style {
protected function showTextField($name, $value, $type='', $placeholder) { /* {{{ */
protected function showTextField($name, $value, $type='', $placeholder='') { /* {{{ */
if($type != 'password' && strlen($value) > 80)
echo '<textarea class="input-xxlarge" name="'.$name.'">'.$value.'</textarea>';
else {

View File

@ -40,6 +40,7 @@ class SeedDMS_View_UsrMgr extends SeedDMS_Bootstrap_Style {
function showUserForm($currUser) { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
$users = $this->params['allusers'];
$groups = $this->params['allgroups'];
$passwordstrength = $this->params['passwordstrength'];
$passwordexpiration = $this->params['passwordexpiration'];