Rename some variables to match our current naming scheme

This commit is contained in:
Chris Morgan
2006-06-30 16:33:02 +00:00
committed by WineHQ
parent da53f65cde
commit a72f31e11a
14 changed files with 73 additions and 73 deletions

View File

@@ -62,21 +62,21 @@ if (!$aClean['id'])
echo "</tr>\n\n";
$c = 1;
while($ob = mysql_fetch_object($hResult))
while($oRow = mysql_fetch_object($hResult))
{
if ($c % 2 == 1) { $bgcolor = 'color0'; } else { $bgcolor = 'color1'; }
echo "<tr class=\"$bgcolor\">\n";
echo "<td>".print_date(mysqltimestamp_to_unixtimestamp($ob->submitTime))."</td>\n";
$oUser = new User($ob->submitterId);
echo "<td>".print_date(mysqltimestamp_to_unixtimestamp($oRow->submitTime))."</td>\n";
$oUser = new User($oRow->submitterId);
echo "<td>";
echo $oUser->sEmail ? "<a href=\"mailto:".$oUser->sEmail."\">":"";
echo $oUser->sRealname;
echo $oUser->sEmail ? "</a>":"";
echo "</td>\n";
echo "<td>".Application::lookup_name($ob->appId)."</td>\n";
echo "<td>".Version::lookup_name($ob->versionId)."</td>\n";
echo "<td>".$ob->type."</td>\n";
echo "<td align=\"center\">[<a href='adminAppDataQueue.php?id=$ob->id'>process</a>]</td>\n";
echo "<td>".Application::lookup_name($oRow->appId)."</td>\n";
echo "<td>".Version::lookup_name($oRow->versionId)."</td>\n";
echo "<td>".$oRow->type."</td>\n";
echo "<td align=\"center\">[<a href='adminAppDataQueue.php?id=$oRow->id'>process</a>]</td>\n";
echo "</tr>\n\n";
$c++;
}

View File

@@ -45,38 +45,38 @@ function outputSearchTableForDuplicateFlagging($currentAppId, $hResult)
echo "<table width='100%' border=0 cellpadding=3 cellspacing=1>\n\n";
$c = 0;
while($ob = mysql_fetch_object($hResult))
while($oRow = mysql_fetch_object($hResult))
{
//skip if a NONAME
if ($ob->appName == "NONAME") { continue; }
if ($oRow->appName == "NONAME") { continue; }
//set row color
$bgcolor = ($c % 2) ? 'color0' : 'color1';
$sBgColor = ($c % 2) ? 'color0' : 'color1';
//count versions
$query = query_parameters("SELECT count(*) as versions FROM appVersion WHERE ".
"appId = '?' AND versionName != 'NONAME'",
$ob->appId);
$y = mysql_fetch_object($query);
$oRow->appId);
$oVersionCount = mysql_fetch_object($query);
//display row
echo "<tr class=$bgcolor>\n";
echo "<tr class=$sBgColor>\n";
/* map the merging of the current app to the app we are displaying in the table */
echo " <td>".html_ahref($ob->appName,"adminAppQueue.php?sub=duplicate&apptype=application&appId=".$currentAppId."&appIdMergeTo=".$ob->appId)."</td>\n";
echo " <td>$y->versions versions &nbsp;</td>\n";
echo " <td>".html_ahref($oRow->appName,"adminAppQueue.php?sub=duplicate&apptype=application&appId=".$currentAppId."&appIdMergeTo=".$oRow->appId)."</td>\n";
echo " <td>$oVersionCount->versions versions &nbsp;</td>\n";
echo "</tr>\n\n";
$c++;
//set row color
$bgcolor = ($c % 2) ? 'color0' : 'color1';
$sBgColor = ($c % 2) ? 'color0' : 'color1';
/* add the versions to the table */
$oApp = new Application($ob->appId);
$oApp = new Application($oRow->appId);
foreach($oApp->aVersionsIds as $iVersionId)
{
$oVersion = new Version($iVersionId);
echo "<tr class=$bgcolor><td></td><td>".$oVersion->sName."</td></tr>\n";
echo "<tr class=$sBgColor><td></td><td>".$oVersion->sName."</td></tr>\n";
}
$c++;
@@ -109,10 +109,10 @@ function display_move_test_to_versions_table($aVersionsIds,$icurrentVersionId)
if ($oVersion->sQueued == 'false')
{
// set row color
$bgcolor = ($c % 2 == 0) ? "color0" : "color1";
$sBgColor = ($c % 2 == 0) ? "color0" : "color1";
//display row
echo "<tr class=$bgcolor>\n";
echo "<tr class=$sBgColor>\n";
echo " <td>".html_ahref($oVersion->sName,"adminAppQueue.php?sub=movetest&apptype=version&versionId=".$icurrentVersionId."&versionIdMergeTo=".$oVersion->iVersionId)."</td>\n";
echo " <td>".util_trim_description($oVersion->sDescription)."</td>\n";
@@ -154,9 +154,9 @@ if ($aClean['sub'])
// if we are processing a queued application there MUST be an implicitly queued
// version to go along with it.
$hResult = query_parameters("SELECT versionId from appVersion where appId='?';", $aClean['appId']);
$oRow = mysql_fetch_object($hResult);
$oVersionRow = mysql_fetch_object($hResult);
$oVersion = new Version($oRow->versionId);
$oVersion = new Version($oVersionRow->versionId);
}
else if($aClean['apptype'] == 'version')

View File

@@ -62,15 +62,15 @@ echo "</center>";
$offset = (($currentPage-1) * $ItemsPerPage);
$commentIds = query_parameters("SELECT commentId from appComments ORDER BY ".
"appComments.time ASC LIMIT ?, ?", $offset, $ItemsPerPage);
while ($ob = mysql_fetch_object($commentIds))
while ($oRow = mysql_fetch_object($commentIds))
{
$sQuery = "SELECT from_unixtime(unix_timestamp(time), \"%W %M %D %Y, %k:%i\") as time, ".
"commentId, parentId, versionId, userid, subject, body ".
"FROM appComments WHERE commentId = '?'";
$hResult = query_parameters($sQuery, $ob->commentId);
$hResult = query_parameters($sQuery, $oRow->commentId);
/* call view_app_comment to display the comment */
$comment_ob = mysql_fetch_object($hResult);
view_app_comment($comment_ob);
$oComment_row = mysql_fetch_object($hResult);
view_app_comment($oComment_row);
}
/* display page selection links */

View File

@@ -69,14 +69,14 @@ if ($aClean['sub'])
$c = 1;
$oldUserId = 0;
while($ob = mysql_fetch_object($hResult))
while($oRow = mysql_fetch_object($hResult))
{
$oUser = new User($ob->userId);
$oUser = new User($oRow->userId);
if ($c % 2 == 1) { $bgcolor = 'color0'; } else { $bgcolor = 'color1'; }
/* if this is a new user we should print a header that has the aggregate of the applications */
/* the user super maintains and versions they maintain */
if($ob->userId != $oldUserId)
if($oRow->userId != $oldUserId)
{
$style = "border-top:thin solid;border-bottom:thin solid";
@@ -107,22 +107,22 @@ if ($aClean['sub'])
echo " <td align=\"center\" style=\"$style;border-right:thin solid\">&nbsp</td>\n";
echo "</tr>\n\n";
$oldUserId = $ob->userId;
$oldUserId = $oRow->userId;
}
echo "<tr class=$bgcolor>\n";
echo " <td>".print_date(mysqldatetime_to_unixtimestamp($ob->submitTime))." &nbsp;</td>\n";
echo " <td>".print_date(mysqldatetime_to_unixtimestamp($oRow->submitTime))." &nbsp;</td>\n";
echo " <td><a href=\"mailto:".$oUser->sEmail."\">".$oUser->sRealname."</a></td>\n";
if($ob->superMaintainer)
if($oRow->superMaintainer)
{
echo " <td><a href='".BASE."appview.php?appId=$ob->appId'>".Application::lookup_name($ob->appId)."</a></td>\n";
echo " <td><a href='".BASE."appview.php?appId=$oRow->appId'>".Application::lookup_name($oRow->appId)."</a></td>\n";
echo " <td>*</td>\n";
} else
{
echo " <td><a href='".BASE."appview.php?appId=$ob->appId'>".Application::lookup_name($ob->appId)."</a></td>\n";
echo " <td><a href='".BASE."appview.php?versionId=$ob->versionId'>".Version::lookup_name($ob->versionId)."</a>&nbsp;</td>\n";
echo " <td><a href='".BASE."appview.php?appId=$oRow->appId'>".Application::lookup_name($oRow->appId)."</a></td>\n";
echo " <td><a href='".BASE."appview.php?versionId=$oRow->versionId'>".Version::lookup_name($oRow->versionId)."</a>&nbsp;</td>\n";
}
echo " <td align=\"center\">[<a href='adminMaintainers.php?sub=delete&maintainerId=$ob->maintainerId'>delete</a>]</td>\n";
echo " <td align=\"center\">[<a href='adminMaintainers.php?sub=delete&maintainerId=$oRow->maintainerId'>delete</a>]</td>\n";
echo "</tr>\n\n";
$c++;
}

View File

@@ -55,10 +55,10 @@ if(!$oDistribution->iDistributionId)
echo "</tr>\n\n";
$c = 1;
while($ob = mysql_fetch_object($hResult))
while($oRow = mysql_fetch_object($hResult))
{
if ($c % 2 == 1) { $bgcolor = 'color0'; } else { $bgcolor = 'color1'; }
$oDistribution = new distribution($ob->distributionId);
$oDistribution = new distribution($oRow->distributionId);
echo "<tr class=\"$bgcolor\">\n";
echo " <td><a href=\"".BASE."distributionView.php?iDistributionId=".$oDistribution->iDistributionId."\">","\n";
echo $oDistribution->sName."</a></td>\n";

View File

@@ -8,9 +8,9 @@ function log_category_visit($catId)
$REMOTE_ADDR, $catId);
if($result && mysql_num_rows($result) == 1)
{
$stats = mysql_fetch_object($result);
$oStatsRow = mysql_fetch_object($result);
query_parameters("UPDATE catHitStats SET count = count + 1 WHERE catHitId = '?'",
$stats->catHitId);
$oStatsRow->catHitId);
} else
{
query_parameters("INSERT INTO catHitStats (appHitId, time, ip, catId, count) ".

View File

@@ -573,9 +573,9 @@ class Application {
if($result && mysql_num_rows($result) > 0)
{
echo " <tr class=\"color1\"><td> <b>Links</b></td><td>\n";
while($ob = mysql_fetch_object($result))
while($oRow = mysql_fetch_object($result))
{
echo " <a href='$ob->url'>".substr(stripslashes($ob->description),0,30)."</a> <br />\n";
echo " <a href='$oRow->url'>".substr(stripslashes($oRow->description),0,30)."</a> <br />\n";
}
echo " </td></tr>\n";
}

View File

@@ -161,20 +161,20 @@ class Category {
*/
function getCategoryPath()
{
$path = array();
$aPath = array();
$iCatId = $this->iCatId;
while($iCatId != 0)
{
$result = query_parameters("SELECT catName, catId, catParent FROM appCategory WHERE catId = '?'",
$hResult = query_parameters("SELECT catName, catId, catParent FROM appCategory WHERE catId = '?'",
$iCatId);
if(!$result || mysql_num_rows($result) != 1)
if(!$hResult || mysql_num_rows($hResult) != 1)
break;
$cat = mysql_fetch_object($result);
$path[] = array($cat->catId, $cat->catName);
$iCatId = $cat->catParent;
$oCatRow = mysql_fetch_object($hResult);
$aPath[] = array($oCatRow->catId, $oCatRow->catName);
$iCatId = $oCatRow->catParent;
}
$path[] = array(0, "ROOT");
return array_reverse($path);
$aPath[] = array(0, "ROOT");
return array_reverse($aPath);
}
/* return the total number of applications in this category */

View File

@@ -68,8 +68,8 @@ class session
{
$result = query_parameters("SELECT data FROM session_list WHERE session_id = '?'", $key);
if (!$result) { return null; }
$r = mysql_fetch_object($result);
return $r->data;
$oRow = mysql_fetch_object($result);
return $oRow->data;
}
// write session to DB

View File

@@ -681,8 +681,8 @@ function getNumberOfQueuedTests()
$hResult = query_parameters($sQuery);
if($hResult)
{
$row = mysql_fetch_object($hResult);
return $row->num_tests;
$oRow = mysql_fetch_object($hResult);
return $oRow->num_tests;
}
return 0;
}

View File

@@ -195,8 +195,8 @@ class User {
$this->iUserId, $sKey);
if(!$hResult || mysql_num_rows($hResult) == 0)
return $sDef;
$ob = mysql_fetch_object($hResult);
return $ob->value;
$oRow = mysql_fetch_object($hResult);
return $oRow->value;
}
@@ -290,8 +290,8 @@ class User {
$hResult = query_parameters($sQuery, $this->iUserId, $bSuperMaintainer);
if(!$hResult)
return 0;
$ob = mysql_fetch_object($hResult);
return $ob->cnt;
$oRow = mysql_fetch_object($hResult);
return $oRow->cnt;
}
@@ -676,18 +676,18 @@ class User {
{
$hResult = query_parameters("SELECT count(userId) as c FROM appComments WHERE userId = '?'",
$this->iUserId);
$ob = mysql_fetch_object($hResult);
if($ob->c != 0) return true;
$oRow = mysql_fetch_object($hResult);
if($oRow->c != 0) return true;
$hResult = query_parameters("SELECT count(userId) as c FROM appMaintainers WHERE userId = '?'",
$this->iUserId);
$ob = mysql_fetch_object($hResult);
if($ob->c != 0) return true;
$oRow = mysql_fetch_object($hResult);
if($oRow->c != 0) return true;
$hResult = query_parameters("SELECT count(userId) as c FROM appVotes WHERE userId = '?'",
$this->iUserId);
$ob = mysql_fetch_object($hResult);
if($ob->c != 0) return true;
$oRow = mysql_fetch_object($hResult);
if($oRow->c != 0) return true;
return false;
}

View File

@@ -667,9 +667,9 @@ class Version {
if($result && mysql_num_rows($result) > 0)
{
echo " <tr class=\"color1\"><td><b>Links</b></td><td>\n";
while($ob = mysql_fetch_object($result))
while($oRow = mysql_fetch_object($result))
{
echo " <a href=\"$ob->url\">".substr(stripslashes($ob->description),0,30)."</a> <br />\n";
echo " <a href=\"$oRow->url\">".substr(stripslashes($oRow->description),0,30)."</a> <br />\n";
}
echo " </td></tr>\n";
}

View File

@@ -89,10 +89,10 @@ else
echo '</tr>',"\n";
$c = 1;
while($ob = mysql_fetch_object($hResult))
while($oRow = mysql_fetch_object($hResult))
{
if ($c % 2 == 1) { $bgcolor = 'color0'; } else { $bgcolor = 'color1'; }
$oVendor = new Vendor($ob->vendorId);
$oVendor = new Vendor($oRow->vendorId);
echo '<tr class="'.$bgcolor.'">',"\n";
echo '<td><a href="'.BASE.'vendorview.php?vendorId='.$oVendor->iVendorId.'">'.$oVendor->sName.'</a></td>',"\n";
echo '<td><a href="'.$oVendor->sWebpage.'">'.substr($oVendor->sWebpage,0,30).'</a></td>',"\n";

View File

@@ -65,17 +65,17 @@ if($catId != 0)
do
{
$catQuery = "SELECT appCategory.catName, appCategory.catParent ".
$sCatQuery = "SELECT appCategory.catName, appCategory.catParent ".
"FROM appCategory WHERE appCategory.catId = '?'";
$hResult = query_parameters($catQuery, $currentCatId);
$hResult = query_parameters($sCatQuery, $currentCatId);
if($hResult)
{
$row = mysql_fetch_object($hResult);
$catParent = $row->catParent;
$oRow = mysql_fetch_object($hResult);
$catParent = $oRow->catParent;
array_push($cat_array, "$currentCatId");
array_push($cat_name_array, "$row->catName");
array_push($cat_name_array, "$oRow->catName");
}
$currentCatId = $catParent;