Overview
Comment:Delete unused code
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA1: 09d5e5feb72b7fbe478d0189ad811016ccc172b8
User & Date: bohwaz on 2020-11-27 12:32:25
Other Links: branch diff | manifest | tags
Context
2020-11-27
12:41
Fix edit of advanced transactions check-in: d8c7ce86a2 user: bohwaz tags: dev, 1.0.0-rc2
12:32
Delete unused code check-in: 09d5e5feb7 user: bohwaz tags: dev
2020-11-26
23:13
Clean up debug check-in: d37e68735c user: bohwaz tags: dev
Changes

Modified src/include/lib/Garradin/Membres/Session.php from [73e8704ad0] to [055409d884].

64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
		parent::__construct(DB::getInstance(), [
			'cookie_domain' => $url['host'],
			'cookie_path'   => preg_replace('!/admin/$!', '/', $url['path']),
			'cookie_secure' => (\Garradin\PREFER_HTTPS >= 2) ? true : false,
		]);
	}

	/**
	 * Suppression anciens cookies qui avaient un chemin incorrect
	 * FIXME supprimer en 2019
	 * @return void
	 */
	public function cleanOldCookies()
	{
		setcookie($this->cookie_name, null, -1, '/admin/', $this->cookie_domain, $this->cookie_secure, true);
		setcookie($this->remember_me_cookie_name, null, -1, '/admin/', $this->cookie_domain, $this->cookie_secure, true);
	}

	protected function getUserForLogin($login)
	{
		$champ_id = Config::getInstance()->get('champ_identifiant');

		// Ne renvoie un membre que si celui-ci a le droit de se connecter
		$query = 'SELECT m.id, m.%1$s AS login, m.passe AS password, m.secret_otp AS otp_secret
			FROM membres AS m







<
<
<
<
<
<
<
<
<
<
<







64
65
66
67
68
69
70











71
72
73
74
75
76
77
		parent::__construct(DB::getInstance(), [
			'cookie_domain' => $url['host'],
			'cookie_path'   => preg_replace('!/admin/$!', '/', $url['path']),
			'cookie_secure' => (\Garradin\PREFER_HTTPS >= 2) ? true : false,
		]);
	}












	protected function getUserForLogin($login)
	{
		$champ_id = Config::getInstance()->get('champ_identifiant');

		// Ne renvoie un membre que si celui-ci a le droit de se connecter
		$query = 'SELECT m.id, m.%1$s AS login, m.passe AS password, m.secret_otp AS otp_secret
			FROM membres AS m

Modified src/www/admin/login.php from [10a6843bd1] to [939e98ed56].

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
    }

    if (!$session->login(f('_id'), f('password'), (bool) f('permanent'))) {
        throw new UserException(sprintf("Connexion impossible.\nVĂ©rifiez votre identifiant (%s) et votre mot de passe.", $id_field_name));
    }
}, 'login', ADMIN_URL);

$session->cleanOldCookies();

$tpl->assign('ssl_enabled', empty($_SERVER['HTTPS']) ? false : true);
$tpl->assign('prefer_ssl', (bool)PREFER_HTTPS);
$tpl->assign('own_https_url', str_replace('http://', 'https://', utils::getSelfURL()));

$tpl->assign(compact('id_field_name'));
$tpl->assign('changed', qg('changed') !== null);

$tpl->display('admin/login.tpl');







<
<








39
40
41
42
43
44
45


46
47
48
49
50
51
52
53
    }

    if (!$session->login(f('_id'), f('password'), (bool) f('permanent'))) {
        throw new UserException(sprintf("Connexion impossible.\nVĂ©rifiez votre identifiant (%s) et votre mot de passe.", $id_field_name));
    }
}, 'login', ADMIN_URL);



$tpl->assign('ssl_enabled', empty($_SERVER['HTTPS']) ? false : true);
$tpl->assign('prefer_ssl', (bool)PREFER_HTTPS);
$tpl->assign('own_https_url', str_replace('http://', 'https://', utils::getSelfURL()));

$tpl->assign(compact('id_field_name'));
$tpl->assign('changed', qg('changed') !== null);

$tpl->display('admin/login.tpl');