- Timestamp:
- May 28, 2008 4:15:25 AM (16 years ago)
- Location:
- trunk/lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Cart.inc.php
r333 r336 233 233 $sum = 0; 234 234 foreach ($_SESSION['_cart'][$this->_ns]['items'] as $item_id => $specs) { 235 $sum += isset($specs[$key]) && is_numeric($specs[$key]) ? $specs[$key] : 0;235 $sum += isset($specs[$key]) && is_numeric($specs[$key]) ? $specs[$key] * $specs['quantity'] : 0; 236 236 } 237 237 return $sum; -
trunk/lib/TemplateGlue.inc.php
r334 r336 461 461 foreach ($submit_buttons as $i => $b) { 462 462 if (is_array($b)) { 463 ?><input type="submit" name="<?php echo oTxt($b['name']) ?>" value="<?php echo oTxt($b['value']); ?>" accesskey="<?php echo oTxt($b['accesskey']); ?>" /><?php 463 $defaults = array(); 464 $defaults['type'] = isset($b['type']) ? $b['type'] : 'submit'; 465 $defaults['id'] = isset($b['id']) ? $b['id'] : sprintf('sc-%s-button', $b['name']); 466 $b = array_merge($defaults, $b); 467 echo '<input'; 468 foreach ($b as $key => $value) { 469 printf(' %s="%s"', $key, oTxt($value)); 470 } 471 echo ' />'; 464 472 } else { 465 473 // For backwards compatibility. -
trunk/lib/Utilities.inc.php
r334 r336 43 43 * Return dump as cleaned text. Useful for dumping data into emails. 44 44 * 45 * @param mixed$var Variable to dump.45 * @param array $var Variable to dump. 46 46 * @param strong $indent A string to prepend indented lines (tab for example). 47 47 * @return string Dump of var. … … 971 971 function stripQuery($url) 972 972 { 973 return preg_replace(' ![?#].*!', '', $url);973 return preg_replace('/[?#].*$/', '', $url); 974 974 } 975 975
Note: See TracChangeset
for help on using the changeset viewer.