function cancelDocument($gid) { global $database; $uid = (int) mosGetParam($_REQUEST, "id", ""); if (!$uid) { _returnTo('cat_view', _DML_OP_CANCELED); } $doc = new mosDMDocument($database); $doc->load($uid); if ($doc->cancel()) { _returnTo('cat_view', _DML_OP_CANCELED, $doc->catid); } _returnTo('cat_view', _DML_OP_CANCELED); }
function cancelDocument() { $database = JFactory::getDBO(); $mainframe = JFactory::getApplication(); $doc = new mosDMDocument($database); if ($doc->cancel()) { $mainframe->redirect("index.php?option=com_docman§ion=documents"); } }
function cancelDocument($gid) { $database = JFactory::getDBO(); $uid = JRequest::getInt('id', 0); if (!$uid) { _returnTo('cat_view', _DML_OP_CANCELED); } $doc = new mosDMDocument($database); $doc->load($uid); if ($doc->cancel()) { _returnTo('cat_view', _DML_OP_CANCELED, $doc->catid); } _returnTo('cat_view', _DML_OP_CANCELED); }
function cancelDocument() { global $database; $doc = new mosDMDocument($database); if ($doc->cancel()) { mosRedirect("index2.php?option=com_docman§ion=documents"); } }