Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
VersionCheck Class Reference

Public Member Functions

 checkIfNewVersionExists ()
 
getCurrentCodeVersion ()
 
getCurrentDBVersion ()
 
getLatestVersion ()
 
 getPatch (&$versionInfo, $codeVersion=null)
 
getValidPluginVersionInfo ($versionFile, $returnErrorMsg=false)
 
parseVersionXML ($url)
 

Detailed Description

Provides methods to check for the latest version of OJS.

See Also
Version

Definition at line 23 of file VersionCheck.inc.php.

Member Function Documentation

VersionCheck::checkIfNewVersionExists ( )

Checks the application's version against the latest version on the PKP servers.

Returns
string or false if no newer version

Definition at line 190 of file VersionCheck.inc.php.

References getCurrentDBVersion(), and getLatestVersion().

& VersionCheck::getCurrentCodeVersion ( )

Return the current code version.

Returns
Version

Definition at line 51 of file VersionCheck.inc.php.

References parseVersionXML().

Referenced by UpgradeForm\display(), and getPatch().

& VersionCheck::getCurrentDBVersion ( )

Return the currently installed database version.

Returns
Version

Definition at line 41 of file VersionCheck.inc.php.

References DAORegistry\getDAO().

Referenced by checkIfNewVersionExists().

& VersionCheck::getLatestVersion ( )

Return information about the latest available version.

Returns
array

Definition at line 29 of file VersionCheck.inc.php.

References parseVersionXML().

Referenced by checkIfNewVersionExists(), and AdminFunctionsHandler\systemInfo().

VersionCheck::getPatch ( $versionInfo,
  $codeVersion = null 
)

Find the applicable patch for the current code version (if available).

Parameters
$versionInfoarray as returned by parseVersionXML()
$codeVersionas returned by getCurrentCodeVersion()
Returns
string

Definition at line 123 of file VersionCheck.inc.php.

References getCurrentCodeVersion().

Referenced by AdminFunctionsHandler\systemInfo().

& VersionCheck::getValidPluginVersionInfo (   $versionFile,
  $returnErrorMsg = false 
)

Checks whether the given version file exists and whether it contains valid data. Returns a Version object if everything is ok, otherwise null. If $returnErroMsg is true, returns the error message.

Parameters
$versionFilestring
$returnErrorMesgboolean
Returns
Version or null/string if invalid or missing version file

Definition at line 143 of file VersionCheck.inc.php.

References parseVersionXML(), and String\regexp_match().

& VersionCheck::parseVersionXML (   $url)

Parse information from a version XML file.

Parameters
$urlstring
Returns
array

Definition at line 66 of file VersionCheck.inc.php.

References Version\fromString().

Referenced by PluginTestCase\executePluginTest(), PluginGridHandler\getCategoryData(), getCurrentCodeVersion(), getLatestVersion(), and getValidPluginVersionInfo().


The documentation for this class was generated from the following file: