Open Journal Systems  2.4.4
 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 189 of file VersionCheck.inc.php.

References getCurrentDBVersion(), and getLatestVersion().

Referenced by AdminHandler\index(), and ManagerHandler\index().

& VersionCheck::getCurrentCodeVersion ( )

Return the current code version.

Returns
Version

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

References parseVersionXML().

Referenced by UpgradeForm\display(), InstallForm\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(), AdminHandler\index(), and ManagerHandler\index().

& VersionCheck::getLatestVersion ( )

Return information about the latest available version.

Returns
array

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

References PKPApplication\getApplication(), and 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 122 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 142 of file VersionCheck.inc.php.

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

Referenced by PluginManagementHandler\_installPlugin(), and PluginManagementHandler\_upgradePlugin().

& VersionCheck::parseVersionXML (   $url)

Parse information from a version XML file.

Returns
array

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

References Version\fromString().

Referenced by Installer\addPluginVersions(), PluginTestCase\executePluginTest(), getCurrentCodeVersion(), getLatestVersion(), and getValidPluginVersionInfo().


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