mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 05:11:27 +00:00 
			
		
		
		
	Merge branch 'seeddms-4.3.11'
This commit is contained in:
		
						commit
						572e742e07
					
				
							
								
								
									
										11
									
								
								CHANGELOG
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								CHANGELOG
									
									
									
									
									
								
							|  | @ -1,3 +1,14 @@ | |||
| -------------------------------------------------------------------------------- | ||||
|                      Changes in version 4.3.11 | ||||
| -------------------------------------------------------------------------------- | ||||
| - translation updates | ||||
| - password expiration can be set to 'never' | ||||
| - fixed saving multi value attributes | ||||
| - do not close browser window anymore when keywords are chosen (Bug #141) | ||||
| - fix almost unrestricted fast upload (Bug #175) | ||||
| - no more php warning on Workflow summary page (Bug #177) | ||||
| - various bug fixes in saving and searching for multi value attributes | ||||
| 
 | ||||
| -------------------------------------------------------------------------------- | ||||
|                      Changes in version 4.3.10 | ||||
| -------------------------------------------------------------------------------- | ||||
|  |  | |||
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							|  | @ -1,4 +1,4 @@ | |||
| VERSION=4.3.10 | ||||
| VERSION=4.3.11 | ||||
| SRC=CHANGELOG inc conf utils index.php languages views op out README.md README.Notification README.Ubuntu drop-tables-innodb.sql styles js TODO LICENSE Makefile webdav install restapi | ||||
| # webapp
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -91,8 +91,33 @@ class SeedDMS_Core_Attribute { /* {{{ */ | |||
| 
 | ||||
| 	function getID() { return $this->_id; } | ||||
| 
 | ||||
| 	/** | ||||
| 	 * Return attribute value as stored in database | ||||
| 	 * | ||||
| 	 * This function will return the value of multi value attributes | ||||
| 	 * including the separator char. | ||||
| 	 * | ||||
| 	 * @return string the attribute value as it is stored in the database. | ||||
| 	 */ | ||||
| 	function getValue() { return $this->_value; } | ||||
| 
 | ||||
| 	/** | ||||
| 	 * Return attribute values as an array | ||||
| 	 * | ||||
| 	 * This function returns the attribute value as an array. Such an array | ||||
| 	 * has one element for non multi value attributes and n elements for | ||||
| 	 * multi value attributes. | ||||
| 	 * | ||||
| 	 * @return array the attribute values | ||||
| 	 */ | ||||
| 	function getValueAsArray() { /* {{{ */ | ||||
| 		if($this->_attrdef->getMultipleValues()) { | ||||
| 			return explode($this->_value[0], substr($this->_value, 1)); | ||||
| 		} else { | ||||
| 			return array($this->_value); | ||||
| 		} | ||||
| 	} /* }}} */ | ||||
| 
 | ||||
| 	/** | ||||
| 	 * Set a value of an attribute | ||||
| 	 * The attribute is deleted completely if the value is the empty string | ||||
|  |  | |||
|  | @ -243,7 +243,7 @@ class SeedDMS_Core_DMS { | |||
| 		$this->convertFileTypes = array(); | ||||
| 		$this->version = '@package_version@'; | ||||
| 		if($this->version[0] == '@') | ||||
| 			$this->version = '4.3.10'; | ||||
| 			$this->version = '4.3.11'; | ||||
| 	} /* }}} */ | ||||
| 
 | ||||
| 	function getDB() { /* {{{ */ | ||||
|  | @ -550,7 +550,9 @@ class SeedDMS_Core_DMS { | |||
| 	 * @param modificationstartdate array search for documents modified after this date | ||||
| 	 * @param modificationenddate array search for documents modified before this date | ||||
| 	 * @param categories array list of categories the documents must have assigned | ||||
| 	 * @param attributes array list of attributes | ||||
| 	 * @param attributes array list of attributes. The key of this array is the | ||||
| 	 * attribute definition id. The value of the array is the value of the | ||||
| 	 * attribute. If the attribute may have multiple values it must be an array. | ||||
| 	 * @param mode int decide whether to search for documents/folders | ||||
| 	 *        0x1 = documents only | ||||
| 	 *        0x2 = folders only | ||||
|  | @ -623,10 +625,13 @@ class SeedDMS_Core_DMS { | |||
| 				foreach($attributes as $attrdefid=>$attribute) { | ||||
| 					if($attribute) { | ||||
| 						$attrdef = $this->getAttributeDefinition($attrdefid); | ||||
| 						if($attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_folder) { | ||||
| 							if($attrdef->getValueSet()) | ||||
| 								$searchAttributes[] = "`tblFolderAttributes`.`attrdef`=".$attrdefid." AND `tblFolderAttributes`.`value`='".$attribute."'"; | ||||
| 							else | ||||
| 						if($attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_folder || $attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_all) { | ||||
| 							if($valueset = $attrdef->getValueSet()) { | ||||
| 								if($attrdef->getMultipleValues()) { | ||||
| 									$searchAttributes[] = "`tblFolderAttributes`.`attrdef`=".$attrdefid." AND (`tblFolderAttributes`.`value` like '".$valueset[0].implode("%' OR `tblFolderAttributes`.`value` like '".$valueset[0], $attribute)."%')"; | ||||
| 								} else | ||||
| 									$searchAttributes[] = "`tblFolderAttributes`.`attrdef`=".$attrdefid." AND `tblDocumentAttributes`.`value`='".$attribute."'"; | ||||
| 							} else | ||||
| 								$searchAttributes[] = "`tblFolderAttributes`.`attrdef`=".$attrdefid." AND `tblFolderAttributes`.`value` like '%".$attribute."%'"; | ||||
| 						} | ||||
| 					} | ||||
|  | @ -783,10 +788,13 @@ class SeedDMS_Core_DMS { | |||
| 				foreach($attributes as $attrdefid=>$attribute) { | ||||
| 					if($attribute) { | ||||
| 						$attrdef = $this->getAttributeDefinition($attrdefid); | ||||
| 						if($attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_document) { | ||||
| 							if($attrdef->getValueSet()) | ||||
| 								$searchAttributes[] = "`tblDocumentAttributes`.`attrdef`=".$attrdefid." AND `tblDocumentAttributes`.`value`='".$attribute."'"; | ||||
| 							else | ||||
| 						if($attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_document || $attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_all) { | ||||
| 							if($valueset = $attrdef->getValueSet()) { | ||||
| 								if($attrdef->getMultipleValues()) { | ||||
| 									$searchAttributes[] = "`tblDocumentAttributes`.`attrdef`=".$attrdefid." AND (`tblDocumentAttributes`.`value` like '".$valueset[0].implode("%' OR `tblDocumentAttributes`.`value` like '".$valueset[0], $attribute)."%')"; | ||||
| 								} else | ||||
| 									$searchAttributes[] = "`tblDocumentAttributes`.`attrdef`=".$attrdefid." AND `tblDocumentAttributes`.`value`='".$attribute."'"; | ||||
| 							} else | ||||
| 								$searchAttributes[] = "`tblDocumentAttributes`.`attrdef`=".$attrdefid." AND `tblDocumentAttributes`.`value` like '%".$attribute."%'"; | ||||
| 						} elseif($attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_documentcontent) { | ||||
| 							if($attrdef->getValueSet()) | ||||
|  |  | |||
|  | @ -451,7 +451,7 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { | |||
| 
 | ||||
| 		if($attributes) { | ||||
| 			foreach($attributes as $attrdefid=>$attribute) { | ||||
| 				if(trim($attribute)) | ||||
| 				if($attribute) | ||||
| 					if(!$newFolder->setAttributeValue($this->_dms->getAttributeDefinition($attrdefid), $attribute)) { | ||||
| 						$db->rollbackTransaction(); | ||||
| 						return false; | ||||
|  | @ -750,7 +750,8 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { | |||
| 
 | ||||
| 		if($attributes) { | ||||
| 			foreach($attributes as $attrdefid=>$attribute) { | ||||
| 				if(trim($attribute)) | ||||
| 				/* $attribute can be a string or an array */ | ||||
| 				if($attribute) | ||||
| 					if(!$document->setAttributeValue($this->_dms->getAttributeDefinition($attrdefid), $attribute)) { | ||||
| 						$document->remove(); | ||||
| 						$db->rollbackTransaction(); | ||||
|  |  | |||
|  | @ -12,11 +12,11 @@ | |||
|   <email>uwe@steinmann.cx</email> | ||||
|   <active>yes</active> | ||||
|  </lead> | ||||
|  <date>2014-10-22</date> | ||||
|  <time>14:13:32</time> | ||||
|  <date>2014-11-13</date> | ||||
|  <time>09:09:35</time> | ||||
|  <version> | ||||
|   <release>4.3.10</release> | ||||
|   <api>4.3.10</api> | ||||
|   <release>4.3.11</release> | ||||
|   <api>4.3.11</api> | ||||
|  </version> | ||||
|  <stability> | ||||
|   <release>stable</release> | ||||
|  | @ -24,7 +24,8 @@ | |||
|  </stability> | ||||
|  <license uri="http://opensource.org/licenses/gpl-license">GPL License</license> | ||||
|  <notes> | ||||
| new release | ||||
| - fixed saving multivalue attributes | ||||
| - add method SeedDMS_Core_Attribute::getValueAsArray() | ||||
|  </notes> | ||||
|  <contents> | ||||
|   <dir baseinstalldir="SeedDMS" name="/"> | ||||
|  | @ -700,5 +701,21 @@ no changes | |||
| - SeedDMS_Core_DMS::addUser() doesn't throw an error if sql_mode is set to STRICT_TRANS_TABLES and pwdexpiration is not set to a valid date. | ||||
| 	 </notes> | ||||
|   </release> | ||||
|   <release> | ||||
|    <date>2014-10-22</date> | ||||
|    <time>14:13:32</time> | ||||
|    <version> | ||||
|     <release>4.3.10</release> | ||||
|     <api>4.3.10</api> | ||||
|    </version> | ||||
|    <stability> | ||||
|     <release>stable</release> | ||||
|     <api>stable</api> | ||||
|    </stability> | ||||
|    <license uri="http://opensource.org/licenses/gpl-license">GPL License</license> | ||||
|    <notes> | ||||
| new release | ||||
|    </notes> | ||||
|   </release> | ||||
|  </changelog> | ||||
| </package> | ||||
|  |  | |||
|  | @ -20,7 +20,7 @@ | |||
| 
 | ||||
| class SeedDMS_Version { | ||||
| 
 | ||||
| 	public $_number = "4.3.10"; | ||||
| 	public $_number = "4.3.11"; | ||||
| 	private $_string = "SeedDMS"; | ||||
| 
 | ||||
| 	function SeedDMS_Version() { | ||||
|  |  | |||
|  | @ -116,7 +116,7 @@ function fileExistsInIncludePath($file) { /* {{{ */ | |||
|  * Load default settings + set | ||||
|  */ | ||||
| define("SEEDDMS_INSTALL", "on"); | ||||
| define("SEEDDMS_VERSION", "4.3.10"); | ||||
| define("SEEDDMS_VERSION", "4.3.11"); | ||||
| 
 | ||||
| require_once('../inc/inc.ClassSettings.php'); | ||||
| 
 | ||||
|  |  | |||
|  | @ -526,6 +526,7 @@ URL: [url]', | |||
| 'my_documents' => 'مستنداتي', | ||||
| 'name' => 'اسم', | ||||
| 'needs_workflow_action' => 'هذا المستند يتطلب انتباهك . من فضلك تفقد زر مسار العمل', | ||||
| 'never' => '', | ||||
| 'new' => 'جديد', | ||||
| 'new_attrdef' => 'اضافة تعريف سمة', | ||||
| 'new_default_keywords' => 'اضافة كلمات بحث', | ||||
|  |  | |||
|  | @ -457,6 +457,7 @@ $text = array( | |||
| 'my_documents' => 'Els meus documents', | ||||
| 'name' => 'Nom', | ||||
| 'needs_workflow_action' => '', | ||||
| 'never' => '', | ||||
| 'new' => 'Nou', | ||||
| 'new_attrdef' => '', | ||||
| 'new_default_keywords' => 'Afegir mots clau', | ||||
|  |  | |||
|  | @ -533,6 +533,7 @@ URL: [url]', | |||
| 'my_documents' => 'Moje dokumenty', | ||||
| 'name' => 'Název', | ||||
| 'needs_workflow_action' => 'Tento dokument vyžaduje Vaši pozornost. Prosím zkontrolujte záložku pracovního postupu.', | ||||
| 'never' => '', | ||||
| 'new' => 'Nový', | ||||
| 'new_attrdef' => 'Přidat definici atributu', | ||||
| 'new_default_keywords' => 'Přidat klíčová slova', | ||||
|  |  | |||
|  | @ -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 (1910)
 | ||||
| //    Translators: Admin (1911)
 | ||||
| 
 | ||||
| $text = array( | ||||
| 'accept' => 'Übernehmen', | ||||
|  | @ -533,6 +533,7 @@ URL: [url]', | |||
| 'my_documents' => 'Meine Dokumente', | ||||
| 'name' => 'Name', | ||||
| 'needs_workflow_action' => 'Diese Dokument erfordert eine Aktion. Bitte schauen Sie auf den Workflow-Reiter.', | ||||
| 'never' => 'nie', | ||||
| 'new' => 'Neu', | ||||
| 'new_attrdef' => 'Neue Attributdefinition', | ||||
| 'new_default_keywords' => 'Neue Vorlage', | ||||
|  |  | |||
|  | @ -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 (1048), netixw (14)
 | ||||
| //    Translators: Admin (1049), netixw (14)
 | ||||
| 
 | ||||
| $text = array( | ||||
| 'accept' => 'Accept', | ||||
|  | @ -533,6 +533,7 @@ URL: [url]', | |||
| 'my_documents' => 'My Documents', | ||||
| 'name' => 'Name', | ||||
| 'needs_workflow_action' => 'This document requires your attention. Please check the workflow tab.', | ||||
| 'never' => 'never', | ||||
| 'new' => 'New', | ||||
| 'new_attrdef' => 'Add attribute defintion', | ||||
| 'new_default_keywords' => 'Add keywords', | ||||
|  |  | |||
|  | @ -533,6 +533,7 @@ URL: [url]', | |||
| 'my_documents' => 'Mis documentos', | ||||
| 'name' => 'Nombre', | ||||
| 'needs_workflow_action' => 'Este documento requiere su atención. Por favor chequee la pestaña de flujo de trabajo.', | ||||
| 'never' => '', | ||||
| 'new' => 'Nuevo', | ||||
| 'new_attrdef' => 'Nueva definición de atributo', | ||||
| 'new_default_keywords' => 'Agregar palabras claves', | ||||
|  |  | |||
|  | @ -526,6 +526,7 @@ URL: [url]', | |||
| 'my_documents' => 'Mes documents', | ||||
| 'name' => 'Nom', | ||||
| 'needs_workflow_action' => 'Ce document requiert votre attention. Consultez l\'onglet workflow.', | ||||
| 'never' => '', | ||||
| 'new' => 'Nouveau', | ||||
| 'new_attrdef' => 'Ajouter une définition d\'attribut', | ||||
| 'new_default_keywords' => 'Ajouter des mots-clés', | ||||
|  |  | |||
|  | @ -533,6 +533,7 @@ URL: [url]', | |||
| 'my_documents' => 'Saját dokumentumok', | ||||
| 'name' => 'Név', | ||||
| 'needs_workflow_action' => 'Ez a dokumentum az Ön beavatkozására vár. Ellenőrizze a munkafolyamat fület.', | ||||
| 'never' => '', | ||||
| 'new' => 'Új', | ||||
| 'new_attrdef' => 'Jellemző meghatározás hozzáadása', | ||||
| 'new_default_keywords' => 'Kulcsszó hozzáadása', | ||||
|  |  | |||
|  | @ -457,6 +457,7 @@ $text = array( | |||
| 'my_documents' => 'Documenti personali', | ||||
| 'name' => 'Nome', | ||||
| 'needs_workflow_action' => '', | ||||
| 'never' => '', | ||||
| 'new' => 'Nuovo', | ||||
| 'new_attrdef' => 'Nuovo attributo', | ||||
| 'new_default_keywords' => 'Aggiungi parole chiave', | ||||
|  |  | |||
|  | @ -526,6 +526,7 @@ URL: [url]', | |||
| 'my_documents' => 'Mijn Documenten', | ||||
| 'name' => 'Naam', | ||||
| 'needs_workflow_action' => 'Dit document vereist uw aandacht. Bekijk deze onder het tabblad workflows.', | ||||
| 'never' => '', | ||||
| 'new' => 'Nieuw', | ||||
| 'new_attrdef' => 'Voeg kenmerk definitie toe', | ||||
| 'new_default_keywords' => 'Sleutelwoorden toevoegen', | ||||
|  |  | |||
|  | @ -526,6 +526,7 @@ URL: [url]', | |||
| 'my_documents' => 'Moje dokumenty', | ||||
| 'name' => 'Nazwa', | ||||
| 'needs_workflow_action' => 'Dokument wymaga uwagi. Proszę sprawdzić kartę workflow.', | ||||
| 'never' => '', | ||||
| 'new' => 'Nowy', | ||||
| 'new_attrdef' => 'Dodaj definicję atrybutu', | ||||
| 'new_default_keywords' => 'Dodaj słowa kluczowe', | ||||
|  |  | |||
|  | @ -532,6 +532,7 @@ URL: [url]', | |||
| 'my_documents' => 'Meus Documentos', | ||||
| 'name' => 'Nome', | ||||
| 'needs_workflow_action' => 'Este documento requer sua atenção. Por favor, verifique a guia de fluxo de trabalho.', | ||||
| 'never' => '', | ||||
| 'new' => 'Novo', | ||||
| 'new_attrdef' => 'Adicionar definição de atributo', | ||||
| 'new_default_keywords' => 'Adicionar palavras-chave', | ||||
|  |  | |||
|  | @ -526,6 +526,7 @@ URL: [url]', | |||
| 'my_documents' => 'Мои документы', | ||||
| 'name' => 'Имя', | ||||
| 'needs_workflow_action' => 'Этот документ требует вашего внимания. См. вкладку «Процесс».', | ||||
| 'never' => '', | ||||
| 'new' => 'Новый', | ||||
| 'new_attrdef' => 'Добавить определение атрибута', | ||||
| 'new_default_keywords' => 'Добавить метки', | ||||
|  |  | |||
|  | @ -457,6 +457,7 @@ $text = array( | |||
| 'my_documents' => 'Moje dokumenty', | ||||
| 'name' => 'Meno', | ||||
| 'needs_workflow_action' => '', | ||||
| 'never' => '', | ||||
| 'new' => 'Nove', | ||||
| 'new_attrdef' => '', | ||||
| 'new_default_keywords' => 'Pridať kľúčové slová', | ||||
|  |  | |||
|  | @ -526,6 +526,7 @@ URL: [url]', | |||
| 'my_documents' => 'Mina dokument', | ||||
| 'name' => 'Namn', | ||||
| 'needs_workflow_action' => 'Detta dokument behöver din uppmärksamhet. Kolla arbetsflödet.', | ||||
| 'never' => '', | ||||
| 'new' => 'Ny', | ||||
| 'new_attrdef' => 'Lägg till attributdefinition', | ||||
| 'new_default_keywords' => 'Lägg till nyckelord', | ||||
|  |  | |||
|  | @ -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 (541), fengjohn (5)
 | ||||
| //    Translators: Admin (542), fengjohn (5)
 | ||||
| 
 | ||||
| $text = array( | ||||
| 'accept' => '接受', | ||||
|  | @ -124,7 +124,7 @@ URL: [url]', | |||
| 'backup_remove' => '删除备份', | ||||
| 'backup_tools' => '备份工具', | ||||
| 'between' => '时间段', | ||||
| 'browse' => '', | ||||
| 'browse' => '浏览', | ||||
| 'calendar' => '日历', | ||||
| 'calendar_week' => '', | ||||
| 'cancel' => '取消', | ||||
|  | @ -461,6 +461,7 @@ URL: [url]', | |||
| 'my_documents' => '我的文档', | ||||
| 'name' => '名称', | ||||
| 'needs_workflow_action' => '', | ||||
| 'never' => '', | ||||
| 'new' => 'New', | ||||
| 'new_attrdef' => '添加属性', | ||||
| 'new_default_keywords' => '添加关键字', | ||||
|  |  | |||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -443,6 +443,20 @@ switch($command) { | |||
| 					echo json_encode(array('success'=>false, 'message'=>getMLText("invalid_folder_id"))); | ||||
| 					exit; | ||||
| 				} | ||||
| 
 | ||||
| 				if ($folder->getAccessMode($user) < M_READWRITE) { | ||||
| 					echo json_encode(array('success'=>false, 'message'=>getMLText("access_denied"))); | ||||
| 					exit; | ||||
| 				} | ||||
| 
 | ||||
| 				if($settings->_quota > 0) { | ||||
| 					$remain = checkQuota($user); | ||||
| 					if ($remain < 0) { | ||||
| 						echo json_encode(array('success'=>false, 'message'=>getMLText("quota_exceeded", array('bytes'=>SeedDMS_Core_File::format_filesize(abs($remain)))))); | ||||
| 						exit; | ||||
| 					} | ||||
| 				} | ||||
| 
 | ||||
| 				if (!is_uploaded_file($_FILES["userfile"]["tmp_name"]) || $_FILES['userfile']['error']!=0){ | ||||
| 					header('Content-Type', 'application/json'); | ||||
| 					echo json_encode(array('success'=>false, 'message'=>getMLText("uploading_failed"))); | ||||
|  |  | |||
|  | @ -436,7 +436,7 @@ if(count($entries) == 1 && ($resArr['totalDocs'] + $resArr['totalFolders']) == 1 | |||
| 		$view->setParam('status', isset($status) ? $status : array()); | ||||
| 		$view->setParam('categories', isset($categories) ? $categories : ''); | ||||
| 		$view->setParam('attributes', isset($attributes) ? $attributes : ''); | ||||
| 		$attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_document, SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_folder/*, SeedDMS_Core_AttributeDefinition::objtype_all*/)); | ||||
| 		$attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_document, SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_folder, SeedDMS_Core_AttributeDefinition::objtype_all)); | ||||
| 		$view->setParam('attrdefs', $attrdefs); | ||||
| 		$allCats = $dms->getDocumentCategories(); | ||||
| 		$view->setParam('allcategories', $allCats); | ||||
|  |  | |||
|  | @ -23,6 +23,7 @@ include("../inc/inc.Utils.php"); | |||
| include("../inc/inc.DBInit.php"); | ||||
| include("../inc/inc.Language.php"); | ||||
| include("../inc/inc.ClassUI.php"); | ||||
| include("../inc/inc.ClassAccessOperation.php"); | ||||
| include("../inc/inc.Authentication.php"); | ||||
| 
 | ||||
| if (!$user->isAdmin()) { | ||||
|  | @ -56,9 +57,13 @@ if (!is_object($workflow)) { | |||
| 
 | ||||
| $folder = $document->getFolder(); | ||||
| 
 | ||||
| /* Create object for checking access to certain operations */ | ||||
| $accessop = new SeedDMS_AccessOperation($document, $user, $settings); | ||||
| 
 | ||||
| $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); | ||||
| $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$version)); | ||||
| if($view) { | ||||
| 	$view->setParam('accessobject', $accessop); | ||||
| 	$view->show(); | ||||
| 	exit; | ||||
| } | ||||
|  |  | |||
|  | @ -23,6 +23,7 @@ include("../inc/inc.Utils.php"); | |||
| include("../inc/inc.DBInit.php"); | ||||
| include("../inc/inc.Language.php"); | ||||
| include("../inc/inc.ClassUI.php"); | ||||
| include("../inc/inc.ClassAccessOperation.php"); | ||||
| include("../inc/inc.Authentication.php"); | ||||
| 
 | ||||
| if (!isset($_POST["documentid"]) || !is_numeric($_POST["documentid"]) || intval($_POST["documentid"])<1) { | ||||
|  | @ -61,9 +62,13 @@ if (!is_object($subworkflow)) { | |||
| 
 | ||||
| $folder = $document->getFolder(); | ||||
| 
 | ||||
| /* Create object for checking access to certain operations */ | ||||
| $accessop = new SeedDMS_AccessOperation($document, $user, $settings); | ||||
| 
 | ||||
| $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); | ||||
| $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$version, 'subworkflow'=>$subworkflow)); | ||||
| if($view) { | ||||
| 	$view->setParam('accessobject', $accessop); | ||||
| 	$view->show(); | ||||
| 	exit; | ||||
| } | ||||
|  |  | |||
|  | @ -23,6 +23,7 @@ include("../inc/inc.Utils.php"); | |||
| include("../inc/inc.DBInit.php"); | ||||
| include("../inc/inc.Language.php"); | ||||
| include("../inc/inc.ClassUI.php"); | ||||
| include("../inc/inc.ClassAccessOperation.php"); | ||||
| include("../inc/inc.Authentication.php"); | ||||
| 
 | ||||
| if (!isset($_POST["documentid"]) || !is_numeric($_POST["documentid"]) || intval($_POST["documentid"])<1) { | ||||
|  | @ -57,9 +58,13 @@ if (!is_object($transition)) { | |||
| 
 | ||||
| $folder = $document->getFolder(); | ||||
| 
 | ||||
| /* Create object for checking access to certain operations */ | ||||
| $accessop = new SeedDMS_AccessOperation($document, $user, $settings); | ||||
| 
 | ||||
| $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); | ||||
| $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$version, 'transition'=>$transition)); | ||||
| if($view) { | ||||
| 	$view->setParam('accessobject', $accessop); | ||||
| 	$view->show(); | ||||
| 	exit; | ||||
| } | ||||
|  |  | |||
|  | @ -35,7 +35,7 @@ if ($user->isGuest()) { | |||
| } | ||||
| 
 | ||||
| $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); | ||||
| $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'cachedir'=>$settings->_cacheDir, 'workflowmode'=>$settings->_workflowMode, 'previewwidthlist'=>$settings->_previewWidthList)); | ||||
| $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'cachedir'=>$settings->_cacheDir, 'workflowmode'=>$settings->_workflowMode, 'previewWidthList'=>$settings->_previewWidthList)); | ||||
| if($view) { | ||||
| 	$view->show(); | ||||
| 	exit; | ||||
|  |  | |||
|  | @ -76,7 +76,8 @@ background-image: linear-gradient(to bottom, #882222, #111111);; | |||
| </style> | ||||
| <?php | ||||
| 		} | ||||
| 		echo "<title>".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS").(strlen($title)>0 ? ": " : "").htmlspecialchars($title)."</title>\n"; | ||||
| 		$sitename = trim(strip_tags($this->params['sitename'])); | ||||
| 		echo "<title>".(strlen($sitename)>0 ? $sitename : "SeedDMS").(strlen($title)>0 ? ": " : "").htmlspecialchars($title)."</title>\n"; | ||||
| 		echo "</head>\n"; | ||||
| 		echo "<body".(strlen($bodyClass)>0 ? " class=\"".$bodyClass."\"" : "").">\n"; | ||||
| 		if($this->params['session'] && $flashmsg = $this->params['session']->getSplashMsg()) { | ||||
|  |  | |||
|  | @ -120,7 +120,7 @@ class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Bootstrap_Style { | |||
| ?>
 | ||||
| 		    <tr> | ||||
| 					<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
 | ||||
| 					<td><?php echo htmlspecialchars($attribute->getValue()); ?></td>
 | ||||
| 					<td><?php echo htmlspecialchars(implode(', ', $attribute->getValueAsArray())); ?></td>
 | ||||
| 		    </tr> | ||||
| <?php | ||||
| 			} | ||||
|  |  | |||
|  | @ -36,7 +36,7 @@ class SeedDMS_View_ForcePasswordChange extends SeedDMS_Bootstrap_Style { | |||
| 		$user = $this->params['user']; | ||||
| 		$passwordstrength = $this->params['passwordstrength']; | ||||
| 
 | ||||
| 		$this->htmlStartPage(getMLText("sign_in"), "login"); | ||||
| 		$this->htmlStartPage(getMLText("sign_in"), "forcepasswordchange"); | ||||
| 		$this->globalBanner(); | ||||
| 		$this->contentStart(); | ||||
| 		echo "<h3>".getMLText('password_expiration')."</h3>"; | ||||
|  |  | |||
|  | @ -63,13 +63,13 @@ function insertKeywords(keywords) { | |||
| } | ||||
| 
 | ||||
| function cancel() { | ||||
| 	window.close(); | ||||
| //	window.close();
 | ||||
| 	return true; | ||||
| } | ||||
| 
 | ||||
| function acceptKeywords() { | ||||
| 	targetObj.value = myTA.value; | ||||
| 	window.close(); | ||||
| //	window.close();
 | ||||
| 	return true; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -34,7 +34,7 @@ class SeedDMS_View_PasswordForgotten extends SeedDMS_Bootstrap_Style { | |||
| 	function show() { /* {{{ */ | ||||
| 		$referrer = $this->params['referrer']; | ||||
| 
 | ||||
| 		$this->htmlStartPage(getMLText("password_forgotten"), "login"); | ||||
| 		$this->htmlStartPage(getMLText("password_forgotten"), "passwordforgotten"); | ||||
| 		$this->globalBanner(); | ||||
| 		$this->contentStart(); | ||||
| 		$this->pageNavigation(getMLText("password_forgotten")); | ||||
|  |  | |||
|  | @ -161,6 +161,24 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { | |||
|         </span> | ||||
| </td> | ||||
| </tr> | ||||
| 
 | ||||
| <?php | ||||
| 		if($attrdefs) { | ||||
| 			foreach($attrdefs as $attrdef) { | ||||
| 				$attricon = ''; | ||||
| 				if($attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_all) { | ||||
| ?>
 | ||||
| <tr> | ||||
| 	<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
 | ||||
| 	<td><?php $this->printAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : '') ?></td>
 | ||||
| </tr> | ||||
| 
 | ||||
| <?php | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| ?>
 | ||||
| 
 | ||||
| <tr> | ||||
| <td></td><td><button type="submit" class="btn"><i class="icon-search"></i> <?php printMLText("search"); ?></button></td>
 | ||||
| </tr> | ||||
|  | @ -457,7 +475,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { | |||
| 					if($lcattributes) { | ||||
| 						foreach($lcattributes as $lcattribute) { | ||||
| 							$attrdef = $lcattribute->getAttributeDefinition(); | ||||
| 							print "<li>".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars($lcattribute->getValue())."</li>\n"; | ||||
| 							print "<li>".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars(implode(', ', $lcattribute->getValueAsArray()))."</li>\n"; | ||||
| 						} | ||||
| 					} | ||||
| 					print "</ul>\n"; | ||||
|  | @ -466,7 +484,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { | |||
| 					if($docttributes) { | ||||
| 						foreach($docttributes as $docttribute) { | ||||
| 							$attrdef = $docttribute->getAttributeDefinition(); | ||||
| 							print "<li>".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars($docttribute->getValue())."</li>\n"; | ||||
| 							print "<li>".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars(implode(', ', $docttribute->getValueAsArray()))."</li>\n"; | ||||
| 						} | ||||
| 					} | ||||
| 					print "</ul>\n"; | ||||
|  | @ -531,7 +549,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { | |||
| 					if($folderattributes) { | ||||
| 						foreach($folderattributes as $folderattribute) { | ||||
| 							$attrdef = $folderattribute->getAttributeDefinition(); | ||||
| 							print "<li>".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars($folderattribute->getValue())."</li>\n"; | ||||
| 							print "<li>".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars(implode(', ', $folderattribute->getValueAsArray()))."</li>\n"; | ||||
| 						} | ||||
| 					} | ||||
| 					print "</td>"; | ||||
|  |  | |||
|  | @ -157,7 +157,7 @@ function showUser(selectObj) { | |||
| ?>
 | ||||
| 		<tr> | ||||
| 			<td><?php printMLText("password_expiration");?>:</td>
 | ||||
| 			<td><select name="pwdexpiration"><option value="<?php echo date('Y-m-d H:i:s'); ?>"><?php printMLText("now");?></option><option value="<?php echo date('Y-m-d H:i:s', time()+$passwordexpiration*86400); ?>"><?php printMLText("according_settings");?></option></select></td>
 | ||||
| 			<td><select name="pwdexpiration"><option value="<?php echo date('Y-m-d H:i:s'); ?>"><?php printMLText("now");?></option><option value="<?php echo date('Y-m-d H:i:s', time()+$passwordexpiration*86400); ?>"><?php printMLText("according_settings");?></option><option value="0000-00-00"><?php printMLText("never");?></option></select></td>
 | ||||
| 		</tr> | ||||
| <?php | ||||
| 		} | ||||
|  | @ -378,7 +378,7 @@ function showUser(selectObj) { | |||
| ?>
 | ||||
| 		<tr> | ||||
| 			<td><?php printMLText("password_expiration");?>:</td>
 | ||||
| 			<td><select name="pwdexpiration"><option value=""><?php printMLText("keep");?></option><option value="<?php echo date('Y-m-d H:i:s'); ?>"><?php printMLText("now");?></option><option value="<?php echo date('Y-m-d H:i:s', time()+$passwordexpiration*86400); ?>"><?php printMLText("according_settings");?></option></select> <?php echo $currUser->getPwdExpiration(); ?></td>
 | ||||
| 			<td><select name="pwdexpiration"><option value=""><?php printMLText("keep");?></option><option value="<?php echo date('Y-m-d H:i:s'); ?>"><?php printMLText("now");?></option><option value="<?php echo date('Y-m-d H:i:s', time()+$passwordexpiration*86400); ?>"><?php printMLText("according_settings");?></option><option value="0000-00-00"><?php printMLText("never");?></option></select> <?php echo $currUser->getPwdExpiration(); ?></td>
 | ||||
| 		</tr> | ||||
| <?php | ||||
| 	} | ||||
|  |  | |||
|  | @ -241,7 +241,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { | |||
| ?>
 | ||||
| 		    <tr> | ||||
| 					<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
 | ||||
| 					<td><?php echo htmlspecialchars($attribute->getValue()); ?></td>
 | ||||
| 					<td><?php echo htmlspecialchars(implode(', ', $attribute->getValueAsArray())); ?></td>
 | ||||
| 		    </tr> | ||||
| <?php | ||||
| 			} | ||||
|  | @ -345,7 +345,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { | |||
| 		if($attributes) { | ||||
| 			foreach($attributes as $attribute) { | ||||
| 				$attrdef = $attribute->getAttributeDefinition(); | ||||
| 				print "<li>".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars($attribute->getValue())."</li>\n"; | ||||
| 				print "<li>".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars(implode(', ', $attribute->getValueAsArray()))."</li>\n"; | ||||
| 			} | ||||
| 		} | ||||
| 		print "</ul>\n"; | ||||
|  | @ -709,7 +709,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { | |||
| 				if(SeedDMS_Core_DMS::checkIfEqual($workflow->getInitState(), $latestContent->getWorkflowState())) { | ||||
| 					print "<form action=\"../out/out.RemoveWorkflowFromDocument.php\" method=\"post\">".createHiddenFieldWithKey('removeworkflowfromdocument')."<input type=\"hidden\" name=\"documentid\" value=\"".$documentid."\" /><input type=\"hidden\" name=\"version\" value=\"".$latestContent->getVersion()."\" /><button type=\"submit\" class=\"btn\"><i class=\"icon-remove\"></i> ".getMLText('rm_workflow')."</button></form>"; | ||||
| 				} else { | ||||
| 					print "<form action=\"../out/out.RewindWorkflow.php\" method=\"post\">".createHiddenFieldWithKey('rewindworkflow')."<input type=\"hidden\" name=\"documentid\" value=\"".$documentid."\" /><input type=\"hidden\" name=\"version\" value=\"".$latestContent->getVersion()."\" /><button type=\"submit\" class=\"btn\"><i class=\"icon-refresh\"></i>".getMLText('rewind_workflow')."</button></form>"; | ||||
| 					print "<form action=\"../out/out.RewindWorkflow.php\" method=\"post\">".createHiddenFieldWithKey('rewindworkflow')."<input type=\"hidden\" name=\"documentid\" value=\"".$documentid."\" /><input type=\"hidden\" name=\"version\" value=\"".$latestContent->getVersion()."\" /><button type=\"submit\" class=\"btn\"><i class=\"icon-refresh\"></i> ".getMLText('rewind_workflow')."</button></form>"; | ||||
| 				} | ||||
| 			} | ||||
| 
 | ||||
|  | @ -933,7 +933,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { | |||
| 				if($attributes) { | ||||
| 					foreach($attributes as $attribute) { | ||||
| 						$attrdef = $attribute->getAttributeDefinition(); | ||||
| 						print "<li>".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars($attribute->getValue())."</li>\n"; | ||||
| 						print "<li>".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars(implode(', ', $attribute->getValueAsArray()))."</li>\n"; | ||||
| 					} | ||||
| 				} | ||||
| 				print "</ul>\n"; | ||||
|  |  | |||
|  | @ -131,7 +131,7 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style { | |||
| 		echo "<div class=\"span".$RightColumnSpan."\">\n"; | ||||
| 
 | ||||
| 
 | ||||
| 		if ($enableDropUpload) { | ||||
| 		if ($enableDropUpload && $folder->getAccessMode($user) >= M_READWRITE) { | ||||
| 			echo "<div class=\"row-fluid\">"; | ||||
| 			echo "<div class=\"span8\">"; | ||||
| 		} | ||||
|  | @ -183,14 +183,14 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style { | |||
| 		?>
 | ||||
| 				<tr> | ||||
| 				<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
 | ||||
| 				<td><?php echo htmlspecialchars($attribute->getValue()); ?></td>
 | ||||
| 				<td><?php echo htmlspecialchars(implode(', ', $attribute->getValueAsArray())); ?></td>
 | ||||
| 				</tr> | ||||
| 		<?php | ||||
| 			} | ||||
| 		} | ||||
| 		echo "</table>\n"; | ||||
| 		$this->contentContainerEnd(); | ||||
| 		if ($enableDropUpload) { | ||||
| 		if ($enableDropUpload && $folder->getAccessMode($user) >= M_READWRITE) { | ||||
| 			echo "</div>"; | ||||
| 			echo "<div class=\"span4\">"; | ||||
| 			$this->contentHeading(getMLText("dropupload"), true); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann