-
Notifications
You must be signed in to change notification settings - Fork 0
/
uninstall.inc.php
48 lines (34 loc) · 1.37 KB
/
uninstall.inc.php
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/**
* gs_piwik
* @author gilbert.seilheimer[at]contic[dot]de Gilbert Seilheimer
* @author <a href="http://www.contic.de">www.contic.de</a>
*/
// AddOn-PIWIK
//////////////////////////////////////////////////////////////////////////////////
// CONFIG
//////////////////////////////////////////////////////////////////////////////////
// VARs
$mypage = "gs_piwik";
//////////////////////////////////////////////////////////////////////////////////
// UPDATE (DB)
//////////////////////////////////////////////////////////////////////////////////
$sql_table = $REX['TABLE_PREFIX']."template";
$sql = rex_sql::factory();
$sql->debugsql = 1; //Ausgabe Query
$sql->setQuery("SELECT * FROM $sql_table WHERE name LIKE '%tpl : addon gs_piwik%'");
$sql_id = $sql->getValue('id');
$sql->setTable($sql_table);
if( $sql->getRows() )
{
$sql->setWhere('id = '.$sql_id);
$sql->setValue("content", "<!-- GS:PIWIK-START -->\r\nADDON gs_piwik deinstalliert\r\n<!-- GS:PIWIK-ENDE -->");
if ( $sql->update() )
{
echo 'Zeile mit id '.$sql_id.' erfolgreich aktuallisiert.';
}
}
//////////////////////////////////////////////////////////////////////////////////
// UNINSTALL
//////////////////////////////////////////////////////////////////////////////////
$REX['ADDON']['install'][$mypage] = FALSE;