From: Verdon V. <ve...@us...> - 2009-03-04 15:33:15
|
Update of /cvsroot/phpwebsite-comm/modules/vshop/class In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv756/class Modified Files: Tag: VSHOP-0-6-1 vShop.php vShop_Tax.php Log Message: 6.0.1 backports from future Index: vShop.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/vshop/class/vShop.php,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** vShop.php 3 Dec 2008 22:17:42 -0000 1.4 --- vShop.php 4 Mar 2009 15:33:03 -0000 1.4.2.1 *************** *** 144,148 **** } else { $this->forwardMessage(dgettext('vshop', 'Item saved successfully.')); ! PHPWS_Core::reroute('index.php?module=vshop&dept='.$this->item->dept_id); } } else { --- 144,149 ---- } else { $this->forwardMessage(dgettext('vshop', 'Item saved successfully.')); ! // old PHPWS_Core::reroute('index.php?module=vshop&dept='.$this->item->dept_id); ! PHPWS_Core::reroute('index.php?module=vshop&aop=menu&tab=list_items&dept='.$this->item->dept_id); // new from wendall } } else { *************** *** 432,436 **** $new_qty = $qty_incart + $qty; } ! if (PHPWS_Settings::get('vshop', 'use_inventory') && $new_qty <= $this->item->stock) { $cart->addItems($this->item->id, null, $qty); $this->forwardMessage(sprintf(dgettext('vshop', '%s successfully added to your cart.'), $this->item->getTitle(true))); --- 433,438 ---- $new_qty = $qty_incart + $qty; } ! // old if (PHPWS_Settings::get('vshop', 'use_inventory') && $new_qty <= $this->item->stock) { ! if ((PHPWS_Settings::get('vshop', 'use_inventory') && $new_qty <= $this->item->stock) || (!PHPWS_Settings::get('vshop', 'use_inventory'))) { // fixed thanks wendall $cart->addItems($this->item->id, null, $qty); $this->forwardMessage(sprintf(dgettext('vshop', '%s successfully added to your cart.'), $this->item->getTitle(true))); *************** *** 773,777 **** } ! if (!empty($_POST['price']) ) { $this->item->setPrice($_POST['price']); } --- 775,780 ---- } ! // old if (!empty($_POST['price'])) { ! if (is_numeric($_POST['price'])) { $this->item->setPrice($_POST['price']); } *************** *** 781,793 **** $this->item->setTaxable(0) ; ! if (!empty($_POST['stock']) ) { $this->item->setStock((int)$_POST['stock']); } ! if (!empty($_POST['weight']) ) { $this->item->setWeight($_POST['weight']); } ! if (!empty($_POST['shipping']) ) { $this->item->setShipping($_POST['shipping']); } --- 784,799 ---- $this->item->setTaxable(0) ; ! // old if (!empty($_POST['stock'])) { ! if (is_int($_POST['stock'])) { $this->item->setStock((int)$_POST['stock']); } ! // old if (!empty($_POST['weight'])) { ! if (is_numeric($_POST['weight'])) { $this->item->setWeight($_POST['weight']); } ! // old if (!empty($_POST['shipping'])) { ! if (is_numeric($_POST['shipping'])) { $this->item->setShipping($_POST['shipping']); } *************** *** 1312,1316 **** public function navLinks() { ! $links = null; if (!PHPWS_Settings::get('vshop', 'use_breadcrumb')) { if (vShop::countDepts() !== 1) { --- 1318,1322 ---- public function navLinks() { ! $links = array(); if (!PHPWS_Settings::get('vshop', 'use_breadcrumb')) { if (vShop::countDepts() !== 1) { Index: vShop_Tax.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/vshop/class/vShop_Tax.php,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -C2 -d -r1.1.1.1 -r1.1.1.1.2.1 *** vShop_Tax.php 25 Nov 2008 15:19:30 -0000 1.1.1.1 --- vShop_Tax.php 4 Mar 2009 15:33:04 -0000 1.1.1.1.2.1 *************** *** 165,169 **** $links = array(); ! if (Current_User::allow('vshop', 'setting')) { $vars['aop'] = 'edit_tax'; $links[] = PHPWS_Text::secureLink(dgettext('vshop', 'Edit'), 'vshop', $vars); --- 165,169 ---- $links = array(); ! if (Current_User::allow('vshop', 'settings')) { $vars['aop'] = 'edit_tax'; $links[] = PHPWS_Text::secureLink(dgettext('vshop', 'Edit'), 'vshop', $vars); |