Skip to content
Snippets Groups Projects
Commit 0b4b4cc2 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

Merge branch 'hotline#22829-integration-stops-at-firts-users-file' into 'hotline-master'

Hotline#22829 integration stops at firts users file

See merge request !775
parents 3e714100 15045255
Branches
Tags
3 merge requests!780Master,!779Master,!778Hotline master
- ticket #22829: Correction d'une régression dans l'import des fichiers d'abonnés
\ No newline at end of file
<?php
/** @see http://forge.afi-sa.fr/issues/22829 */
class IntegrationAdminVarTest extends PHPUnit_Framework_TestCase {
use Storm_Test_THelpers;
public function setUp() {
parent::setUp();
Storm_Model_Loader::defaultToVolatile();
}
public function tearDown() {
Storm_Model_Loader::defaultToDb();
parent::tearDown();
}
/** @test */
public function settingAdminVarShouldNotThrowException() {
Class_AdminVar::set('DATE_LAST_FULL_INTEGRATION_USERS', date('Y-m-d'));
}
}
\ No newline at end of file
<?php
class IntegrationTest extends PHPUnit_Framework_TestCase {
/** @test */
public function assertTrueShouldSucceed() {
$this->assertTrue(true);
}
}
?>
\ No newline at end of file
......@@ -392,9 +392,7 @@ class Class_AdminVar extends Storm_Model_Abstract {
'CACHE_ACTIF' => [
'description' => implode('<br/>', [
'Activer le cache des boîtes (meilleure performance mais mise à jour toutes les ' . CACHE_LIFETIME / 60 . 'mn)',
sprintf('<a href="%s" >Vider le cache</a>',
Class_Url::assemble(['module' => 'admin',
'action' => 'clearcache']))
'<a href="' . Class_Url::baseUrl() . '/admin/index/clearcache" >Vider le cache</a>',
]),
'type' => self::TYPE_ON_OFF,
],
......
......@@ -22,6 +22,16 @@
class Class_Url {
protected static $_do_not_add_base_url;
public static function baseUrl() {
$parts = array_diff(array_filter(explode('/', $_SERVER['SCRIPT_NAME'])),
['index.php']);
return 0 < count($parts)
? '/' . implode('/', $parts)
: '';
}
public static function doNotAddBaseUrl() {
static::$_do_not_add_base_url = true;
}
......
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