Support vendor queuing
This commit is contained in:
committed by
WineHQ
parent
8cf53f1679
commit
2a7d8e8c3f
@@ -61,12 +61,10 @@ class Vendor {
|
||||
*/
|
||||
function create()
|
||||
{
|
||||
if(!$this->canEdit())
|
||||
return FALSE;
|
||||
|
||||
$hResult = query_parameters("INSERT INTO vendor (vendorName, vendorURL) ".
|
||||
"VALUES ('?', '?')",
|
||||
$this->sName, $this->sWebpage);
|
||||
$hResult = query_parameters("INSERT INTO vendor (vendorName, vendorURL, queued) ".
|
||||
"VALUES ('?', '?', '?')",
|
||||
$this->sName, $this->sWebpage,
|
||||
$this->mustBeQueued() ? "true" : "false");
|
||||
if($hResult)
|
||||
{
|
||||
$this->iVendorId = mysql_insert_id();
|
||||
@@ -80,6 +78,23 @@ class Vendor {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Un-queue vendor
|
||||
* Returns TRUE or FALSE
|
||||
*/
|
||||
function unQueue()
|
||||
{
|
||||
if(!$this->canEdit())
|
||||
return FALSE;
|
||||
|
||||
$hResult = query_parameters("UPDATE vendor SET queued = '?' WHERE vendorId = '?'",
|
||||
'false', $this->iVendorId);
|
||||
|
||||
if(!$hResult)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update vendor.
|
||||
|
||||
@@ -20,9 +20,10 @@ drop table if exists sessionMessages;
|
||||
* vendor information
|
||||
*/
|
||||
create table vendor (
|
||||
vendorId int not null auto_increment,
|
||||
vendorName varchar(100) not null,
|
||||
vendorURL varchar(200),
|
||||
vendorId int not null auto_increment,
|
||||
vendorName varchar(100) not null,
|
||||
vendorURL varchar(200),
|
||||
queued enum('true','false') NOT NULL default 'false',
|
||||
key(vendorId)
|
||||
);
|
||||
|
||||
@@ -31,7 +32,7 @@ create table vendor (
|
||||
* application
|
||||
*/
|
||||
create table appFamily (
|
||||
appId int not null auto_increment,
|
||||
appId int not null auto_increment,
|
||||
appName varchar(100) not null,
|
||||
vendorId int not null,
|
||||
keywords text,
|
||||
|
||||
Reference in New Issue
Block a user