Update of /cvs/scoop/scoop/lib/Scoop/Stories
In directory lithium.sabren.com:/tmp/cvs-serv21466/lib/Scoop/Stories
Modified Files:
Elements.pm
Log Message:
Checking in rusty's fix for subsections and get_sids.
-j
Index: Elements.pm
===================================================================
RCS file: /cvs/scoop/scoop/lib/Scoop/Stories/Elements.pm,v
retrieving revision 1.121
retrieving revision 1.122
diff -C2 -d -r1.121 -r1.122
*** Elements.pm 6 Apr 2005 02:50:34 -0000 1.121
--- Elements.pm 11 May 2005 22:44:10 -0000 1.122
***************
*** 713,716 ****
--- 713,723 ----
? $S->get_inheritable_sect_sql($params->{section}) : '';
+ # If there are subsections, they need to be ORed with the section
+ if ($subsections && $params->{section}) {
+ $subsections .= qq| OR section=| . $S->dbh->quote($params->{section});
+ #remove the section param so it doesn't show up again
+ delete $params->{section};
+ }
+
$where = $disallowed_sections;
$where .= ( $where && $subsections ) ? ' AND ' : '';