[Fusionforge-commits] r13495 - in trunk/src/common/docman: include views

Franck VILLAUME nerville at fusionforge.org
Fri Jun 10 15:04:04 CEST 2011


Author: nerville
Date: 2011-06-10 15:04:04 +0200 (Fri, 10 Jun 2011)
New Revision: 13495

Modified:
   trunk/src/common/docman/include/utils.php
   trunk/src/common/docman/views/editfile.php
Log:
fix status -> directory to belong when editing deleted files

Modified: trunk/src/common/docman/include/utils.php
===================================================================
--- trunk/src/common/docman/include/utils.php	2011-06-10 12:52:35 UTC (rev 13494)
+++ trunk/src/common/docman/include/utils.php	2011-06-10 13:04:04 UTC (rev 13495)
@@ -28,8 +28,12 @@
  * tooling library
  */
 
-function doc_get_state_box($checkedval = 'xzxz') {
-	$res_states = db_query_params('select * from doc_states', array());
+function doc_get_state_box($checkedval = 'xzxz', $removedval = '') {
+	if (!empty($removedval)) {
+		$res_states = db_query_params('select * from doc_states where stateid not in ($1)', array($removedval));
+	} else {
+		$res_states = db_query_params('select * from doc_states', array());
+	}
 	echo html_build_select_box($res_states, 'stateid', $checkedval, false);
 }
 

Modified: trunk/src/common/docman/views/editfile.php
===================================================================
--- trunk/src/common/docman/views/editfile.php	2011-06-10 12:52:35 UTC (rev 13494)
+++ trunk/src/common/docman/views/editfile.php	2011-06-10 13:04:04 UTC (rev 13495)
@@ -145,7 +145,7 @@
 	<tr>
 		<td>
 			<strong><?php echo _('State') ?>:</strong><br />
-			<?php doc_get_state_box($d->getStateID()); ?>
+			<?php doc_get_state_box('xzxz', $d->getStateID()); ?>
 		</td>
 	</tr>
 	<tr>




More information about the Fusionforge-commits mailing list