tuupola / frog_funky_cache

Funky cache plugin for Frog CMS

This URL has Read+Write access

frog_funky_cache / disable.php
100644 45 lines (37 sloc) 1.069 kb
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
<?php
 
/*
* Funky Cache - Frog CMS caching plugin
*
* Copyright (c) 2008-2009 Mika Tuupola
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
* Project home:
* http://www.appelsiini.net/projects/funky_cache
*
*/
 
/* Prevent direct access. */
if (!defined("FRAMEWORK_STARTING_MICROTIME")) {
    die("All your base are belong to us!");
}
 
$PDO = Record::getConnection();
 
$cache = Record::findAllFrom('FunkyCachePage');
foreach ($cache as $page) {
    $page->delete();
}
 
$table = TABLE_PREFIX . "setting";
$PDO->exec("DELETE FROM $table
WHERE name='funky_cache_by_default'
LIMIT 1");
$PDO->exec("DELETE FROM $table
WHERE name='funky_cache_suffix'
LIMIT 1");
$PDO->exec("DELETE FROM $table
WHERE name='funky_cache_folder'
LIMIT 1");
            
$table = TABLE_PREFIX . "page";
$PDO->exec("ALTER TABLE $table
DROP COLUMN 'funky_cache_enabled'");
 
$table = TABLE_PREFIX . "funky_cache_page";
$PDO->exec("DROP TABLE $table");