diff --git a/mozilla/webtools/update/core/commenthelpful.php b/mozilla/webtools/update/core/commenthelpful.php
index d66b3bff5fa..5cfca73e4b7 100755
--- a/mozilla/webtools/update/core/commenthelpful.php
+++ b/mozilla/webtools/update/core/commenthelpful.php
@@ -41,7 +41,7 @@ require"../core/config.php";
//Check and see if the CommentID/ID is valid.
-$sql = "SELECT `ID`, `CommentID` FROM `t_feedback` WHERE `ID` = '".escape_string($_GET[id])."' AND `CommentID`='".escape_string($_GET["commentid"])."' LIMIT 1";
+$sql = "SELECT `ID`, `CommentID` FROM `feedback` WHERE `ID` = '".escape_string($_GET[id])."' AND `CommentID`='".escape_string($_GET["commentid"])."' LIMIT 1";
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_ERROR);
if(mysql_num_rows($sql_result)=="0") {
unset($_GET["id"],$_GET["commentid"],$id,$commentid);
@@ -64,7 +64,7 @@ $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mys
}
//Get Data for the Comment Record as it stands.
-$sql = "SELECT `helpful-yes`,`helpful-no`,`helpful-rating` FROM `t_feedback` WHERE `CommentID` = '$commentid' LIMIT 1";
+$sql = "SELECT `helpful-yes`,`helpful-no`,`helpful-rating` FROM `feedback` WHERE `CommentID` = '$commentid' LIMIT 1";
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_ERROR);
$row = mysql_fetch_array($sql_result);
$helpful_yes = $row["helpful-yes"];
@@ -88,7 +88,7 @@ $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mys
$helpful_rating = ($helpful_no/$total)*-100;
}
}
- $sql = "UPDATE `t_feedback` SET `helpful-yes`='$helpful_yes',`helpful-no`='$helpful_no',`helpful-rating`='$helpful_rating' WHERE `CommentID`='$commentid' LIMIT 1";
+ $sql = "UPDATE `feedback` SET `helpful-yes`='$helpful_yes',`helpful-no`='$helpful_no',`helpful-rating`='$helpful_rating' WHERE `CommentID`='$commentid' LIMIT 1";
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
diff --git a/mozilla/webtools/update/core/config.php b/mozilla/webtools/update/core/config.php
index 66efc736844..f9a3f2b7c8b 100644
--- a/mozilla/webtools/update/core/config.php
+++ b/mozilla/webtools/update/core/config.php
@@ -44,9 +44,9 @@
include"dbconfig.php"; // Include Database Server Configuration File
// General Website Configuration Variables
-$websitepath = "D:/Websites/update/mozilla/webtools/update"; // Local Path to Site Files
-$repositorypath = "D:/Websites/update/mozilla/webtools/update/files/"; //Path to XPI/JAR Respository
-$sitehostname = "mozillaupdate.psychoticwolf.net"; // DNS Hostname
+$websitepath = "/opt/update-beta"; // Local Path to Site Files
+$repositorypath = "/opt/update-beta/files/"; //Path to XPI/JAR Respository
+$sitehostname = $_SERVER["SERVER_NAME"]; // DNS Hostname, ex. "update.mozilla.org"
$ftpurl = "http://ftp.mozilla.org/pub/mozilla.org"; // URL to FTP site
// Page Header and Footer Path Variables
@@ -64,6 +64,4 @@ $time_start = getmicrotime();
include"inc_guids.php"; // GUID --> AppName Handler
include"inc_global.php"; // Global Functions - Variable Cleanup
include"inc_browserdetection.php"; //Browser Detection - App Variable Handling
-//include"sessionconfig.php"; //Start Session
-
?>
diff --git a/mozilla/webtools/update/core/inc_browserdetection.php b/mozilla/webtools/update/core/inc_browserdetection.php
index 853762c4503..9aee303bf6c 100644
--- a/mozilla/webtools/update/core/inc_browserdetection.php
+++ b/mozilla/webtools/update/core/inc_browserdetection.php
@@ -40,11 +40,7 @@
//$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (Photon; U; QNX x86pc; en-US; rv:1.6a) Gecko/20030122";
//$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; rv:1.4a) Gecko/20030305";
//$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7b) Gecko/20040302";
-//$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Lightninglizard/0.8";
-//$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040322 Nuclearunicorn/0.8.0+ (Firefox/0.8.0+ rebrand)";
-//$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Firefox/0.9";
//$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3";
-//$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040818 Firefox/0.9.1+";
//$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20041001 Firefox/0.10.1";
@@ -76,9 +72,9 @@ if ($_GET["version"]=="auto-detect") {$_GET["version"]="";}//Clear Version For A
break;
}
-$application = $_GET["application"];
-$app_version = $_GET["version"];
-$OS = $_GET["os"];
+$application = escape_string($_GET["application"]);
+$app_version = escape_string($_GET["version"]);
+$OS = escape_string($_GET["os"]);
//print("$application, $app_version, $OS \n");
@@ -139,7 +135,7 @@ if (!$application) { $application="firefox"; } //Default App is Firefox
//App_Version
//Get Max Version for Application Specified
if (!$app_version) {
- $sql = "SELECT `major`,`minor`,`release`,`SubVer` FROM `t_applications` WHERE `AppName` = '$application' ORDER BY `major` DESC, `minor` DESC, `release` DESC, `SubVer` DESC LIMIT 1";
+ $sql = "SELECT `major`,`minor`,`release`,`SubVer` FROM `applications` WHERE `AppName` = '$application' ORDER BY `major` DESC, `minor` DESC, `release` DESC, `SubVer` DESC LIMIT 1";
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
$row = mysql_fetch_array($sql_result);
$release = "$row[major].$row[minor]";
@@ -156,7 +152,7 @@ if (!$app_version) {
//Check for Internal Versioning for the $app_version
- $sql = "SELECT `int_version`,`major`,`minor`,`release`,`SubVer` FROM `t_applications` WHERE `AppName`='$application' AND `int_version` IS NOT NULL ORDER BY `major` DESC, `minor` DESC, `release` DESC, `SubVer` DESC";
+ $sql = "SELECT `int_version`,`major`,`minor`,`release`,`SubVer` FROM `applications` WHERE `AppName`='$application' AND `int_version` IS NOT NULL ORDER BY `major` DESC, `minor` DESC, `release` DESC, `SubVer` DESC";
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
while ($row = mysql_fetch_array($sql_result)) {
$release = "$row[major].$row[minor]";
diff --git a/mozilla/webtools/update/core/inc_footer.php b/mozilla/webtools/update/core/inc_footer.php
index 999460e5f13..17e110d9500 100644
--- a/mozilla/webtools/update/core/inc_footer.php
+++ b/mozilla/webtools/update/core/inc_footer.php
@@ -36,43 +36,17 @@
//
// ***** END LICENSE BLOCK *****
?>
-
-
-
+
+
-
-";print_r($_SESSION); echo" \n";
-//echo"Current application data: $application - $app_version - $OS ";
-//}
-
-
-return;
-
-//Site Timer Counter :: Debug-Mode Item Only
-$time_end = getmicrotime();
-//Returns in format: sss.mmmuuunnnppp ;-)
-// m = millisec, u=microsec, n=nansec, p=picosec
-$time = round($time_end - $time_start,"6");
-
-echo""; //Debug Time
-
-if ($pos !== false) {
-echo"\n";
-}
-?>
diff --git a/mozilla/webtools/update/core/inc_global.php b/mozilla/webtools/update/core/inc_global.php
index 0420570a864..c74f5246b08 100644
--- a/mozilla/webtools/update/core/inc_global.php
+++ b/mozilla/webtools/update/core/inc_global.php
@@ -63,27 +63,19 @@ foreach ($_GET as $key => $val) {
$_GET["$key"] = htmlentities(str_replace("\\","",strip_tags($_GET["$key"])));
}
-//Set Debug Mode session Variable
-if ($_GET["debug"]=="true") {$_SESSION["debug"]=$_GET["debug"]; } else if ($_GET["debug"]=="false") {unset($_SESSION["debug"]);}
-
// Bug 250596 Fixes for incoming $_GET variables.
if ($_GET["application"]) {
$_GET["application"] = escape_string(strtolower($_GET["application"]));
-$sql = "SELECT AppID FROM `t_applications` WHERE `AppName` = '".ucwords(strtolower($_GET["application"]))."' LIMIT 1";
+$sql = "SELECT AppID FROM `applications` WHERE `AppName` = '".ucwords(strtolower($_GET["application"]))."' LIMIT 1";
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
if (mysql_num_rows($sql_result)===0) {unset($_GET["application"]);}
}
-//if ($_GET["version"]) {
-//$sql = "SELECT AppID FROM `t_applications` WHERE `Release` = '$_GET[version]' LIMIT 1";
-// $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
-// if (mysql_num_rows($sql_result)===0) {unset($_GET["application"]);}
-//}
if ($_GET["category"] AND $_GET["category"] !=="All"
AND $_GET["category"] !=="Editors Pick" AND $_GET["category"] !=="Popular"
AND $_GET["category"] !=="Top Rated" AND $_GET["category"] !=="Newest") {
-$sql = "SELECT CatName FROM `t_categories` WHERE `CatName` = '".escape_string(ucwords(strtolower($_GET["category"])))."' LIMIT 1";
+$sql = "SELECT CatName FROM `categories` WHERE `CatName` = '".escape_string(ucwords(strtolower($_GET["category"])))."' LIMIT 1";
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
if (mysql_num_rows($sql_result)===0) {unset($_GET["category"]);}
}
@@ -99,10 +91,9 @@ function page_error($reason, $custom_message) {
global $page_header, $page_footer;
echo"Mozilla Update :: Error\n";
- echo"\n";
include"$page_header";
-
+ echo"
";
echo"
Mozilla Update :: Error
\n";
echo"\n";
echo"Mozilla Update has encountered an error and is unable to fulfill your request. Please try your request again later. If the
@@ -111,7 +102,7 @@ function page_error($reason, $custom_message) {
Error $reason: $custom_message
\n";
-
if ($versioncheck[errors]=="true") {
echo"Errors were encountered during install.rdf checking... \n";
die("Aborting...");
@@ -213,8 +211,7 @@ if ($versioncheck[errors]=="true") {
} else {
-//echo"install.rdf is not present, use legacy mode... \n";
-//header("Location: http://$_SERVER[HTTP_HOST]/developers/additem.php?function=step1b&filename=$filename");
+
echo"