added dev mode
This commit is contained in:
parent
c9990fa189
commit
b65125beaf
|
@ -1751,6 +1751,16 @@ function getLAMVersionText() {
|
||||||
return $text . ' - ' . LAMVersion();
|
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.
|
* LAM exception with title and message.
|
||||||
*
|
*
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -24,7 +24,7 @@ include_once __DIR__ . '/../../lib/account.inc';
|
||||||
include_once __DIR__ . '/../../lib/security.inc';
|
include_once __DIR__ . '/../../lib/security.inc';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LAMConfig test case.
|
* account.inc test cases.
|
||||||
*
|
*
|
||||||
* @author Roland Gruber
|
* @author Roland Gruber
|
||||||
*/
|
*/
|
||||||
|
@ -155,4 +155,13 @@ class AccountTest extends TestCase {
|
||||||
$this->assertFalse(isCommandlineSafeEmailAddress('test+abc@example.com'));
|
$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…
Reference in New Issue