whitespace consistency
This commit is contained in:
parent
d3c921e8f3
commit
7e303dc73d
@ -25,11 +25,11 @@ class Blotter extends SimpleExtension {
|
|||||||
* Installer
|
* Installer
|
||||||
*/
|
*/
|
||||||
global $database, $config;
|
global $database, $config;
|
||||||
$database->create_table("blotter",
|
$database->create_table("blotter", "
|
||||||
"id SCORE_AIPK
|
id SCORE_AIPK,
|
||||||
, entry_date SCORE_DATETIME DEFAULT SCORE_NOW
|
entry_date SCORE_DATETIME DEFAULT SCORE_NOW,
|
||||||
, entry_text TEXT NOT NULL
|
entry_text TEXT NOT NULL,
|
||||||
, important SCORE_BOOL NOT NULL DEFAULT SCORE_BOOL_N
|
important SCORE_BOOL NOT NULL DEFAULT SCORE_BOOL_N
|
||||||
");
|
");
|
||||||
// Insert sample data:
|
// Insert sample data:
|
||||||
$database->execute("INSERT INTO blotter (id, entry_date, entry_text, important) VALUES (?, now(), ?, ?)",
|
$database->execute("INSERT INTO blotter (id, entry_date, entry_text, important) VALUES (?, now(), ?, ?)",
|
||||||
@ -99,7 +99,7 @@ class Blotter extends SimpleExtension {
|
|||||||
if(!$user->is_admin()) {
|
if(!$user->is_admin()) {
|
||||||
$this->theme->display_permission_denied($page);
|
$this->theme->display_permission_denied($page);
|
||||||
} else {
|
} else {
|
||||||
$id = $_POST['id'];
|
$id = int_escape($_POST['id']);
|
||||||
if(!isset($id)) { die("No ID!"); }
|
if(!isset($id)) { die("No ID!"); }
|
||||||
$database->Execute("DELETE FROM blotter WHERE id=$id");
|
$database->Execute("DELETE FROM blotter WHERE id=$id");
|
||||||
log_info("blotter", "Removed Entry #$id");
|
log_info("blotter", "Removed Entry #$id");
|
||||||
@ -122,6 +122,7 @@ class Blotter extends SimpleExtension {
|
|||||||
*/
|
*/
|
||||||
$this->display_blotter();
|
$this->display_blotter();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function display_blotter() {
|
private function display_blotter() {
|
||||||
global $database, $config;
|
global $database, $config;
|
||||||
$limit = $config->get_int("blotter_recent", 5);
|
$limit = $config->get_int("blotter_recent", 5);
|
||||||
@ -129,3 +130,4 @@ class Blotter extends SimpleExtension {
|
|||||||
$this->theme->display_blotter($entries);
|
$this->theme->display_blotter($entries);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
?>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
class BlotterTheme extends Themelet {
|
class BlotterTheme extends Themelet {
|
||||||
public function display_editor($entries) {
|
public function display_editor($entries) {
|
||||||
global $page;
|
global $page;
|
||||||
@ -132,10 +132,8 @@ class BlotterTheme extends Themelet {
|
|||||||
$i_color = $config->get_string("blotter_color","#FF0000");
|
$i_color = $config->get_string("blotter_color","#FF0000");
|
||||||
$position = $config->get_string("blotter_position", "subheading");
|
$position = $config->get_string("blotter_position", "subheading");
|
||||||
$html = "<style type='text/css'>
|
$html = "<style type='text/css'>
|
||||||
#blotter1 {font-size: 80%;
|
#blotter1 {font-size: 80%; position: relative;}
|
||||||
position: relative;}
|
#blotter2 {font-size: 80%;}
|
||||||
#blotter2 {font-size: 80%;
|
|
||||||
}
|
|
||||||
</style>";
|
</style>";
|
||||||
$html .= "<script><!--
|
$html .= "<script><!--
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user