The Wakaba and Kareha support thread, part 2 (1000)

292 Name: Anonymous : 2008-06-05 18:51 ID:eho4jHIG [Del]

>>291

Doesn't work, however I tried something different based off of what you did (in a way).

Replace (around line 600):

	make_http_forward(HTML_SELF,ALTERNATE_REDIRECT);

With:

	my $noko;
my $noko2;
if($parent)
{
$sth=$dbh->prepare("SELECT num FROM ".SQL_TABLE." WHERE timestamp=? AND comment=?;") or make_error(S_SQLFAIL);
$sth->execute($time,$comment) or make_error(S_SQLFAIL);
$noko = $parent;
$noko2 = '#'.($sth->fetchrow_array())[0];
}
else
{
$sth=$dbh->prepare("SELECT num FROM ".SQL_TABLE." WHERE timestamp=? AND comment=?;") or make_error(S_SQLFAIL);
$sth->execute($time,$comment) or make_error(S_SQLFAIL);
$noko = ($sth->fetchrow_array())[0];
}

if($c_email eq 'noko')
{
make_http_forward(RES_DIR.$noko.PAGE_EXT.$noko2,ALTERNATE_REDIRECT);
}
else
{
make_http_forward(HTML_SELF,ALTERNATE_REDIRECT);
}

It may be bulk and able to be done in less lines of code, but this works perfectly.

This thread has been closed. You cannot post in this thread any longer.