appdb/ ./appview.php include/monitor.php inclu ...
ChangeSet ID: 30872 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner(a)winehq.org 2007/01/09 19:25:18 Modified files: . : appview.php include : monitor.php version.php Log message: Chris Morgan <cmorgan(a)alum.wpi.edu> Remove unused $iAppId parameter from monitor::find() Patch: http://cvs.winehq.org/patch.py?id=30872 Old revision New revision Changes Path 1.97 1.98 +1 -1 appdb/appview.php 1.11 1.12 +9 -12 appdb/include/monitor.php 1.92 1.93 +2 -3 appdb/include/version.php Index: appdb/appview.php diff -u -p appdb/appview.php:1.97 appdb/appview.php:1.98 --- appdb/appview.php:1.97 10 Jan 2007 1:25:18 -0000 +++ appdb/appview.php 10 Jan 2007 1:25:18 -0000 @@ -116,7 +116,7 @@ if ($aClean['sSub']) if($aClean['sSub'] == 'StopMonitoring') { $oMonitor = new Monitor(); - $oMonitor->find($_SESSION['current']->iUserId,$aClean['iAppId'],$aClean['iVersionId']); + $oMonitor->find($_SESSION['current']->iUserId, $aClean['iVersionId']); if($oMonitor->iMonitorId) { $oMonitor->delete(); Index: appdb/include/monitor.php diff -u -p appdb/include/monitor.php:1.11 appdb/include/monitor.php:1.12 --- appdb/include/monitor.php:1.11 10 Jan 2007 1:25:18 -0000 +++ appdb/include/monitor.php 10 Jan 2007 1:25:18 -0000 @@ -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 WHERE userId = '".$iUserId."' AND versionId = '".$iVersionId."'"; - $hResult = query_appdb($sQuery); - $oRow = mysql_fetch_object($hResult); - $this->iMonitorId = $oRow->monitorId; - $this->iAppId = $oRow->appId; - $this->iVersionId = $oRow->versionId; - $this->iUserId = $oRow->userId; - } + $hResult = query_appdb($sQuery); + $oRow = mysql_fetch_object($hResult); + $this->iMonitorId = $oRow->monitorId; + $this->iAppId = $oRow->appId; + $this->iVersionId = $oRow->versionId; + $this->iUserId = $oRow->userId; } } Index: appdb/include/version.php diff -u -p appdb/include/version.php:1.92 appdb/include/version.php:1.93 --- appdb/include/version.php:1.92 10 Jan 2007 1:25:18 -0000 +++ appdb/include/version.php 10 Jan 2007 1:25:18 -0000 @@ -731,8 +731,7 @@ class Version { echo "<input type=hidden name=\"iVersionId\" value=\"".$this->iVersionId."\">"; echo "</form>"; $oMonitor = new Monitor(); - $oMonitor->find($_SESSION['current']->iUserId, - $oApp->iAppId,$this->iVersionId); + $oMonitor->find($_SESSION['current']->iUserId, $this->iVersionId); if(!$oMonitor->iMonitorId) { echo '<form method=post name=sMessage action=appview.php?iVersionId='.$this->iVersionId.'&iAppId='.$oApp->iAppId.'>'; @@ -780,7 +779,7 @@ class Version { echo "</td></tr>"; } $oMonitor = new Monitor(); - $oMonitor->find($_SESSION['current']->iUserId, $oApp->iAppId, $this->iVersionId); + $oMonitor->find($_SESSION['current']->iUserId, $this->iVersionId); if($oMonitor->iMonitorId) { echo '<tr><td colspan="2" align="center">';
participants (1)
-
WineHQ