applications/dashboard/models/class.updatemodel.php
public static function ParseCoreVersion($Path) {
      $fp = fopen($Path, 'rb');
      $Application = FALSE;
      $Version = FALSE;

      while (($Line = fgets($fp)) !== FALSE) {
         if (preg_match("`define\\('(.*?)', '(.*?)'\\);`", $Line, $Matches)) {
            $Name = $Matches[1];
            $Value = $Matches[2];
            switch ($Name) {
               case 'APPLICATION':
                  $Application = $Value;
                  break;
               case 'APPLICATION_VERSION':
                  $Version = $Value;
            }
         }

         if ($Application !== FALSE && $Version !== FALSE)
            break;
      }
      fclose($fp);
      return $Version;
   }
public static function ParseCoreVersion($Path) {
      $fp = fopen($Path, 'rb');
      $Application = FALSE;
      $Version = FALSE;

      while (($Line = fgets($fp)) !== FALSE) {
         if (preg_match("`define\\('(.*?)', '(.*?)'\\);`", $Line, $Matches)) {
            $Name = $Matches[1];
            $Value = $Matches[2];
            switch ($Name) {
               case 'APPLICATION':
                  $Application = $Value;
                  break;
               case 'APPLICATION_VERSION':
                  $Version = $Value;
            }
         }

         if ($Application !== FALSE && $Version !== FALSE)
            break;
      }
      fclose($fp);
      return $Version;
   }
public static function ParseCoreVersion ( $ Path ) { $ fp = fopen ( $ Path , 'rb' ) ; $ Application = FALSE ; $ Version = FALSE ; while ( ( $ Line = fgets ( $ fp ) ) !== FALSE ) { if ( preg_match ( "`define\\('(.*?)', '(.*?)'\\);`" , $ Line , $ Matches ) ) { $ Name = $ Matches [ 1 ] ; $ Value = $ Matches [ 2 ] ; switch ( $ Name ) { case 'APPLICATION' : $ Application = $ Value ; break ; case 'APPLICATION_VERSION' : $ Version = $ Value ; } } if ( $ Application !== FALSE && $ Version !== FALSE ) break ; } fclose ( $ fp ) ; return $ Version ; }
Parse the version out of the core's index.php file.

@param string $Path The path to the index.php file.
@return string|false A string containing the version or false if the file could not be parsed.
Parse the version out of the core s index . php file .