Open Journal Systems  3.3.0
VersionCheck Class Reference

Static Public Member Functions

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

Detailed Description

Provides methods to check for the latest version of OJS.

See also
Version

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

Member Function Documentation

◆ checkIfNewVersionExists()

static VersionCheck::checkIfNewVersionExists ( )
static

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

Returns
string|false Version description or false if no newer version

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

References getCurrentDBVersion(), and getLatestVersion().

Referenced by ManagementHandler\context(), and AdminHandler\initialize().

◆ getCurrentCodeVersion()

static VersionCheck::getCurrentCodeVersion ( )
static

Return the current code version.

Returns
Version|false

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

References parseVersionXML().

Referenced by UpgradeTool\checkVersion(), MaintenanceForm\display(), and getPatch().

◆ getCurrentDBVersion()

static VersionCheck::getCurrentDBVersion ( )
static

Return the currently installed database version.

Returns
Version

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

References DAORegistry\getDAO().

Referenced by checkIfNewVersionExists(), UpgradeTool\checkVersion(), ManagementHandler\context(), and AdminHandler\initialize().

◆ getLatestVersion()

static VersionCheck::getLatestVersion ( )
static

Return information about the latest available version.

Returns
array

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

References $application, PKPApplication\get(), DAORegistry\getDAO(), Config\getVar(), and parseVersionXML().

Referenced by UpgradeTool\check(), checkIfNewVersionExists(), UpgradeTool\download(), UpgradeTool\latest(), and AdminHandler\systemInfo().

◆ getPatch()

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

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 127 of file VersionCheck.inc.php.

References getCurrentCodeVersion().

Referenced by AdminHandler\systemInfo().

◆ getValidPluginVersionInfo()

static VersionCheck::getValidPluginVersionInfo (   $versionFile)
static

Checks whether the given version file exists and whether it contains valid data. Returns a Version object if everything is ok, otherwise throws an Exception.

Parameters
$versionFilestring
Returns
Version

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

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

Referenced by PluginHelper\installPlugin(), and PluginHelper\upgradePlugin().

◆ parseVersionXML()

static VersionCheck::parseVersionXML (   $url)
static

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