based on code by * Jesse Mullan */ /** * @package Picasa * @subpackage UserInterface */ class ImportResultsView extends GalleryView { /** * @see GalleryView::loadTemplate */ function loadTemplate(&$template, &$form) { global $gallery; if ($form['formName'] != 'ImportResults') { $form['formName'] = 'ImportResults'; } $status = $template->getVariable('status'); $counts = array(); foreach (array('albumImportFailure', 'albumImportSuccess', 'pictureImportFailure', 'pictureImportSuccess') as $key) { if (isset($status[$key])) { $counts[$key] = sizeof($status[$key]); } else { $counts[$key] = 0; } } $ImportResults = array(); $ImportResults['counts'] = $counts; $ImportResults['status'] = $status; $template->setVariable('ImportResults', $ImportResults); $template->setVariable('controller', 'picasa.ImportResults'); return array(null, array('body' => 'modules/picasa/templates/ImportResults.tpl')); } } ?>