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 f08ae29f58 Split maintainer::notifyMaintainerOfQueuedData() into two parts.
maintainer::fetchNotificationUpdate() that retrieves much of the email to the maintainer and
the target notification level, and maintainer::processNotificationUpdate() that acts on the
target notification level and completes and optionally sends the email to the maintainer. Add
admin/maintainerNotification.php to aid in debugging the notification system.
2007-07-21 23:49:36 +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 = mysql_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 = mysql_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();
?>