Remove unused $iAppId parameter from monitor::find()
This commit is contained in:
@@ -116,7 +116,7 @@ if ($aClean['sSub'])
|
|||||||
if($aClean['sSub'] == 'StopMonitoring')
|
if($aClean['sSub'] == 'StopMonitoring')
|
||||||
{
|
{
|
||||||
$oMonitor = new Monitor();
|
$oMonitor = new Monitor();
|
||||||
$oMonitor->find($_SESSION['current']->iUserId,$aClean['iAppId'],$aClean['iVersionId']);
|
$oMonitor->find($_SESSION['current']->iUserId, $aClean['iVersionId']);
|
||||||
if($oMonitor->iMonitorId)
|
if($oMonitor->iMonitorId)
|
||||||
{
|
{
|
||||||
$oMonitor->delete();
|
$oMonitor->delete();
|
||||||
|
|||||||
@@ -36,23 +36,20 @@ class Monitor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function find($iUserId, $iAppId=0, $iVersionId=0)
|
function find($iUserId, $iVersionId=0)
|
||||||
{
|
{
|
||||||
if($iUserId)
|
if($iUserId && $iVersionId)
|
||||||
{
|
{
|
||||||
if($iVersionId)
|
$sQuery = "SELECT *
|
||||||
{
|
|
||||||
$sQuery = "SELECT *
|
|
||||||
FROM appMonitors
|
FROM appMonitors
|
||||||
WHERE userId = '".$iUserId."'
|
WHERE userId = '".$iUserId."'
|
||||||
AND versionId = '".$iVersionId."'";
|
AND versionId = '".$iVersionId."'";
|
||||||
$hResult = query_appdb($sQuery);
|
$hResult = query_appdb($sQuery);
|
||||||
$oRow = mysql_fetch_object($hResult);
|
$oRow = mysql_fetch_object($hResult);
|
||||||
$this->iMonitorId = $oRow->monitorId;
|
$this->iMonitorId = $oRow->monitorId;
|
||||||
$this->iAppId = $oRow->appId;
|
$this->iAppId = $oRow->appId;
|
||||||
$this->iVersionId = $oRow->versionId;
|
$this->iVersionId = $oRow->versionId;
|
||||||
$this->iUserId = $oRow->userId;
|
$this->iUserId = $oRow->userId;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -731,8 +731,7 @@ class Version {
|
|||||||
echo "<input type=hidden name=\"iVersionId\" value=\"".$this->iVersionId."\">";
|
echo "<input type=hidden name=\"iVersionId\" value=\"".$this->iVersionId."\">";
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
$oMonitor = new Monitor();
|
$oMonitor = new Monitor();
|
||||||
$oMonitor->find($_SESSION['current']->iUserId,
|
$oMonitor->find($_SESSION['current']->iUserId, $this->iVersionId);
|
||||||
$oApp->iAppId,$this->iVersionId);
|
|
||||||
if(!$oMonitor->iMonitorId)
|
if(!$oMonitor->iMonitorId)
|
||||||
{
|
{
|
||||||
echo '<form method=post name=sMessage action=appview.php?iVersionId='.$this->iVersionId.'&iAppId='.$oApp->iAppId.'>';
|
echo '<form method=post name=sMessage action=appview.php?iVersionId='.$this->iVersionId.'&iAppId='.$oApp->iAppId.'>';
|
||||||
@@ -780,7 +779,7 @@ class Version {
|
|||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
}
|
}
|
||||||
$oMonitor = new Monitor();
|
$oMonitor = new Monitor();
|
||||||
$oMonitor->find($_SESSION['current']->iUserId, $oApp->iAppId, $this->iVersionId);
|
$oMonitor->find($_SESSION['current']->iUserId, $this->iVersionId);
|
||||||
if($oMonitor->iMonitorId)
|
if($oMonitor->iMonitorId)
|
||||||
{
|
{
|
||||||
echo '<tr><td colspan="2" align="center">';
|
echo '<tr><td colspan="2" align="center">';
|
||||||
|
|||||||
Reference in New Issue
Block a user