head	1.3;
access;
symbols;
locks; strict;
comment	@# @;


1.3
date	2000.08.28.02.28.21;	author chuck;	state dead;
branches;
next	1.2;

1.2
date	99.08.03.04.12.54;	author chuck;	state Exp;
branches;
next	1.1;

1.1
date	99.07.20.07.36.25;	author jon;	state Exp;
branches;
next	;


desc
@@


1.3
log
@starting to modernize babel - nothing autogenerated, standard
directory/library names, etc.
@
text
@function close_all (&$request_ref) {
  global $babel;
  
  if (!($topic = $request_ref->topic))
    return error("topic undefined");
  
  $babel['open_posts'][$topic] = array();
  $request_ref->open_posts = array();
  $request_ref->id = $request_ref->topic_root;
  
  return success();
}
@


1.2
log
@cjh: Babel is probably half-broken now, as I begin moving it to use phplib
session storage. Already got rid of the open_posts db table in favor of a
session var; read_posts will follow, and then I'll fix the rest of it.
@
text
@@


1.1
log
@
jon: alrighty, babel.php3.in is now broken down into seperate
     function files.  they're jusy dying to be combined into
     objects and seperate source files.
@
text
@d2 1
a2 2
  if (!($dbh = $request_ref->dbh))
    return error("database undefined");
d7 1
a7 14
  if (!($user_id = $request_ref->user_id))
    return error("'user_id' not specified");
  
  $query  = "DELETE FROM open_posts ";
  $query .= "WHERE topic = '$topic' AND user_id = $user_id ";
  
  if (!($sth = $dbh->prepare($query)))
    return error("could not prepare: " . $dbh->errstr);
  
  if (!($sth->execute()))
    return error("could not execute: " . $sth->errstr); 
  
  $sth->finish();
  
a8 1
  
@

