Gnucomo-0.0.3: December 6th 2002
$Log: gcm_daemon.php,v $
- Revision 1.11 2003-07-09 07:25:02 arjen
+ Revision 1.12 2003-08-05 07:46:37 arjen
+ BUGFIX: Print an error message if a parameter does not have
+ any history.
+
+ Revision 1.11 2003/07/09 07:25:02 arjen
Gcm_daemon gathers statistics on parameters, notifications, etc. for all objects.
Revision 1.10 2003/03/29 08:33:58 arjen
*/
-// $Id: gcm_daemon.php,v 1.11 2003-07-09 07:25:02 arjen Exp $
+// $Id: gcm_daemon.php,v 1.12 2003-08-05 07:46:37 arjen Exp $
ini_set('include_path', '.:./classes:../phpclasses');
$project_name = "gnucomo"; //name of the entire project
$app_name = "gcm_daemon"; //name of the application running
$developrelease = "TRUE"; //Indicates if special debug settings are needed
-$db_version = 41; //The db_version indicates what the level of
+$db_version = 42; //The db_version indicates what the level of
//the database should be. If the database is
//old an update will be generated.
$gcmd_version = 5; //This value indicates the active version of the gcm_daemon,
$qry ="select change_nature from history where paramid= CAST('";
$qry .= $param->paramid . "' AS BIGINT) order by modified desc";
$rhist = $dbms->query($qry);
- $hist = $dbms->fetch_object($rhist, 0);
- if ($hist->change_nature == "REMOVED")
+ if ($dbms->num_rows($rhist) == 0)
+ {
+ echo "ERROR: No history for parameter id " . $param->paramid . "\n";
+ }
+ else
{
- $removed_parameters++;
+ $hist = $dbms->fetch_object($rhist, 0);
+ if ($hist->change_nature == "REMOVED")
+ {
+ $removed_parameters++;
+ }
}
}