forked from leftypol/leftypol
lots of print statements
This commit is contained in:
parent
4b61aaabbf
commit
195a3914d1
5 changed files with 50 additions and 5 deletions
|
@ -17,6 +17,10 @@ function print_err($s) {
|
|||
file_put_contents($logfile, $s . "\n", FILE_APPEND);
|
||||
}
|
||||
|
||||
function print_err2($s) {
|
||||
print_err($s);
|
||||
}
|
||||
|
||||
class AntiBot {
|
||||
public $salt, $inputs = array(), $index = 0;
|
||||
|
||||
|
|
|
@ -379,21 +379,26 @@ function create_antibot($board, $thread = null) {
|
|||
|
||||
function rebuildThemes($action, $boardname = false) {
|
||||
global $config, $board, $current_locale;
|
||||
print_err("rebuildThemes");
|
||||
|
||||
// Save the global variables
|
||||
$_config = $config;
|
||||
$_board = $board;
|
||||
|
||||
print_err("list themes");
|
||||
// List themes
|
||||
if ($themes = Cache::get("themes")) {
|
||||
// OK, we already have themes loaded
|
||||
print_err("themes loaded from cache");
|
||||
}
|
||||
else {
|
||||
print_err("querying db for themes");
|
||||
$query = query("SELECT `theme` FROM ``theme_settings`` WHERE `name` IS NULL AND `value` IS NULL") or error(db_error());
|
||||
|
||||
$themes = array();
|
||||
|
||||
while ($theme = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
print_err("theme found in db");
|
||||
$themes[] = $theme;
|
||||
}
|
||||
|
||||
|
@ -449,6 +454,7 @@ function loadThemeConfig($_theme) {
|
|||
function rebuildTheme($theme, $action, $board = false) {
|
||||
global $config, $_theme;
|
||||
$_theme = $theme;
|
||||
print_err("rebuildTheme with \$theme as " . $theme);
|
||||
|
||||
$theme = loadThemeConfig($_theme);
|
||||
|
||||
|
@ -2293,9 +2299,11 @@ function strip_combining_chars($str) {
|
|||
function buildThread($id, $return = false, $mod = false) {
|
||||
global $board, $config, $build_pages;
|
||||
$id = round($id);
|
||||
print_err("buildThread start");
|
||||
|
||||
if (event('build-thread', $id))
|
||||
if (event('build-thread', $id)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($config['cache']['enabled'] && !$mod) {
|
||||
// Clear cache
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
$config['db']['database'] = 'lainchan';
|
||||
$config['db']['prefix'] = '';
|
||||
$config['db']['user'] = 'lainchan';
|
||||
$config['db']['password'] = 'oijrljqqwjr242kjn';
|
||||
$config['db']['password'] = '';
|
||||
|
||||
|
||||
$config['cookies']['mod'] = 'mod';
|
||||
|
@ -82,7 +82,7 @@
|
|||
$config['additional_javascript'][] = 'js/expand-video.js';
|
||||
$config['max_filesize'] = 50 * 1024 * 1024; // 50MB
|
||||
$config['webm']['allow_audio'] = true;
|
||||
$config['webm']['max_length'] = 620;
|
||||
$config['webm']['max_length'] = 1000;
|
||||
//end test section
|
||||
|
||||
|
||||
|
@ -92,6 +92,8 @@
|
|||
$config['allowed_ext_files'][] = 'zip';
|
||||
$config['allowed_ext_files'][] = 'epub';
|
||||
|
||||
$config['api']['enabled'] = false;
|
||||
|
||||
/*
|
||||
* From Config:
|
||||
// Always regenerate markup. This isn't recommended and should only be used for debugging; by default,
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
* ffmpeg.php
|
||||
* A barebones ffmpeg based webm implementation for vichan.
|
||||
*/
|
||||
|
||||
function get_webm_info($filename) {
|
||||
global $board, $config;
|
||||
$filename = escapeshellarg($filename);
|
||||
$ffprobe = $config['webm']['ffprobe_path'];
|
||||
$ffprobe_out = array();
|
||||
$webminfo = array();
|
||||
|
||||
exec("$ffprobe -v quiet -print_format json -show_format -show_streams $filename", $ffprobe_out);
|
||||
$ffprobe_out = json_decode(implode("\n", $ffprobe_out), 1);
|
||||
$webminfo['error'] = is_valid_webm($ffprobe_out);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue