-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathuninstall.php
More file actions
29 lines (23 loc) · 747 Bytes
/
uninstall.php
File metadata and controls
29 lines (23 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
/**
* Notes plugin for Wolf CMS <http://project79.net/projects/notes>
* Available on Github <https://github.com/project79>
*
* Simple notes for admin area.
*
* @author Dejan Andjelkovic <dejan79@gmail.com>
* @package Wolf
* @subpackage plugin.notes
* @version 0.0.2
* @licence http://www.gnu.org/licenses/gpl.html
* @copyright http://project79.net, 2010-2012
*/
if (!defined('IN_CMS')) { exit(); }
$PDO = Record::getConnection();
if($PDO->exec('DROP TABLE IF EXISTS '.TABLE_PREFIX.'notes') === false) {
Flash::set('error', __('Unable to drop table :tablename', array(':tablename' => TABLE_PREFIX.'notes')));
redirect(get_url('setting'));
}
else {
Flash::set('success', __('Plugin is succesfully uninstalled!'));
}