mysql_connect() deprecated
Change-Id: Iec4d6b145655f25234b48eed1b0050fa8f605326
diff --git a/html/callback/getCurrentStringTranslation.php b/html/callback/getCurrentStringTranslation.php
index 7abbf49..68f3281 100644
--- a/html/callback/getCurrentStringTranslation.php
+++ b/html/callback/getCurrentStringTranslation.php
@@ -58,7 +58,7 @@
//print $query;
-$res = mysql_query($query,$dbh);
+$res = mysqli_query($dbh, $query);
$line = mysql_fetch_array($res, MYSQL_ASSOC);
@@ -135,7 +135,7 @@
AND t.is_active
AND t.language_id = '" . addslashes($language) . "'
ORDER BY LENGTH(t.value) ASC LIMIT 10";
- $res_th = mysql_query($q_th, $dbh);
+ $res_th = mysqli_query($dbh, $q_th);
if(mysql_affected_rows($dbh) > 0) {
echo "<b>, or use from the following:</b><ul>";
while($translation_hints = mysql_fetch_array($res_th, MYSQL_ASSOC)){
@@ -178,7 +178,7 @@
<table>
<?php
$query = "select value,first_name,last_name,translations.created_on, possibly_incorrect as fuzzy from translations,users where string_id = '".addslashes($line['string_id'])."' and language_id = '".addslashes($language)."' and translations.userid = users.userid order by translations.created_on desc";
- $res_history = mysql_query($query,$dbh);
+ $res_history = mysqli_query($dbh, $query);
if(!mysql_num_rows($res_history)){
print "No history.";
diff --git a/html/callback/getExcludePatterns.php b/html/callback/getExcludePatterns.php
index 0e9a857..0636e7b 100644
--- a/html/callback/getExcludePatterns.php
+++ b/html/callback/getExcludePatterns.php
@@ -22,7 +22,7 @@
$query = "SELECT pattern FROM plugin_exclude_patterns WHERE project_id = " . returnQuotedString(sqlSanitize($project_id, $dbh)) .
" AND version = " . returnQuotedString(sqlSanitize($version, $dbh));
-$res = mysql_query($query, $dbh);
+$res = mysqli_query($dbh, $query);
if (mysql_affected_rows($dbh) > 0) {
while ($line = mysql_fetch_array($res, MYSQL_ASSOC)) {
echo $line['pattern'] . "\n";
diff --git a/html/callback/getFilesForProject.php b/html/callback/getFilesForProject.php
index df0bf0e..c126f92 100644
--- a/html/callback/getFilesForProject.php
+++ b/html/callback/getFilesForProject.php
@@ -58,7 +58,7 @@
# print $query."\n";
-$res = mysql_query($query,$dbh);
+$res = mysqli_query($dbh, $query);
while($line = mysql_fetch_array($res, MYSQL_ASSOC)){
diff --git a/html/callback/getLanguages.php b/html/callback/getLanguages.php
index 4d1026e..5730520 100644
--- a/html/callback/getLanguages.php
+++ b/html/callback/getLanguages.php
@@ -17,7 +17,7 @@
$query = "SELECT language_id, IF(locale <> '', CONCAT(CONCAT(CONCAT(name, ' ('), locale), ')'), name) as name FROM languages WHERE is_active AND iso_code != 'en' ORDER BY name";
-$res = mysql_query($query,$dbh);
+$res = mysqli_query($dbh, $query);
$return = Array();
diff --git a/html/callback/getMapFiles.php b/html/callback/getMapFiles.php
index 514eec9..71c8dfc 100644
--- a/html/callback/getMapFiles.php
+++ b/html/callback/getMapFiles.php
@@ -25,7 +25,7 @@
AND m.project_id = " . returnQuotedString(sqlSanitize($project_id, $dbh)) . "
AND m.version = " . returnQuotedString(sqlSanitize($version, $dbh));
-$res = mysql_query($query,$dbh);
+$res = mysqli_query($dbh, $query);
if (mysql_affected_rows($dbh) > 0) {
while ($line = mysql_fetch_array($res, MYSQL_ASSOC)) {
echo $line['location'] . "\n";
diff --git a/html/callback/getProjectSourceLocations.php b/html/callback/getProjectSourceLocations.php
index fa155bf..3208848 100644
--- a/html/callback/getProjectSourceLocations.php
+++ b/html/callback/getProjectSourceLocations.php
@@ -22,7 +22,7 @@
WHERE m.project_id = " . returnQuotedString(sqlSanitize($project_id, $dbh)) . "
AND m.version = " . returnQuotedString(sqlSanitize($version, $dbh));
-$res = mysql_query($query,$dbh);
+$res = mysqli_query($dbh, $query);
if (mysql_affected_rows($dbh) > 0) {
while ($line = mysql_fetch_array($res, MYSQL_ASSOC)) {
echo $line['location'] . "\n";
diff --git a/html/callback/getProjects.php b/html/callback/getProjects.php
index 97650ee..3d3c9ba 100644
--- a/html/callback/getProjects.php
+++ b/html/callback/getProjects.php
@@ -21,7 +21,7 @@
WHERE P.is_active = 1";
- $res = mysql_query($query,$dbh);
+ $res = mysqli_query($dbh, $query);
// $return = '<ul id="project-choices">';
diff --git a/html/callback/getStringsforProject.php b/html/callback/getStringsforProject.php
index 792dacb..ac57e05 100644
--- a/html/callback/getStringsforProject.php
+++ b/html/callback/getStringsforProject.php
@@ -135,7 +135,7 @@
//print $query."<br>";
-$res = mysql_query($query,$dbh);
+$res = mysqli_query($dbh, $query);
//print mysql_error();
diff --git a/html/callback/getTranslationHints.php b/html/callback/getTranslationHints.php
index 93f8fcf..2fcaf5a 100644
--- a/html/callback/getTranslationHints.php
+++ b/html/callback/getTranslationHints.php
@@ -38,7 +38,7 @@
AND t.language_id = '".addslashes($language)."'
ORDER BY LENGTH(t.value) ASC LIMIT 15";
-$res = mysql_query($query,$dbh);
+$res = mysqli_query($dbh, $query);
if(mysql_affected_rows($dbh) > 0) {
echo "<ul>";
while($line = mysql_fetch_array($res, MYSQL_ASSOC)){
@@ -60,7 +60,7 @@
AND t.language_id = '".addslashes($language)."'
ORDER BY LENGTH(t.value) ASC LIMIT 15";
- $res = mysql_query($query2,$dbh);
+ $res = mysqli_query($dbh, $query2);
if(mysql_affected_rows($dbh) > 0) {
echo "<ul>";
while($line = mysql_fetch_array($res, MYSQL_ASSOC)){
diff --git a/html/callback/getUrlType.php b/html/callback/getUrlType.php
index 0e4844c..582339d 100644
--- a/html/callback/getUrlType.php
+++ b/html/callback/getUrlType.php
@@ -20,7 +20,7 @@
$query = "SELECT is_map_file FROM map_files WHERE project_id = " . returnQuotedString(sqlSanitize($project_id, $dbh)) .
" AND version = " . returnQuotedString(sqlSanitize($version, $dbh)) . " LIMIT 1";
-$res = mysql_query($query, $dbh);
+$res = mysqli_query($dbh, $query);
if (mysql_affected_rows($dbh) > 0) {
while ($line = mysql_fetch_array($res, MYSQL_ASSOC)) {
echo $line['is_map_file'];
diff --git a/html/callback/getVersionsforProject.php b/html/callback/getVersionsforProject.php
index d0a5963..72fc226 100644
--- a/html/callback/getVersionsforProject.php
+++ b/html/callback/getVersionsforProject.php
@@ -33,7 +33,7 @@
order by
f.version desc";
- $res = mysql_query($query,$dbh);
+ $res = mysqli_query($dbh, $query);
$return = array();
diff --git a/html/callback/setStringNonTranslatable.php b/html/callback/setStringNonTranslatable.php
index bd4f5b9..fc38a69 100644
--- a/html/callback/setStringNonTranslatable.php
+++ b/html/callback/setStringNonTranslatable.php
@@ -17,7 +17,7 @@
strings.string_id = '".addslashes($string_id)."
'";
-$res = mysql_query($query,$dbh);
+$res = mysqli_query($dbh, $query);
$row = mysql_fetch_assoc($res);
if($checked_state == "true"){
@@ -36,7 +36,7 @@
AND strings.file_id = files.file_id
";
-$res = mysql_query($query,$dbh);
+$res = mysqli_query($dbh, $query);
$updated_rows = mysql_affected_rows();
if($updated_rows < 0){
diff --git a/html/callback/setStringTranslation.php b/html/callback/setStringTranslation.php
index c45a294..98c17da 100644
--- a/html/callback/setStringTranslation.php
+++ b/html/callback/setStringTranslation.php
@@ -47,7 +47,7 @@
and
is_active = 1
";
- $res = mysql_query($query,$dbh);
+ $res = mysqli_query($dbh, $query);
$query = "insert into
translations
@@ -59,7 +59,7 @@
possibly_incorrect = '".addslashes($fuzzy_state)."',
created_on = NOW()
";
- $res = mysql_query($query,$dbh);
+ $res = mysqli_query($dbh, $query);
$affected_rows += mysql_affected_rows();
// print $query;
@@ -79,14 +79,14 @@
and f.project_id = the_file_selected_for_translation.project_id
and s.is_active = 1";
- $res = mysql_query($query,$dbh);
+ $res = mysqli_query($dbh, $query);
while($row = mysql_fetch_assoc($res)){
$string_ids[] = $row['string_id'];
}
//GET CURRENT TRANSLATION FOR THIS STRING
$query= "select value from translations where string_id = '".addslashes($string_id)."' and language_id = '".addslashes($language_id)."' and is_active = 1 order by version limit 1";
- $res = mysql_query($query,$dbh);
+ $res = mysqli_query($dbh, $query);
$string_translation = "";
while($row = mysql_fetch_assoc($res)){
$string_translation = $row['value'];
@@ -108,11 +108,11 @@
and language_id = '" . addslashes($language_id)."'
";
- $res = mysql_query($query,$dbh);
+ $res = mysqli_query($dbh, $query);
while($row = mysql_fetch_assoc($res)){
//DE-ACTIVATE ALL OLD TRANSLATIONS
$query = "update translations set is_active = 0 where translation_id = '".addslashes($row['translation_id'])."'";
- $res2 = mysql_query($query,$dbh);
+ $res2 = mysqli_query($dbh, $query);
//INSERT NEW TRANSLATIONS
$query = "insert into
@@ -125,7 +125,7 @@
possibly_incorrect = '".addslashes($fuzzy_state)."',
created_on = NOW()
";
- $res2 = mysql_query($query,$dbh);
+ $res2 = mysqli_query($dbh, $query);
$affected_rows += mysql_affected_rows();
}
@@ -146,7 +146,7 @@
strings.string_id in (".addslashes(implode(',',$string_ids)).")
";
- $res = mysql_query($query,$dbh);
+ $res = mysqli_query($dbh, $query);
while($row = mysql_fetch_assoc($res)){
$translation_ids[] = $row['string_id'];
@@ -161,7 +161,7 @@
userid = '".addslashes($user_id)."',
created_on = NOW()
";
- $res2 = mysql_query($query,$dbh);
+ $res2 = mysqli_query($dbh, $query);
$affected_rows += mysql_affected_rows();
}
}
@@ -177,7 +177,7 @@
WHERE s.value = BINARY (select value from strings where string_id = '".addslashes($string_id)."')
AND s.is_active = 1 AND t.value IS NULL GROUP BY s.string_id HAVING tr_count = 0";
- $res = mysql_query($sql, $dbh);
+ $res = mysqli_query($dbh, $sql);
$str_count = mysql_affected_rows();
while($myrow = mysql_fetch_assoc($res)) {
@@ -189,7 +189,7 @@
value = '".addslashes($translation)."',
userid = '".addslashes($user_id)."',
created_on = NOW()";
- mysql_query($sql, $dbh);
+ mysqli_query($dbh, $sql);
$affected_rows += mysql_affected_rows();
}
}
diff --git a/html/fragments/language_progress.php b/html/fragments/language_progress.php
index f7ef6a6..965dbef 100644
--- a/html/fragments/language_progress.php
+++ b/html/fragments/language_progress.php
@@ -16,7 +16,7 @@
$query = "SELECT value, quantity FROM scoreboard WHERE itemid = 'LANGPR' ORDER BY quantity DESC";
-$res = mysql_query($query);
+$res = mysqli_query($query);
?>
<div id="trans-progress-area">
diff --git a/html/fragments/motd.php b/html/fragments/motd.php
index e2db98c..8182e23 100644
--- a/html/fragments/motd.php
+++ b/html/fragments/motd.php
@@ -14,7 +14,7 @@
$query = "SELECT value FROM sys_values WHERE itemid = 'MOTD' AND value IS NOT NULL AND value <> '' LIMIT 1";
-if ($res = mysql_query($query)) {
+if ($res = mysqli_query($query)) {
if ($row = mysql_fetch_assoc($res)) {
echo "<div id='motd'>";
echo $row['value'];
diff --git a/html/fragments/top_translators.php b/html/fragments/top_translators.php
index edbb66c..055ede8 100644
--- a/html/fragments/top_translators.php
+++ b/html/fragments/top_translators.php
@@ -15,7 +15,7 @@
$query = "SELECT value, quantity FROM scoreboard WHERE itemid = 'TOPTR' ORDER BY quantity DESC";
-$res = mysql_query($query);
+$res = mysqli_query($query);
?>
<div id="top-translators-area">
diff --git a/html/map_files.php b/html/map_files.php
index 0f346b6..6c68c2d 100644
--- a/html/map_files.php
+++ b/html/map_files.php
@@ -55,7 +55,7 @@
$sql = "DELETE FROM map_files WHERE project_id = "
. returnQuotedString(sqlSanitize($PROJECT_ID, $dbh))
. " AND version = " . returnQuotedString(sqlSanitize($VERSION, $dbh));
- mysql_query($sql, $dbh);
+ mysqli_query($dbh, $sql);
# Insert new map files for this project version
$list = explode("\n", $FILE_FLD);
@@ -68,7 +68,7 @@
. "," . returnQuotedString(sqlSanitize(md5($file), $dbh))
. "," . returnQuotedString(sqlSanitize($file, $dbh))
. ", 1, $is_Map_file)";
- mysql_query($sql, $dbh);
+ mysqli_query($dbh, $sql);
}
}
@@ -76,7 +76,7 @@
$sql = "DELETE FROM plugin_exclude_patterns WHERE project_id = "
. returnQuotedString(sqlSanitize($PROJECT_ID, $dbh))
. " AND version = " . returnQuotedString(sqlSanitize($VERSION, $dbh));
- mysql_query($sql, $dbh);
+ mysqli_query($dbh, $sql);
# Insert new plugin exclude patterns for this project version
$list = explode("\n", $PATTERNS);
@@ -89,7 +89,7 @@
. returnQuotedString(sqlSanitize($PROJECT_ID, $dbh))
. "," . returnQuotedString(sqlSanitize($VERSION, $dbh))
. "," . returnQuotedString(sqlSanitize($pattern, $dbh)) . ")";
- mysql_query($sql, $dbh);
+ mysqli_query($dbh, $sql);
}
}
}
@@ -98,12 +98,12 @@
$sql = "DELETE FROM release_train_projects WHERE project_id = "
. returnQuotedString(sqlSanitize($PROJECT_ID, $dbh))
. " AND version = " . returnQuotedString(sqlSanitize($VERSION, $dbh));
- mysql_query($sql, $dbh);
+ mysqli_query($dbh, $sql);
$sql = "INSERT INTO release_train_projects SET project_id = "
. returnQuotedString(sqlSanitize($PROJECT_ID, $dbh))
. ", version = " . returnQuotedString(sqlSanitize($VERSION, $dbh))
. ", train_id = " . returnQuotedString(sqlSanitize($TRAIN_ID, $dbh));
- mysql_query($sql, $dbh);
+ mysqli_query($dbh, $sql);
$GLOBALS['g_ERRSTRS'][0] = "Map files saved.";
}
else {
@@ -116,21 +116,21 @@
project_id = " . returnQuotedString(sqlSanitize($PROJECT_ID, $dbh)) . "
AND version = " . returnQuotedString(sqlSanitize($VERSION, $dbh)) . "
AND filename = ". returnQuotedString(sqlSanitize($FILENAME, $dbh)) . " LIMIT 1";
- mysql_query($sql, $dbh);
+ mysqli_query($dbh, $sql);
}
$sql = "SELECT project_id FROM projects WHERE is_active = 1 ORDER BY project_id";
-$rs_project_list = mysql_query($sql, $dbh);
+$rs_project_list = mysqli_query($dbh, $sql);
$sql = "SELECT pv.project_id, pv.version, count(m.is_active) AS map_count FROM project_versions as pv left join map_files as m on m.project_id = pv.project_id and m.version = pv.version WHERE pv.is_active = 1 and pv.version != 'unspecified' group by pv.project_id, pv.version ORDER BY pv.project_id ASC, pv.version DESC;";
-$rs_version_list = mysql_query($sql, $dbh);
+$rs_version_list = mysqli_query($dbh, $sql);
$sql = "SELECT train_id FROM release_trains ORDER BY train_id ASC";
-$rs_train_list = mysql_query($sql, $dbh);
+$rs_train_list = mysqli_query($dbh, $sql);
$sql = "SELECT train_id, project_id, version FROM release_train_projects ORDER BY project_id, version ASC";
-$rs_train_project_list = mysql_query($sql, $dbh);
+$rs_train_project_list = mysqli_query($dbh, $sql);
global $addon;
$addon->callHook("head");
diff --git a/html/process_map_files.php b/html/process_map_files.php
index 6a8b64a..1daed7d 100755
--- a/html/process_map_files.php
+++ b/html/process_map_files.php
@@ -47,7 +47,7 @@
INNER JOIN release_train_projects AS r ON r.project_id = m.project_id AND r.version = m.version
INNER JOIN release_trains AS t on t.train_id = r.train_id
WHERE m.is_active = 1 AND m.is_map_file = 1 AND t.is_active = 1";
-$rs_maps = mysql_query($sql, $dbh);
+$rs_maps = mysqli_query($dbh, $sql);
while ($myrow_maps = mysql_fetch_assoc($rs_maps)) {
$location = $myrow_maps['location'];
$project_id = $myrow_maps['project_id'];
@@ -62,7 +62,7 @@
if (!(isset($files_collected[$project_id]) && isset($files_collected[$project_id][$version]))) {
$files_collected[$project_id][$version] = 1;
$sql = "SELECT * FROM files WHERE project_id = \"$project_id\" AND version = \"$version\"";
- $rs_files = mysql_query($sql, $dbh);
+ $rs_files = mysqli_query($dbh, $sql);
while($myrow_files = mysql_fetch_assoc($rs_files)) {
$file = new File();
$file->project_id = $myrow_files['project_id'];
@@ -77,7 +77,7 @@
# Collect all plugin exclude patterns for this project version
$sql = "SELECT pattern FROM plugin_exclude_patterns WHERE project_id = \"$project_id\" AND version = \"$version\"";
- $rs_patterns = mysql_query($sql, $dbh);
+ $rs_patterns = mysqli_query($dbh, $sql);
$patterns = Array();
# Add default exclude patterns
$patterns[] = "/^.*\/feature.properties$/";
diff --git a/html/process_project_source_locations.php b/html/process_project_source_locations.php
index 0af32c8..59e763f 100644
--- a/html/process_project_source_locations.php
+++ b/html/process_project_source_locations.php
@@ -50,7 +50,7 @@
INNER JOIN release_train_projects AS r ON r.project_id = m.project_id AND r.version = m.version
INNER JOIN release_trains AS t on t.train_id = r.train_id
WHERE t.is_active = 1";
-$rs_maps = mysql_query($sql, $dbh);
+$rs_maps = mysqli_query($dbh, $sql);
while($update_site = mysql_fetch_assoc($rs_maps)) {
$site_url = $update_site['location'];
$project_id = $update_site['project_id'];
@@ -67,7 +67,7 @@
if (!(isset($files_collected[$project_id]) && isset($files_collected[$project_id][$version]))) {
$files_collected[$project_id][$version] = 1;
$sql = "SELECT * FROM files WHERE project_id = \"$project_id\" AND version = \"$version\"";
- $rs_files = mysql_query($sql, $dbh);
+ $rs_files = mysqli_query($dbh, $sql);
while ($myrow_files = mysql_fetch_assoc($rs_files)) {
$file = new File();
$file->project_id = $myrow_files['project_id'];
@@ -82,7 +82,7 @@
# Collect all plugin exclude patterns for this project version
$sql = "SELECT pattern FROM plugin_exclude_patterns WHERE project_id = \"$project_id\" AND version = \"$version\"";
- $rs_patterns = mysql_query($sql, $dbh);
+ $rs_patterns = mysqli_query($dbh, $sql);
$patterns = Array();
# Add default exclude patterns
$patterns[] = "/^.*\/feature.properties$/";
diff --git a/html/process_update_sites.php b/html/process_update_sites.php
index aa88cba..d58f45a 100644
--- a/html/process_update_sites.php
+++ b/html/process_update_sites.php
@@ -51,7 +51,7 @@
INNER JOIN release_train_projects AS r ON r.project_id = m.project_id AND r.version = m.version
INNER JOIN release_trains AS t on t.train_id = r.train_id
WHERE m.is_active = 1 AND m.is_map_file = 0 AND t.is_active = 1";
-$rs_maps = mysql_query($sql, $dbh);
+$rs_maps = mysqli_query($dbh, $sql);
while($update_site = mysql_fetch_assoc($rs_maps)) {
$site_url = $update_site['location'];
$project_id = $update_site['project_id'];
@@ -74,7 +74,7 @@
if (!(isset($files_collected[$project_id]) && isset($files_collected[$project_id][$version]))) {
$files_collected[$project_id][$version] = 1;
$sql = "SELECT * FROM files WHERE project_id = \"$project_id\" AND version = \"$version\"";
- $rs_files = mysql_query($sql, $dbh);
+ $rs_files = mysqli_query($dbh, $sql);
while ($myrow_files = mysql_fetch_assoc($rs_files)) {
$file = new File();
$file->project_id = $myrow_files['project_id'];
@@ -89,7 +89,7 @@
# Collect all plugin exclude patterns for this project version
$sql = "SELECT pattern FROM plugin_exclude_patterns WHERE project_id = \"$project_id\" AND version = \"$version\"";
- $rs_patterns = mysql_query($sql, $dbh);
+ $rs_patterns = mysqli_query($dbh, $sql);
$patterns = Array();
# Add default exclude patterns
$patterns[] = "/^.*\/feature.properties$/";
diff --git a/html/project_source_locations.php b/html/project_source_locations.php
index 918eb5f..666187b 100644
--- a/html/project_source_locations.php
+++ b/html/project_source_locations.php
@@ -48,7 +48,7 @@
$sql = "DELETE FROM project_source_locations WHERE project_id = "
. returnQuotedString(sqlSanitize($PROJECT_ID, $dbh))
. " AND version = " . returnQuotedString(sqlSanitize($VERSION, $dbh));
- mysql_query($sql, $dbh);
+ mysqli_query($dbh, $sql);
# Insert new project_source_locations for this project version
$list = explode("\n", $FILE_FLD);
@@ -60,7 +60,7 @@
. "," . returnQuotedString(sqlSanitize($VERSION, $dbh))
. "," . returnQuotedString(sqlSanitize($file, $dbh))
. ")";
- mysql_query($sql, $dbh);
+ mysqli_query($dbh, $sql);
}
}
@@ -68,7 +68,7 @@
$sql = "DELETE FROM plugin_exclude_patterns WHERE project_id = "
. returnQuotedString(sqlSanitize($PROJECT_ID, $dbh))
. " AND version = " . returnQuotedString(sqlSanitize($VERSION, $dbh));
- mysql_query($sql, $dbh);
+ mysqli_query($dbh, $sql);
# Insert new plugin exclude patterns for this project version
$list = explode("\n", $PATTERNS);
@@ -81,7 +81,7 @@
. returnQuotedString(sqlSanitize($PROJECT_ID, $dbh))
. "," . returnQuotedString(sqlSanitize($VERSION, $dbh))
. "," . returnQuotedString(sqlSanitize($pattern, $dbh)) . ")";
- mysql_query($sql, $dbh);
+ mysqli_query($dbh, $sql);
}
}
}
@@ -90,12 +90,12 @@
$sql = "DELETE FROM release_train_projects WHERE project_id = "
. returnQuotedString(sqlSanitize($PROJECT_ID, $dbh))
. " AND version = " . returnQuotedString(sqlSanitize($VERSION, $dbh));
- mysql_query($sql, $dbh);
+ mysqli_query($dbh, $sql);
$sql = "INSERT INTO release_train_projects SET project_id = "
. returnQuotedString(sqlSanitize($PROJECT_ID, $dbh))
. ", version = " . returnQuotedString(sqlSanitize($VERSION, $dbh))
. ", train_id = " . returnQuotedString(sqlSanitize($TRAIN_ID, $dbh));
- mysql_query($sql, $dbh);
+ mysqli_query($dbh, $sql);
$GLOBALS['g_ERRSTRS'][0] = "Project source locations saved.";
}
else {
@@ -104,16 +104,16 @@
}
$sql = "SELECT project_id FROM projects WHERE is_active = 1 ORDER BY project_id";
-$rs_project_list = mysql_query($sql, $dbh);
+$rs_project_list = mysqli_query($dbh, $sql);
$sql = "SELECT pv.project_id, pv.version, count(m.location) AS map_count FROM project_versions as pv left join project_source_locations as m on m.project_id = pv.project_id and m.version = pv.version WHERE pv.is_active = 1 and pv.version != 'unspecified' group by pv.project_id, pv.version ORDER BY pv.project_id ASC, pv.version DESC;";
-$rs_version_list = mysql_query($sql, $dbh);
+$rs_version_list = mysqli_query($dbh, $sql);
$sql = "SELECT train_id FROM release_trains ORDER BY train_id ASC";
-$rs_train_list = mysql_query($sql, $dbh);
+$rs_train_list = mysqli_query($dbh, $sql);
$sql = "SELECT train_id, project_id, version FROM release_train_projects ORDER BY project_id, version ASC";
-$rs_train_project_list = mysql_query($sql, $dbh);
+$rs_train_project_list = mysqli_query($dbh, $sql);
global $addon;
$addon->callHook("head");
diff --git a/html/query.php b/html/query.php
index 39c53da..6b25e99 100644
--- a/html/query.php
+++ b/html/query.php
@@ -31,7 +31,7 @@
$value = html_entity_decode($value);
-$possible_translations = mysql_query(
+$possible_translations = mysqli_query(
"SELECT t.value
from strings As s inner join translations AS t on s.string_id = t.string_id
inner join languages As l on l.language_id = t.language_id
diff --git a/html/recent.php b/html/recent.php
index 0e42940..63a0fc7 100644
--- a/html/recent.php
+++ b/html/recent.php
@@ -68,10 +68,10 @@
$SUBMIT = getHTTPParameter("submit");
$sql = "SELECT DISTINCT pv_m.project_id, pv_m.version FROM project_versions AS pv_m INNER JOIN map_files as m ON pv_m.project_id = m.project_id AND pv_m.version = m.version WHERE pv_m.is_active UNION SELECT DISTINCT pv_s.project_id, pv_s.version FROM project_versions AS pv_s INNER JOIN project_source_locations as s ON pv_s.project_id = s.project_id AND pv_s.version = s.version WHERE pv_s.is_active ORDER BY project_id ASC, version DESC";
-$rs_p_list = mysql_query($sql, $dbh);
+$rs_p_list = mysqli_query($dbh, $sql);
$sql = "SELECT language_id, IF(locale <> '', CONCAT(CONCAT(CONCAT(name, ' ('), locale), ')'), name) as name FROM languages WHERE is_active AND iso_code != 'en' ORDER BY name";
-$rs_l_list = mysql_query($sql, $dbh);
+$rs_l_list = mysqli_query($dbh, $sql);
$where = " t.is_active ";
@@ -123,7 +123,7 @@
$where
ORDER BY t.created_on desc
LIMIT $LIMIT";
-$rs_p_stat = mysql_query($sql, $dbh);
+$rs_p_stat = mysqli_query($dbh, $sql);
global $addon;
$addon->callHook("head");
include($incfile);
diff --git a/html/stats.php b/html/stats.php
index e0866d2..5290db7 100644
--- a/html/stats.php
+++ b/html/stats.php
@@ -36,10 +36,10 @@
$SUBMIT = getHTTPParameter("submit");
$sql = "SELECT DISTINCT pv_m.project_id, pv_m.version FROM project_versions AS pv_m INNER JOIN map_files as m ON pv_m.project_id = m.project_id AND pv_m.version = m.version WHERE pv_m.is_active UNION SELECT DISTINCT pv_s.project_id, pv_s.version FROM project_versions AS pv_s INNER JOIN project_source_locations as s ON pv_s.project_id = s.project_id AND pv_s.version = s.version WHERE pv_s.is_active ORDER BY project_id ASC, version DESC";
-$rs_p_list = mysql_query($sql, $dbh);
+$rs_p_list = mysqli_query($dbh, $sql);
$sql = "SELECT language_id, IF(locale <> '', CONCAT(CONCAT(CONCAT(name, ' ('), locale), ')'), name) as name FROM languages WHERE is_active AND iso_code != 'en' ORDER BY name";
-$rs_l_list = mysql_query($sql, $dbh);
+$rs_l_list = mysqli_query($dbh, $sql);
$where = "";
@@ -62,7 +62,7 @@
}
$sql = "SELECT p.project_id, p.version, l.name, l.locale, p.pct_complete FROM project_progress AS p INNER JOIN languages AS l ON l.language_id = p.language_id $where ORDER BY p.pct_complete DESC, p.project_id, p.version, l.name";
-$rs_p_stat = mysql_query($sql, $dbh);
+$rs_p_stat = mysqli_query($dbh, $sql);
global $addon;
$addon->callHook("head");