Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: b048473f12
Fetching contributors…

Cannot retrieve contributors at this time

46 lines (41 sloc) 1.183 kB
<?php
/*
* Dashboard - Wolf CMS dashboard plugin
*
* Copyright (c) 2008-2011 Mika Tuupola
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
* Project home:
* http://www.appelsiini.net/
*
*/
/* Prevent direct access. */
if (!defined("FRAMEWORK_STARTING_MICROTIME")) {
die("All your base are belong to us!");
}
$pdo = Record::getConnection();
$table = TABLE_PREFIX . "dashboard_log";
if (preg_match('/^mysql/', DB_DSN)) {
/* Schema for MySQL */
$pdo->exec("CREATE TABLE $table (
id INT(11) NOT NULL AUTO_INCREMENT,
ident CHAR(16) NOT NULL,
priority INT NOT NULL,
message VARCHAR(255),
username VARCHAR(64),
created_on DATETIME DEFAULT NULL,
PRIMARY KEY (id)
) DEFAULT CHARSET=utf8");
} else {
/* Otherwise assume SQLite */
$pdo->exec("CREATE TABLE $table (
id INTEGER PRIMARY KEY AUTOINCREMENT,
ident CHAR(16) NOT NULL,
priority INT NOT NULL,
message VARCHAR(255),
username VARCHAR(64),
created_on DATETIME DEFAULT NULL
)");
}
Jump to Line
Something went wrong with that request. Please try again.