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