mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
77a606cebe
|
@ -491,7 +491,7 @@ class SeedDMS_Core_User { /* {{{ */
|
|||
|
||||
$classname = $dms->getClassname('role');
|
||||
for ($i = 0; $i < count($resArr); $i++) {
|
||||
/** @var SeedDMS_Core_User $user */
|
||||
/** @var SeedDMS_Core_User $user */
|
||||
$role = $classname::getInstance($resArr[$i]['role'], $dms);
|
||||
$user = new self($resArr[$i]["id"], $resArr[$i]["login"], $resArr[$i]["pwd"], $resArr[$i]["fullName"], $resArr[$i]["email"], (isset($resArr[$i]["language"])?$resArr[$i]["language"]:NULL), (isset($resArr[$i]["theme"])?$resArr[$i]["theme"]:NULL), $resArr[$i]["comment"], $role, $resArr[$i]["hidden"], $resArr[$i]["disabled"], $resArr[$i]["pwdExpiration"], $resArr[$i]["loginfailures"], $resArr[$i]["quota"], $resArr[$i]["homefolder"]);
|
||||
$user->setDMS($dms);
|
||||
|
@ -1751,9 +1751,9 @@ class SeedDMS_Core_User { /* {{{ */
|
|||
"AND `tblDocumentReviewers`.`type`='0' ".
|
||||
"AND `tblDocumentReviewers`.`required`='". $this->_id ."' ".
|
||||
"ORDER BY `tblDocumentReviewLog`.`reviewLogID` DESC";
|
||||
$resArr = $db->getResultArray($queryStr);
|
||||
$resArr = $db->getResultArray($queryStr);
|
||||
if (is_bool($resArr) && $resArr === false)
|
||||
return false;
|
||||
return false;
|
||||
if (count($resArr)>0) {
|
||||
foreach ($resArr as $res) {
|
||||
if(isset($status["indstatus"][$res['documentID']])) {
|
||||
|
@ -1764,7 +1764,7 @@ class SeedDMS_Core_User { /* {{{ */
|
|||
$status["indstatus"][$res['documentID']] = $res;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// See if the user is the member of a group that has been assigned to
|
||||
// review the document version.
|
||||
|
|
|
@ -216,7 +216,7 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify {
|
|||
|
||||
if (isset($GLOBALS['SEEDDMS_HOOKS']['mailqueue'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['mailqueue'] as $queueService) {
|
||||
if(method_exists($queueService, 'queueMailJob')) {
|
||||
if(method_exists($queueService, 'queueMailJob')) {
|
||||
$ret = $queueService->queueMailJob($mail_params, $to, $hdrs, getMLText($subject, $params, "", $lang), $message);
|
||||
if($ret !== null)
|
||||
return $ret;
|
||||
|
|
|
@ -446,8 +446,8 @@ class Settings { /* {{{ */
|
|||
*
|
||||
*/
|
||||
function arrayToString($value) { /* {{{ */
|
||||
return implode(";", $value);
|
||||
} /* }}} */
|
||||
return implode(";", $value);
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Return array from ';' seperated string
|
||||
|
@ -456,8 +456,8 @@ class Settings { /* {{{ */
|
|||
*
|
||||
*/
|
||||
function stringToArray($value) { /* {{{ */
|
||||
return explode(";", $Value);
|
||||
} /* }}} */
|
||||
return explode(";", $Value);
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* set $_viewOnlineFileTypes
|
||||
|
@ -465,9 +465,9 @@ class Settings { /* {{{ */
|
|||
* @param string $stringValue string value
|
||||
*
|
||||
*/
|
||||
function setViewOnlineFileTypesFromString($stringValue) { /* {{{ */
|
||||
$this->_viewOnlineFileTypes = explode(";", $stringValue);
|
||||
} /* }}} */
|
||||
function setViewOnlineFileTypesFromString($stringValue) { /* {{{ */
|
||||
$this->_viewOnlineFileTypes = explode(";", $stringValue);
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* get $_viewOnlineFileTypes in a string value
|
||||
|
@ -475,9 +475,9 @@ class Settings { /* {{{ */
|
|||
* @return string value
|
||||
*
|
||||
*/
|
||||
function getViewOnlineFileTypesToString() { /* {{{ */
|
||||
return implode(";", $this->_viewOnlineFileTypes);
|
||||
} /* }}} */
|
||||
function getViewOnlineFileTypesToString() { /* {{{ */
|
||||
return implode(";", $this->_viewOnlineFileTypes);
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* set $_editOnlineFileTypes
|
||||
|
@ -485,9 +485,9 @@ class Settings { /* {{{ */
|
|||
* @param string $stringValue string value
|
||||
*
|
||||
*/
|
||||
function setEditOnlineFileTypesFromString($stringValue) { /* {{{ */
|
||||
$this->_editOnlineFileTypes = explode(";", $stringValue);
|
||||
} /* }}} */
|
||||
function setEditOnlineFileTypesFromString($stringValue) { /* {{{ */
|
||||
$this->_editOnlineFileTypes = explode(";", $stringValue);
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* get $_editOnlineFileTypes in a string value
|
||||
|
@ -495,9 +495,9 @@ class Settings { /* {{{ */
|
|||
* @return string value
|
||||
*
|
||||
*/
|
||||
function getEditOnlineFileTypesToString() { /* {{{ */
|
||||
return implode(";", $this->_editOnlineFileTypes);
|
||||
} /* }}} */
|
||||
function getEditOnlineFileTypesToString() { /* {{{ */
|
||||
return implode(";", $this->_editOnlineFileTypes);
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Load config file
|
||||
|
@ -870,22 +870,22 @@ class Settings { /* {{{ */
|
|||
*
|
||||
* @return true/false
|
||||
*/
|
||||
protected function setXMLAttributValue($node, $attributName, $attributValue) { /* {{{ */
|
||||
if (is_bool($attributValue)) {
|
||||
if ($attributValue)
|
||||
$attributValue = "true";
|
||||
else
|
||||
$attributValue = "false";
|
||||
protected function setXMLAttributValue($node, $attributName, $attributValue) { /* {{{ */
|
||||
if (is_bool($attributValue)) {
|
||||
if ($attributValue)
|
||||
$attributValue = "true";
|
||||
else
|
||||
$attributValue = "false";
|
||||
} elseif(is_array($attributValue)) {
|
||||
$attributValue = implode(';', $attributValue);
|
||||
}
|
||||
|
||||
if (isset($node[$attributName])) {
|
||||
$node[$attributName] = $attributValue;
|
||||
} else {
|
||||
$node->addAttribute($attributName, $attributValue);
|
||||
}
|
||||
} /* }}} */
|
||||
if (isset($node[$attributName])) {
|
||||
$node[$attributName] = $attributValue;
|
||||
} else {
|
||||
$node->addAttribute($attributName, $attributValue);
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Get XML node, create it if not exists
|
||||
|
@ -917,12 +917,12 @@ class Settings { /* {{{ */
|
|||
* @return true/false
|
||||
*/
|
||||
public function save($configFilePath=NULL) { /* {{{ */
|
||||
if (is_null($configFilePath))
|
||||
$configFilePath = $this->_configFilePath;
|
||||
if (is_null($configFilePath))
|
||||
$configFilePath = $this->_configFilePath;
|
||||
|
||||
// Load
|
||||
$xml = simplexml_load_string(file_get_contents($configFilePath));
|
||||
$this->getXMLNode($xml, '/', 'configuration');
|
||||
// Load
|
||||
$xml = simplexml_load_string(file_get_contents($configFilePath));
|
||||
$this->getXMLNode($xml, '/', 'configuration');
|
||||
|
||||
// XML Path: /configuration/site/display
|
||||
$this->getXMLNode($xml, '/configuration', 'site');
|
||||
|
@ -1044,71 +1044,71 @@ class Settings { /* {{{ */
|
|||
$this->setXMLAttributValue($node, "enableUserImage", $this->_enableUserImage);
|
||||
$this->setXMLAttributValue($node, "disableSelfEdit", $this->_disableSelfEdit);
|
||||
|
||||
// XML Path: /configuration/system/authentication/connectors
|
||||
foreach($this->_usersConnectors as $keyConn => $paramConn)
|
||||
{
|
||||
// search XML node
|
||||
$node = $xml->xpath('/configuration/system/authentication/connectors/connector[@type="'. $keyConn .'"]');
|
||||
// XML Path: /configuration/system/authentication/connectors
|
||||
foreach($this->_usersConnectors as $keyConn => $paramConn)
|
||||
{
|
||||
// search XML node
|
||||
$node = $xml->xpath('/configuration/system/authentication/connectors/connector[@type="'. $keyConn .'"]');
|
||||
|
||||
// Just the first is configured
|
||||
if (isset($node))
|
||||
{
|
||||
if (count($node)>0)
|
||||
{
|
||||
$node = $node[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
$nodeParent = $xml->xpath('/configuration/system/authentication/connectors');
|
||||
$node = $nodeParent[0]->addChild("connector");
|
||||
}
|
||||
// Just the first is configured
|
||||
if (isset($node))
|
||||
{
|
||||
if (count($node)>0)
|
||||
{
|
||||
$node = $node[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
$nodeParent = $xml->xpath('/configuration/system/authentication/connectors');
|
||||
$node = $nodeParent[0]->addChild("connector");
|
||||
}
|
||||
|
||||
foreach($paramConn as $key => $value)
|
||||
{
|
||||
$this->setXMLAttributValue($node, $key, $value);
|
||||
}
|
||||
foreach($paramConn as $key => $value)
|
||||
{
|
||||
$this->setXMLAttributValue($node, $key, $value);
|
||||
}
|
||||
|
||||
} // isset($node)
|
||||
} // isset($node)
|
||||
|
||||
} // foreach
|
||||
} // foreach
|
||||
|
||||
// XML Path: /configuration/system/authentication/connectors
|
||||
// manage old settings parameters
|
||||
if (isset($this->_ldapHost) && (strlen($this->_ldapHost)>0))
|
||||
{
|
||||
if ($this->_ldapType == 1)
|
||||
{
|
||||
$node = $xml->xpath('/configuration/system/authentication/connectors/connector[@type="AD"]');
|
||||
$node = $node[0];
|
||||
$this->setXMLAttributValue($node, "accountDomainName", $this->_ldapAccountDomainName);
|
||||
}
|
||||
else
|
||||
{
|
||||
$node = $xml->xpath('/configuration/system/authentication/connectors/connector[@type="ldap"]');
|
||||
$node = $node[0];
|
||||
}
|
||||
// XML Path: /configuration/system/authentication/connectors
|
||||
// manage old settings parameters
|
||||
if (isset($this->_ldapHost) && (strlen($this->_ldapHost)>0))
|
||||
{
|
||||
if ($this->_ldapType == 1)
|
||||
{
|
||||
$node = $xml->xpath('/configuration/system/authentication/connectors/connector[@type="AD"]');
|
||||
$node = $node[0];
|
||||
$this->setXMLAttributValue($node, "accountDomainName", $this->_ldapAccountDomainName);
|
||||
}
|
||||
else
|
||||
{
|
||||
$node = $xml->xpath('/configuration/system/authentication/connectors/connector[@type="ldap"]');
|
||||
$node = $node[0];
|
||||
}
|
||||
|
||||
$this->setXMLAttributValue($node, "host", $this->_ldapHost);
|
||||
$this->setXMLAttributValue($node, "port", $this->_ldapPort);
|
||||
$this->setXMLAttributValue($node, "baseDN", $this->_ldapBaseDN);
|
||||
}
|
||||
$this->setXMLAttributValue($node, "host", $this->_ldapHost);
|
||||
$this->setXMLAttributValue($node, "port", $this->_ldapPort);
|
||||
$this->setXMLAttributValue($node, "baseDN", $this->_ldapBaseDN);
|
||||
}
|
||||
|
||||
// XML Path: /configuration/system/database
|
||||
$node = $this->getXMLNode($xml, '/configuration/system', 'database');
|
||||
$this->setXMLAttributValue($node, "dbDriver", $this->_dbDriver);
|
||||
$this->setXMLAttributValue($node, "dbHostname", $this->_dbHostname);
|
||||
$this->setXMLAttributValue($node, "dbDatabase", $this->_dbDatabase);
|
||||
$this->setXMLAttributValue($node, "dbUser", $this->_dbUser);
|
||||
$this->setXMLAttributValue($node, "dbPass", $this->_dbPass);
|
||||
$this->setXMLAttributValue($node, "doNotCheckDBVersion", $this->_doNotCheckDBVersion);
|
||||
// XML Path: /configuration/system/database
|
||||
$node = $this->getXMLNode($xml, '/configuration/system', 'database');
|
||||
$this->setXMLAttributValue($node, "dbDriver", $this->_dbDriver);
|
||||
$this->setXMLAttributValue($node, "dbHostname", $this->_dbHostname);
|
||||
$this->setXMLAttributValue($node, "dbDatabase", $this->_dbDatabase);
|
||||
$this->setXMLAttributValue($node, "dbUser", $this->_dbUser);
|
||||
$this->setXMLAttributValue($node, "dbPass", $this->_dbPass);
|
||||
$this->setXMLAttributValue($node, "doNotCheckDBVersion", $this->_doNotCheckDBVersion);
|
||||
|
||||
// XML Path: /configuration/system/smtp
|
||||
$node = $this->getXMLNode($xml, '/configuration/system', 'smtp');
|
||||
$this->setXMLAttributValue($node, "smtpServer", $this->_smtpServer);
|
||||
$this->setXMLAttributValue($node, "smtpPort", $this->_smtpPort);
|
||||
$this->setXMLAttributValue($node, "smtpSendFrom", $this->_smtpSendFrom);
|
||||
$this->setXMLAttributValue($node, "smtpUser", $this->_smtpUser);
|
||||
$this->setXMLAttributValue($node, "smtpPassword", $this->_smtpPassword);
|
||||
// XML Path: /configuration/system/smtp
|
||||
$node = $this->getXMLNode($xml, '/configuration/system', 'smtp');
|
||||
$this->setXMLAttributValue($node, "smtpServer", $this->_smtpServer);
|
||||
$this->setXMLAttributValue($node, "smtpPort", $this->_smtpPort);
|
||||
$this->setXMLAttributValue($node, "smtpSendFrom", $this->_smtpSendFrom);
|
||||
$this->setXMLAttributValue($node, "smtpUser", $this->_smtpUser);
|
||||
$this->setXMLAttributValue($node, "smtpPassword", $this->_smtpPassword);
|
||||
|
||||
// XML Path: /configuration/advanced/display
|
||||
$advnode = $this->getXMLNode($xml, '/configuration', 'advanced');
|
||||
|
@ -1119,62 +1119,62 @@ class Settings { /* {{{ */
|
|||
$this->setXMLAttributValue($node, "showMissingTranslations", $this->_showMissingTranslations);
|
||||
// $this->setXMLAttributValue($node, "hiddenConfFields", $this->_hiddenConfFields);
|
||||
|
||||
// XML Path: /configuration/advanced/authentication
|
||||
$node = $this->getXMLNode($xml, '/configuration/advanced', 'authentication');
|
||||
$this->setXMLAttributValue($node, "guestID", $this->_guestID);
|
||||
$this->setXMLAttributValue($node, "adminIP", $this->_adminIP);
|
||||
$this->setXMLAttributValue($node, "apiKey", $this->_apiKey);
|
||||
$this->setXMLAttributValue($node, "apiUserId", $this->_apiUserId);
|
||||
$this->setXMLAttributValue($node, "apiOrigin", $this->_apiOrigin);
|
||||
// XML Path: /configuration/advanced/authentication
|
||||
$node = $this->getXMLNode($xml, '/configuration/advanced', 'authentication');
|
||||
$this->setXMLAttributValue($node, "guestID", $this->_guestID);
|
||||
$this->setXMLAttributValue($node, "adminIP", $this->_adminIP);
|
||||
$this->setXMLAttributValue($node, "apiKey", $this->_apiKey);
|
||||
$this->setXMLAttributValue($node, "apiUserId", $this->_apiUserId);
|
||||
$this->setXMLAttributValue($node, "apiOrigin", $this->_apiOrigin);
|
||||
|
||||
// XML Path: /configuration/advanced/edition
|
||||
$node = $this->getXMLNode($xml, '/configuration/advanced', 'edition');
|
||||
$this->setXMLAttributValue($node, "enableAdminRevApp", $this->_enableAdminRevApp);
|
||||
$this->setXMLAttributValue($node, "enableOwnerRevApp", $this->_enableOwnerRevApp);
|
||||
$this->setXMLAttributValue($node, "enableSelfRevApp", $this->_enableSelfRevApp);
|
||||
$this->setXMLAttributValue($node, "enableUpdateRevApp", $this->_enableUpdateRevApp);
|
||||
$this->setXMLAttributValue($node, "enableRemoveRevApp", $this->_enableRemoveRevApp);
|
||||
$this->setXMLAttributValue($node, "enableSelfReceipt", $this->_enableSelfReceipt);
|
||||
$this->setXMLAttributValue($node, "enableAdminReceipt", $this->_enableAdminReceipt);
|
||||
$this->setXMLAttributValue($node, "enableOwnerReceipt", $this->_enableOwnerReceipt);
|
||||
$this->setXMLAttributValue($node, "enableUpdateReceipt", $this->_enableUpdateReceipt);
|
||||
$this->setXMLAttributValue($node, "enableFilterReceipt", $this->_enableFilterReceipt);
|
||||
$this->setXMLAttributValue($node, "presetExpirationDate", $this->_presetExpirationDate);
|
||||
$this->setXMLAttributValue($node, "initialDocumentStatus", $this->_initialDocumentStatus);
|
||||
$this->setXMLAttributValue($node, "versioningFileName", $this->_versioningFileName);
|
||||
$this->setXMLAttributValue($node, "workflowMode", $this->_workflowMode);
|
||||
$this->setXMLAttributValue($node, "enableReceiptWorkflow", $this->_enableReceiptWorkflow);
|
||||
$this->setXMLAttributValue($node, "enableReceiptReject", $this->_enableReceiptReject);
|
||||
$this->setXMLAttributValue($node, "enableRevisionWorkflow", $this->_enableRevisionWorkflow);
|
||||
$this->setXMLAttributValue($node, "enableRevisionOneVoteReject", $this->_enableRevisionOneVoteReject);
|
||||
$this->setXMLAttributValue($node, "allowReviewerOnly", $this->_allowReviewerOnly);
|
||||
$this->setXMLAttributValue($node, "allowChangeRevAppInProcess", $this->_allowChangeRevAppInProcess);
|
||||
$this->setXMLAttributValue($node, "enableVersionDeletion", $this->_enableVersionDeletion);
|
||||
$this->setXMLAttributValue($node, "enableVersionModification", $this->_enableVersionModification);
|
||||
$this->setXMLAttributValue($node, "enableDuplicateDocNames", $this->_enableDuplicateDocNames);
|
||||
$this->setXMLAttributValue($node, "enableDuplicateSubFolderNames", $this->_enableDuplicateSubFolderNames);
|
||||
$this->setXMLAttributValue($node, "enableCancelCheckout", $this->_enableCancelCheckout);
|
||||
$this->setXMLAttributValue($node, "overrideMimeType", $this->_overrideMimeType);
|
||||
$this->setXMLAttributValue($node, "advancedAcl", $this->_advancedAcl);
|
||||
$this->setXMLAttributValue($node, "removeFromDropFolder", $this->_removeFromDropFolder);
|
||||
// XML Path: /configuration/advanced/edition
|
||||
$node = $this->getXMLNode($xml, '/configuration/advanced', 'edition');
|
||||
$this->setXMLAttributValue($node, "enableAdminRevApp", $this->_enableAdminRevApp);
|
||||
$this->setXMLAttributValue($node, "enableOwnerRevApp", $this->_enableOwnerRevApp);
|
||||
$this->setXMLAttributValue($node, "enableSelfRevApp", $this->_enableSelfRevApp);
|
||||
$this->setXMLAttributValue($node, "enableUpdateRevApp", $this->_enableUpdateRevApp);
|
||||
$this->setXMLAttributValue($node, "enableRemoveRevApp", $this->_enableRemoveRevApp);
|
||||
$this->setXMLAttributValue($node, "enableSelfReceipt", $this->_enableSelfReceipt);
|
||||
$this->setXMLAttributValue($node, "enableAdminReceipt", $this->_enableAdminReceipt);
|
||||
$this->setXMLAttributValue($node, "enableOwnerReceipt", $this->_enableOwnerReceipt);
|
||||
$this->setXMLAttributValue($node, "enableUpdateReceipt", $this->_enableUpdateReceipt);
|
||||
$this->setXMLAttributValue($node, "enableFilterReceipt", $this->_enableFilterReceipt);
|
||||
$this->setXMLAttributValue($node, "presetExpirationDate", $this->_presetExpirationDate);
|
||||
$this->setXMLAttributValue($node, "initialDocumentStatus", $this->_initialDocumentStatus);
|
||||
$this->setXMLAttributValue($node, "versioningFileName", $this->_versioningFileName);
|
||||
$this->setXMLAttributValue($node, "workflowMode", $this->_workflowMode);
|
||||
$this->setXMLAttributValue($node, "enableReceiptWorkflow", $this->_enableReceiptWorkflow);
|
||||
$this->setXMLAttributValue($node, "enableReceiptReject", $this->_enableReceiptReject);
|
||||
$this->setXMLAttributValue($node, "enableRevisionWorkflow", $this->_enableRevisionWorkflow);
|
||||
$this->setXMLAttributValue($node, "enableRevisionOneVoteReject", $this->_enableRevisionOneVoteReject);
|
||||
$this->setXMLAttributValue($node, "allowReviewerOnly", $this->_allowReviewerOnly);
|
||||
$this->setXMLAttributValue($node, "allowChangeRevAppInProcess", $this->_allowChangeRevAppInProcess);
|
||||
$this->setXMLAttributValue($node, "enableVersionDeletion", $this->_enableVersionDeletion);
|
||||
$this->setXMLAttributValue($node, "enableVersionModification", $this->_enableVersionModification);
|
||||
$this->setXMLAttributValue($node, "enableDuplicateDocNames", $this->_enableDuplicateDocNames);
|
||||
$this->setXMLAttributValue($node, "enableDuplicateSubFolderNames", $this->_enableDuplicateSubFolderNames);
|
||||
$this->setXMLAttributValue($node, "enableCancelCheckout", $this->_enableCancelCheckout);
|
||||
$this->setXMLAttributValue($node, "overrideMimeType", $this->_overrideMimeType);
|
||||
$this->setXMLAttributValue($node, "advancedAcl", $this->_advancedAcl);
|
||||
$this->setXMLAttributValue($node, "removeFromDropFolder", $this->_removeFromDropFolder);
|
||||
|
||||
// XML Path: /configuration/advanced/notification
|
||||
$node = $this->getXMLNode($xml, '/configuration/advanced', 'notification');
|
||||
$this->setXMLAttributValue($node, "enableNotificationAppRev", $this->_enableNotificationAppRev);
|
||||
$this->setXMLAttributValue($node, "enableOwnerNotification", $this->_enableOwnerNotification);
|
||||
$this->setXMLAttributValue($node, "enableNotificationWorkflow", $this->_enableNotificationWorkflow);
|
||||
// XML Path: /configuration/advanced/notification
|
||||
$node = $this->getXMLNode($xml, '/configuration/advanced', 'notification');
|
||||
$this->setXMLAttributValue($node, "enableNotificationAppRev", $this->_enableNotificationAppRev);
|
||||
$this->setXMLAttributValue($node, "enableOwnerNotification", $this->_enableOwnerNotification);
|
||||
$this->setXMLAttributValue($node, "enableNotificationWorkflow", $this->_enableNotificationWorkflow);
|
||||
|
||||
// XML Path: /configuration/advanced/server
|
||||
$node = $this->getXMLNode($xml, '/configuration/advanced', 'server');
|
||||
$this->setXMLAttributValue($node, "coreDir", $this->_coreDir);
|
||||
$this->setXMLAttributValue($node, "luceneClassDir", $this->_luceneClassDir);
|
||||
$this->setXMLAttributValue($node, "extraPath", $this->_extraPath);
|
||||
$this->setXMLAttributValue($node, "contentOffsetDir", $this->_contentOffsetDir);
|
||||
$this->setXMLAttributValue($node, "maxDirID", $this->_maxDirID);
|
||||
$this->setXMLAttributValue($node, "updateNotifyTime", $this->_updateNotifyTime);
|
||||
$this->setXMLAttributValue($node, "maxExecutionTime", $this->_maxExecutionTime);
|
||||
$this->setXMLAttributValue($node, "cmdTimeout", $this->_cmdTimeout);
|
||||
$this->setXMLAttributValue($node, "enableDebugMode", $this->_enableDebugMode);
|
||||
// XML Path: /configuration/advanced/server
|
||||
$node = $this->getXMLNode($xml, '/configuration/advanced', 'server');
|
||||
$this->setXMLAttributValue($node, "coreDir", $this->_coreDir);
|
||||
$this->setXMLAttributValue($node, "luceneClassDir", $this->_luceneClassDir);
|
||||
$this->setXMLAttributValue($node, "extraPath", $this->_extraPath);
|
||||
$this->setXMLAttributValue($node, "contentOffsetDir", $this->_contentOffsetDir);
|
||||
$this->setXMLAttributValue($node, "maxDirID", $this->_maxDirID);
|
||||
$this->setXMLAttributValue($node, "updateNotifyTime", $this->_updateNotifyTime);
|
||||
$this->setXMLAttributValue($node, "maxExecutionTime", $this->_maxExecutionTime);
|
||||
$this->setXMLAttributValue($node, "cmdTimeout", $this->_cmdTimeout);
|
||||
$this->setXMLAttributValue($node, "enableDebugMode", $this->_enableDebugMode);
|
||||
|
||||
/* Check if there is still a converters list with a target attribute */
|
||||
$node = $xml->xpath('/configuration/advanced/converters[count(@*)=0]');
|
||||
|
@ -1213,8 +1213,8 @@ class Settings { /* {{{ */
|
|||
} // foreach
|
||||
|
||||
|
||||
// XML Path: /configuration/extensions
|
||||
$extnodes = $xml->xpath('/configuration/extensions');
|
||||
// XML Path: /configuration/extensions
|
||||
$extnodes = $xml->xpath('/configuration/extensions');
|
||||
if(!$extnodes) {
|
||||
$nodeParent = $xml->xpath('/configuration');
|
||||
$extnodes = $nodeParent[0]->addChild("extensions");
|
||||
|
@ -1222,9 +1222,9 @@ class Settings { /* {{{ */
|
|||
unset($xml->extensions);
|
||||
$extnodes = $xml->addChild("extensions");
|
||||
}
|
||||
foreach($this->_extensions as $name => $extension)
|
||||
foreach($this->_extensions as $name => $extension)
|
||||
{
|
||||
// search XML node
|
||||
// search XML node
|
||||
$extnode = $extnodes->addChild('extension');
|
||||
$this->setXMLAttributValue($extnode, 'name', $name);
|
||||
$this->setXMLAttributValue($extnode, 'disable', $extension['__disable__'] ? 'true' : 'false');
|
||||
|
@ -1250,10 +1250,10 @@ class Settings { /* {{{ */
|
|||
*/
|
||||
|
||||
|
||||
} // foreach
|
||||
} // foreach
|
||||
|
||||
// Save
|
||||
return $xml->asXML($configFilePath);
|
||||
// Save
|
||||
return $xml->asXML($configFilePath);
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
|
@ -1325,15 +1325,15 @@ class Settings { /* {{{ */
|
|||
$pageURL = 'http';
|
||||
|
||||
if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") {
|
||||
$pageURL .= "s";
|
||||
$pageURL .= "s";
|
||||
}
|
||||
|
||||
$pageURL .= "://";
|
||||
|
||||
if ($_SERVER["SERVER_PORT"] != "80") {
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
} else {
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
|
||||
return $pageURL;
|
||||
|
|
|
@ -39,25 +39,25 @@ if(!trim($settings->_encryptionKey)) {
|
|||
$__basedir = dirname(dirname(__DIR__));
|
||||
$__datadir = dirname(dirname(__DIR__))."/data";;
|
||||
if(empty($settings->_rootDir)) {
|
||||
$settings->_rootDir = $__basedir."/www/";
|
||||
$settings->_rootDir = $__basedir."/www/";
|
||||
}
|
||||
if(empty($settings->_contentDir)) {
|
||||
$settings->_contentDir = $__basedir;
|
||||
$settings->_contentDir = $__basedir;
|
||||
}
|
||||
if(empty($settings->_cacheDir)) {
|
||||
$settings->_cacheDir = $__datadir."/cache/";
|
||||
$settings->_cacheDir = $__datadir."/cache/";
|
||||
}
|
||||
if(empty($settings->_backupDir)) {
|
||||
$settings->_backupDir = $__datadir."/backup/";
|
||||
$settings->_backupDir = $__datadir."/backup/";
|
||||
}
|
||||
if(empty($settings->_luceneDir)) {
|
||||
$settings->_luceneDir = $__datadir."/lucene/";
|
||||
$settings->_luceneDir = $__datadir."/lucene/";
|
||||
}
|
||||
if(empty($settings->_stagingDir)) {
|
||||
$settings->_stagingDir = $__datadir."/lucene/";
|
||||
$settings->_stagingDir = $__datadir."/lucene/";
|
||||
}
|
||||
if($settings->_dbDriver == 'sqlite' && empty($settings->_dbDatabase)) {
|
||||
$settings->_dbDatabase = $__datadir."/content.db";
|
||||
$settings->_dbDatabase = $__datadir."/content.db";
|
||||
}
|
||||
|
||||
ini_set('include_path', $settings->_rootDir.'pear'. PATH_SEPARATOR .ini_get('include_path'));
|
||||
|
|
|
@ -1045,12 +1045,12 @@ class SeedDMS_JwtToken { /* {{{ */
|
|||
class SeedDMS_FolderTree { /* {{{ */
|
||||
|
||||
public function __construct($folder, $callback) { /* {{{ */
|
||||
$iter = new \SeedDMS\RecursiveFolderIterator($folder);
|
||||
$iter2 = new RecursiveIteratorIterator($iter, RecursiveIteratorIterator::SELF_FIRST);
|
||||
$iter = new \SeedDMS\RecursiveFolderIterator($folder);
|
||||
$iter2 = new RecursiveIteratorIterator($iter, RecursiveIteratorIterator::SELF_FIRST);
|
||||
foreach($iter2 as $ff) {
|
||||
call_user_func($callback, $ff, $iter2->getDepth());
|
||||
// echo $ff->getID().': '.$ff->getFolderPathPlain().'-'.$ff->getName()."<br />";
|
||||
}
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
} /* }}} */
|
||||
|
|
Loading…
Reference in New Issue
Block a user