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

This commit is contained in:
Uwe Steinmann 2017-01-12 18:03:01 +01:00
commit 950449ac04
34 changed files with 183 additions and 55 deletions

View File

@ -67,6 +67,20 @@
Changes in version 4.3.32
--------------------------------------------------------------------------------
- fix saving new mimetype for fulltext search, available languages
- put access rights of folder into popup box if more than 3 exists
- define apache_request_headers() if it does not exists, makes webdav
work in fast cgi mode or on webservers other than apache
- clean up of distribution created by makefile
- order groups in select boxes by name
- javascript added by addToFooterJS() will be written to a temp. file
which can then be read without violating the CSP
- clearing cache can just remove temp. js files or preview images
- new mimetype of preview command may contain a '.' now
- fix incorrect calls of $app->response()->header() in restapi.php
- set filetype propperly after uploadind a new document with the restapi
- add new method getDocumentPreview() to restapi
- replace lots of tables in forms by bootstraps control-group
- add remove button to folder selector
--------------------------------------------------------------------------------
Changes in version 4.3.31

View File

@ -2032,16 +2032,16 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
if ($defAccess < M_READ) {
if (strlen($groupIDs)>0) {
$queryStr = "SELECT `tblGroups`.* FROM `tblGroups` ".
"WHERE `tblGroups`.`id` IN (". $groupIDs .")";
"WHERE `tblGroups`.`id` IN (". $groupIDs .") ORDER BY `name`";
}
}
else {
if (strlen($groupIDs)>0) {
$queryStr = "SELECT `tblGroups`.* FROM `tblGroups` ".
"WHERE `tblGroups`.`id` NOT IN (". $groupIDs .")";
"WHERE `tblGroups`.`id` NOT IN (". $groupIDs .") ORDER BY `name`";
}
else {
$queryStr = "SELECT `tblGroups`.* FROM `tblGroups`";
$queryStr = "SELECT `tblGroups`.* FROM `tblGroups` ORDER BY `name`";
}
}
if (strlen($queryStr)>0) {

View File

@ -1590,16 +1590,16 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
if ($defAccess < M_READ) {
if (strlen($groupIDs)>0) {
$queryStr = "SELECT `tblGroups`.* FROM `tblGroups` ".
"WHERE `tblGroups`.`id` IN (". $groupIDs .")";
"WHERE `tblGroups`.`id` IN (". $groupIDs .") ORDER BY `name`";
}
}
else {
if (strlen($groupIDs)>0) {
$queryStr = "SELECT `tblGroups`.* FROM `tblGroups` ".
"WHERE `tblGroups`.`id` NOT IN (". $groupIDs .")";
"WHERE `tblGroups`.`id` NOT IN (". $groupIDs .") ORDER BY `name`";
}
else {
$queryStr = "SELECT `tblGroups`.* FROM `tblGroups`";
$queryStr = "SELECT `tblGroups`.* FROM `tblGroups` ORDER BY `name`";
}
}
if (strlen($queryStr)>0) {

View File

@ -24,7 +24,7 @@
</stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes>
- all changes from 4.3.31 merged
- all changes from 4.3.32 merged
</notes>
<contents>
<dir baseinstalldir="SeedDMS" name="/">
@ -1243,5 +1243,21 @@ SeedDMS_Core_DMS::getNotificationsByUser() are deprecated
- better attribute value checking
</notes>
</release>
<release>
<date>2017-01-12</date>
<time>10:18:59</time>
<version>
<release>4.3.32</release>
<api>4.3.32</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes>
- order groups by name returned by getReadAccessList()
</notes>
</release>
</changelog>
</package>

View File

@ -295,6 +295,7 @@ URL: [url]',
'disclaimer' => 'هذه المنطقة محظورة. الدخول فقط مسموح للموظفين المعتمدين. اي اختراق سيتم التعامل معه وفقا للقوانين المحلية والدولية.',
'discspace' => '',
'document' => 'المستند',
'documentcontent' => '',
'documents' => 'المستندات',
'documents_checked_out_by_you' => '',
'documents_in_process' => 'مستندات رهن المعالجة',

View File

@ -280,6 +280,7 @@ $text = array(
'disclaimer' => 'Работим аккуратно и задълбочено. От това зависи бъдeщето на нашата страна и благополучието на народа.nПетилетката за три години!nДа не оставим неодрусана слива в наше село!',
'discspace' => '',
'document' => 'Документ',
'documentcontent' => '',
'documents' => 'Документи',
'documents_checked_out_by_you' => '',
'documents_in_process' => 'Документи в процес на работа',

View File

@ -285,6 +285,7 @@ URL: [url]',
'disclaimer' => 'Aquesta és una àrea restringida. Només es permet l\'accés a usuaris autoritzats. Qualsevol intrusió es perseguirà d\'acord amb les lleis internacionals.',
'discspace' => '',
'document' => 'Document',
'documentcontent' => '',
'documents' => 'Documents',
'documents_checked_out_by_you' => '',
'documents_in_process' => 'Documents en procés',

View File

@ -302,6 +302,7 @@ URL: [url]',
'disclaimer' => 'Toto je neveřejná oblast. Přístup povolen pouze oprávněným uživatelům. Jakékoliv narušení bude stíháno podle platných právních norem.',
'discspace' => 'Místo na disku',
'document' => 'Dokument',
'documentcontent' => '',
'documents' => 'Dokumenty',
'documents_checked_out_by_you' => '',
'documents_in_process' => 'Zpracovávané dokumenty',

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 (2349), dgrutsch (22)
// Translators: Admin (2350), dgrutsch (22)
$text = array(
'2_factor_auth' => '2-Faktor Authentifizierung',
@ -307,6 +307,7 @@ URL: [url]',
'disclaimer' => 'Dies ist ein geschützter Bereich. Nur authorisiertes Personal hat Zugriff. Jegliche Verstöße werden nach geltendem Recht (Englisch und International) verfolgt.',
'discspace' => 'Plattenplatz',
'document' => 'Dokument',
'documentcontent' => 'Dokumentenversion',
'documents' => 'Dokumente',
'documents_checked_out_by_you' => 'Von mir ausgecheckte Dokumente',
'documents_in_process' => 'Dokumente in Bearbeitung',

View File

@ -280,6 +280,7 @@ $text = array(
'disclaimer' => '',
'discspace' => '',
'document' => 'Έγγραφο',
'documentcontent' => '',
'documents' => 'Έγγραφα',
'documents_checked_out_by_you' => '',
'documents_in_process' => '',

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 (1479), dgrutsch (9), netixw (14)
// Translators: Admin (1480), dgrutsch (9), netixw (14)
$text = array(
'2_factor_auth' => '2-factor authentication',
@ -307,6 +307,7 @@ URL: [url]',
'disclaimer' => 'This is a classified area. Access is permitted only to authorized personnel. Any violation will be prosecuted according to the national and international laws.',
'discspace' => 'Disc space',
'document' => 'Document',
'documentcontent' => 'Document content',
'documents' => 'Documents',
'documents_checked_out_by_you' => 'Documents checked out by you',
'documents_in_process' => 'Documents In Process',

View File

@ -302,6 +302,7 @@ URL: [url]',
'disclaimer' => 'Esta es un área restringida. Se permite el acceso únicamente a personal autorizado. Cualquier intrusión se perseguirá conforme a las leyes internacionales.',
'discspace' => 'Espacio en disco',
'document' => 'Documento',
'documentcontent' => '',
'documents' => 'Documentos',
'documents_checked_out_by_you' => '',
'documents_in_process' => 'Documentos en proceso',

View File

@ -307,6 +307,7 @@ URL: [url]',
'disclaimer' => 'Cet espace est protégé. Son accès est strictement réservé aux utilisateurs autorisés.<br/>Tout accès non autorisé est punissable par les lois internationales.',
'discspace' => 'Espace disque',
'document' => 'Document',
'documentcontent' => '',
'documents' => 'Documents',
'documents_checked_out_by_you' => 'Documents bloqués par vous',
'documents_in_process' => 'Documents en cours',

View File

@ -307,6 +307,7 @@ Internet poveznica: [url]',
'disclaimer' => 'Ovo je klasificirano područje. Pristup je omogućen samo ovlaštenim osobama. Sa svakim kršenjem bit će postupano sukladno nacionalnim i međunarodnim zakonima.',
'discspace' => 'Prostor na disku',
'document' => 'Dokument',
'documentcontent' => '',
'documents' => 'Dokumenti',
'documents_checked_out_by_you' => 'Dokumenti koje ste Vi odjavili',
'documents_in_process' => 'Dokumenti u postupku',

View File

@ -302,6 +302,7 @@ URL: [url]',
'disclaimer' => 'Ez egy bizalmas terület. Hozzáférés kizárólag a meghatalmazott személyek részére engedélyezett. Bárminemű megsértését a nemzeti, illetve a nemzetközi jog szerint fogják büntetni.',
'discspace' => 'Lemezterület',
'document' => 'Dokumentum',
'documentcontent' => '',
'documents' => 'Dokumentumok',
'documents_checked_out_by_you' => '',
'documents_in_process' => 'Feldolgozás alatt lévő dokumentumok',

View File

@ -308,6 +308,7 @@ URL: [url]',
'disclaimer' => 'Questa è un\'area riservata. L\'accesso è consentito solo agli utenti autorizzati. Qualunque violazione sarà perseguita a norma delle leggi italiane ed internazionali.',
'discspace' => 'Spazio su disco',
'document' => 'Documento',
'documentcontent' => '',
'documents' => 'Documenti',
'documents_checked_out_by_you' => 'Documenti approvati da te',
'documents_in_process' => 'Documenti in lavorazione',

View File

@ -309,6 +309,7 @@ URL: [url]',
'disclaimer' => '본 사이트는 접근이 허가된 자에게만 사용이 허용된 곳 입니다. 허가받지 않은 접근이나 불법행위는 국내 및 국제법에 따라 기소 될 것입니다.',
'discspace' => '디스크 공간',
'document' => '문서',
'documentcontent' => '',
'documents' => '문서',
'documents_checked_out_by_you' => '당신으로 부터 문서가 체크아웃 되었습니다.',
'documents_in_process' => '진행중인 문서',

View File

@ -300,6 +300,7 @@ URL: [url]',
'disclaimer' => 'Dit is een beveiligde omgeving. Gebruik is alleen toegestaan voor geautoriseerde leden. Ongeautoriseerde toegang kan worden bestraft overeenkomstig (inter)nationale wetgeving.',
'discspace' => 'Schijfruimte',
'document' => 'Document',
'documentcontent' => '',
'documents' => 'Documenten',
'documents_checked_out_by_you' => 'Door u in behandeling genomen documenten',
'documents_in_process' => 'Documenten in behandeling',

View File

@ -295,6 +295,7 @@ URL: [url]',
'disclaimer' => 'To jest zastrzeżona strefa. Dostęp do niej ma wyłącznie wyznaczony personel. Wszelkie naruszenia będą ścigane zgodnie z prawem krajowym i międzynarodowym.',
'discspace' => 'Miejsce na dysku',
'document' => 'Dokument',
'documentcontent' => '',
'documents' => 'Dokumenty',
'documents_checked_out_by_you' => '',
'documents_in_process' => 'Dokumenty procesowane',

View File

@ -302,6 +302,7 @@ URL: [url]',
'disclaimer' => 'Esta é uma área restrita, o acesso é permitido apenas ao pessoal autorizado. Qualquer violação será tratado de acordo com as normas internas e leis vigentes.',
'discspace' => 'Espaço em Disco',
'document' => 'Documento',
'documentcontent' => '',
'documents' => 'Documentos',
'documents_checked_out_by_you' => '',
'documents_in_process' => 'Documentos em Processo',

View File

@ -307,6 +307,7 @@ URL: [url]',
'disclaimer' => 'Aceasta este o zonă clasificată. Accesul este permis numai personalului autorizat. Orice încălcare va fi urmărită penal în conformitate cu legile naționale și internaționale.',
'discspace' => 'Spațiu pe disc',
'document' => 'Document',
'documentcontent' => '',
'documents' => 'Documente',
'documents_checked_out_by_you' => 'Documente verificate de tine',
'documents_in_process' => 'Documente în procesare',

View File

@ -307,6 +307,7 @@ URL: [url]',
'disclaimer' => 'Работник, помни! От тебя зависит успех фирмы и всей страны!',
'discspace' => 'Дисковое пространство',
'document' => 'Документ',
'documentcontent' => '',
'documents' => 'док.',
'documents_checked_out_by_you' => 'Документ проверен вами',
'documents_in_process' => 'Документы в работе',

View File

@ -284,6 +284,7 @@ URL: [url]',
'disclaimer' => 'Toto je zabezpečená zóna. Prístup je povolený len autorizovaným osobám.',
'discspace' => '',
'document' => 'Dokument',
'documentcontent' => '',
'documents' => 'Dokumenty',
'documents_checked_out_by_you' => '',
'documents_in_process' => 'Dokumenty v spracovaní',

View File

@ -295,6 +295,7 @@ URL: [url]',
'disclaimer' => 'Detta är ett sekretessbelagt område. Bara auktoriserade personer äger tillträde. Vid överträdelse kommer åtal att väckas i enlighet med nationella och internationella lagar.',
'discspace' => '',
'document' => 'Dokument',
'documentcontent' => '',
'documents' => 'Dokument',
'documents_checked_out_by_you' => '',
'documents_in_process' => 'Dokument i bearbetning',

View File

@ -301,6 +301,7 @@ URL: [url]',
'disclaimer' => 'Bu sisteme sadece yetkilendirilmiş personel yetki seviyesine göre erişebilir. Herhangi bir ihlalde veya ihlal girişiminde, ulusal ve uluslararası yasalara göre takibat yapılacaktır.',
'discspace' => 'Disk alanı',
'document' => 'Doküman',
'documentcontent' => '',
'documents' => 'Dokümanlar',
'documents_checked_out_by_you' => '',
'documents_in_process' => 'İşlemdeki Dokümanlar',

View File

@ -307,6 +307,7 @@ URL: [url]',
'disclaimer' => 'Авторизована зона. Несанкціонований доступ переслідується згідно національного законодавства.',
'discspace' => 'Дисковий простір',
'document' => 'Документ',
'documentcontent' => '',
'documents' => 'док.',
'documents_checked_out_by_you' => 'Документи на Опрацюванні у вас',
'documents_in_process' => 'Документи в роботі',

View File

@ -286,6 +286,7 @@ URL: [url]',
'disclaimer' => '警告:这是机密区.只有授权用户才被允许访问.任何违反行为将受到法律制裁',
'discspace' => '磁盘空间',
'document' => '文档',
'documentcontent' => '',
'documents' => '文档',
'documents_checked_out_by_you' => '',
'documents_in_process' => '待处理文档',

View File

@ -284,6 +284,7 @@ URL: [url]',
'disclaimer' => '警告:這是機密區.只有授權使用者才被允許訪問.任何違反行為將受到法律制裁',
'discspace' => '',
'document' => '文檔',
'documentcontent' => '',
'documents' => '文檔',
'documents_checked_out_by_you' => '',
'documents_in_process' => '待處理文檔',

View File

@ -182,6 +182,20 @@ i.rejected {color: #b00000;}
i.in-workflow {color: #11479e;}
i.workflow-action {color: #91479e;}
span.openpopupbox {
cursor: pointer;
}
div.popupbox {
background-color: #fff;
border-radius: 4px;
border: 1px solid #ccc;
padding: 15px;
display: none;
position: absolute;
width: 200px;
}
@media (max-width: 480px) {
.nav-tabs > li {
float:none;

View File

@ -988,4 +988,10 @@ $(document).ready(function() { /* {{{ */
timeout: (typeof timeout == 'undefined' ? 1500 : timeout),
});
});
$('span.openpopupbox').on('click', function(e) {
$('div.popupbox').toggle();
console.log('Hallo');
});
}); /* }}} */

View File

@ -70,50 +70,41 @@ $(document).ready( function() {
$this->contentHeading(getMLText("attrdef_info"));
$res = $selattrdef->getStatistics(30);
if(!empty($res['frequencies']['document']) ||!empty($res['frequencies']['folder']) ||!empty($res['frequencies']['content'])) {
?>
<div class="accordion" id="accordion1">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapseOne">
<?php printMLText('attribute_value'); ?>
</a>
</div>
<div id="collapseOne" class="accordion-body collapse" style="height: 0px;">
<div class="accordion-inner">
<?php
foreach(array('document', 'folder', 'content') as $type) {
if(isset($res['frequencies'][$type]) && $res['frequencies'][$type]) {
print "<table class=\"table table-condensed\">";
print "<thead>\n<tr>\n";
print "<th>".getMLText("attribute_value")."</th>\n";
print "<th>".getMLText("attribute_count")."</th>\n";
print "<th></th>\n";
print "</tr></thead>\n<tbody>\n";
foreach($res['frequencies'][$type] as $entry) {
$value = $selattrdef->parseValue($entry['value']);
echo "<tr>";
echo "<td>".implode(';', $value)."</td><td>".$entry['c']."</td>";
/* various checks, if the value is valid */
echo "<td>";
/* Check if value is in value set */
if(!$selattrdef->validate($entry['value'])) {
echo getAttributeValidationText($selattrdef->getValidationError(), $selattrdef->getName(), $entry['value']);
foreach(array('document', 'folder', 'content') as $type) {
$content = '';
if(isset($res['frequencies'][$type]) && $res['frequencies'][$type]) {
$content .= "<table class=\"table table-condensed\">";
$content .= "<thead>\n<tr>\n";
$content .= "<th>".getMLText("attribute_value")."</th>\n";
$content .= "<th>".getMLText("attribute_count")."</th>\n";
$content .= "<th></th>\n";
$content .= "</tr></thead>\n<tbody>\n";
foreach($res['frequencies'][$type] as $entry) {
$value = $selattrdef->parseValue($entry['value']);
$content .= "<tr>";
$content .= "<td>".implode(';', $value)."</td><td>".$entry['c']."</td>";
/* various checks, if the value is valid */
if(!$selattrdef->validate($entry['value'])) {
$content .= getAttributeValidationText($selattrdef->getValidationError(), $selattrdef->getName(), $entry['value']);
}
$content .= "<td>";
/* Check if value is in value set */
if($selattrdef->getValueSet()) {
foreach($values as $v) {
if(!in_array($value, $selattrdef->getValueSetAsArray()))
$content .= getMLText("attribute_value_not_in_valueset");
}
}
$content .= "</td>";
$content .= "</tr>";
}
echo "</td>";
echo "</tr>";
$content .= "</tbody></table>";
}
print "</tbody></table>";
if($content)
$this->printAccordion(getMLText('attribute_value')." (".getMLText($type).")", $content);
}
}
?>
</div>
</div>
</div>
</div>
<?php
}
if($res['folders'] || $res['docs']) {
print "<table id=\"viewfolder-table\" class=\"table table-condensed\">";
print "<thead>\n<tr>\n";
@ -194,7 +185,7 @@ $(document).ready( function() {
<?php printMLText("attrdef_objtype");?>:
</label>
<div class="controls">
<select name="objtype"><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_all ?>"><?php printMLText('all'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_folder ?>" <?php if($attrdef && $attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_folder) echo "selected"; ?>><?php printMLText('folder'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_document ?>" <?php if($attrdef && $attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_document) echo "selected"; ?>><?php printMLText('document'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_documentcontent ?>" <?php if($attrdef && $attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_documentcontent) echo "selected"; ?>><?php printMLText('version'); ?></option></select>
<select name="objtype"><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_all ?>"><?php printMLText('all'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_folder ?>" <?php if($attrdef && $attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_folder) echo "selected"; ?>><?php printMLText('folder'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_document ?>" <?php if($attrdef && $attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_document) echo "selected"; ?>><?php printMLText('document'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_documentcontent ?>" <?php if($attrdef && $attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_documentcontent) echo "selected"; ?>><?php printMLText('documentcontent'); ?></option></select>
</div>
</div>
@ -310,7 +301,7 @@ $(document).ready( function() {
$ot = getMLText("document");
break;
case SeedDMS_Core_AttributeDefinition::objtype_documentcontent:
$ot = getMLText("version");
$ot = getMLText("documentcontent");
break;
}
switch($attrdef->getType()) {

View File

@ -2552,5 +2552,36 @@ mayscript>
echo "</script>";
$this->printTimelineHtml($height);
} /* }}} */
protected function printPopupBox($title, $content) { /* {{{ */
?>
<span class="openpopupbox"><?php echo $title; ?></span>
<div class="popupbox" style="display: none;">
<?php echo $content; ?>
</div>
<?php
} /* }}} */
protected function printAccordion($title, $content) { /* {{{ */
$id = substr(md5(uniqid()), 0, 4);
?>
<div class="accordion" id="accordion<?php echo $id; ?>">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion<?php echo $id; ?>" href="#collapse<?php echo $id; ?>">
<?php echo $title; ?>
</a>
</div>
<div id="collapse<?php echo $id; ?>" class="accordion-body collapse" style="height: 0px;">
<div class="accordion-inner">
<?php
echo $content;
?>
</div>
</div>
</div>
</div>
<?php
} /* }}} */
}
?>

View File

@ -58,21 +58,28 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style {
if (count($accessList["users"]) == 0 && count($accessList["groups"]) == 0)
return;
$content = '';
for ($i = 0; $i < count($accessList["groups"]); $i++)
{
$group = $accessList["groups"][$i]->getGroup();
$accesstext = $this->getAccessModeText($accessList["groups"][$i]->getMode());
print $accesstext.": ".htmlspecialchars($group->getName());
$content .= $accesstext.": ".htmlspecialchars($group->getName());
if ($i+1 < count($accessList["groups"]) || count($accessList["users"]) > 0)
print "<br />";
$content .= "<br />";
}
for ($i = 0; $i < count($accessList["users"]); $i++)
{
$user = $accessList["users"][$i]->getUser();
$accesstext = $this->getAccessModeText($accessList["users"][$i]->getMode());
print $accesstext.": ".htmlspecialchars($user->getFullName());
$content .= $accesstext.": ".htmlspecialchars($user->getFullName());
if ($i+1 < count($accessList["users"]))
print "<br />";
$content .= "<br />";
}
if(count($accessList["groups"]) + count($accessList["users"]) > 3) {
$this->printPopupBox(getMLText('list_access_rights'), $content);
} else {
echo $content;
}
} /* }}} */

View File

@ -6,6 +6,31 @@ if(!empty($settings->_coreDir))
else
require_once('SeedDMS/Core.php');
/* Set apache_request_headers() in case it doesn't exists, like
* when using fastcgi (patch by christopher täufert)
*/
if( !function_exists('apache_request_headers') ) {
function apache_request_headers() {
$arh = array();
$rx_http = '/\AHTTP_/';
foreach($_SERVER as $key => $val) {
if( preg_match($rx_http, $key) ) {
$arh_key = preg_replace($rx_http, '', $key);
$rx_matches = array();
// do some nasty string manipulations to restore the original letter case
// this should work in most cases
$rx_matches = explode('_', $arh_key);
if( count($rx_matches) > 0 and strlen($arh_key) > 2 ) {
foreach($rx_matches as $ak_key => $ak_val) $rx_matches[$ak_key] = ucfirst($ak_val);
$arh_key = implode('-', $rx_matches);
}
$arh[$arh_key] = $val;
}
}
return( $arh );
}
}
/**
* SeedDMS access using WebDAV
*