Commit a312214e authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Don't count beta releases when scraping launchpad for latest mahara version

Signed-off-by: default avatarRichard Mansfield <>
parent 349128c6
......@@ -2285,8 +2285,9 @@ function cron_check_for_updates() {
$xpath = new DOMXPath($page);
$query = '//div[@class="version"]';
$elements = $xpath->query($query);
preg_match('/[0-9]+.[0-9]+.[a-zA-Z0-9]+/', $elements->item(0)->nodeValue, $match);
set_config('latest_version', $match[0]);
if (preg_match('/\b[0-9]+\.[0-9]+\.[0-9]+\b/', $elements->item(0)->nodeValue, $match)) {
set_config('latest_version', $match[0]);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment