This repository has been archived on 2025-05-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
qemudb/admin/maintainerNotification.php
Chris Morgan 6119246b51 Replace direct mysql_xxx() calls with query_xxx() calls. Replace calls to mysql_insert_id()
with calls specific to the appdb or bugzilla database. Fixes a bug where a call to
mysql_insert_id() can potentially retrieve an id from either the bugzilla or appdb database,
depending on whichever database was last opened by mysql_connect().
2007-08-03 23:27:25 +00:00

61 lines
1.5 KiB
PHP

<?php
require("path.php");
require(BASE."include/incl.php");
// module used to debug the maintainer notification system
// TODO: integrate this properly in with the objectManager system
// and with the normal admin menus on the site
apidb_header("Maintiner notification info");
// display all currently notified maintainers
$hResult = maintainer::objectGetEntries(false, false);
echo "Maintainers with a non-zero notification level<br />\n";
$bFoundNonZero = false;
while($oRow = query_fetch_object($hResult))
{
$oMaintainer = new maintainer(null, $oRow);
if($oMaintainer->iNotificationLevel != 0)
{
$bFoundNonZero = true;
echo "iMaintainerId: $oMaintainer->iMaintainerId<br />";
echo "iNotificationLevel: $oMaintainer->iNotificationLevel<br />";
echo "<br />\n";
}
}
if(!$bFoundNonZero)
{
echo "No maintainers have a non-zero notification level<br />\n";
}
echo "<br />\n";
echo "<br />\n";
// retrieve all of the maintainers
echo "Maintainers with notification iTargetLevel != 0<br />\n";
$hResult = maintainer::objectGetEntries(false, false);
while($oRow = query_fetch_object($hResult))
{
$oMaintainer = new maintainer(null, $oRow);
$oNotificationUpdate = $oMaintainer->fetchNotificationUpdate();
if($oNotificationUpdate->iTargetLevel != 0)
{
echo "iMaintainerId: $oMaintainer->iMaintainerId<br />\n";
echo "iNotificationLevel: $oMaintainer->iNotificationLevel<br />\n";
echo "iTargetLevel: $oNotificationUpdate->iTargetLevel<br />\n";
echo "<br />\n";
}
}
apidb_footer();
?>