function get_local_md5() {
        global $CFG;

    /// Check requisites are passed
        if (!$this->requisitesok) {
            return false;
        }

        $return_value = 'needtobeinstalled';   /// Fake value to force new installation

    /// Calculate source to read
       $source = $CFG->dataroot.'/'.$this->destpath.'/'.$this->componentname.'/'.$this->componentname.'.md5';
    /// Read md5 value stored (if exists)
       if (file_exists($source)) {
           if ($temp = file_get_contents($source)) {
               $return_value = $temp;
           }
        }
        return $return_value;
    }
function get_local_md5() {
        global $CFG;

    /// Check requisites are passed
        if (!$this->requisitesok) {
            return false;
        }

        $return_value = 'needtobeinstalled';   /// Fake value to force new installation

    /// Calculate source to read
       $source = $CFG->dataroot.'/'.$this->destpath.'/'.$this->componentname.'/'.$this->componentname.'.md5';
    /// Read md5 value stored (if exists)
       if (file_exists($source)) {
           if ($temp = file_get_contents($source)) {
               $return_value = $temp;
           }
        }
        return $return_value;
    }
function get_local_md5 ( ) { global $ CFG ; /// Check requisites are passed if ( ! $ this -> requisitesok ) { return false ; } $ return_value = 'needtobeinstalled' ; /// Fake value to force new installation /// Calculate source to read $ source = $ CFG -> dataroot . '/' . $ this -> destpath . '/' . $ this -> componentname . '/' . $ this -> componentname . '.md5' ; /// Read md5 value stored (if exists) if ( file_exists ( $ source ) ) { if ( $ temp = file_get_contents ( $ source ) ) { $ return_value = $ temp ; } } return $ return_value ; }
This function will get the local md5 value of the installed
component.

@global object
@return bool|string md5 of the local component (false on error)
This function will get the local md5 value of the installed component .