Don't use arguments for vendor::create() and vendor::update()

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-01-28 23:28:14 +00:00
committed by WineHQ
parent 03c8c62699
commit d8aa5380a2
5 changed files with 52 additions and 29 deletions

View File

@@ -180,10 +180,12 @@ if ($aClean['sSub'])
$oApp = new Application($aClean['iAppId']);
$oApp->GetOutputEditorValues($aClean); // load the values from $aClean
// add new vendor
if($aClean['sAppVendorName'] and !$aClean['iAppVendorId'])
if($aClean['sVendorName'] and !$aClean['iAppVendorId'])
{
$oVendor = new Vendor();
$oVendor->create($aClean['sAppVendorName'],$aClean['sAppWebpage']);
$oVendor->getOutputEditorValues($aClean);
$oVendor->sWebpage = $aClean['sAppWebpage'];
$oVendor->create();
$oApp->iVendorId = $oVendor->iVendorId;
}
$oApp->update(true);

View File

@@ -9,7 +9,8 @@ if(!$_SESSION['current']->hasPriv("admin"))
$oVendor = new Vendor($aClean['iVendorId']);
if($aClean['sSubmit'])
{
$oVendor->update($aClean['sName'],$aClean['sWebpage']);
$oVendor->getOutputEditorValues($aClean);
$oVendor->update();
util_redirect_and_exit(apidb_fullurl("vendorview.php"));
}
else