diff --git a/inc/anti-bot.php b/inc/anti-bot.php index 54c6d87b..daf12c5d 100644 --- a/inc/anti-bot.php +++ b/inc/anti-bot.php @@ -8,19 +8,6 @@ defined('TINYBOARD') or exit; $hidden_inputs_twig = array(); -$logfile = "/tmp/lainchan_err.out"; - -function print_err($s) { - // global $logfile; - // file_put_contents($logfile, $s . "\n", FILE_APPEND); -} - -function print_err2($s) { - print_err($s); -} - -print_err("\n\nSTART\n\n"); - class AntiBot { public $salt, $inputs = array(), $index = 0; diff --git a/inc/filters.php b/inc/filters.php index 1c7b39f1..2a66cd2a 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -6,8 +6,6 @@ defined('TINYBOARD') or exit; -require_once 'inc/anti-bot.php'; - class Filter { public $flood_check; private $condition; @@ -19,7 +17,6 @@ class Filter { } public function match($condition, $match) { - print_err("Filter condition: " . $condition); $condition = strtolower($condition); $post = &$this->post; @@ -220,8 +217,6 @@ function purge_flood_table() { function do_filters(array $post) { global $config; - print_err("do_filters begin"); - if (!isset($config['filters']) || empty($config['filters'])) return; @@ -239,7 +234,6 @@ function do_filters(array $post) { } foreach ($config['filters'] as $filter_array) { - print_err("creating new filter, running check"); $filter = new Filter($filter_array); $filter->flood_check = $flood_check; if ($filter->check($post)) { diff --git a/inc/functions.php b/inc/functions.php index 7ad23de7..3a7a8e99 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -357,7 +357,6 @@ function define_groups() { function create_antibot($board, $thread = null) { require_once dirname(__FILE__) . '/anti-bot.php'; - print_err("Create Antibot."); return _create_antibot($board, $thread); } @@ -1624,7 +1623,6 @@ function checkSpam(array $extra_salt = array()) { // Iterate through each input foreach ($inputs as $name => $value) { - print_err("-> " . $name . ' : ' . $value); $_hash .= $name . '=' . $value; } @@ -1635,7 +1633,6 @@ function checkSpam(array $extra_salt = array()) { $_hash = sha1($_hash . $extra_salt); if ($hash != $_hash) { - print_err("Hash mismatch"); return true; } diff --git a/inc/mod/pages.php b/inc/mod/pages.php index a15ed1a2..1b68fb2c 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -6,8 +6,6 @@ defined('TINYBOARD') or exit; -require_once 'inc/anti-bot.php'; // DELETE ME THIS IS FOR print_err function only! - function mod_page($title, $template, $args, $subtitle = false) { global $config, $mod; @@ -2688,7 +2686,6 @@ function mod_new_pm($username) { function mod_rebuild() { global $config, $twig; - print_err("mod_rebuild"); if (!hasPermission($config['mod']['rebuild'])) error($config['error']['noaccess']); @@ -2713,9 +2710,7 @@ function mod_rebuild() { if (isset($_POST['rebuild_themes'])) { $log[] = 'Regenerating theme files'; - print_err("mod_rebuild calling rebuildThemes"); rebuildThemes('all'); - print_err("mod_rebuild calling rebuildThemes ok"); } if (isset($_POST['rebuild_javascript'])) { diff --git a/install.php b/install.php index 3eda423b..72994bfa 100644 --- a/install.php +++ b/install.php @@ -24,27 +24,17 @@ $page = array( $config['minify_html'] = false; function checkMd5Exec(bool $can_exec) { - print_err2("checkMd5Exec"); - print_err2($can_exec); $shell_out = shell_exec("pwd"); - print_err2("shell out: " . $shell_out); $shell_out = shell_exec('echo "vichan" | md5sum'); - print_err2("shell out: " . $shell_out); $shell_ok = $shell_out == "141225c362da02b5c359c45b665168de -\n"; - print_err2("shell ok: " . strval($shell_ok)); $result = $can_exec && $shell_ok; - print_err2($result); return $result; } function checkGifsicle() { - print_err2("checkGifsicle"); $shell_out = shell_exec('echo $PATH'); - print_err2("shell out: " . $shell_out); $shell_out = shell_exec('gifsicle --help'); - print_err2("shell out: " . $shell_out); $shell_out = shell_exec('which gifsicle'); - print_err2("shell out (which gifsicle): " . $shell_out); return $shell_out; } @@ -672,7 +662,6 @@ if ($step == 0) { echo Element('page.html', $page); } elseif ($step == 1) { - print_err2("Hello World install.php"); $page['title'] = 'Pre-installation test'; $can_exec = true; @@ -689,8 +678,6 @@ if ($step == 0) { $version = explode('.', PHP_VERSION); define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2])); } - - print_err2("Can exec: " . strval($can_exec)); // Required extensions $extensions = array(