From bdb05b16d84115067acfce2e9e53c699521bc69c Mon Sep 17 00:00:00 2001
From: Savetheinternet
Date: Sat, 21 May 2011 15:21:45 +1000
Subject: Automatically check for Tinyboard updates
---
inc/config.php | 9 ++++++++-
inc/display.php | 10 +++++-----
inc/functions.php | 8 +++++++-
3 files changed, 20 insertions(+), 7 deletions(-)
(limited to 'inc')
diff --git a/inc/config.php b/inc/config.php
index 800996c5..7fa9da2d 100644
--- a/inc/config.php
+++ b/inc/config.php
@@ -26,8 +26,12 @@
'custom_capcode' => Array(),
'dnsbl' => Array()
);
- // Database stuff
+ // Database stuff
+ // Automatically check if a newer version of Tinyboard is available when an administrator logs in
+ $config['check_updates'] = true;
+ // How often to check for updates
+ $config['check_updates_time'] = 43200; // 12 hours
// SQL driver ("mysql", "pgsql", "sqlite", "dblib", etc)
// http://www.php.net/manual/en/pdo.drivers.php
@@ -46,6 +50,9 @@
// Timeout duration in seconds (not all drivers support this)
$config['db']['timeout'] = 5;
+ // Shows some extra information at the bottom of pages. Good for debugging development.
+ // Also experimental.
+ $config['debug'] = false;
// Optional Memcached server for more cache/optimization (currently at debug state)
$config['memcached']['enabled'] = false;
diff --git a/inc/display.php b/inc/display.php
index 965356da..38ab67a6 100644
--- a/inc/display.php
+++ b/inc/display.php
@@ -342,9 +342,9 @@
$built .= ', ' . $this->filename . ')
' .
// Thumbnail
- '';
@@ -531,9 +531,9 @@
// JavaScript cite
''.$this->id.'' .
// Sticky
- ($this->sticky ? '
' : '') .
+ ($this->sticky ? '
' : '') .
// Locked
- ($this->locked ? '
' : '') .
+ ($this->locked ? '
' : '') .
// [Reply]
($index ? '[Reply]' : '') .
diff --git a/inc/functions.php b/inc/functions.php
index d3be5d1c..20118599 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -9,7 +9,7 @@
loadConfig();
function loadConfig() {
- global $board, $config, $__ip;
+ global $board, $config, $__ip, $debug;
require 'config.php';
if (file_exists('inc/instance-config.php')) {
@@ -19,6 +19,12 @@
require $board['dir'] . '/config.php';
}
+ if($config['debug']) {
+ if(!isset($debug))
+ $debug = Array('sql');
+ $debug['start'] = time();
+ }
+
if(!isset($config['url_stylesheet']))
$config['url_stylesheet'] = $config['root'] . 'style.css';
if(!isset($config['url_javascript']))
--
cgit v1.3