diff --git a/addcomment.php b/addcomment.php
index 8c1272a..92bedaf 100644
--- a/addcomment.php
+++ b/addcomment.php
@@ -48,7 +48,7 @@ if(!empty($aClean['sBody']))
{
$hResult = query_parameters("SELECT * FROM appComments WHERE commentId = '?'",
$aClean['iThread']);
- $oRow = mysql_fetch_object($hResult);
+ $oRow = query_fetch_object($hResult);
if($oRow)
{
$mesTitle = "Replying To ... $oRow->subject\n";
diff --git a/admin/addAppNote.php b/admin/addAppNote.php
index 8d3cdc2..ae1f96c 100644
--- a/admin/addAppNote.php
+++ b/admin/addAppNote.php
@@ -10,7 +10,7 @@ require_once(BASE."include/note.php");
//FIXME: get rid of appId references everywhere, as version is enough.
$sQuery = "SELECT appId FROM appVersion WHERE versionId = '?'";
$hResult = query_parameters($sQuery, $aClean['iVersionId']);
-$oRow = mysql_fetch_object($hResult);
+$oRow = query_fetch_object($hResult);
$appId = $oRow->appId;
//check for admin privs
diff --git a/admin/addCategory.php b/admin/addCategory.php
index fa6f16e..0159249 100644
--- a/admin/addCategory.php
+++ b/admin/addCategory.php
@@ -18,7 +18,7 @@ else
apidb_header("Add Category");
$sQuery = "SELECT catId, catName FROM appCategory WHERE catId!='?'";
$hResult = query_parameters($sQuery, $aClean['iCatId']);
- while($oRow = mysql_fetch_object($hResult))
+ while($oRow = query_fetch_object($hResult))
{
$aCatsIds[]=$oRow->catId;
$aCatsNames[]=$oRow->catName;
diff --git a/admin/adminBugs.php b/admin/adminBugs.php
index d0ce6ac..4a9cf28 100644
--- a/admin/adminBugs.php
+++ b/admin/adminBugs.php
@@ -111,13 +111,13 @@ if (isset($aClean['sSub']))
FROM appFamily, appVersion, buglinks, bugs.bugs
".$sWhere."
ORDER BY buglinks.bug_id, appName, versionName
- LIMIT ".mysql_real_escape_string($offset).", ".mysql_real_escape_string($ItemsPerPage).";";
+ LIMIT ".query_escape_string($offset).", ".query_escape_string($ItemsPerPage).";";
$c = 0;
if($hResult = query_parameters($sQuery))
{
- while($oRow = mysql_fetch_object($hResult))
+ while($oRow = query_fetch_object($hResult))
{
$oApp = new application($oRow->appId);
$oVersion = new version($oRow->versionId);
diff --git a/admin/adminCommentView.php b/admin/adminCommentView.php
index a12aa62..eb947cf 100644
--- a/admin/adminCommentView.php
+++ b/admin/adminCommentView.php
@@ -52,14 +52,14 @@ echo "";
$offset = (($currentPage-1) * $ItemsPerPage);
$commentIds = query_parameters("SELECT commentId from appComments ORDER BY ".
"appComments.time ASC LIMIT ?, ?", $offset, $ItemsPerPage);
-while ($oRow = mysql_fetch_object($commentIds))
+while ($oRow = query_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, $oRow->commentId);
/* call view_app_comment to display the comment */
- $oComment_row = mysql_fetch_object($hResult);
+ $oComment_row = query_fetch_object($hResult);
Comment::view_app_comment($oComment_row);
}
diff --git a/admin/adminMaintainers.php b/admin/adminMaintainers.php
index a6ee83f..041a888 100644
--- a/admin/adminMaintainers.php
+++ b/admin/adminMaintainers.php
@@ -38,7 +38,7 @@ if (isset($aClean['sSub']))
$sQuery.= " AND queued='false' ORDER BY realname;";
$hResult = query_parameters($sQuery);
- if(!$hResult || !mysql_num_rows($hResult))
+ if(!$hResult || !query_num_rows($hResult))
{
// no apps
echo html_frame_start("","90%");
@@ -61,7 +61,7 @@ if (isset($aClean['sSub']))
$c = 1;
$oldUserId = 0;
- while($oRow = mysql_fetch_object($hResult))
+ while($oRow = query_fetch_object($hResult))
{
$oUser = new User($oRow->userId);
$oApp = new application($oRow->appId);
diff --git a/admin/adminScreenshots.php b/admin/adminScreenshots.php
index 0d433bd..4cca6f5 100644
--- a/admin/adminScreenshots.php
+++ b/admin/adminScreenshots.php
@@ -37,7 +37,7 @@ if(isset($aClean['sRegenerate']))
{
$sQuery = "SELECT id FROM appData WHERE type = 'screenshot'";
$hResult = query_parameters($sQuery);
- while($oRow = mysql_fetch_object($hResult))
+ while($oRow = query_fetch_object($hResult))
{
echo "REGENERATING IMAGE ".$oRow->id."
";
$screenshot = new Screenshot($oRow->id);
@@ -100,7 +100,7 @@ $Ids = query_parameters("SELECT * from appData
ORDER BY id ASC LIMIT ?, ?", $offset, $ItemsPerPage);
$c = 1;
echo "
\n";
-while ($oRow = mysql_fetch_object($Ids))
+while ($oRow = query_fetch_object($Ids))
{
// display thumbnail
$oVersion = new Version($oRow->versionId);
diff --git a/admin/adminUsers.php b/admin/adminUsers.php
index 81c04d6..20d4957 100644
--- a/admin/adminUsers.php
+++ b/admin/adminUsers.php
@@ -121,7 +121,7 @@ if(isset($aClean['sSubmit']))
$hResult = query_parameters($sQuery, $sSearch, $sSearch, $aClean['sOrderBy'],
$aClean['iLimit']);
$i=0;
- while($hResult && $oRow = mysql_fetch_object($hResult))
+ while($hResult && $oRow = query_fetch_object($hResult))
{
$oUser = new User($oRow->userid);
$sAreYouSure = "Are you sure that you want to delete user ".addslashes($oUser->sRealname)." ?";
diff --git a/admin/editBundle.php b/admin/editBundle.php
index c7e289a..cb45429 100644
--- a/admin/editBundle.php
+++ b/admin/editBundle.php
@@ -11,7 +11,7 @@ function build_app_list()
$hResult = query_parameters("SELECT appId, appName FROM appFamily ORDER BY appName");
echo "
\n\n";
-if($hResult && mysql_num_rows($hResult))
+if($hResult && query_num_rows($hResult))
{
$c = 1;
- while($oRow = mysql_fetch_object($hResult))
+ while($oRow = query_fetch_object($hResult))
{
//set row color
if ($c % 2 == 1) { $bgcolor = 'color0'; } else { $bgcolor = 'color1'; }
@@ -72,7 +72,7 @@ if($hResult && mysql_num_rows($hResult))
$c++;
}
-} else if($hResult && !mysql_num_rows($hResult))
+} else if($hResult && !query_num_rows($hResult))
{
/* indicate to the user that there are no apps in this bundle at the moment */
echo "\n";
diff --git a/admin/maintainerNotification.php b/admin/maintainerNotification.php
index e078ca4..423b306 100644
--- a/admin/maintainerNotification.php
+++ b/admin/maintainerNotification.php
@@ -15,7 +15,7 @@ $hResult = maintainer::objectGetEntries(false, false);
echo "Maintainers with a non-zero notification level
\n";
$bFoundNonZero = false;
-while($oRow = mysql_fetch_object($hResult))
+while($oRow = query_fetch_object($hResult))
{
$oMaintainer = new maintainer(null, $oRow);
@@ -41,7 +41,7 @@ echo "
\n";
// retrieve all of the maintainers
echo "Maintainers with notification iTargetLevel != 0
\n";
$hResult = maintainer::objectGetEntries(false, false);
-while($oRow = mysql_fetch_object($hResult))
+while($oRow = query_fetch_object($hResult))
{
$oMaintainer = new maintainer(null, $oRow);
diff --git a/admin/moveAppVersion.php b/admin/moveAppVersion.php
index daa69c6..e99478d 100644
--- a/admin/moveAppVersion.php
+++ b/admin/moveAppVersion.php
@@ -47,7 +47,7 @@ if(!empty($aClean['sAction']))
$sQuery.= "on appVersion.appId = appFamily.appId ORDER BY appFamily.appName, appFamily.appId, appVersion.versionName;";
$hResult = query_parameters($sQuery);
$currentAppId = 0;
- while($oRow = mysql_fetch_object($hResult))
+ while($oRow = query_fetch_object($hResult))
{
/* if the version ids differ then we should start a row with a new application */
/* and the version that matches with it */
diff --git a/appview.php b/appview.php
index 272f4ca..b5e20f3 100644
--- a/appview.php
+++ b/appview.php
@@ -37,7 +37,7 @@ function display_bundle($iAppId)
$hResult = query_parameters("SELECT appFamily.appId, appName, description FROM appBundle, appFamily ".
"WHERE appFamily.queued='false' AND bundleId = '?' AND appBundle.appId = appFamily.appId",
$iAppId);
- if(!$hResult || mysql_num_rows($hResult) == 0)
+ if(!$hResult || query_num_rows($hResult) == 0)
{
return; // do nothing
}
@@ -51,7 +51,7 @@ function display_bundle($iAppId)
echo "
\n\n";
$c = 0;
- while($ob = mysql_fetch_object($hResult))
+ while($ob = query_fetch_object($hResult))
{
$oApp = new application($ob->appId);
//set row color
diff --git a/browse_downloadable.php b/browse_downloadable.php
index d80a9bc..0125f84 100644
--- a/browse_downloadable.php
+++ b/browse_downloadable.php
@@ -37,8 +37,8 @@ else
$hResult = query_parameters($sQuery, "downloadurl", $sLicense);
}
-if($hResult && mysql_num_rows($hResult))
- $num = mysql_num_rows($hResult);
+if($hResult && query_num_rows($hResult))
+ $num = query_num_rows($hResult);
$iNumPages = isset($num) ? ceil($num/$aClean['iNumVersions']) : 0;
@@ -108,7 +108,7 @@ if(!$sLicense)
$aClean['iNumVersions']);
}
-if($hResult && mysql_num_rows($hResult))
+if($hResult && query_num_rows($hResult))
{
echo html_frame_start("", "90%");
@@ -127,7 +127,7 @@ if($hResult && mysql_num_rows($hResult))
$oTableRow->SetClass("color4");
$oTable->AddRow($oTableRow);
- for($iIndex = 1; $oRow = mysql_fetch_object($hResult); $iIndex++)
+ for($iIndex = 1; $oRow = query_fetch_object($hResult); $iIndex++)
{
$oVersion = new version($oRow->versionId);
diff --git a/cron/cleanup.php b/cron/cleanup.php
index 69a9a5c..b16a1cc 100644
--- a/cron/cleanup.php
+++ b/cron/cleanup.php
@@ -52,7 +52,7 @@ function inactiveUserCheck()
$hUsersToWarn = unwarnedAndInactiveSince(6);
if($hUsersToWarn)
{
- while($oRow = mysql_fetch_object($hUsersToWarn))
+ while($oRow = query_fetch_object($hUsersToWarn))
{
$oUser = new User($oRow->userid);
@@ -73,7 +73,7 @@ function inactiveUserCheck()
$hUsersToDelete = warnedSince(1);
if($hUsersToDelete)
{
- while($oRow = mysql_fetch_object($hUsersToDelete))
+ while($oRow = query_fetch_object($hUsersToDelete))
{
$oUser = new User($oRow->userid);
if(!$oUser->hasDataAssociated())
@@ -179,11 +179,11 @@ function orphanVersionCheck()
$sMsg.= "this sql command '".$sQuery."'\r\n";
/* don't report anything if no orphans are found */
- if(mysql_num_rows($hResult) == 0)
+ if(query_num_rows($hResult) == 0)
return;
$sMsg .= "versionId/name\r\n";
- while($oRow = mysql_fetch_object($hResult))
+ while($oRow = query_fetch_object($hResult))
{
$sMsg .= $oRow->versionId."/".$oRow->versionName."\r\n";
}
@@ -209,7 +209,7 @@ function orphanSessionMessagesCheck()
$sQuery = "SELECT count(*) as cnt from sessionMessages where TO_DAYS(NOW()) - TO_DAYS(time) > ?";
$hResult = query_parameters($sQuery, $iSessionMessageDayLimit);
- $oRow = mysql_fetch_object($hResult);
+ $oRow = query_fetch_object($hResult);
$iMessages = $oRow->cnt;
$sMsg = "Found ".$iMessages." that have been orphaned in the sessionMessages table for longer than ".$iSessionMessageDayLimit." days\r\n";
@@ -237,7 +237,7 @@ function orphanSessionListCheck()
$sQuery = "SELECT count(*) as cnt from session_list where TO_DAYS(NOW()) - TO_DAYS(stamp) > ?";
$hResult = query_parameters($sQuery, SESSION_DAYS_TO_EXPIRE + 2);
- $oRow = mysql_fetch_object($hResult);
+ $oRow = query_fetch_object($hResult);
$iMessages = $oRow->cnt;
$sMsg = "Found ".$iMessages." sessions that have expired after ".(SESSION_DAYS_TO_EXPIRE + 2)." days\r\n";
@@ -272,7 +272,7 @@ function getMissingScreenshotArray()
$hResult = Screenshot::objectGetEntries(false, false);
// go through each screenshot
- while($oRow = mysql_fetch_object($hResult))
+ while($oRow = query_fetch_object($hResult))
{
$iScreenshotId = $oRow->id;
$oScreenshot = new Screenshot($iScreenshotId);
diff --git a/include/appData.php b/include/appData.php
index 58bd46f..4737ffc 100644
--- a/include/appData.php
+++ b/include/appData.php
@@ -37,7 +37,7 @@ class appData
if(!$oRow)
{
$hResult = query_parameters("SELECT * FROM appData WHERE id = '?'", $iId);
- $oRow = mysql_fetch_object($hResult);
+ $oRow = query_fetch_object($hResult);
}
if($oRow)
@@ -126,7 +126,7 @@ class appData
ORDER BY appData.id",
$iUserId, $bQueued ? "true" : "false");
- if(!$hResult || !mysql_num_rows($hResult))
+ if(!$hResult || !query_num_rows($hResult))
return false;
$sReturn = html_table_begin("width=\"100%\" align=\"center\"");
@@ -137,7 +137,7 @@ class appData
"Submission Date"),
"color4");
- for($i = 1; $oRow = mysql_fetch_object($hResult); $i++)
+ for($i = 1; $oRow = query_fetch_object($hResult); $i++)
{
if($oRow->versionId)
{
@@ -180,7 +180,7 @@ class appData
versionId = '?' AND TYPE = '?' AND queued = '?'",
$iAppId, $iVersionId, $sType, $sQueued);
- if(!$hResult || !mysql_num_rows($hResult))
+ if(!$hResult || !query_num_rows($hResult))
return FALSE;
return $hResult;
@@ -297,7 +297,7 @@ class appData
if(!$hResult)
return FALSE;
- for($iCount = 0; $oRow = mysql_fetch_object($hResult);)
+ for($iCount = 0; $oRow = query_fetch_object($hResult);)
$iCount += $oRow->count;
return $iCount;
diff --git a/include/appdb.php b/include/appdb.php
index 532cb8c..51bd8e8 100644
--- a/include/appdb.php
+++ b/include/appdb.php
@@ -6,9 +6,9 @@ function log_category_visit($catId)
$result = query_parameters("SELECT * FROM catHitStats WHERE ip = '?' AND catId = '?'",
$REMOTE_ADDR, $catId);
- if($result && mysql_num_rows($result) == 1)
+ if($result && query_num_rows($result) == 1)
{
- $oStatsRow = mysql_fetch_object($result);
+ $oStatsRow = query_fetch_object($result);
query_parameters("UPDATE catHitStats SET count = count + 1 WHERE catHitId = '?'",
$oStatsRow->catHitId);
} else
@@ -25,9 +25,9 @@ function log_application_visit($appId)
$result = query_parameters("SELECT * FROM appHitStats WHERE ip = '?' AND appId = '?'",
$REMOTE_ADDR, $appId);
- if($result && mysql_num_rows($result) == 1)
+ if($result && query_num_rows($result) == 1)
{
- $stats = mysql_fetch_object($result);
+ $stats = query_fetch_object($result);
query_parameters("UPDATE appHitStats SET count = count + 1 WHERE appHitId = '?'",
$stats->appHitId);
} else
diff --git a/include/application.php b/include/application.php
index 04c7d6e..d5f26d3 100644
--- a/include/application.php
+++ b/include/application.php
@@ -56,7 +56,7 @@ class Application {
FROM appFamily
WHERE appId = '?'";
if($hResult = query_parameters($sQuery, $iAppId))
- $oRow = mysql_fetch_object($hResult);
+ $oRow = query_fetch_object($hResult);
}
if($oRow)
@@ -89,7 +89,7 @@ class Application {
}
if($hResult)
{
- while($oRow = mysql_fetch_object($hResult))
+ while($oRow = query_fetch_object($hResult))
{
$this->aVersionsIds[] = $oRow->versionId;
}
@@ -132,7 +132,7 @@ class Application {
$this->mustBeQueued() ? "true" : "false");
if($hResult)
{
- $this->iAppId = mysql_insert_id();
+ $this->iAppId = query_appdb_insert_id();
$this->application($this->iAppId);
$this->SendNotificationMail(); // Only administrators will be mailed as no supermaintainers exist for this app.
@@ -246,7 +246,7 @@ class Application {
//FIXME: how to deal with concurrency issues such as
// if a new version was added during this deletion?
$hResult = $this->_internal_retrieve_all_versions();
- while($oRow = mysql_fetch_object($hResult))
+ while($oRow = query_fetch_object($hResult))
{
$iVersionId = $oRow->versionId;
$oVersion = new Version($iVersionId);
@@ -263,7 +263,7 @@ class Application {
if($hResult = query_parameters($sQuery, $this->iAppId))
{
- while($oRow = mysql_fetch_object($hResult))
+ while($oRow = query_fetch_object($hResult))
{
$aUrlsIds[] = $oRow->id;
}
@@ -315,9 +315,9 @@ class Application {
/* Unqueue matching super maintainer request */
$hResultMaint = query_parameters("SELECT maintainerId FROM appMaintainers WHERE userId = '?' AND appId = '?'", $this->iSubmitterId, $this->iAppId);
- if($hResultMaint && mysql_num_rows($hResultMaint))
+ if($hResultMaint && query_num_rows($hResultMaint))
{
- $oMaintainerRow = mysql_fetch_object($hResultMaint);
+ $oMaintainerRow = query_fetch_object($hResultMaint);
$oMaintainer = new Maintainer($oMaintainerRow->maintainerId);
$oMaintainer->unQueue("OK");
}
@@ -420,7 +420,7 @@ class Application {
if($hResult = query_parameters($sQuery, $sRating))
{
- $oRow = mysql_fetch_object($hResult);
+ $oRow = query_fetch_object($hResult);
}
return $oRow->total;
}
@@ -436,7 +436,7 @@ class Application {
if($hResult = query_parameters($sQuery, $sRating, $iOffset, $iItemsPerPage))
{
- while($aRow = mysql_fetch_row($hResult))
+ while($aRow = query_fetch_row($hResult))
{
array_push($aApps, $aRow[0]);
}
@@ -764,9 +764,9 @@ class Application {
if(!$appId) return null;
$result = query_parameters("SELECT appName FROM appFamily WHERE appId = '?'",
$appId);
- if(!$result || mysql_num_rows($result) != 1)
+ if(!$result || query_num_rows($result) != 1)
return null;
- $ob = mysql_fetch_object($result);
+ $ob = query_fetch_object($result);
return $ob->appName;
}
@@ -781,7 +781,7 @@ class Application {
queued = '?'
ORDER BY appId", $iUserId, $bQueued ? "true" : "false");
- if(!$hResult || !mysql_num_rows($hResult))
+ if(!$hResult || !query_num_rows($hResult))
return false;
$oTable = new Table();
@@ -796,7 +796,7 @@ class Application {
$oTableRow->SetClass("color4");
$oTable->SetHeader($oTableRow);
- for($i = 1; $oRow = mysql_fetch_object($hResult); $i++)
+ for($i = 1; $oRow = query_fetch_object($hResult); $i++)
{
$oVendor = new vendor($oRow->vendorId);
@@ -1013,7 +1013,7 @@ class Application {
if(!$hResult)
return FALSE;
- if(!$oRow = mysql_fetch_object($hResult))
+ if(!$oRow = query_fetch_object($hResult))
return FALSE;
return $oRow->count;
diff --git a/include/application_queue.php b/include/application_queue.php
index 5a503c2..b99dbd2 100644
--- a/include/application_queue.php
+++ b/include/application_queue.php
@@ -30,7 +30,7 @@ class application_queue
$hResult = query_parameters($sQuery, $this->oApp->iAppId);
if($hResult)
{
- if($oRow = mysql_fetch_object($hResult))
+ if($oRow = query_fetch_object($hResult))
$iVersionId = $oRow->versionId;
}
}
@@ -230,7 +230,7 @@ class application_queue
return FALSE;
/* There's no point in displaying an empty table */
- if($hResult === null ||mysql_num_rows($hResult) == 0)
+ if($hResult === null || (query_num_rows($hResult) == 0))
{
echo "No matches.
\n";
return;
@@ -256,7 +256,7 @@ class application_queue
echo "";
echo html_tr($aHeader, "color4");
- for($i = 0; $oRow = mysql_fetch_object($hResult); $i++)
+ for($i = 0; $oRow = query_fetch_object($hResult); $i++)
{
$oApp = new application($oRow->appId);
$aCells = array(
diff --git a/include/bugs.php b/include/bugs.php
index ce26712..eea8a78 100644
--- a/include/bugs.php
+++ b/include/bugs.php
@@ -39,7 +39,7 @@ class Bug {
AND linkid = '?'";
if($hResult = query_parameters($sQuery, $iLinkId))
{
- $oRow = mysql_fetch_object($hResult);
+ $oRow = query_fetch_object($hResult);
$this->iLinkId = $iLinkId;
$this->iAppId = $oRow->appId;
$this->iBug_id = $oRow->bug_id;
@@ -55,7 +55,7 @@ class Bug {
WHERE bug_id = ".$this->iBug_id;
if($hResult = query_bugzilladb($sQuery))
{
- $oRow = mysql_fetch_object($hResult);
+ $oRow = query_fetch_object($hResult);
$this->sShort_desc = $oRow->short_desc;
$this->sBug_status = $oRow->bug_status;
$this->sResolution = $oRow->resolution;
@@ -95,7 +95,7 @@ class Bug {
$sQuery = "SELECT *
FROM bugs
WHERE bug_id = ".$this->iBug_id;
- if(mysql_num_rows(query_bugzilladb($sQuery, "checking bugzilla")) == 0)
+ if(query_num_rows(query_bugzilladb($sQuery, "checking bugzilla")) == 0)
{
addmsg("There is no bug in Bugzilla with that bug number.", "red");
return false;
@@ -108,7 +108,7 @@ class Bug {
WHERE versionId = '?'";
if($hResult = query_parameters($sQuery, $this->iVersionId))
{
- while($oRow = mysql_fetch_object($hResult))
+ while($oRow = query_fetch_object($hResult))
{
if($oRow->bug_id == $this->iBug_id)
{
@@ -129,7 +129,7 @@ class Bug {
$this->bQueued ? "true":"false");
if($hResult)
{
- $this->iLinkId = mysql_insert_id();
+ $this->iLinkId = query_bugzilla_insert_id();
$this->SendNotificationMail();
@@ -259,7 +259,7 @@ class Bug {
{
$hResult = query_parameters("SELECT appFamily.appName, buglinks.versionId, appVersion.versionName, buglinks.submitTime, buglinks.bug_id FROM buglinks, appFamily, appVersion WHERE appFamily.appId = appVersion.appId AND buglinks.versionId = appVersion.versionId AND buglinks.queued = '?' AND buglinks.submitterId = '?' ORDER BY buglinks.versionId", $bQueued ? "true" : "false", $iUserId);
- if(!$hResult || !mysql_num_rows($hResult))
+ if(!$hResult || !query_num_rows($hResult))
return FALSE;
$sReturn = html_table_begin("width=\"100%\" align=\"center\"");
@@ -272,7 +272,7 @@ class Bug {
"Submit time"),
"color4");
- for($i = 1; $oRow = mysql_fetch_object($hResult); $i++)
+ for($i = 1; $oRow = query_fetch_object($hResult); $i++)
{
$oBug = new Bug($oRow->bug_id);
$sReturn .= html_tr(array(
diff --git a/include/category.php b/include/category.php
index c6d7d9d..c91dd0e 100644
--- a/include/category.php
+++ b/include/category.php
@@ -31,7 +31,7 @@ class Category {
WHERE catId = '?' ORDER BY catName;";
if($hResult = query_parameters($sQuery, $iCatId))
{
- $oRow = mysql_fetch_object($hResult);
+ $oRow = query_fetch_object($hResult);
if($oRow)
{
$this->iCatId = $iCatId;
@@ -50,7 +50,7 @@ class Category {
AND queued = 'false' ORDER BY appName";
if($hResult = query_parameters($sQuery, $iCatId))
{
- while($oRow = mysql_fetch_object($hResult))
+ while($oRow = query_fetch_object($hResult))
{
$this->aApplicationsIds[] = $oRow->appId;
}
@@ -64,7 +64,7 @@ class Category {
WHERE catParent = '?' ORDER BY catName;";
if($hResult = query_parameters($sQuery, $iCatId))
{
- while($oRow = mysql_fetch_object($hResult))
+ while($oRow = query_fetch_object($hResult))
{
$this->aSubcatsIds[] = $oRow->catId;
}
@@ -83,7 +83,7 @@ class Category {
$sName, $sDescription, $iParentId);
if($hResult)
{
- $this->iCatId = mysql_insert_id();
+ $this->iCatId = query_appdb_insert_id();
$this->category($this->iCatId);
return true;
}
@@ -171,9 +171,9 @@ class Category {
{
$hResult = query_parameters("SELECT catName, catId, catParent FROM appCategory WHERE catId = '?'",
$iCatId);
- if(!$hResult || mysql_num_rows($hResult) != 1)
+ if(!$hResult || query_num_rows($hResult) != 1)
break;
- $oCatRow = mysql_fetch_object($hResult);
+ $oCatRow = query_fetch_object($hResult);
$aPath[] = array($oCatRow->catId, $oCatRow->catName);
$iCatId = $oCatRow->catParent;
}
diff --git a/include/comment.php b/include/comment.php
index 1144b5d..4e9ffe5 100644
--- a/include/comment.php
+++ b/include/comment.php
@@ -36,7 +36,7 @@ class Comment {
WHERE appComments.versionId = appVersion.versionId
AND commentId = '?'";
$hResult = query_parameters($sQuery, $iCommentId);
- $oRow = mysql_fetch_object($hResult);
+ $oRow = query_fetch_object($hResult);
$this->iCommentId = $oRow->commentId;
$this->iParentId = $oRow->parentId;
$this->iAppId = $oRow->appId;
@@ -68,7 +68,7 @@ class Comment {
if($hResult)
{
- $this->comment(mysql_insert_id());
+ $this->comment(query_appdb_insert_id());
$sEmail = User::get_notify_email_address_list($this->iAppId, $this->iVersionId);
$sEmail .= $this->oOwner->sEmail." ";
@@ -203,7 +203,7 @@ class Comment {
$hResult = query_parameters($sQuery, $iVersionId);
if(!$hResult) return 0;
- $oRow = mysql_fetch_object($hResult);
+ $oRow = query_fetch_object($hResult);
return $oRow->cnt;
}
@@ -275,8 +275,8 @@ class Comment {
}
/* escape input so we can use query_appdb() without concern */
- $iVersionId = mysql_real_escape_string($iVersionId);
- $iParentId = mysql_real_escape_string($iParentId);
+ $iVersionId = query_escape_string($iVersionId);
+ $iParentId = query_escape_string($iParentId);
$sExtra = "";
@@ -300,11 +300,11 @@ class Comment {
*/
function do_display_comments_nested($hResult)
{
- while($oRow = mysql_fetch_object($hResult))
+ while($oRow = query_fetch_object($hResult))
{
Comment::view_app_comment($oRow);
$hResult2 = Comment::grab_comments($oRow->versionId, $oRow->commentId);
- if($hResult && mysql_num_rows($hResult2))
+ if($hResult && query_num_rows($hResult2))
{
echo "\n";
Comment::do_display_comments_nested($hResult2);
@@ -328,7 +328,7 @@ class Comment {
if (!$is_main)
echo "\n";
- while ($oRow = mysql_fetch_object($hResult))
+ while ($oRow = query_fetch_object($hResult))
{
if ($is_main)
{
@@ -340,7 +340,7 @@ class Comment {
}
$hResult2 = Comment::grab_comments($oRow->versionId, $oRow->commentId);
- if ($hResult2 && mysql_num_rows($hResult2))
+ if ($hResult2 && query_num_rows($hResult2))
{
echo "\n";
Comment::do_display_comments_threaded($hResult2, 0);
@@ -367,7 +367,7 @@ class Comment {
$hResult = Comment::grab_comments($versionId);
if ($hResult)
{
- while($oRow = mysql_fetch_object($hResult))
+ while($oRow = query_fetch_object($hResult))
{
Comment::view_app_comment($oRow);
}
@@ -380,7 +380,7 @@ class Comment {
// count posts
$hResult = query_parameters("SELECT commentId FROM appComments WHERE versionId = '?'", $versionId);
- $messageCount = mysql_num_rows($hResult);
+ $messageCount = query_num_rows($hResult);
//start comment format table
echo html_frame_start("","98%",'',0);
diff --git a/include/distribution.php b/include/distribution.php
index 4f92dcc..3c49062 100644
--- a/include/distribution.php
+++ b/include/distribution.php
@@ -30,7 +30,7 @@ class distribution {
FROM distributions
WHERE distributionId = '?'";
if($hResult = query_parameters($sQuery, $iDistributionId))
- $oRow = mysql_fetch_object($hResult);
+ $oRow = query_fetch_object($hResult);
}
if($oRow)
@@ -69,7 +69,7 @@ class distribution {
if($hResult = query_parameters($sQuery, $this->iDistributionId))
{
- while($oRow = mysql_fetch_object($hResult))
+ while($oRow = query_fetch_object($hResult))
{
$this->aTestingIds[] = $oRow->testingId;
}
@@ -85,9 +85,9 @@ class distribution {
WHERE name = '?'";
$hResult = query_parameters($sQuery, $this->sName);
- if($hResult && $oRow = mysql_fetch_object($hResult))
+ if($hResult && $oRow = query_fetch_object($hResult))
{
- if(mysql_num_rows($hResult))
+ if(query_num_rows($hResult))
{
addmsg("There was an existing distribution called ".$this->sName.".", "red");
$this->distribution($oRow->distributionId);
@@ -108,7 +108,7 @@ class distribution {
$this->mustBeQueued() ? "true" : "false");
if($hResult)
{
- $this->iDistributionId = mysql_insert_id();
+ $this->iDistributionId = query_appdb_insert_id();
$this->distribution($this->iDistributionId);
$this->SendNotificationMail();
return true;
@@ -397,7 +397,7 @@ class distribution {
if($hResult)
{
- $oRow = mysql_fetch_object($hResult);
+ $oRow = query_fetch_object($hResult);
return $oRow->num_dists;
}
return 0;
@@ -414,7 +414,7 @@ class distribution {
echo "