public function groupsrandAction() { $count = $this->_getParam("count", NULL); $randtype = $this->_getParam("randtype", NULL); switch ($randtype) { case 'dist': case 'pure': for ($i = 0; $i < $count; ++$i) { $group = new Ultimatum_Model_Ultgroups(); $group->randomize(); $group->save(); } break; } $params = array('message' => $count . ' groups made'); $this->_forward('groups', NULL, NULL, $params); }