[Fusionforge-commits] r10483 - in trunk/src: common/docman/actions www/include

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Wed Sep 15 17:26:47 CEST 2010


Author: nerville
Date: 2010-09-15 17:26:47 +0200 (Wed, 15 Sep 2010)
New Revision: 10483

Modified:
   trunk/src/common/docman/actions/addfile.php
   trunk/src/www/include/exit.php
Log:
exit_missing_param : enhanced version. provide toptab to exit_error to fix php warning

Modified: trunk/src/common/docman/actions/addfile.php
===================================================================
--- trunk/src/common/docman/actions/addfile.php	2010-09-15 15:21:06 UTC (rev 10482)
+++ trunk/src/common/docman/actions/addfile.php	2010-09-15 15:26:47 UTC (rev 10483)
@@ -54,7 +54,7 @@
     if (!$description)
         $missing_params[] = 'description';
 
-	exit_missing_param($_SERVER['HTTP_REFERER'],$missing_params);
+	exit_missing_param($_SERVER['HTTP_REFERER'],$missing_params,'docman');
 }
 
 $d = new Document($g, false, false,$gfcommon.'docman/engine/');

Modified: trunk/src/www/include/exit.php
===================================================================
--- trunk/src/www/include/exit.php	2010-09-15 15:21:06 UTC (rev 10482)
+++ trunk/src/www/include/exit.php	2010-09-15 15:26:47 UTC (rev 10483)
@@ -33,7 +33,7 @@
 	global $HTML,$group_id;
 	$HTML->header(array('title'=>_('Exiting with error'), 'group'=>$group_id, 'toptab'=>$toptab));
 	echo '<h1>' . _('Exiting with error') . '</h1>';
-	echo $HTML->error_msg($title.'<br />'.htmlspecialchars($text));
+	echo $HTML->error_msg($title.' : '.htmlspecialchars($text));
 	$HTML->footer(array());
 	exit;
 }
@@ -73,8 +73,9 @@
  * exit_missing_param() - Exit with missing required parameters error
  * @param   string  URL : usually $_SERVER['HTTP_REFERER']
  * @param   array   array of missing parameters
+ * @param   string  toptab needed for navigation
  */
-function exit_missing_param($url='',$missing_params=array()) {
+function exit_missing_param($url='',$missing_params=array(),$toptab='') {
     if (!empty($url)) {
         if (!empty($missing_params)) {
             $error = _('Missing required parameters : ');
@@ -87,7 +88,7 @@
         header('Location: '.$url.'&error_msg='.urlencode($error));
         exit;
     } else {
-	    exit_error(_('Error - Missing required parameters.'));
+	    exit_error(_('Error'), _('Missing required parameters.'),$toptab);
     }
 }
 




More information about the Fusionforge-commits mailing list