From: Sebastien D. <sde...@us...> - 2005-01-03 16:28:01
|
Update of /cvsroot/tslogparser/tslogparser/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22310/admin Modified Files: enter-new-run.php index.php modules.inc.php Log Message: finalize opts module Index: enter-new-run.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/enter-new-run.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- enter-new-run.php 29 Nov 2004 14:04:01 -0000 1.2 +++ enter-new-run.php 3 Jan 2005 16:27:49 -0000 1.3 @@ -1,6 +1,6 @@ <?php /* - * Copyright (c) 2004, Bull S.A.. All rights reserved. + * Copyright (c) 2005, Bull S.A.. All rights reserved. * Created by: Sebastien Decugis * This program is free software; you can redistribute it and/or modify it Index: modules.inc.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/modules.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- modules.inc.php 3 Jan 2005 14:22:56 -0000 1.2 +++ modules.inc.php 3 Jan 2005 16:27:49 -0000 1.3 @@ -215,7 +215,22 @@ array($this->selected_module, 'RUN_parse'), array(&$this, $RUN_name, $RUN_description, $TS_id, $CONTENT)); } - + function RUN_delete($RUN_id) + { + /* Check the environment is correct */ + if ($this->selected_module == "") + { + die("No selected module"); + } + if (!is_callable(array($this->selected_module,'RUN_delete'))) + { + die("Module ".$this->selected_module." is malformed.\n"); + } + /* Call actually the module method */ + return call_user_func_array( + array($this->selected_module, 'RUN_delete'), + array(&$this, $RUN_id)); + } } ?> Index: index.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/admin/index.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- index.php 3 Jan 2005 14:22:56 -0000 1.2 +++ index.php 3 Jan 2005 16:27:49 -0000 1.3 @@ -50,9 +50,9 @@ /******************************************** Testing the functions ********************************************/ +/* echo "<pre>\n"; -/* $tmp = $tslp->TS_delete(13); if ($tmp == false) { @@ -65,18 +65,23 @@ { echo "Erreur: <b>".$tslp->last_error."</b>\n"; } -*/ $DATA=file_get_contents("/home/thedoc/travail/CVS-sf.net/posixtestsuite/logfile") or die("failed to read file"); -$tmp = $tslp->RUN_parse("test_run", "Run de test", $DATA); +$tmp = $tslp->RUN_parse("test_run", "Run de test", 14, $DATA); if ($tmp == false) { echo "Erreur: <b>".$tslp->last_error."</b>\n"; } - +$tmp = $tslp->RUN_delete(19); +if ($tmp == false) +{ + echo "Erreur: <b>".$tslp->last_error."</b>\n"; +} echo "</pre>\n"; +*/ -?> \ No newline at end of file + +?> |