Overview
Comment:Fix graphs cache ID
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable | 1.0.0-rc13
Files: files | file ages | folders
SHA1: 55c3d98885471d90267d2159b9102596fec1224f
User & Date: bohwaz on 2020-12-11 22:12:22
Other Links: manifest | tags
Context
2020-12-12
13:27
Add transaction reference to service payment form check-in: 9277c7498c user: bohwaz tags: trunk, stable
2020-12-11
22:12
Fix graphs cache ID check-in: 55c3d98885 user: bohwaz tags: trunk, stable, 1.0.0-rc13
21:45
Force cache refresh check-in: 65ab4db8f1 user: bohwaz tags: trunk
Changes

Modified src/include/lib/Garradin/Accounting/Graph.php from [01efa75756] to [7ff385bce4].

58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

	static public function plot(string $type, array $criterias, int $interval = self::WEEKLY_INTERVAL, int $width = 700)
	{
		if (!array_key_exists($type, self::PLOT_TYPES)) {
			throw new \InvalidArgumentException('Unknown type');
		}

		$cache_id = sha1(json_encode(func_get_args()));

		if (!Static_Cache::expired($cache_id)) {
			return Static_Cache::get($cache_id);
		}

		$plot = new Plot($width, 300);








|







58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

	static public function plot(string $type, array $criterias, int $interval = self::WEEKLY_INTERVAL, int $width = 700)
	{
		if (!array_key_exists($type, self::PLOT_TYPES)) {
			throw new \InvalidArgumentException('Unknown type');
		}

		$cache_id = sha1('plot' . json_encode(func_get_args()));

		if (!Static_Cache::expired($cache_id)) {
			return Static_Cache::get($cache_id);
		}

		$plot = new Plot($width, 300);

129
130
131
132
133
134
135
136
137
138
139
140
141
142
143

	static public function pie(string $type, array $criterias)
	{
		if (!array_key_exists($type, self::PIE_TYPES)) {
			throw new \InvalidArgumentException('Unknown type');
		}

		$cache_id = sha1(json_encode(func_get_args()));

		if (!Static_Cache::expired($cache_id)) {
			return Static_Cache::get($cache_id);
		}

		$pie = new Pie(700, 300);








|







129
130
131
132
133
134
135
136
137
138
139
140
141
142
143

	static public function pie(string $type, array $criterias)
	{
		if (!array_key_exists($type, self::PIE_TYPES)) {
			throw new \InvalidArgumentException('Unknown type');
		}

		$cache_id = sha1('pie' . json_encode(func_get_args()));

		if (!Static_Cache::expired($cache_id)) {
			return Static_Cache::get($cache_id);
		}

		$pie = new Pie(700, 300);