Branch: Tag:

2001-01-10

2001-01-10 08:57:28 by Per Hedbor <ph@opera.com>

Modified for the new Sql.Sql()->query interface

Rev: server/base_server/config_userdb.pike:1.18
Rev: server/base_server/configuration.pike:1.407
Rev: server/base_server/dbs.pike:1.6
Rev: server/base_server/prototypes.pike:1.2
Rev: server/base_server/roxen.pike:1.608
Rev: server/base_server/roxenloader.pike:1.227
Rev: server/bin/sqladduser.pike:1.5
Rev: server/config_interface/standard/dbs/new_db.pike:1.2
Rev: server/config_interface/standard/dbs/status.pike:1.2
Rev: server/config_interface/standard/inheritinfo.pike:1.16
Rev: server/modules/compat/sqldb.pike:1.2
Rev: server/modules/configuration/config_filesystem.pike:1.67
Rev: server/modules/database/SQLuserdb.pike:1.23
Rev: server/modules/database/sqltag.pike:1.71
Rev: server/modules/tags/accessed.pike:1.39

1:   // A vitual server's main configuration   // Copyright © 1996 - 2000, Roxen IS. - constant cvs_version = "$Id: configuration.pike,v 1.406 2001/01/04 06:29:04 nilsson Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.407 2001/01/10 08:57:24 per Exp $";   #include <module.h>   #include <module_constants.h>   #include <roxen.h>
2675:   #endif   }    + #if ROXEN_COMPAT < 2.2   // BEGIN SQL      mapping(string:string) sql_urls = ([]);      mapping sql_cache = ([]);    - Sql.sql sql_cache_get(string what) + Sql.Sql sql_cache_get(string what)   {   #ifdef THREADS    if(sql_cache[what] && sql_cache[what][this_thread()])    return sql_cache[what][this_thread()];    if(!sql_cache[what]) -  sql_cache[what] = ([ this_thread():Sql.sql( what ) ]); +  sql_cache[what] = ([ this_thread():Sql.Sql( what ) ]);    else -  sql_cache[what][ this_thread() ] = Sql.sql( what ); +  sql_cache[what][ this_thread() ] = Sql.Sql( what );    return sql_cache[what][ this_thread() ];   #else /* !THREADS */    if(!sql_cache[what]) -  sql_cache[what] = Sql.sql( what ); +  sql_cache[what] = Sql.Sql( what );    return sql_cache[what];   #endif   }    - Sql.sql sql_connect(string db) + Sql.Sql sql_connect(string db)   {    if (sql_urls[db])    return sql_cache_get(sql_urls[db]);
2707:   }      // END SQL + #endif      // This is the most likely URL for a site.   private string get_my_url()