I am guessing it has something to with this section of code from
osclass\oc-includes\osclass\helpers\hItems.php
at line 1067
/**
Gets next item of latest items query
@return boolean It returns true if there is another item available or false if there isn't
*/
function osc_has_latest_items($total_latest_items = null, $options = array(), $withPicture = false) {
// if we don't have the latest items loaded, do the query
if ( !View::newInstance()->_exists('latestItems') ) {
$search = Search::newInstance();
if( !is_numeric($total_latest_items) ) {
$total_latest_items = osc_max_latest_items();
}
View::newInstance()->_exportVariableToView('latestItems', $search->getLatestItems($total_latest_items, $options, $withPicture));
}
// keys we want to erase from View
$to_erase = array('resources', 'item_category', 'metafields');
foreach($to_erase as $t) {
if ( View::newInstance()->_exists($t) ) {
View::newInstance()->_erase($t);
}
}
// set itemLoop to latest if it's the first time we enter here
if(View::newInstance()->_get('itemLoop') !== 'latest') {
View::newInstance()->_exportVariableToView('oldItem', View::newInstance()->_get('item'));
View::newInstance()->_exportVariableToView('itemLoop', 'latest');
}
// get next item
$item = View::newInstance()->_next('latestItems');
if(!$item) {
View::newInstance()->_exportVariableToView('item', View::newInstance()->_get('oldItem'));
View::newInstance()->_exportVariableToView('itemLoop', '');
} else {
View::newInstance()->_exportVariableToView('item', View::newInstance()->_current('latestItems'));
}
// reset the loop once we finish just in case we want to use it again
if( !$item && View::newInstance()->_count('latestItems') > 0 ) {
View::newInstance()->_reset('latestItems');
}
return $item;
}
Should I post this somewhere else?