Skip to content

Instantly share code, notes, and snippets.

@skurvish
skurvish / gist:6d9ba9b273a98f947735
Created September 4, 2014 11:03
How to get DocMan Version
function get_docman_ver( &$majDMver, &$minDMver) {
$maj = $min = 0;
if ( file_exists(JPATH_BASE . '/administrator/components/com_docman/version.php') ) {
include_once( JPATH_BASE . '/administrator/components/com_docman/version.php' );
sscanf( ComDocmanVersion::getVersion(), "%i.%i", $maj, $min);
} else {
if ( file_exists(JPATH_BASE . '/administrator/components/com_docman/includes/defines.php') ) {
include_once( JPATH_BASE . '/administrator/components/com_docman/includes/defines.php' );
sscanf( _DM_VERSION, "%i.%i", $maj, $min);
} else // Unknown DocMan or not installed