function clearData($cid = array()) { DOCMAN_token::check() or die('Invalid Token'); $msgs = array(); $cleardata = new DOCMAN_Cleardata($cid); $cleardata->clear(); $rows =& $cleardata->getList(); foreach ($rows as $row) { $msgs[] = $row->msg; } mosRedirect('index2.php?option=com_docman§ion=cleardata', implode(' | ', $msgs)); }
function clearData($cid = array()) { DOCMAN_token::check('request') or die('Invalid Token'); $mainframe = JFactory::getApplication(); $msgs = array(); $cleardata = new DOCMAN_Cleardata($cid); $cleardata->clear(); $rows =& $cleardata->getList(); foreach ($rows as $row) { $msgs[] = $row->msg; } $mainframe->redirect('index.php?option=com_docman§ion=cleardata', implode(' | ', $msgs)); }