Browse Source

added dev mode

pull/101/head
Roland Gruber 3 years ago
parent
commit
b65125beaf
  1. 10
      lam/lib/account.inc
  2. 2
      lam/templates/config/index.php
  3. 11
      lam/tests/lib/accountTest.php

10
lam/lib/account.inc

@ -1751,6 +1751,16 @@ function getLAMVersionText() {
return $text . ' - ' . LAMVersion();
}
/**
* Returns if the given release is a developer version.
*
* @param string version
* @return bool is developer version
*/
function isDeveloperVersion($version) {
return strpos($version, 'DEV') !== false;
}
/**
* LAM exception with title and message.
*

2
lam/templates/config/index.php

@ -2,7 +2,7 @@
/*
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2003 - 2019 Roland Gruber
Copyright (C) 2003 - 2020 Roland Gruber
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

11
lam/tests/lib/accountTest.php

@ -24,7 +24,7 @@ include_once __DIR__ . '/../../lib/account.inc';
include_once __DIR__ . '/../../lib/security.inc';
/**
* LAMConfig test case.
* account.inc test cases.
*
* @author Roland Gruber
*/
@ -155,4 +155,13 @@ class AccountTest extends TestCase {
$this->assertFalse(isCommandlineSafeEmailAddress('test+abc@example.com'));
}
/**
* Tests isDeveloperVersion()
*/
function testIsDeveloperVersion() {
$this->assertFalse(isDeveloperVersion('0.4.1'));
$this->assertFalse(isDeveloperVersion('3.2.RC1'));
$this->assertTrue(isDeveloperVersion('4.5.DEV'));
}
}
Loading…
Cancel
Save