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


1.4
date	2000.08.28.02.28.20;	author chuck;	state dead;
branches;
next	1.3;

1.3
date	2000.01.17.22.11.00;	author chuck;	state Exp;
branches;
next	1.2;

1.2
date	2000.01.16.18.49.39;	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.4
log
@starting to modernize babel - nothing autogenerated, standard
directory/library names, etc.
@
text
@function can_erase (&$request_ref) {
  global $conf;
  
  if (!($author_id = $request_ref->post['author_id']))
    return error("'author_id' not found in post");
  
  if (!($user_id = $request_ref->user_id))
    return error("'user_id' not found in request");
  
  if (!($administrator = $conf['admin']['user']))
    return error("'administrator' not found in conf");
  
  if (!($editors = $request_ref->editors))
    return error("editors not found in conf");
  
  if (!($anonymous = $conf['anonymous']['login']))
    return error("'anonymous_login' not found in conf");
  
  if ($user_id == $administrator)     return success();
  if ($request_ref->post['children']) return FAILURE;
  if ($user_id == $anonymous)         return FAILURE;
  if ($user_id == $author_id)         return success();
  if (member($user_id, $editors))     return success();
  return FAILURE;
}
@


1.3
log
@Another whomping commit that really doesn't do much tangible. The conf
system is now moved over to the $conf[section][value|subsection] mode that
the other cvs horde stuff is using.

Also, I'm compacting and tightening up the code wherever possible when I go.
Lots of major changes - moving the configuration of forums into the
database, changes in the database code for faster sql access, options to put
different forums in different tables/databases, and some nifty setup ideas -
to come.

Comments on what people would like to see in a forum system - I've already
thought of being able to attach files (where should they be stored?) - would
be welcome.
@
text
@@


1.2
log
@Babel no longer keeps it's own user table; it grabs Horde (phplib)
usernames/ids and uses those. We'll need to figure out a way of storing
email and fullname prefs with Horde accounts.
@
text
@d2 2
d10 1
a10 1
  if (!($administrator = $request_ref->conf['administrator']))
d16 1
a16 1
  if (!($anonymous = $request_ref->conf['anonymous_login']))
@


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 2
a3 2
  if (!($author = $request_ref->post['author']))
    return error("'author' not found in post");
d5 2
a6 2
  if (!($username = $request_ref->username))
    return error("'username' not found in request");
d17 1
a17 1
  if ($username == $administrator)    return success();
d19 3
a21 3
  if ($username == $anonymous)        return FAILURE;
  if ($username == $author)           return success();
  if (member($username, $editors))    return success();
@

