Overview
Comment:Plugin : add context for uninstall too
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1b8f3acdccd0cea0afda85dfa274b27e06aa9844
User & Date: bohwaz on 2017-01-16 22:50:07
Other Links: manifest | tags
References
2020-12-08
23:25 Wiki page "Changelog/0.9" artifact: b9c916b4d1 user: bohwaz
Context
2017-01-19
21:34
Fix: message d'erreur si aucun plugin sélectionné (signalé par @Sébastien) check-in: c97a0ca3bb user: bohwaz tags: trunk
2017-01-17
02:44
Create new branch named "dev" check-in: b0743bd868 user: bohwaz tags: dev
2017-01-16
22:50
Plugin : add context for uninstall too check-in: 1b8f3acdcc user: bohwaz tags: trunk
21:38
Fix plugin name match in router check-in: 5004acdf3a user: bohwaz tags: trunk
Changes

Modified src/include/lib/Garradin/Plugin.php from [933423603a] to [9153e82c84].

216
217
218
219
220
221
222

223
224
225
226
227
228
229
230
231
232
	 * Désinstaller le plugin
	 * @return boolean TRUE si la suppression a fonctionné
	 */
	public function uninstall()
	{
		if (file_exists($this->path() . '/uninstall.php'))
		{

			include $this->path() . '/uninstall.php';
		}
		
		unlink(PLUGINS_ROOT . '/' . $this->id . '.tar.gz');

		$db = DB::getInstance();
		$db->simpleExec('DELETE FROM plugins_signaux WHERE plugin = ?;', $this->id);
		return $db->simpleExec('DELETE FROM plugins WHERE id = ?;', $this->id);
	}








>


|







216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
	 * Désinstaller le plugin
	 * @return boolean TRUE si la suppression a fonctionné
	 */
	public function uninstall()
	{
		if (file_exists($this->path() . '/uninstall.php'))
		{
			$plugin = $this;
			include $this->path() . '/uninstall.php';
		}

		unlink(PLUGINS_ROOT . '/' . $this->id . '.tar.gz');

		$db = DB::getInstance();
		$db->simpleExec('DELETE FROM plugins_signaux WHERE plugin = ?;', $this->id);
		return $db->simpleExec('DELETE FROM plugins WHERE id = ?;', $this->id);
	}