Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
?>
<?php

$numColumns = sizeof($this->getColumns());
$numColumns = count($this->getColumns());
?>
<?php if($this->getCollection()): ?>
<div class="grid np">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
?>
<?php if( sizeof($this->getTotals()) > 0 ): ?>
<?php if(count($this->getTotals()) > 0): ?>
<?php foreach( $this->getTotals() as $_total ): ?>
<div class="entry-edit">
<div class="entry-edit-head"><h4><?php echo $_total['label'] ?></h4></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
?>
<?php if( sizeof($this->getTotals()) > 0 ): ?>
<?php if(count($this->getTotals()) > 0): ?>
<div class="box" id="dashboard_diagram_totals">
<div class="entry-edit">
<table cellspacing="0" width="100%">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* getPagerVisibility()
* getVarNamePage()
*/
$numColumns = sizeof($this->getColumns());
$numColumns = count($this->getColumns());
?>
<?php if($this->getCollection()): ?>
<?php if($this->canDisplayContainer()): ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
?>
<?php if( sizeof($this->getTotals()) > 0 ): ?>
<?php if(count($this->getTotals()) > 0): ?>
<div class="box">
<div class="entry-edit">
<table border="0" cellspacing="0" width="100%">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ $_rates = ( $_newRates ) ? $_newRates : $_oldRates;
<thead>
<tr class="headings">
<th class="a-right">&nbsp;</th>
<?php $_i = 0; foreach( $this->getAllowedCurrencies() as $_currencyCode ): ?>
<th class="<?php echo (( ++$_i == (sizeof($this->getAllowedCurrencies())) ) ? 'last' : '' ) ?> a-right"><strong><?php echo $this->escapeHtml($_currencyCode) ?><strong></th>
<?php $_allowedCurrencies = $this->getAllowedCurrencies(); ?>
<?php $_allowedCurrencyCount = count($_allowedCurrencies); ?>
<?php $_i = 0; foreach($_allowedCurrencies as $_currencyCode): ?>
<th class="<?php echo ((++$_i === $_allowedCurrencyCount) ? 'last' : '' ) ?> a-right"><strong><?php echo $this->escapeHtml($_currencyCode) ?><strong></th>
<?php endforeach ?>
</tr>
</thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* getPagerVisibility()
* getVarNamePage()
*/
$numColumns = sizeof($this->getColumns());
$numColumns = count($this->getColumns());
?>
<?php if($this->getCollection()): ?>
<?php if($this->canDisplayContainer()): ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
*/
?>
<?php
$_productCollection=$this->getLoadedProductCollection();
$_productCollection = $this->getLoadedProductCollection();
$_productCollectionCount = count($_productCollection);
$_helper = $this->helper('catalog/output');
$_params = $this->escapeHtml(json_encode(array('form_key' => $this->getFormKey())));
?>
Expand All @@ -46,7 +47,7 @@
<?php $_iterator = 0; ?>
<ol class="products-list" id="products-list">
<?php foreach ($_productCollection as $_product): ?>
<li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif ?>">
<li class="item<?php if(++$_iterator === $_productCollectionCount): ?> last<?php endif ?>">
<?php // Product Image ?>
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
<?php // Product description ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div class="page-title">
<h1><?php echo $this->__('Popular Search Terms') ?></h1>
</div>
<?php if( sizeof($this->getTerms()) > 0 ): ?>
<?php if(count($this->getTerms()) > 0): ?>
<ul class="tags-list">
<?php foreach ($this->getTerms() as $_term): ?>
<li><a href="<?php echo $this->getSearchUrl($_term) ?>" style="font-size:<?php echo $_term->getRatio()*70+75 ?>%;"><?php echo $this->escapeHtml($_term->getName()) ?></a></li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
<?php $_orders = $this->getOrders(); ?>
<div class="box-head">
<h2><?php echo $this->__('Recent Orders') ?></h2>
<?php if( sizeof($_orders->getItems()) > 0 ): ?><a href="<?php echo $this->getUrl('sales/order/history') ?>"><?php echo $this->__('View All') ?></a><?php endif ?>
<?php if(count($_orders->getItems()) > 0): ?><a href="<?php echo $this->getUrl('sales/order/history') ?>"><?php echo $this->__('View All') ?></a><?php endif ?>
</div>
<?php if( sizeof($_orders->getItems()) > 0 ): ?>
<?php if(count($_orders->getItems()) > 0): ?>
<table class="data-table" id="my-orders-table">
<col width="1" />
<col width="1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@
<h1><?php echo $this->__('Tracking Information'); ?></h1>
<button class="button" onclick="window.close(); window.opener.focus();"><span><span><?php echo $this->__('Close Window') ?></span></span></button>
</div>
<?php if(sizeof($_results)>0): ?>
<?php if(count($_results) > 0): ?>
<?php foreach($_results as $shipid => $_result): ?>
<?php if($shipid): ?>
<h2 class="sub-title"><?php echo $this->__('Shipment #').$shipid; ?></h2>
<?php endif ?>
<?php if(sizeof($_result)>0): ?>
<?php $rowCount = sizeof($_result); $counter = 1; ?>
<?php $_id = 0; foreach($_result as $track): ?>
<?php if(($rowCount = count($_result)) > 0): ?>
<?php $counter = 1;
$_id = 0;
foreach($_result as $track): ?>
<table class="tracking-table-popup data-table" id="tracking-table-popup-<?php echo $_id ?>">
<col width="15%" />
<col />
Expand Down
2 changes: 1 addition & 1 deletion app/design/frontend/base/default/template/tag/cloud.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div class="page-title">
<h1><?php echo $this->__('All Tags') ?></h1>
</div>
<?php if( sizeof($this->getTags()) > 0 ): ?>
<?php if(count($this->getTags()) > 0): ?>
<ul class="tags-list">
<?php foreach ($this->getTags() as $_tag): ?>
<li><a href="<?php echo $_tag->getTaggedProductsUrl() ?>" style="font-size:<?php echo $_tag->getRatio()*70+75 ?>%;"><?php echo $this->escapeHtml($_tag->getName()) ?></a></li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@
<strong><?php echo $this->__('Tags:') ?></strong>
<?php $_i = 0; ?>
<ul>
<?php foreach( $_item->getProductTags() as $_tag ): ?>
<li><a href="<?php echo $_tag->getViewTagUrl() ?>"><?php echo $this->escapeHtml($_tag->getName()) ?></a><?php if(++$_i != sizeof($_item->getProductTags()->getItems())): ?>,<?php endif ?></li>
<?php $_itemProductTags = $_item->getProductTags(); ?>
<?php $_itemProductTagCount = count($_itemProductTags->getItems()); ?>
<?php foreach($_itemProductTags as $_tag): ?>
<li><a href="<?php echo $_tag->getViewTagUrl() ?>"><?php echo $this->escapeHtml($_tag->getName()) ?></a><?php if(++$_i !== $_itemProductTagCount): ?>,<?php endif ?></li>
<?php endforeach ?>
</ul>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<div class="clearer"></div>
<?php echo $this->getToolbarHtml() ?>
<table class="data-table" id="my-tags-table">
<?php if( sizeof($this->getMyProducts()) > 0 ): ?>
<?php if(count($this->getMyProducts()) > 0): ?>
<col width="1" />
<col />
<col width="1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
?>
<div class="info-box recent-orders">
<?php $_orders = $this->getOrders(); ?>
<h3 class="box-title"><?php echo $this->__('Recent Orders') ?><?php if( sizeof($_orders->getItems()) > 0 ): ?> <span class="separator">|</span> <a href="<?php echo $this->getUrl('sales/order/history') ?>"><?php echo $this->__('View All') ?></a><?php endif ?></h3>
<h3 class="box-title"><?php echo $this->__('Recent Orders') ?><?php if(count($_orders->getItems()) > 0): ?> <span class="separator">|</span> <a href="<?php echo $this->getUrl('sales/order/history') ?>"><?php echo $this->__('View All') ?></a><?php endif ?></h3>
<div class="box-content">
<?php echo $this->getChildHtml()?>
<?php if( sizeof($_orders->getItems()) > 0 ): ?>
<?php if(count($_orders->getItems()) > 0): ?>
<table class="data-table" id="my-orders-table">
<thead>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
?>
<?php $_results = $this->getTrackingInfo() ?>
<?php $_results = $this->getTrackingInfo() ?>
<div class="shipping-tracking">
<div class="button-set">
<button class="form-button" onclick="window.close();window.opener.focus();"><span><?php echo $this->__('Close Window') ?></span></button>
</div>
<?php if(sizeof($_results)>0): ?>
<?php if(count($_results) > 0): ?>
<?php foreach($_results as $shipid => $_result): ?>
<?php if($shipid): ?>
<div class="box-header"><?php echo $this->__('Shipment #').$shipid; ?></div>
<?php endif ?>
<?php if(sizeof($_result)>0): ?>
<?php $rowCount = sizeof($_result); $counter = 1; ?>
<?php if(($rowCount = count($_result)) > 0): ?>
<?php $counter = 1; ?>
<?php foreach($_result as $track): ?>
<table class="generic-table">
<?php if(is_object($track)): ?>
Expand Down Expand Up @@ -125,7 +125,7 @@

</table>

<?php if (is_object($track) && sizeof($track->getProgressdetail())>0): ?>
<?php if (is_object($track) && count($track->getProgressdetail()) > 0): ?>
<br />
<table cellspacing="0" class="data-table" id="track-history-table-<?php echo $track->getTracking(); ?>">
<thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
*/
?>
<?php
$_productCollection=$this->getLoadedProductCollection();
$_productCollection = $this->getLoadedProductCollection();
$_productCollectionCount = count($_productCollection);
$_helper = $this->helper('catalog/output');
?>
<?php if(!$_productCollection->count()): ?>
Expand All @@ -45,7 +46,7 @@
<?php $_iterator = 0; ?>
<ol class="products-list" id="products-list">
<?php foreach ($_productCollection as $_product): ?>
<li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif ?>">
<li class="item<?php if(++$_iterator === $_productCollectionCount): ?> last<?php endif ?>">
<?php // Product Image ?>
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(170); ?>" width="170" height="170" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
<?php // Product description ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
/* @var $this Mage_Catalog_Block_Product_List */
?>
<?php
$_productCollection=$this->getLoadedProductCollection();
$_productCollection = $this->getLoadedProductCollection();
$_productCollectionCount = count($_productCollection);
$_helper = $this->helper('catalog/output');
$_params = $this->escapeHtml(json_encode(array('form_key' => $this->getFormKey())));
?>
Expand All @@ -47,7 +48,7 @@
<?php $_iterator = 0; ?>
<ol class="products-list" id="products-list">
<?php foreach ($_productCollection as $_product): ?>
<li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif ?>">
<li class="item<?php if(++$_iterator === $_productCollectionCount): ?> last<?php endif ?>">
<?php // Product Image ?>
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
<?php /* Based on the native RWD styling, product images are displayed at a max of ~400px wide when viewed on a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
/* @var $this Mage_Catalog_Block_Product_List */
?>
<?php
$_productCollection=$this->getLoadedProductCollection();
$_productCollection = $this->getLoadedProductCollection();
$_productCollectionCount = count($_productCollection);
$_helper = $this->helper('catalog/output');
$_params = $this->escapeHtml(json_encode(array('form_key' => $this->getFormKey())));
?>
Expand All @@ -47,7 +48,7 @@ $_params = $this->escapeHtml(json_encode(array('form_key' => $this->getFormKey()
<?php $_iterator = 0; ?>
<ol class="products-list" id="products-list">
<?php foreach ($_productCollection as $_product): ?>
<li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif ?>">
<li class="item<?php if(++$_iterator === $_productCollectionCount): ?> last<?php endif ?>">
<?php // Product Image ?>
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
<?php /* Based on the native RWD styling, product images are displayed at a max of ~400px wide when viewed on a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
<?php $_orders = $this->getOrders(); ?>
<div class="box-head">
<h2><?php echo $this->__('Recent Orders') ?></h2>
<?php if( sizeof($_orders->getItems()) > 0 ): ?><a href="<?php echo $this->getUrl('sales/order/history') ?>"><?php echo $this->__('View All') ?></a><?php endif ?>
<?php if(count($_orders->getItems()) > 0): ?><a href="<?php echo $this->getUrl('sales/order/history') ?>"><?php echo $this->__('View All') ?></a><?php endif ?>
</div>
<?php if( sizeof($_orders->getItems()) > 0 ): ?>
<?php if(count($_orders->getItems()) > 0): ?>
<table class="data-table orders" id="my-orders-table">
<col width="1" />
<col width="1" />
Expand Down
4 changes: 2 additions & 2 deletions lib/Net/IDNA2.php
Original file line number Diff line number Diff line change
Expand Up @@ -2382,7 +2382,7 @@ public function encode($decoded, $one_time_encoding = false)
}
// Catch the rest of the string
if ($last_begin) {
$inp_len = sizeof($decoded);
$inp_len = count($decoded);
$encoded = '';
$encoded = $this->_encode(array_slice($decoded, $last_begin, (($inp_len)-$last_begin)));
if ($encoded) {
Expand Down Expand Up @@ -3399,4 +3399,4 @@ public static function singleton($params = array())
// }}}
}

?>
?>
2 changes: 1 addition & 1 deletion lib/Varien/Convert/Container/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function addItem($name, Varien_Convert_Container_Interface $item)
if ($item->getName()) {
$name = $item->getName();
} else {
$name = sizeof($this->_items);
$name = count($this->_items);
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Varien/Convert/Parser/Xml/Excel.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function parse()
}
}
$data[$wsName] = $wsData;
$this->addException('Found worksheet "'.$wsName.'" with '.sizeof($wsData).' row(s)');
$this->addException('Found worksheet "' .$wsName . '" with ' . count($wsData) . ' row(s)');
}
if ($wsName = $this->getVar('single_sheet')) {
if (isset($data[$wsName])) {
Expand Down
6 changes: 3 additions & 3 deletions lib/Varien/Event/Observer/Cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Varien_Event_Observer_Cron extends Varien_Event_Observer
public function isValidFor(Varien_Event $event)
{
$e = preg_split('#\s+#', $this->getCronExpr(), null, PREG_SPLIT_NO_EMPTY);
if (sizeof($e)!==5) {
if (count($e) !== 5) {
return false;
}

Expand Down Expand Up @@ -98,7 +98,7 @@ public function matchCronExpression($expr, $num)
// handle modulus
if (strpos($expr,'/')!==false) {
$e = explode('/', $expr);
if (sizeof($e)!==2) {
if (count($e) !== 2) {
return false;
}
$expr = $e[0];
Expand All @@ -113,7 +113,7 @@ public function matchCronExpression($expr, $num)
// handle range
if (strpos($expr,'-')!==false) {
$e = explode('-', $expr);
if (sizeof($e)!==2) {
if (count($e) !== 2) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Varien/Simplexml/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ public function setNode($path, $value, $overwrite=true)
foreach ($arr1 as $v) {
if (!empty($v)) $arr[] = $v;
}
$last = sizeof($arr)-1;
$last = count($arr) - 1;
$node = $this;
foreach ($arr as $i=>$nodeName) {
if ($last===$i) {
Expand Down