Branch: Tag:

1998-09-29

1998-09-29 16:18:50 by Johan Schön <js@opera.com>

Added host attribute to sql_object(). Removed id attribute to same function.

Rev: server/modules/tags/sqltag.pike:1.30

1:   /* -  * $Id: sqltag.pike,v 1.29 1998/08/10 21:39:57 per Exp $ +  * $Id: sqltag.pike,v 1.30 1998/09/29 16:18:50 js Exp $    *    * A module for Roxen Challenger, which gives the tags    * <SQLQUERY> and <SQLOUTPUT>.
7:    * Henrik Grubbström 1997-01-12    */    - constant cvs_version="$Id: sqltag.pike,v 1.29 1998/08/10 21:39:57 per Exp $"; + constant cvs_version="$Id: sqltag.pike,v 1.30 1998/09/29 16:18:50 js Exp $";   constant thread_safe=1;   #include <module.h>   
20:   import Array;   import Sql;    + object conf; +  +    /*    * Module interface functions    */
460:    */       - object(sql) sql_object(object request_id) + object(sql) sql_object(void|string host)   { -  string host = query("hostname"); +  string host = stringp(host)?host:query("hostname");    object(sql) con; -  function sql_connect = request_id->conf->sql_connect; +  function sql_connect = conf->sql_connect;    mixed error;    error = catch(con = sql_connect(host));    if(error)
514:    * More interface functions    */    - object conf; +       void start(int level, object _conf)   {