fix template configuration
This commit is contained in:
@@ -204,7 +204,7 @@ sub update {
|
||||
set $set
|
||||
where $conditions
|
||||
};
|
||||
print STDERR Dumper($query) . Dumper($bind_values);
|
||||
#print STDERR Dumper($query) . Dumper($bind_values);
|
||||
my $result = db::put( $dbh, $query, $bind_values );
|
||||
|
||||
images::setSeriesLabels( $dbh, $image );
|
||||
@@ -491,10 +491,10 @@ sub setEventLabels {
|
||||
where image=?
|
||||
};
|
||||
my $bind_values = [ $image->{licence}, $image->{filename} ];
|
||||
print STDERR Dumper($query) . Dumper($bind_values);
|
||||
#print STDERR Dumper($query) . Dumper($bind_values);
|
||||
|
||||
my $results = db::put( $dbh, $query, $bind_values );
|
||||
print STDERR Dumper($results) . " changes\n";
|
||||
#print STDERR Dumper($results) . " changes\n";
|
||||
return $results;
|
||||
}
|
||||
|
||||
@@ -521,10 +521,10 @@ sub setSeriesLabels {
|
||||
where series_image=?
|
||||
};
|
||||
my $bind_values = [ $image->{licence}, $image->{filename} ];
|
||||
print STDERR Dumper($query) . Dumper($bind_values);
|
||||
#print STDERR Dumper($query) . Dumper($bind_values);
|
||||
|
||||
my $results = db::put( $dbh, $query, $bind_values );
|
||||
print STDERR Dumper($results) . " changes\n";
|
||||
#print STDERR Dumper($results) . " changes\n";
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
||||
@@ -307,7 +307,7 @@ sub plain_to_xml {
|
||||
}
|
||||
|
||||
sub fix_utf8 {
|
||||
$_[0] = decode( 'cp1252', $_[0] );
|
||||
$_[0] = Encode::decode( 'cp1252', $_[0] );
|
||||
return $_[0];
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ sub get {
|
||||
my $query = '';
|
||||
unless ( ( defined $condition->{project_id} ) && ( $condition->{project_id} ne '' ) ) {
|
||||
my $conditions = '';
|
||||
$conditions = " where " . join( " and ", @conditions ) if ( @conditions > 0 );
|
||||
$conditions = " where " . join( " and ", @conditions ) if ( scalar @conditions > 0 );
|
||||
$query = qq{
|
||||
select *
|
||||
from calcms_studios s
|
||||
@@ -62,11 +62,10 @@ sub get {
|
||||
};
|
||||
} else {
|
||||
push @conditions, 's.id=ps.studio_id';
|
||||
|
||||
push @conditions, 'ps.project_id=?';
|
||||
push @bind_values, $condition->{project_id};
|
||||
my $conditions = '';
|
||||
$condition .= " where " . join( " and ", @conditions ) if ( scalar @conditions > 0 );
|
||||
|
||||
my $conditions = " where " . join( " and ", @conditions );
|
||||
$query = qq{
|
||||
select *
|
||||
from calcms_studios s, calcms_project_studios ps
|
||||
|
||||
@@ -77,7 +77,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params($config, $params),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -540,6 +540,7 @@ sub getEventDuration {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -4,7 +4,7 @@ use warnings "all";
|
||||
use strict;
|
||||
use Data::Dumper;
|
||||
use URI::Escape();
|
||||
use Encode();
|
||||
#use Encode();
|
||||
use utf8();
|
||||
use params();
|
||||
use config();
|
||||
@@ -52,8 +52,6 @@ $params->{project_id} = $user_presets->{project_id}
|
||||
if ( ( !( defined $params->{action} ) ) || ( $params->{action} eq '' ) || ( $params->{action} eq 'login' ) );
|
||||
$params->{expires} = $expires;
|
||||
|
||||
#print STDERR Dumper($params);
|
||||
|
||||
my $scriptName = 'calendar.cgi';
|
||||
|
||||
#add "all" studio to select box
|
||||
@@ -75,7 +73,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params( $params, $config ),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -83,7 +81,6 @@ $request = uac::prepare_request( $request, $user_presets );
|
||||
|
||||
$params = $request->{params}->{checked};
|
||||
|
||||
#print STDERR Dumper($request);
|
||||
if (
|
||||
(
|
||||
( defined $params->{action} ) && ( ( $params->{action} eq 'show' )
|
||||
@@ -1802,8 +1799,8 @@ sub getSeriesEvents {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $params = shift;
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
my $template = '';
|
||||
|
||||
@@ -52,7 +52,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -238,6 +238,7 @@ sub setRead {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -48,7 +48,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
$request = uac::prepare_request( $request, $user_presets );
|
||||
@@ -177,6 +177,7 @@ sub createEvent {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -60,7 +60,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -769,6 +769,7 @@ sub download {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -4,7 +4,6 @@ use warnings "all";
|
||||
use strict;
|
||||
|
||||
use URI::Escape();
|
||||
use Encode();
|
||||
use Data::Dumper;
|
||||
use MIME::Base64();
|
||||
use Text::Diff::FormattedHTML();
|
||||
@@ -43,7 +42,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -196,6 +195,7 @@ sub eventToText {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -5,7 +5,6 @@ use strict;
|
||||
|
||||
use Data::Dumper;
|
||||
use URI::Escape();
|
||||
use Encode();
|
||||
|
||||
use params();
|
||||
use config();
|
||||
@@ -46,7 +45,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
$request = uac::prepare_request( $request, $user_presets );
|
||||
@@ -617,6 +616,7 @@ There are following status fields:
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -56,7 +56,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
}
|
||||
};
|
||||
$request = uac::prepare_request( $request, $user_presets );
|
||||
@@ -406,6 +406,7 @@ sub modify_results {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = { template => template::check( $config, $params->{template}, 'image.html' ) };
|
||||
|
||||
@@ -13,7 +13,7 @@ require 'CGI.pm';
|
||||
use Date::Calc();
|
||||
use Time::Local();
|
||||
use Image::Magick();
|
||||
use Image::Magick::Square();
|
||||
use Image::Magick::Square;
|
||||
|
||||
use config();
|
||||
use auth();
|
||||
@@ -44,25 +44,17 @@ my $error = '';
|
||||
if ( defined $r ) {
|
||||
|
||||
#Apache2::Request
|
||||
# print "Content-type:text/html; charset=UTF-8; \n\n<br><br><br>Apache2::Request<br>\n";
|
||||
my $apr = Apache2::Request->new( $r, POST_MAX => $upload_limit, TEMP_DIR => $tmp_dir );
|
||||
|
||||
#copy params to hash
|
||||
my $body = $apr->body();
|
||||
if ( defined $body ) {
|
||||
for my $key ( keys %$body ) {
|
||||
|
||||
# print "$key=".$apr->param($key)."<br>\n";
|
||||
$params->{ scalar($key) } = scalar( $apr->param($key) ); # unless ($key eq'image');
|
||||
$params->{ scalar($key) } = scalar( $apr->param($key) );
|
||||
}
|
||||
}
|
||||
|
||||
# print Dumper($params);
|
||||
|
||||
# print Dumper($apr);
|
||||
my $status = $apr->parse;
|
||||
|
||||
# print "Status:$status<br>";
|
||||
$status = '' if ( $status =~ /missing input data/i );
|
||||
if ( $status =~ /limit/i ) {
|
||||
$error = $status;
|
||||
@@ -70,18 +62,10 @@ if ( defined $r ) {
|
||||
$upload = $apr->upload('image') if ( defined $params->{image} );
|
||||
}
|
||||
|
||||
#dont get params parsed
|
||||
# $CGI::POST_MAX = $upload_limit;
|
||||
# $CGI::TMPDIRECTORY=$tmp_dir;
|
||||
$cgi = new CGI();
|
||||
|
||||
# my %params=$cgi->Vars();
|
||||
# $params=\%params;
|
||||
# $error=$cgi->cgi_error()||$error;
|
||||
} else {
|
||||
|
||||
#CGI fallback
|
||||
# print "Content-type:text/html; charset=UTF-8; \n\n<br><br><br>CGI<br>\n";
|
||||
$CGI::POST_MAX = $upload_limit;
|
||||
$CGI::TMPDIRECTORY = $tmp_dir;
|
||||
$cgi = new CGI();
|
||||
@@ -103,15 +87,15 @@ my $user_presets = uac::get_user_presets(
|
||||
);
|
||||
$params->{default_studio_id} = $user_presets->{studio_id};
|
||||
$params->{studio_id} = $params->{default_studio_id}
|
||||
if ( ( !( defined $params->{action} ) ) || ( $params->{action} eq '' ) || ( $params->{action} eq 'login' ) );
|
||||
if ( !( defined $params->{action} ) ) || ( $params->{action} eq '' ) || ( $params->{action} eq 'login' );
|
||||
$params->{project_id} = $user_presets->{project_id}
|
||||
if ( ( !( defined $params->{action} ) ) || ( $params->{action} eq '' ) || ( $params->{action} eq 'login' ) );
|
||||
if ( !( defined $params->{action} ) ) || ( $params->{action} eq '' ) || ( $params->{action} eq 'login' );
|
||||
|
||||
my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -121,7 +105,7 @@ return unless defined uac::check( $config, $params, $user_presets );
|
||||
|
||||
my $permissions = $request->{permissions};
|
||||
|
||||
$params->{action} = '' unless ( defined $params->{action} );
|
||||
$params->{action} = '' unless defined $params->{action};
|
||||
|
||||
if ( $permissions->{create_image} ne '1' ) {
|
||||
uac::permissions_denied("create image");
|
||||
@@ -138,17 +122,20 @@ if ( $error ne '' ) {
|
||||
} elsif ( $params->{action} eq 'upload' ) {
|
||||
$file_info = upload_file( $config, $cgi, $upload, $user );
|
||||
$params->{error} .= $file_info->{error};
|
||||
$params = update_database( $config, $params, $file_info, $user ) if ( $params->{error} eq '' );
|
||||
$params = update_database( $config, $params, $file_info, $user ) if $params->{error} eq '';
|
||||
}
|
||||
print STDERR $params->{error} . "\n" if defined $params->{error};
|
||||
|
||||
print STDERR "upload error: $params->{error}\n" if $params->{error} ne '';
|
||||
my $out = '';
|
||||
template::process( $config, 'print', $params->{template}, $params );
|
||||
|
||||
print $cgi->cgi_error() if defined $cgi;
|
||||
print $cgi->cgi_error() if (defined $cgi) && (defined $cgi->cgi_error());
|
||||
return if $params->{action} eq '';
|
||||
|
||||
#return;
|
||||
|
||||
return if ( $params->{action} eq '' );
|
||||
$params->{action_result} ||= '';
|
||||
$params->{filename} ||= '';
|
||||
$params->{image_id} ||= '';
|
||||
$params->{name} ||= '';
|
||||
|
||||
if ( $params->{error} eq '' ) {
|
||||
print qq{
|
||||
@@ -169,7 +156,6 @@ if ( $params->{error} eq '' ) {
|
||||
<div id="output">failed</div>
|
||||
<div id="message">$params->{error}</div>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
sub upload_file {
|
||||
@@ -185,7 +171,7 @@ sub upload_file {
|
||||
my $filename = $result->{filename};
|
||||
|
||||
$result = check_filename($filename);
|
||||
print STDERR $result . "\n";
|
||||
#print STDERR $result . "\n";
|
||||
return $result if ( $result->{error} ne '' );
|
||||
|
||||
my $extension = $result->{extension} || '';
|
||||
@@ -193,9 +179,8 @@ sub upload_file {
|
||||
#read file from handle
|
||||
my $data;
|
||||
my $content = '';
|
||||
print STDERR $file . "\n";
|
||||
#print STDERR $file . "\n";
|
||||
|
||||
#unless (-e $file){}
|
||||
binmode $file;
|
||||
while ( read $file, $data, 1024 ) {
|
||||
$content .= $data;
|
||||
@@ -259,16 +244,14 @@ sub get_filename {
|
||||
my $cgi = shift;
|
||||
my $upload = shift;
|
||||
|
||||
if ( defined $upload ) {
|
||||
|
||||
# try apache2 module
|
||||
if ( defined $upload ) {
|
||||
my $filename = $upload->filename();
|
||||
return {
|
||||
filename => $filename,
|
||||
fh => $upload->fh(),
|
||||
error => ''
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
# fallback to CGI module
|
||||
@@ -362,29 +345,22 @@ sub process_image {
|
||||
$icon->Resize( width => 25, height => 25 );
|
||||
$icon->Write( 'jpg:' . $icon_path );
|
||||
|
||||
unless ( -e $thumb_path ) {
|
||||
return { error => 'could not create thumb file!' };
|
||||
}
|
||||
unless ( -e $icon_path ) {
|
||||
return { error => 'could not create icon file!' };
|
||||
}
|
||||
unless ( -e $image_path ) {
|
||||
return { error => 'could not create image file!' };
|
||||
}
|
||||
return { error => 'could not create thumb file!' } unless -e $thumb_path;
|
||||
return { error => 'could not create icon file!' } unless -e $icon_path;
|
||||
return { error => 'could not create image file!' } unless -e $image_path;
|
||||
|
||||
return {
|
||||
upload_filename => $filename,
|
||||
|
||||
filename => $md5_filename . '.jpg',
|
||||
thumb_path => $thumb_path,
|
||||
icon_path => $icon_path,
|
||||
image_path => $image_path,
|
||||
|
||||
error => ''
|
||||
};
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
@@ -392,10 +368,9 @@ sub check_params {
|
||||
|
||||
#numeric values
|
||||
for my $param ( 'project_id', 'studio_id', 'default_studio_id' ) {
|
||||
if ( ( defined $params->{$param} ) && ( $params->{$param} =~ /^\d+$/ ) ) {
|
||||
$checked->{$param} = $params->{$param};
|
||||
}
|
||||
$checked->{$param} = $params->{$param} if ( defined $params->{$param} ) && ( $params->{$param} =~ /^\d+$/ );
|
||||
}
|
||||
|
||||
if ( defined $checked->{studio_id} ) {
|
||||
$checked->{default_studio_id} = $checked->{studio_id};
|
||||
} else {
|
||||
|
||||
@@ -27,7 +27,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
}
|
||||
};
|
||||
$params = $request->{params}->{checked};
|
||||
@@ -42,12 +42,10 @@ for my $line ( split /\n/, $json ) {
|
||||
}
|
||||
|
||||
$json = $header . $json;
|
||||
|
||||
# .'var loc_text='.join('+',@json_lines).";\n"
|
||||
# .'var loc = JQuery.parseJSON(loc_text)';
|
||||
print $json;
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = { usecase => '' };
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
use warnings "all";
|
||||
use strict;
|
||||
use URI::Escape();
|
||||
use Encode();
|
||||
|
||||
#use Encode();
|
||||
use Data::Dumper;
|
||||
use MIME::Lite();
|
||||
|
||||
@@ -48,7 +49,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -237,6 +238,7 @@ sub eventToText {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -5,7 +5,8 @@ use strict;
|
||||
use Data::Dumper;
|
||||
|
||||
use URI::Escape();
|
||||
use Encode();
|
||||
|
||||
#use Encode();
|
||||
use localization();
|
||||
|
||||
use params();
|
||||
@@ -59,7 +60,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
$request = uac::prepare_request( $request, $user_presets );
|
||||
@@ -115,6 +116,7 @@ sub deleteFromPlayout {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -43,7 +43,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
$request = uac::prepare_request( $request, $user_presets );
|
||||
@@ -266,6 +266,7 @@ sub show_projects {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -19,7 +19,7 @@ my $r = shift;
|
||||
my $config = config::get('../config/config.cgi');
|
||||
my $debug = $config->{system}->{debug};
|
||||
|
||||
$params = check_params($params);
|
||||
$params = check_params( $config, $params );
|
||||
|
||||
print "Content-type:text/html\n\n";
|
||||
print qq{<!DOCTYPE html>
|
||||
@@ -136,6 +136,7 @@ sub printForm {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -53,7 +53,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
$request = uac::prepare_request( $request, $user_presets );
|
||||
@@ -425,6 +425,7 @@ sub sort_groups {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -42,7 +42,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
$request = uac::prepare_request( $request, $user_presets );
|
||||
@@ -122,6 +122,7 @@ sub show_events {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -41,7 +41,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params($config, $params),
|
||||
},
|
||||
};
|
||||
$request = uac::prepare_request( $request, $user_presets );
|
||||
@@ -109,6 +109,7 @@ sub show_series {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -56,7 +56,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
$request = uac::prepare_request( $request, $user_presets );
|
||||
@@ -338,7 +338,7 @@ sub save_series {
|
||||
$entry->{live} = $params->{live} || 0;
|
||||
$entry->{count_episodes} = $params->{count_episodes} || 0;
|
||||
|
||||
#$entry->{html_content} = decode( 'utf-8', $entry->{content} );
|
||||
#$entry->{html_content} = Encode::decode( 'utf-8', $entry->{content} );
|
||||
$entry->{html_content} = markup::creole_to_html( $entry->{content} );
|
||||
$entry->{html_content} =~ s/([^\>])\n+([^\<])/$1<br\/><br\/>$2/g;
|
||||
|
||||
@@ -1211,6 +1211,7 @@ sub show_series {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -48,7 +48,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
$request = uac::prepare_request( $request, $user_presets );
|
||||
@@ -170,6 +170,7 @@ sub formatLoudness {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -43,7 +43,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
$request = uac::prepare_request( $request, $user_presets );
|
||||
@@ -95,6 +95,7 @@ sub showImage {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -5,7 +5,8 @@ use strict;
|
||||
|
||||
use Data::Dumper;
|
||||
use URI::Escape();
|
||||
use Encode();
|
||||
|
||||
#use Encode();
|
||||
|
||||
use params();
|
||||
use config();
|
||||
@@ -49,7 +50,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
$request = uac::prepare_request( $request, $user_presets );
|
||||
@@ -355,6 +356,7 @@ sub showDates {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -43,7 +43,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
$request = uac::prepare_request( $request, $user_presets );
|
||||
@@ -203,6 +203,7 @@ sub show_studios {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -41,7 +41,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
$request = uac::prepare_request( $request, $user_presets );
|
||||
@@ -159,6 +159,7 @@ sub update_settings {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -43,7 +43,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
$request = uac::prepare_request( $request, $user_presets );
|
||||
@@ -80,6 +80,7 @@ sub show_stats {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -39,7 +39,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params($config, $params),
|
||||
},
|
||||
};
|
||||
$request = uac::prepare_request( $request, $user_presets );
|
||||
@@ -399,6 +399,7 @@ sub update_user_roles {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -5,7 +5,8 @@ use strict;
|
||||
|
||||
use Data::Dumper;
|
||||
use URI::Escape();
|
||||
use Encode();
|
||||
|
||||
#use Encode();
|
||||
|
||||
use params();
|
||||
use config();
|
||||
@@ -50,7 +51,7 @@ my $request = {
|
||||
url => $ENV{QUERY_STRING} || '',
|
||||
params => {
|
||||
original => $params,
|
||||
checked => check_params($params),
|
||||
checked => check_params( $config, $params ),
|
||||
},
|
||||
};
|
||||
$request = uac::prepare_request( $request, $user_presets );
|
||||
@@ -265,6 +266,7 @@ sub show_work_schedule {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
@@ -18,7 +18,7 @@ my $r = shift;
|
||||
|
||||
my $config = config::get('config/config.cgi');
|
||||
|
||||
$params = check_params($params);
|
||||
$params = check_params( $config, $params );
|
||||
|
||||
list_series( $config, $params );
|
||||
|
||||
@@ -72,6 +72,7 @@ sub list_series {
|
||||
}
|
||||
|
||||
sub check_params {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
Reference in New Issue
Block a user