function removeDocument($cid) { DOCMAN_token::check() or die('Invalid Token'); $database = JFactory::getDBO(); $mainframe = JFactory::getApplication(); $doc = new mosDMDocument($database); if ($doc->remove($cid)) { $mainframe->redirect("index.php?option=com_docman§ion=documents"); } else { echo "<script> alert('Problem removing documents'); window.history.go(-1);</script>\n"; exit; } }
function removeDocument($cid) { DOCMAN_token::check() or die('Invalid Token'); global $database; $doc = new mosDMDocument($database); if ($doc->remove($cid)) { mosRedirect("index2.php?option=com_docman§ion=documents"); } else { echo "<script> alert('Problem removing documents'); window.history.go(-1);</script>\n"; exit; } }