function editLicense($option, $uid) { $database = JFactory::getDBO(); // disable the main menu to force user to use buttons $_REQUEST['hidemainmenu'] = 1; $row = new mosDMLicenses($database); $row->load($uid); HTML_DMLicenses::editLicense($option, $row); }
function showDocumentView($gid) { global $_DOCMAN; $database = JFactory::getDBO(); $doc = new DOCMAN_Document($gid); $data =& $doc->getDataObject(); //check if we need to display a license if ($_DOCMAN->getCfg('display_license') && ($data->dmlicense_display && $data->dmlicense_id)) { //fetch the license form $html = new StdClass(); $html->doclicense = fetchDocumentLicenseForm($gid, 1); //get the license text $license = new mosDMLicenses($database); $license->load($data->dmlicense_id); HTML_docman::pageDocumentLicense($html, $license->license); } else { download($doc, true); } }