removed cortado property everywhere
git-svn-id: http://yolanda.mister-muffin.de/svn@263 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
parent
70982f5da6
commit
95306bdc8d
5 changed files with 4 additions and 65 deletions
|
@ -6,13 +6,13 @@ sub get_userinfo_from_sid
|
||||||
my ($sid) = @_;
|
my ($sid) = @_;
|
||||||
|
|
||||||
#prepare query
|
#prepare query
|
||||||
my $sth = $dbh->prepare(qq{select id, username, locale, pagesize, cortado from users where sid = ?}) or die $dbh->errstr;
|
my $sth = $dbh->prepare(qq{select id, username, locale, pagesize from users where sid = ?}) or die $dbh->errstr;
|
||||||
|
|
||||||
#execute it
|
#execute it
|
||||||
$sth->execute($sid) or die $dbh->errstr;
|
$sth->execute($sid) or die $dbh->errstr;
|
||||||
|
|
||||||
#save the resulting username
|
#save the resulting username
|
||||||
($userinfo->{'id'}, $userinfo->{'username'}, $userinfo->{'locale'}, $userinfo->{'pagesize'}, $userinfo->{'cortado'}) = $sth->fetchrow_array();
|
($userinfo->{'id'}, $userinfo->{'username'}, $userinfo->{'locale'}, $userinfo->{'pagesize'}) = $sth->fetchrow_array();
|
||||||
|
|
||||||
#finish query
|
#finish query
|
||||||
$sth->finish() or die $dbh->errstr;
|
$sth->finish() or die $dbh->errstr;
|
||||||
|
@ -141,18 +141,7 @@ sub output_page
|
||||||
my $parser = XML::LibXML->new();
|
my $parser = XML::LibXML->new();
|
||||||
my $xslt = XML::LibXSLT->new();
|
my $xslt = XML::LibXSLT->new();
|
||||||
|
|
||||||
if($query->param('cortado') eq 'true')
|
|
||||||
{
|
|
||||||
@cookies = [$session->cookie(-name=>$session_name, -value=>$session->id), $session->cookie(-name=>'cortado', -value=>'true')];
|
|
||||||
}
|
|
||||||
elsif($query->param('cortado') eq 'false')
|
|
||||||
{
|
|
||||||
@cookies = [$session->cookie(-name=>$session_name, -value=>$session->id), $session->cookie(-name=>'cortado', -value=>'false')];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@cookies = [$session->cookie(-name=>$session_name, -value=>$session->id)];
|
@cookies = [$session->cookie(-name=>$session_name, -value=>$session->id)];
|
||||||
}
|
|
||||||
|
|
||||||
#let the XSLT param choose other stylesheets or default to xhtml.xsl
|
#let the XSLT param choose other stylesheets or default to xhtml.xsl
|
||||||
my $param_xslt = $query->param('xslt');
|
my $param_xslt = $query->param('xslt');
|
||||||
|
|
|
@ -52,7 +52,6 @@ $dbh->do(qq{create table
|
||||||
timestamp bigint not null,
|
timestamp bigint not null,
|
||||||
locale varchar(10) not null,
|
locale varchar(10) not null,
|
||||||
pagesize tinyint unsigned default 5,
|
pagesize tinyint unsigned default 5,
|
||||||
cortado varchar(5) default 'true',
|
|
||||||
primary key (id)
|
primary key (id)
|
||||||
)
|
)
|
||||||
}) or die $dbh->errstr;
|
}) or die $dbh->errstr;
|
||||||
|
|
|
@ -11,7 +11,7 @@ if($userinfo->{'username'})
|
||||||
{
|
{
|
||||||
if($query->param('submit'))
|
if($query->param('submit'))
|
||||||
{
|
{
|
||||||
$dbh->do(qq{update users set locale = ?, pagesize = ?, cortado = ? where id = ?}, undef, $query->param('locale'), $query->param('pagesize'), $query->param('cortado'), $userinfo->{'id'} ) or die $dbh->errstr;
|
$dbh->do(qq{update users set locale = ?, pagesize = ? where id = ?}, undef, $query->param('locale'), $query->param('pagesize'), $userinfo->{'id'} ) or die $dbh->errstr;
|
||||||
|
|
||||||
$page->{'message'}->{'type'} = "information";
|
$page->{'message'}->{'type'} = "information";
|
||||||
$page->{'message'}->{'text'} = "information_settings_changed";
|
$page->{'message'}->{'text'} = "information_settings_changed";
|
||||||
|
@ -26,7 +26,6 @@ if($userinfo->{'username'})
|
||||||
{
|
{
|
||||||
$page->{'settings'}->{'locale'} = $userinfo->{'locale'};
|
$page->{'settings'}->{'locale'} = $userinfo->{'locale'};
|
||||||
$page->{'settings'}->{'pagesize'} = $userinfo->{'pagesize'};
|
$page->{'settings'}->{'pagesize'} = $userinfo->{'pagesize'};
|
||||||
$page->{'settings'}->{'cortado'} = $userinfo->{'cortado'}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -125,40 +125,10 @@ if($query->url_param('title') or $query->url_param('id'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($query->param('cortado') eq 'true')
|
|
||||||
{
|
|
||||||
$cortado = 'true';
|
|
||||||
}
|
|
||||||
elsif($query->param('cortado') eq 'false')
|
|
||||||
{
|
|
||||||
$cortado = 'false';
|
|
||||||
}
|
|
||||||
elsif($userinfo->{'cortado'} eq 'true')
|
|
||||||
{
|
|
||||||
$cortado = 'true';
|
|
||||||
}
|
|
||||||
elsif($userinfo->{'cortado'} eq 'false')
|
|
||||||
{
|
|
||||||
$cortado = 'false';
|
|
||||||
}
|
|
||||||
elsif($query->cookie('cortado') eq 'true')
|
|
||||||
{
|
|
||||||
$cortado = 'true';
|
|
||||||
}
|
|
||||||
elsif($query->cookie('cortado') eq 'false')
|
|
||||||
{
|
|
||||||
$cortado = 'false';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$cortado = 'true';
|
|
||||||
}
|
|
||||||
|
|
||||||
#before code cleanup, this was a really obfuscated array/hash creation
|
#before code cleanup, this was a really obfuscated array/hash creation
|
||||||
push @{ $page->{'video'} },
|
push @{ $page->{'video'} },
|
||||||
{
|
{
|
||||||
'thumbnail' => "$domain/video-stills/$id",
|
'thumbnail' => "$domain/video-stills/$id",
|
||||||
'cortado' => $cortado,
|
|
||||||
'filesize' => $filesize,
|
'filesize' => $filesize,
|
||||||
'duration' => $duration,
|
'duration' => $duration,
|
||||||
'width' => $width,
|
'width' => $width,
|
||||||
|
|
|
@ -59,24 +59,6 @@
|
||||||
<xsl:value-of select="$locale_strings[@id='settings_instruction_method']" />
|
<xsl:value-of select="$locale_strings[@id='settings_instruction_method']" />
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<input type="radio" name="cortado" value="true">
|
|
||||||
<xsl:if test="//settings/@cortado='true'">
|
|
||||||
<xsl:attribute name="checked">
|
|
||||||
checked
|
|
||||||
</xsl:attribute>
|
|
||||||
</xsl:if>
|
|
||||||
</input>
|
|
||||||
|
|
||||||
<xsl:value-of select="$locale_strings[@id='watch_cortadoapplet']" />
|
|
||||||
<br />
|
|
||||||
<input type="radio" name="cortado" value="false">
|
|
||||||
<xsl:if test="//settings/@cortado='false'">
|
|
||||||
<xsl:attribute name="checked">
|
|
||||||
checked
|
|
||||||
</xsl:attribute>
|
|
||||||
</xsl:if>
|
|
||||||
</input>
|
|
||||||
|
|
||||||
<xsl:value-of select="$locale_strings[@id='watch_browserplugin']" />
|
<xsl:value-of select="$locale_strings[@id='watch_browserplugin']" />
|
||||||
<br />
|
<br />
|
||||||
<input name="submit" type="submit" />
|
<input name="submit" type="submit" />
|
||||||
|
|
Loading…
Reference in a new issue