english/administrator/components/com_aicontactsafe/models/control_panel.php
// function to check if aiContactSafeLink is installed
function to check if aiContactSafeLink is installed
function to check if aiContactSafeLink is installed
function checkAiContactSafeLink() {
		$return = 0;
		if(substr($this->_jversion,0,3) >= '1.6') {
			$xml_file = JPath::clean(JPATH_ROOT.DS.'plugins'.DS.'content'.DS.'aicontactsafelink'.DS.'aicontactsafelink.xml');
		} else {
			$xml_file = JPath::clean(JPATH_ROOT.DS.'plugins'.DS.'content'.DS.'aicontactsafelink.xml');
		}
		if (is_file($xml_file)) {
			$xml =& JFactory::getXMLParser( 'simple' );
			$xml->loadFile( $xml_file );
			$version =& $xml->document->getElementByPath( 'version' );
			$installed_version = $version->data();
			$xml_file = JPath::clean(JPATH_ROOT.DS.'administrator'.DS.'components'.DS.'com_aicontactsafe'.DS.'includes'.DS.'plg_aicontactsafelink'.DS.'aicontactsafelink.xml');
			if (is_file($xml_file)) {
				$xml =& JFactory::getXMLParser( 'simple' );
				$xml->loadFile( $xml_file );
				$version =& $xml->document->getElementByPath( 'version' );
				$current_version = $version->data();
			}
			if ( $installed_version == $current_version ) {
				$return = 2;
			} else {
				$return = 1;
			}
		}
		return $return;
	}
function checkAiContactSafeLink ( ) { $ return = 0 ; if ( substr ( $ this -> _jversion , 0 , 3 ) >= '1.6' ) { $ xml_file = JPath :: clean ( JPATH_ROOT . DS . 'plugins' . DS . 'content' . DS . 'aicontactsafelink' . DS . 'aicontactsafelink.xml' ) ; } else { $ xml_file = JPath :: clean ( JPATH_ROOT . DS . 'plugins' . DS . 'content' . DS . 'aicontactsafelink.xml' ) ; } if ( is_file ( $ xml_file ) ) { $ xml = & JFactory :: getXMLParser ( 'simple' ) ; $ xml -> loadFile ( $ xml_file ) ; $ version = & $ xml -> document -> getElementByPath ( 'version' ) ; $ installed_version = $ version -> data ( ) ; $ xml_file = JPath :: clean ( JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . 'com_aicontactsafe' . DS . 'includes' . DS . 'plg_aicontactsafelink' . DS . 'aicontactsafelink.xml' ) ; if ( is_file ( $ xml_file ) ) { $ xml = & JFactory :: getXMLParser ( 'simple' ) ; $ xml -> loadFile ( $ xml_file ) ; $ version = & $ xml -> document -> getElementByPath ( 'version' ) ; $ current_version = $ version -> data ( ) ; } if ( $ installed_version == $ current_version ) { $ return = 2 ; } else { $ return = 1 ; } } return $ return ; }
function to check if aiContactSafeLink is installed
function to check if aiContactSafeLink is installed