Add notify messages to editAppFamily
This commit is contained in:
@@ -227,4 +227,16 @@ function deleteCategory($catId)
|
||||
addmsg("Failed to delete category $catId: ".mysql_error(), "red");
|
||||
}
|
||||
}
|
||||
|
||||
Function lookupCategoryName($catId)
|
||||
{
|
||||
$sResult = query_appdb("SELECT * FROM appCategory ".
|
||||
"WHERE catId = ".$catId);
|
||||
if(!$sResult || mysql_num_rows($sResult) != 1)
|
||||
return "Unknown category";
|
||||
|
||||
$ob = mysql_fetch_object($sResult);
|
||||
return $ob->catName;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -374,15 +374,17 @@ function UserWantsEmail($userid)
|
||||
/**
|
||||
* get the email address of people to notify for this appId and versionId
|
||||
*/
|
||||
function getNotifyEmailAddressList($appId, $versionId)
|
||||
function getNotifyEmailAddressList($appId, $versionId = 0)
|
||||
{
|
||||
$aUserId = array();
|
||||
$c = 0;
|
||||
$retval = "";
|
||||
if ($versionId == 0)
|
||||
$sWhere = "appId = ".$appId;
|
||||
else
|
||||
$sWhere = "appId = ".$appId." AND versionId = ".$versionId;
|
||||
|
||||
$query = "SELECT userId FROM ".
|
||||
"appMaintainers WHERE appId = '$appId' " .
|
||||
"AND versionId = '$versionId';";
|
||||
$query = "SELECT userId FROM appMaintainers WHERE ".$sWhere.";";
|
||||
$result = mysql_query($query);
|
||||
if(mysql_num_rows($result) > 0)
|
||||
{
|
||||
|
||||
@@ -283,4 +283,15 @@ function getNumberOfImages()
|
||||
return $row->num_images;
|
||||
}
|
||||
|
||||
function lookupVendorName($vendorId)
|
||||
{
|
||||
$sResult = query_appdb("SELECT * FROM vendor ".
|
||||
"WHERE vendorId = ".$vendorId);
|
||||
if(!$sResult || mysql_num_rows($sResult) != 1)
|
||||
return "Unknown vendor";
|
||||
|
||||
$vendor = mysql_fetch_object($sResult);
|
||||
return $vendor->vendorName;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user