Update of /cvs/scoop/scoop/lib/Scoop
In directory lithium.sabren.com:/tmp/cvs-serv8892/lib/Scoop
Modified Files:
Cookies.pm DB.pm Stories.pm
Log Message:
Special page layout is now in a block, and a few quoting issues and
limit/offset behaviour were fixed to work with both pgsql and mysql.
-janra
Index: Stories.pm
===================================================================
RCS file: /cvs/scoop/scoop/lib/Scoop/Stories.pm,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** Stories.pm 30 Jul 2004 08:12:56 -0000 1.44
--- Stories.pm 15 Jan 2005 17:45:26 -0000 1.45
***************
*** 224,238 ****
$S->{UI}->{BLOCKS}->{subtitle} = $page->{title};
! my $content = qq|
! <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
! <TR>
! <TD BGCOLOR="%%title_bgcolor%%">%%title_font%%<B>$page->{title}</B>%%title_font_end%%</TD>
! </TR>
! <TR><TD> </TD></TR>
! <TR>
! <TD>%%norm_font%%$page->{content}%%norm_font_end%%</TD>
! </TR>
! </TABLE>|;
!
$S->{UI}->{BLOCKS}->{CONTENT} = $content;
return ;
--- 224,229 ----
$S->{UI}->{BLOCKS}->{subtitle} = $page->{title};
! my $content = $S->interpolate($S->{UI}->{BLOCKS}->{special_page_layout}, $page);
!
$S->{UI}->{BLOCKS}->{CONTENT} = $content;
return ;
Index: DB.pm
===================================================================
RCS file: /cvs/scoop/scoop/lib/Scoop/DB.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** DB.pm 6 Aug 2004 18:31:00 -0000 1.25
--- DB.pm 15 Jan 2005 17:45:26 -0000 1.26
***************
*** 54,63 ****
if ($args->{LIMIT}) {
$query .= " LIMIT";
! if ($args->{OFFSET}) {
! $query .= " $args->{OFFSET},";
}
- $query .= " $args->{LIMIT}";
}
-
if ($args->{DEBUG} || $DEBUG) {warn "in db_select: Query is $query\n";}
--- 54,69 ----
if ($args->{LIMIT}) {
$query .= " LIMIT";
! if (lc($S->{CONFIG}->{DBType}) eq "mysql") {
! if ($args->{OFFSET}) {
! $query .= " $args->{OFFSET},";
! }
! $query .= " $args->{LIMIT}";
! } else {
! $query .= " $args->{LIMIT}";
! if($args->{OFFSET}) {
! $query .= " OFFSET $args->{OFFSET}";
! }
}
}
if ($args->{DEBUG} || $DEBUG) {warn "in db_select: Query is $query\n";}
***************
*** 98,101 ****
--- 104,112 ----
if ($args->{NOCACHE}) {
+ unless($rv)
+ {
+ my ($package, $filename, $line) = caller;
+ warn "<<ERROR>> <<$S->{REMOTE_IP}>> in db_select: $DBI::errstr (Query is $query) : Error in $filename line $line"
+ }
return ($rv, $sth);
}
Index: Cookies.pm
===================================================================
RCS file: /cvs/scoop/scoop/lib/Scoop/Cookies.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Cookies.pm 4 Aug 2004 21:49:48 -0000 1.12
--- Cookies.pm 15 Jan 2005 17:45:26 -0000 1.13
***************
*** 34,38 ****
# Expirey time = user pref or global, or default of 1 30-day month
! my $adj = $S->pref('cookie_expire');
my $expire = $now + $adj;
--- 34,38 ----
# Expirey time = user pref or global, or default of 1 30-day month
! my $adj = $S->pref('cookie_expire') || 2592000;
my $expire = $now + $adj;