Version specific description ', "\n";
- if(trim(strip_tags($oRow->description))=="")
+ // FIXME: put templates in config file or somewhere else.
+ if(trim(strip_tags($oVersion->sDescription))=="")
{
- $oRow->description = "This is a template; enter version-specific description here
";
- $oRow->description .= "
+ $oVersion->sDescription = "
This is a template; enter version-specific description here
";
+ $oVersion->sDescription .= "
Wine compatibility
What works:
- settings
@@ -228,7 +139,7 @@ if(isset($_REQUEST['submit1']))
What was not tested:
- burning
";
- $oRow->description .= "Tested versions
+ $oVersion->sDescription .= "Tested versions
@@ -241,13 +152,13 @@ if(isset($_REQUEST['submit1']))
";
}
echo '', "\n";
- echo '',"\n";
+ echo '',"\n";
echo '
';
echo 'Rating ',"\n";
- make_maintainer_rating_list("maintainer_rating", $oRow->maintainer_rating);
+ make_maintainer_rating_list("maintainer_rating", $oVersion->sTestedRating);
echo ' ',"\n";
echo 'Release ',"\n";
- make_bugzilla_version_list("maintainer_release", $oRow->maintainer_release);
+ make_bugzilla_version_list("maintainer_release", $oVersion->sTestedRelease);
echo ' ',"\n";
echo ' ',"\n";
@@ -258,13 +169,13 @@ if(isset($_REQUEST['submit1']))
// url edit form
echo '";
- echo html_back_link(1,BASE."appview.php?versionId=".$_REQUEST['versionId']);
+ echo html_back_link(1,BASE."appview.php?versionId=".$oVersion->iVersionId);
apidb_footer();
}
?>
diff --git a/appsubmit.php b/appsubmit.php
index ecb0e71..13cf313 100644
--- a/appsubmit.php
+++ b/appsubmit.php
@@ -5,13 +5,16 @@
include("path.php");
require(BASE."include/incl.php");
require(BASE."include/tableve.php");
+require(BASE."include/mail.php");
+require(BASE."include/application.php");
+
-// Send user to the correct branch of code even if they try to bypass
-// the first page (appsubmit.php without parameters)
if(!$_SESSION['current']->isLoggedIn())
{
- unset($_REQUEST['queueName']);
- unset($_REQUEST['apptype']);
+ // you must be logged in to submit app
+ apidb_header("Please login");
+ echo "To submit an application to the database you must be logged in. Please login now or create a new account .","\n";
+ exit;
}
// Check the input of a submitted form. And output with a list
@@ -20,88 +23,71 @@ function checkInput($fields)
{
$errors = "";
- if (strlen($fields['queueName']) > 200 )
+ if (strlen($fields['appName']) > 200 )
$errors .= "Your application name is too long. \n";
- if (empty( $fields['queueName']))
+ if (empty($fields['appName']) && !$fields['appId'])
$errors .= "Please enter an application name. \n";
- if (empty( $fields['queueVersion']))
+ if (empty($fields['versionName']))
$errors .= "Please enter an application version. \n";
// No vendor entered, and nothing in the list is selected
- if (empty( $fields['queueVendor']) and $fields['altvendor'] == '0')
+ if (empty($fields['vendorName']) && !$fields['vendorId'])
$errors .= "Please enter a vendor. \n";
- if (empty( $fields['queueDesc']))
+ if (empty($fields['appDescription']))
$errors .= "Please enter a description of your application. \n";
- // Not empty and an invalid e-mail address
- if (!empty( $fields['queueEmail'])
- AND !preg_match('/^[A-Za-z0-9\._-]+[@][A-Za-z0-9_-]+([.][A-Za-z0-9_-]+)+[A-Za-z]$/',
- $fields['queueEmail']))
- {
- $errors .= "Please enter a valid e-mail address. \n";
- }
-
if (empty($errors))
return "";
else
return $errors;
}
-#################################
-# USER SUBMITTED APP OR VERSION #
-#################################
-if (isset($_REQUEST['queueName']))
+/*
+ * User submitted an application
+ */
+if (isset($_REQUEST['appName']))
{
// Check input and exit if we found errors
$errors = checkInput($_REQUEST);
- if( !empty($errors) )
+ if(!empty($errors))
+ {
+ errorpage("We found the following errors:"," Please go back and correct them.");
+ echo html_back_link(1);
+ exit;
+ }
+
+ if($vendorName) $_REQUEST['vendorId']="";
+ $oApplication = new Application();
+ $oApplication->create($_REQUEST['appName'], $_REQUEST['appDescription'], $_REQUEST['keywords']." *** ".$_REQUEST['vendorName'], $_REQUEST['webpage'],$_REQUEST['vendorId'], $_REQUEST['catId']);
+ $oVersion = new Version();
+ $oVersion->create($_REQUEST['versionName'], $_REQUEST['versionDescription'], null, null, $oApplication->iAppId);
+ redirect(apidb_fullurl("index.php"));
+}
+/*
+ * User submitted a version
+ */
+elseif (isset($_REQUEST['versionName']) && is_numeric($_REQUEST['appId']))
+{
+ // Check input and exit if we found errors
+ $errors = checkInput($_REQUEST);
+ if(!empty($errors))
{
errorpage("We found the following errors:"," Please go back and correct them.");
echo html_back_link(1);
exit;
}
- /* if the user picked the vendor we need to retrieve the vendor name */
- /* and store it into the $queueVendor */
- if(isset($_REQUEST['altvendor']))
- {
- /* retrieve the actual name here */
- $sQuery = "select * from vendor where vendorId = ".$_REQUEST['altvendor'].";";
- $result = query_appdb($sQuery);
- if($result && mysql_num_rows($result) > 0 )
- {
- $ob = mysql_fetch_object($result);
- $_REQUEST['queueVendor'] = $ob->vendorName;
- }
- }
-
- $aFields = compile_insert_string(
- array( 'queueName' => $_REQUEST['queueName'],
- 'queueVersion' => $_REQUEST['queueVersion'],
- 'queueVendor' => $_REQUEST['queueVendor'],
- 'queueDesc' => $_REQUEST['queueDesc'],
- 'queueEmail' => $_REQUEST['queueEmail'],
- 'queueURL' => $_REQUEST['queueURL'],
- 'queueCatId' => $_REQUEST['queueCatId']));
-
- $sQuery = "INSERT INTO appQueue ({$aFields['FIELDS']},`submitTime`) VALUES ({$aFields['VALUES']}, NOW())";
-
- if(query_appdb($sQuery))
- {
- addmsg("Your application has been submitted for review. You should hear back soon".
- " about the status of your submission.",'green');
- }
-
+ $oVersion = new Version();
+ $oVersion->create($_REQUEST['versionName'], $_REQUEST['versionDescription'], null, null, $_REQUEST['appId']);
redirect(apidb_fullurl("index.php"));
}
-
-#######################################
-# USER WANTS TO SUBMIT APP OR VERSION #
-#######################################
-else if (isset($_REQUEST['apptype']))
+/*
+ * User wants to submit an application or version
+ */
+elseif (isset($_REQUEST['apptype']))
{
//FIXME: use absolute path in htmlarea_loader.js to avoid code duplication here
?>
@@ -125,6 +111,14 @@ function initDocument() {
editor.config.pageStyle = "@import url(./application.css);";
editor.registerPlugin(DynamicCSS);
editor.generate();
+
+ var editor2 = new HTMLArea("editor2",config);
+ editor2.config.pageStyle = "@import url(./application.css);";
+ editor2.generate();
+
}
onload = function() {
@@ -135,87 +129,14 @@ onload = function() {
isLoggedIn())
- $email = $_SESSION['current']->sEmail;
- // header
- apidb_header("Submit Application");
-
- // show add to queue form
- echo '";
- }
-
- # NEW VERSION
- else
- {
- echo html_frame_start("New Version Form",400,"",0);
-
- echo "\n";
-
- // app parent
- $x = new TableVE("view");
- echo 'App Parent ',"\n";
- $x->make_option_list("queueName",$_REQUEST['appId'],"appFamily","appId","appName");
- echo ' ',"\n";
-
- echo 'App Version ',"\n";
- echo ' ',"\n";
- $sDescription = "This is a template; enter version-specific description here
";
- $sDescription .= "
+ /*
+ * Templates
+ * FIXME: put templates in config file or somewhere else.
+ */
+ $sAppDescription = "
Enter description here
";
+ $sVersionDescription = "This is a template; enter version-specific description here
+
Wine compatibility
What works:
- settings
@@ -224,8 +145,8 @@ onload = function() {
- erasing
What was not tested:
- burning
-
";
- $oRow->description .= "Tested versions
+
+ Tested versions
@@ -237,50 +158,96 @@ onload = function() {
3.21 20040615 yes yes Bronze
";
- echo 'App Desc ',"\n";
- echo ''.$sDescription.'
',"\n";
+ // header
+ apidb_header("Submit Application");
- echo 'Email ',"\n";
- echo ' ',"\n";
+ // show add to queue form
+ echo ''."\n";
+ echo "This page is for submitting new applications to be added to this\n";
+ echo "database. The application will be reviewed by the AppDB Administrator\n";
+ echo "and you will be notified via email if this application will be added to\n";
+ echo "the database.
\n";
+ echo "Please don't forget to mention which Wine version you used, how well it worked\n";
+ echo "and if any workaround were needed. Having app descriptions just sponsoring the app\n";
+ echo "(Yes, some vendor want to use the appdb for this) or saying \"I haven't tried this app with Wine\" ";
+ echo "won't help Wine development or Wine users.
\n";
+ echo "After your application has been added you'll be able to submit screenshots for it.
";
- echo ' ',"\n";
- echo ' ',"\n";
+ // new application and version
+ if ($_REQUEST['apptype'] == 1)
+ {
+ echo html_frame_start("New Application Form",400,"",0);
+ echo "',"\n";
+ // app Category
+ $w = new TableVE("view");
+ echo 'Category ',"\n";
+ $w->make_option_list("catId","","appCategory","catId","catName");
+ echo ' ',"\n";
- echo html_frame_end();
+ echo 'Vendor ',"\n";
+ echo ' ',"\n";
- echo " ";
- }
+ // alt vendor
+ $x = new TableVE("view");
+ echo ' ',"\n";
+ $x->make_option_list("vendorId","","vendor","vendorId","vendorName");
+ echo ' ',"\n";
+
+ echo 'URL ',"\n";
+ echo ' ',"\n";
+
+ echo 'Keywords ',"\n";
+ echo ' ',"\n";
+
+
+ echo 'Application Description ',"\n";
+ echo ''.$sAppDescription.'
',"\n";
+
+ echo 'Version Description ',"\n";
+ echo ''.$sVersionDescription.'
',"\n";
+
+
+ echo '',"\n";
+ echo ' ',"\n";
+ echo '
',"\n";
+
+ echo html_frame_end();
+
+ echo "";
+ }
+ // new version
+ else
+ {
+ echo html_frame_start("New Version Form",400,"",0);
+
+ echo "\n";
+
+ // app parent
+ $x = new TableVE("view");
+ echo 'Application ',"\n";
+ $x->make_option_list("appId",$_REQUEST['appId'],"appFamily","appId","appName");
+ echo ' ',"\n";
+
+ echo 'Version name ',"\n";
+ echo ' ',"\n";
+
+ echo 'Version description ',"\n";
+ echo ''.$sVersionDescription.'
',"\n";
+
+ echo '',"\n";
+ echo ' ',"\n";
+
+ echo '
',"\n";
+
+ echo html_frame_end();
+
+ echo "";
+ }
}
-
-##########################
-# HOME PAGE OF APPSUBMIT #
-##########################
-else
-{
- if(!$_SESSION['current']->isLoggedIn())
- {
- // you must be logged in to submit app
- apidb_header("Please login");
- echo "To submit an application to the database you must be logged in. Please login now or create a new account .","\n";
- }
- else
- {
- // choose type of app
- apidb_header("Choose Application Type");
- echo "Please search through the database first. If you cannot find your application in the database select ","\n";
- echo "New Application .","\n";
- echo "If you have found your application but have not found your version then choose New Version .","\n";
- echo "',"\n";
- }
-}
-
apidb_footer();
?>
diff --git a/appview.php b/appview.php
index 0147c72..c955a56 100644
--- a/appview.php
+++ b/appview.php
@@ -33,9 +33,11 @@ function display_catpath($catId, $appId, $versionId = '')
/**
* display the SUB apps that belong to this app
+ * FIXME:
*/
function display_bundle($appId)
{
+ $oApp = new Application($appId);
$result = query_appdb("SELECT appFamily.appId, appName, description FROM appBundle, appFamily ".
"WHERE bundleId = $appId AND appBundle.appId = appFamily.appId");
if(!$result || mysql_num_rows($result) == 0)
@@ -56,12 +58,10 @@ function display_bundle($appId)
//set row color
$bgcolor = ($c % 2 == 0) ? "color0" : "color1";
- //format desc
- $aDesc = explode("\n",$oApp->data->description,2);
//display row
echo "\n";
echo " ".stripslashes($ob->appName)." \n";
- echo " ".$aDesc[0]." \n";
+ echo " ".trim_description($oApp->sDescription)." \n";
echo " \n\n";
$c++;
@@ -194,7 +194,7 @@ if($_REQUEST['appId'])
display_catpath($oApp->iCatId, $oApp->iAppId);
// set Vendor
- $vendor = $oApp->iVendorId;
+ $oVendor = new Vendor($oApp->iVendorId);
// set URL
$appLinkURL = ($oApp->sWebpage) ? "webPage\">".substr(stripslashes($oApp->sWebpage),0,30)." ": " ";
@@ -209,7 +209,7 @@ if($_REQUEST['appId'])
echo ' ',"\n";
echo " Name ".$oApp->sName." \n";
echo " Vendor ".
- " ".stripslashes($vendor->vendorName)." \n";
+ " ".$oVendor->sName." \n";
echo " BUGS ".
" iAppId."\">Check for bugs in bugzilla \n";
echo " \n";
diff --git a/cron/cleanup.php b/cron/cleanup.php
index 6764e74..143c5e4 100644
--- a/cron/cleanup.php
+++ b/cron/cleanup.php
@@ -61,10 +61,6 @@ function hasDataAssociated($iUserId)
$hResult = query_appdb($sQuery);
if(mysql_num_rows($hResult)) return true;
- $sQuery = "SELECT * FROM appDataQueue WHERE userId = $iUserId";
- $hResult = query_appdb($sQuery);
- if(mysql_num_rows($hResult)) return true;
-
$sQuery = "SELECT * FROM appMaintainerQueue WHERE userId = $iUserId";
$hResult = query_appdb($sQuery);
if(mysql_num_rows($hResult)) return true;
diff --git a/include/application.php b/include/application.php
index a390a46..8abe665 100644
--- a/include/application.php
+++ b/include/application.php
@@ -3,8 +3,8 @@
/* this class represents an application incl. all versions */
/***********************************************************/
-require(BASE."include/version.php");
-require(BASE."include/vendor.php");
+require_once(BASE."include/version.php");
+require_once(BASE."include/vendor.php");
/**
* Application class for handling applications.
@@ -19,6 +19,7 @@ class Application {
var $sDescription;
var $sWebpage;
var $bQueued;
+ var $sSubmitTime;
var $iSubmitterId;
var $aVersionsIds; // an array that contains the versionId of every version linked to this app.
@@ -47,6 +48,7 @@ class Application {
$this->iVendorId = $oRow->vendorId;
$this->iCatId = $oRow->catId;
$this->iSubmitterId = $oRow->submitterId;
+ $this->sSubmitTime = $oRow->submitTime;
$this->sDate = $oRow->submitTime;
$this->sName = $oRow->appName;
$this->sKeywords = $oRow->keywords;
@@ -104,6 +106,7 @@ class Application {
'webPage' => $sWebpage,
'vendorId' => $iVendorId,
'catId' => $iCatId,
+ 'submitterId'=> $_REQUEST['current']->iUserId,
'queued' => $this->bQueued ));
$sFields = "({$aInsert['FIELDS']})";
$sValues = "({$aInsert['VALUES']})";
@@ -123,34 +126,36 @@ class Application {
/**
* Update application.
* FIXME: Informs interested people about the modification.
+ * FIXME: tell what changed in the email.
+ * FIXME: get rid of addslashes and use compile_update_string
* Returns true on success and false on failure.
*/
function update($sName=null, $sDescription=null, $sKeywords=null, $sWebpage=null, $iVendorId=null, $iCatId=null)
{
if ($sName)
{
- if (!query_appdb("UPDATE appFamily SET appName = '".$sName."' WHERE appId = ".$this->iAppId))
+ if (!query_appdb("UPDATE appFamily SET appName = '".addslashes($sName)."' WHERE appId = ".$this->iAppId))
return false;
$this->sName = $sName;
}
if ($sDescription)
{
- if (!query_appdb("UPDATE appFamily SET description = '".$sDescription."' WHERE appId = ".$this->iAppId))
+ if (!query_appdb("UPDATE appFamily SET description = '".addslashes($sDescription)."' WHERE appId = ".$this->iAppId))
return false;
$this->sDescription = $sDescription;
}
if ($sKeywords)
{
- if (!query_appdb("UPDATE appFamily SET keywords = '".$sKeywords."' WHERE appId = ".$this->iAppId))
+ if (!query_appdb("UPDATE appFamily SET keywords = '".addslashes($sKeywords)."' WHERE appId = ".$this->iAppId))
return false;
$this->sKeywords = $sKeywords;
}
if ($sWebpage)
{
- if (!query_appdb("UPDATE appFamily SET webPage = '".$sWebpage."' WHERE appId = ".$this->iAppId))
+ if (!query_appdb("UPDATE appFamily SET webPage = '".addslashes($sWebpage)."' WHERE appId = ".$this->iAppId))
return false;
$this->sWebpage = $sWebpage;
}
@@ -161,6 +166,13 @@ class Application {
return false;
$this->iVendorId = $iVendorId;
}
+
+ if ($iCatId)
+ {
+ if (!query_appdb("UPDATE appFamily SET catId = '".$iCatId."' WHERE appId = ".$this->iAppId))
+ return false;
+ $this->iCatId = $iCatId;
+ }
return true;
}
@@ -196,8 +208,9 @@ class Application {
if(!$this->bQueued)
return false;
- $sUpdate = compile_insert_string(array('queued' => "false"));
- if(query_appdb("UPDATE appFamily ".$sUpdate))
+ $sUpdate = compile_update_string(array('queued' => "false",
+ 'keywords'=> str_replace(" *** ","",$this->sKeywords) ));
+ if(query_appdb("UPDATE appFamily SET ".$sUpdate." WHERE appId = ".$this->iAppId))
{
// we send an e-mail to intersted people
$this->mailSubmitter();
@@ -258,8 +271,7 @@ class Application {
$sSubject = "Application ".$this->sName." deleted by ".$_SESSION['current']->sRealname;
addmsg("Application deleted.", "green");
}
-
- $sEmail = get_notify_email_address_list(null, $this->iVersionId);
+ $sEmail = get_notify_email_address_list($this->iAppId);
if($sEmail)
mail_appdb($sEmail, $sSubject ,$sMsg);
}
diff --git a/include/category.php b/include/category.php
index 33446de..6820e04 100644
--- a/include/category.php
+++ b/include/category.php
@@ -203,14 +203,16 @@ function make_cat_path($path, $appId = '', $versionId = '')
if(!empty($appId))
{
+ $oApp = new Application($appId);
if(!empty($versionId))
{
- $str .= " > ".html_ahref(lookup_app_name($appId),"appview.php?appId=$appId");
- $str .= " > ".lookup_version_name($versionId);
+ $oVersion = new Version($versionId);
+ $str .= " > ".html_ahref($oApp->sName,"appview.php?appId=$appId");
+ $str .= " > ".$oVersion->sName;
}
else
{
- $str .= " > ".lookup_app_name($appId);
+ $str .= " > ".$oApp->sName;
}
}
diff --git a/include/sidebar.php b/include/sidebar.php
index a830b58..83e7b8f 100644
--- a/include/sidebar.php
+++ b/include/sidebar.php
@@ -13,7 +13,7 @@ function global_sidebar_menu() {
$g->add("AppDB Home", BASE);
$g->add("Browse Apps", BASE."appbrowse.php");
$g->add("Top 25", BASE."votestats.php");
- $g->add("Submit App", BASE."appsubmit.php");
+ $g->add("Submit App", BASE."appsubmit.php?apptype=1");
$g->add("Documentation", BASE."help/");
$g->add("Help & Support", BASE."support.php");
$g->add("Appdb Stats", BASE."appdbStats.php");
diff --git a/include/util.php b/include/util.php
index 6cac5a4..21b7326 100644
--- a/include/util.php
+++ b/include/util.php
@@ -128,25 +128,25 @@ function make_maintainer_rating_list($varname, $cvalue)
echo "\n";
}
-/* get the number of applications in the appQueue table */
+/* get the number of queued applications */
function getQueuedAppCount()
{
- $qstring = "SELECT count(*) as queued_apps FROM appQueue";
+ $qstring = "SELECT count(*) as queued_apps FROM appFamily WHERE queued='true'";
$result = query_appdb($qstring);
$ob = mysql_fetch_object($result);
return $ob->queued_apps;
}
-/* get the number of applications in the appQueue table */
+/* get the number of queued appdata */
function getQueuedAppDataCount()
{
- $qstring = "SELECT count(*) as queued_appdata FROM appDataQueue";
+ $qstring = "SELECT count(*) as queued_appdata FROM appData WHERE queued='true'";
$result = query_appdb($qstring);
$ob = mysql_fetch_object($result);
return $ob->queued_appdata;
}
-/* get the number of applications in the appQueue table */
+/* get the number of queued maintainers */
function getQueuedMaintainerCount()
{
$qstring = "SELECT count(*) as queued_maintainers FROM appMaintainerQueue";
diff --git a/include/version.php b/include/version.php
index cab3bf2..039d0bf 100644
--- a/include/version.php
+++ b/include/version.php
@@ -13,7 +13,9 @@ class Version {
var $sDescription;
var $sTestedRelease;
var $sTestedRating;
+ var $sSubmitTime;
var $iSubmitterId;
+ var $sDate;
var $aNotesIds; // an array that contains the noteId of every note linked to this version
var $aScreenshotsIds; // an array that contains the screenshotId of every screenshot linked to this version
var $aUrlsIds; // an array that contains the screenshotId of every url linked to this version
@@ -42,6 +44,7 @@ class Version {
$this->iVendorId = $oRow->vendorId;
$this->iCatId = $oRow->catId;
$this->iSubmitterId = $oRow->submitterId;
+ $this->sSubmitTime = $oRow->submitTime;
$this->sDate = $oRow->submitTime;
$this->sName = $oRow->versionName;
$this->sKeywords = $oRow->keywords;
@@ -206,8 +209,8 @@ class Version {
if(!$this->bQueued)
return false;
- $sUpdate = compile_insert_string(array('queued' => "false"));
- if(query_appdb("UPDATE appVersion ".$sUpdate))
+ $sUpdate = compile_update_string(array('queued' => "false"));
+ if(query_appdb("UPDATE appVersion SET ".$sUpdate." WHERE versionId = ".$this->iVersionId))
{
// we send an e-mail to intersted people
$this->mailSubmitter();
diff --git a/screenshots.php b/screenshots.php
index 0e37805..022da4b 100644
--- a/screenshots.php
+++ b/screenshots.php
@@ -41,9 +41,12 @@ if($_REQUEST['cmd'])
*/
$hResult = get_screenshots($_REQUEST['appId'], $_REQUEST['versionId']);
apidb_header("Screenshots");
+$oApp = new Application($_REQUEST['appId']);
+$oVersion = new Version($_REQUEST['versionId']);
+
if($hResult && mysql_num_rows($hResult))
{
- echo html_frame_start("Screenshot Gallery for ".lookup_app_name($_REQUEST['appId'])." ".lookup_version_name($_REQUEST['versionId']),500);
+ echo html_frame_start("Screenshot Gallery for ".$oApp->sName." ".$oVersion->sName,500);
// display thumbnails
$c = 1;
diff --git a/tables/appdb_tables.sql b/tables/appdb_tables.sql
index c627dd3..d98c295 100644
--- a/tables/appdb_tables.sql
+++ b/tables/appdb_tables.sql
@@ -11,8 +11,6 @@ drop table if exists appHitStats;
drop table if exists catHitStats;
drop table if exists appComments;
drop table if exists appData;
-drop table if exists appDataQueue;
-drop table if exists appQueue;
drop table if exists appBundle;
drop table if exists appVotes;
drop table if exists appNotes;
@@ -34,14 +32,17 @@ create table vendor (
* application
*/
create table appFamily (
- appId int not null auto_increment,
- appName varchar(100) not null,
- vendorId int not null,
- keywords text,
- description text,
- webPage varchar(100),
- catId int,
- key(appId)
+ appId int not null auto_increment,
+ appName varchar(100) not null,
+ vendorId int not null,
+ keywords text,
+ description text,
+ webPage varchar(100),
+ catId int,
+ submitTime timestamp(14) NOT NULL,
+ submitterId int(11) NOT NULL default '0',
+ queued enum('true','false') NOT NULL default 'false',
+ key(appId)
);
@@ -49,28 +50,18 @@ create table appFamily (
* a version of an application
*/
create table appVersion (
- versionId int not null auto_increment,
- appId int not null,
- versionName varchar(100) not null,
- description text,
- maintainer_rating text,
- maintainer_release text,
- key(versionId)
+ versionId int not null auto_increment,
+ appId int not null,
+ versionName varchar(100) not null,
+ description text,
+ maintainer_rating text,
+ maintainer_release text,
+ submitTime timestamp(14) NOT NULL,
+ submitterId int(11) NOT NULL default '0',
+ queued enum('true','false') NOT NULL default 'false',
+ key(versionId)
);
-create table appQueue (
- queueId int not null auto_increment,
- queueName varchar(100) not null,
- queueVersion varchar(100) not null,
- queueVendor varchar(100) not null,
- queueDesc text,
- queueEmail varchar(100),
- queueURL varchar(100),
- queueImage varchar(100) not null,
- submitTime timestamp,
- queueCatId int,
- key(queueId)
-);
create table userExperience (
uExpId int not null auto_increment,
@@ -158,27 +149,12 @@ create table appData (
versionId int default 0,
type enum('image', 'url', 'bug'),
description text,
- url varchar(255),
- key(id),
- index(appId),
- index(versionId)
-);
-
-
-/*
- * links to screenshots and other stuff waiting to be accepted
- */
-create table appDataQueue (
- queueId int not null auto_increment,
- versionId int default 0,
- type enum('image', 'url'),
- description text,
- url varchar(255),
- userId int not null,
- submitTime timestamp,
- key(queueid),
- index(appId),
- index(versionId)
+ url varchar(255) default NULL,
+ submitTime timestamp(14) NOT NULL,
+ submitterId int(11) NOT NULL default '0',
+ queued enum('true','false') NOT NULL default 'false',
+ KEY id (id),
+ KEY versionId (versionId)
);