Branch: Tag:

2008-08-15

2008-08-15 12:33:55 by Martin Stjernholm <mast@lysator.liu.se>

Moving to pike 7.8 and dropping compatibility with earlier pikes.

Rev: server/arg_cache_plugins/replicate.pike:1.27
Rev: server/base_server/__default.pmod:1.2
Rev: server/base_server/cache.pike:1.90
Rev: server/base_server/config_userdb.pike:1.53
Rev: server/base_server/configuration.pike:1.653
Rev: server/base_server/emit_object.pike:1.7
Rev: server/base_server/fonts.pike:1.87
Rev: server/base_server/global_variables.pike:1.110
Rev: server/base_server/javamodule.pike:1.7
Rev: server/base_server/language.pike:1.43
Rev: server/base_server/module.pike:1.231
Rev: server/base_server/module_support.pike:1.135
Rev: server/base_server/prototypes.pike:1.219
Rev: server/base_server/roxen.pike:1.981
Rev: server/base_server/roxenlib.pike:1.224
Rev: server/base_server/roxenloader.pike:1.397
Rev: server/base_server/rxmlhelp.pike:1.65
Rev: server/base_server/smtprelay.pike:3.2
Rev: server/base_server/snmpagent.pike:1.24
Rev: server/bin/buildenv.pike:1.10
Rev: server/bin/create_testcert.pike:1.2
Rev: server/bin/functions:1.19
Rev: server/bin/garbagecollector.pike:1.23
Rev: server/bin/setup_nsr.pike:1.4
Rev: server/bin/sqlhelper.pike:1.4
Rev: server/config_interface/actions/change_version.pike:1.15
Rev: server/config_interface/actions/debug_info.pike:1.40
Rev: server/config_interface/actions/feature_list.pike:1.14
Rev: server/config_interface/actions/ftpstatus.pike:1.4
Rev: server/config_interface/actions/generate_rsa.pike:1.7
Rev: server/config_interface/actions/make_rsa_csr.pike:1.11
Rev: server/config_interface/actions/make_selfsigned_dsa.pike:1.11
Rev: server/config_interface/actions/make_selfsigned_rsa.pike:1.10
Rev: server/config_interface/actions/ssl_common.pike:1.8
Rev: server/config_interface/actions/tablist.pike:1.10
Rev: server/config_interface/actions/threads.pike:1.8
Rev: server/etc/env.d/java.pike:1.19
Rev: server/etc/include/variables.h:1.18
Rev: server/etc/modules/DBManager.pmod:1.76
Rev: server/etc/modules/ExtSQL.pmod:1.4
Rev: server/etc/modules/ExtScript.pmod:1.22
Rev: server/etc/modules/GText.pmod:1.20
Rev: server/etc/modules/HTML.pmod:1.8
Rev: server/etc/modules/JavaModule.pmod:1.25
Rev: server/etc/modules/LazyImage.pmod/CoordinateSystem.pike:1.4
Rev: server/etc/modules/LazyImage.pmod/Legend.pike:1.5
Rev: server/etc/modules/LazyImage.pmod/module.pmod:1.19
Rev: server/etc/modules/License.pmod:1.27
Rev: server/etc/modules/Map.pmod:1.7
Rev: server/etc/modules/PropertySet.pike:1.12
Rev: server/etc/modules/RXML.pmod/PEnt.pike:1.24
Rev: server/etc/modules/RXML.pmod/PXml.pike:1.65
Rev: server/etc/modules/RXML.pmod/module.pmod:1.367
Rev: server/etc/modules/Roxen.pmod:1.246
Rev: server/etc/modules/RoxenDebug.pmod:1.12
Rev: server/etc/modules/RoxenRPC.pmod/HTTP.pmod/Client.pike:1.10
Rev: server/etc/modules/RoxenRPC.pmod/HTTP.pmod/Server.pike:1.6
Rev: server/etc/modules/RoxenSSLFile.pike:1.27(DEAD)
Rev: server/etc/modules/SNMP.pmod:1.10
Rev: server/etc/modules/Servlet.pmod:1.31
Rev: server/etc/modules/SloppyDOM.pmod:1.16
Rev: server/etc/modules/StateHandler.pmod:1.13
Rev: server/etc/modules/VFS.pmod:1.7
Rev: server/etc/modules/Variable.pmod/Date.pike:1.9
Rev: server/etc/modules/Variable.pmod/Email.pike:1.15
Rev: server/etc/modules/Variable.pmod/Image.pike:1.5
Rev: server/etc/modules/Variable.pmod/Language.pike:1.2
Rev: server/etc/modules/Variable.pmod/MapLocation.pike:1.6
Rev: server/etc/modules/Variable.pmod/Mapping.pike:1.9
Rev: server/etc/modules/Variable.pmod/Upload.pike:1.5
Rev: server/etc/modules/Variable.pmod/module.pmod:1.108
Rev: server/etc/modules/_NewLDAP.pmod/client.pike:1.11(DEAD)
Rev: server/etc/modules/_NewLDAP.pmod/ldap_globals.h:1.1(DEAD)
Rev: server/etc/modules/_NewLDAP.pmod/ldap_privates.pmod:1.1(DEAD)
Rev: server/etc/modules/_NewLDAP.pmod/module.pmod:1.4(DEAD)
Rev: server/etc/modules/_NewLDAP.pmod/protocol.pike:1.1(DEAD)
Rev: server/etc/roxen_master.pike:1.150
Rev: server/etc/test/tests/ftp/ftp_test.pike:1.4
Rev: server/font_handlers/freetype.pike:1.30
Rev: server/font_handlers/imagedir.pike:1.15
Rev: server/font_handlers/imagetar.pike:1.10
Rev: server/font_handlers/ttf.pike:1.18
Rev: server/languages/catala.pike:1.11
Rev: server/languages/chinese.pike:1.2
Rev: server/languages/croatian.pike:1.11
Rev: server/languages/czech.pike:1.18
Rev: server/languages/dutch.pike:1.11
Rev: server/languages/finnish.pike:1.10
Rev: server/languages/french.pike:1.13
Rev: server/languages/german.pike:1.11
Rev: server/languages/hungarian.pike:1.7
Rev: server/languages/italian.pike:1.13
Rev: server/languages/japanese.pike:1.22
Rev: server/languages/maori.pike:1.9
Rev: server/languages/norwegian.pike:1.12
Rev: server/languages/polish.pike:1.8
Rev: server/languages/portuguese.pike:1.11
Rev: server/languages/russian.pike:1.10
Rev: server/languages/serbian.pike:1.10
Rev: server/languages/slovenian.pike:1.17
Rev: server/languages/spanish.pike:1.12
Rev: server/languages/swedish.pike:1.20
Rev: server/modules/configuration/config_tags.pike:1.197
Rev: server/modules/configuration/roxen_test.pike:1.68
Rev: server/modules/configuration/update.pike:1.40
Rev: server/modules/examples/userdb_ex.pike:1.8
Rev: server/modules/filesystems/filesystem.pike:1.157
Rev: server/modules/filesystems/incoming.pike:1.19
Rev: server/modules/filesystems/restrictedfs.pike:1.24
Rev: server/modules/filesystems/sqlfs.pike:1.9
Rev: server/modules/filesystems/userfs.pike:1.71
Rev: server/modules/filters/tableborder.pike:1.13
Rev: server/modules/filters/whitespace_remover.pike:1.4
Rev: server/modules/graphics/business.pike:1.152
Rev: server/modules/graphics/gxml.pike:1.38
Rev: server/modules/graphics/pimage.pike:1.31
Rev: server/modules/graphics/rimage/rimage.pike:1.23
Rev: server/modules/icecast/icecast.pike:1.12
Rev: server/modules/icecast/pl_common.pike:1.9
Rev: server/modules/js-support/javascript_support.pike:1.68
Rev: server/modules/ldap/ldaptag.pike:2.38
Rev: server/modules/ldap/userdb_ldap.pike:1.14
Rev: server/modules/logging/home_logger.pike:1.35
Rev: server/modules/misc/preferred_language.pike:1.32
Rev: server/modules/misc/randomtext.pike:1.10
Rev: server/modules/misc/wapadapter.pike:1.13
Rev: server/modules/misc/webdav.pike:1.38
Rev: server/modules/proxies/connect.pike:1.20
Rev: server/modules/proxies/proxy.pike:1.57
Rev: server/modules/proxies/wais.pike:1.28
Rev: server/modules/scripting/cgi.pike:2.65
Rev: server/modules/scripting/fastcgi.pike:2.13
Rev: server/modules/scripting/perl.pike:2.26
Rev: server/modules/scripting/php.pike:2.5
Rev: server/modules/scripting/piketag.pike:2.38
Rev: server/modules/scripting/servlet.pike:2.24
Rev: server/modules/scripting/webapp.pike:2.32
Rev: server/modules/security/auth_httpbasic.pike:1.12
Rev: server/modules/security/auth_httpcookie.pike:1.12
Rev: server/modules/security/htaccess.pike:1.106
Rev: server/modules/security/userdb_sql.pike:1.10
Rev: server/modules/security/userdb_system.pike:1.12
Rev: server/modules/tags/accessed.pike:1.57
Rev: server/modules/tags/email.pike:1.43
Rev: server/modules/tags/emit_exec.pike:1.4
Rev: server/modules/tags/emit_timerange.pike:1.29
Rev: server/modules/tags/insert_cached_href.pike:1.22
Rev: server/modules/tags/obox.pike:1.41
Rev: server/modules/tags/rxmltags.pike:1.553
Rev: server/modules/tags/wizz.pike:1.10
Rev: server/modules/tags/writefile.pike:1.20
Rev: server/modules/throttling/throttling_byaddress.pike:1.6
Rev: server/modules/throttling/throttling_bytime.pike:1.8
Rev: server/ntroxenloader.pike:1.9
Rev: server/protocols/ftp.pike:2.125
Rev: server/protocols/http.pike:1.561
Rev: server/protocols/prot_hilfe.pike:2.15
Rev: server/protocols/prot_snmp.pike:2.8
Rev: server/sbin/roxen-create-server:1.5
Rev: server/tools/ntroxen/startdll/cmdline.cpp:1.21

1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2004, Roxen IS. - // $Id: module.pike,v 1.230 2008/05/21 14:50:23 mast Exp $ + // $Id: module.pike,v 1.231 2008/08/15 12:33:53 mast Exp $      #include <module_constants.h>   #include <module.h>
28:    return _my_configuration->name + "/" + _module_local_identifier;    }    }(); - static mapping _api_functions = ([]); + protected mapping _api_functions = ([]);      string|array(string) module_creator;   string module_url;
173:    return _my_configuration;   }    - nomask void set_configuration(Configuration c) + final void set_configuration(Configuration c)   {    if(_my_configuration && _my_configuration != c)    error("set_configuration() called twice.\n");
428:   {    inherit PropertySet;    -  static Stat stat; +  protected Stat stat;    -  static void create (string path, string abs_path, RequestID id, Stat stat) +  protected void create (string path, string abs_path, RequestID id, Stat stat)    {    ::create (path, abs_path, id);    this_program::stat = stat;
438:       Stat get_stat() {return stat;}    -  static mapping(string:string) response_headers; +  protected mapping(string:string) response_headers;       mapping(string:string) get_response_headers()    {
769:   // that apply to the resource.   //   // Only used internally by the default lock implementation. - static mapping(string:mapping(mixed:DAVLock)) file_locks = ([]); + protected mapping(string:mapping(mixed:DAVLock)) file_locks = ([]);      // Mapping from resource id to a mapping from user id to the lock   // that apply recursively to the resource and all other resources   // it's a prefix of.   //   // Only used internally by the default lock implementation. - static mapping(string:mapping(mixed:DAVLock)) prefix_locks = ([]); + protected mapping(string:mapping(mixed:DAVLock)) prefix_locks = ([]);      #define LOOP_OVER_BOTH(PATH, LOCKS, CODE) \    do { \
1030:   //! The default implementation only handles the @expr{"DAV:write"@}   //! lock type. It uses @[resource_id] to map paths to unique resources   //! and @[authenticated_user_id] to tell users apart. - static void register_lock(string path, DAVLock lock, RequestID id) + protected void register_lock(string path, DAVLock lock, RequestID id)   {    TRACE_ENTER(sprintf("register_lock(%O, lock(%O), X).", path, lock->locktoken),    this);
1070:   //! @param id   //! The request id may have the value @expr{0@} (zero) if called   //! by @[Configuration()->expire_locks()]. - static void unregister_lock (string path, DAVLock lock, RequestID|int(0..0) id) + protected void unregister_lock (string path, DAVLock lock, +  RequestID|int(0..0) id)   {    TRACE_ENTER(sprintf("unregister_lock(%O, lock(%O), X).", path, lock->locktoken),    this);
1328:   //! A filesystem module should typically put all needed write access   //! checks here and then use this from @[find_file()],   //! @[delete_file()] etc. - static mapping(string:mixed)|int(0..1) write_access(string relative_path, + protected mapping(string:mixed)|int(0..1) write_access(string relative_path,    int(0..1) recursive,    RequestID id)   {
1348:   //!   //! @note   //! The default implementation falls back to @[find_file()]. - static mapping(string:mixed) delete_file(string path, RequestID id) + protected mapping(string:mixed) delete_file(string path, RequestID id)   {    // Fall back to find_file().    RequestID tmp_id = id->clone_me();
1457:   //! @returns   //! @expr{0@} (zero) on success or an appropriate status mapping for   //! any error. - static mapping(string:mixed) copy_properties(string source, string destination, -  PropertyBehavior behavior, RequestID id) + protected mapping(string:mixed) copy_properties( +  string source, string destination, PropertyBehavior behavior, RequestID id)   {    SIMPLE_TRACE_ENTER(this, "copy_properties(%O, %O, %O, %O)",    source, destination, behavior, id);
1539:   //! includes an empty mapping in case there's a failure on some   //! subpart or at the destination, to signify a 207 Multi-Status   //! response using the info in @[id->get_multi_status()]. - static mapping(string:mixed) copy_collection(string source, -  string destination, -  PropertyBehavior behavior, -  Overwrite overwrite, -  MultiStatus.Prefixed result, -  RequestID id) + protected mapping(string:mixed) copy_collection( +  string source, string destination, PropertyBehavior behavior, +  Overwrite overwrite, MultiStatus.Prefixed result, RequestID id)   {    SIMPLE_TRACE_ENTER(this, "copy_collection(%O, %O, %O, %O, %O, %O).",    source, destination, behavior, overwrite, result, id);
1642:   //! Created if the destination didn't exist before, or 204 No   //! Content otherwise). Returns 0 if the source doesn't exist.   //! Returns an appropriate status mapping for any other error. - static mapping(string:mixed) copy_file(string source, string destination, + protected mapping(string:mixed) copy_file(string source, string destination,    PropertyBehavior behavior,    Overwrite overwrite, RequestID id)   {
1771:   //! includes an empty mapping in case there's a failure on some   //! subpart or at the destination, to signify a 207 Multi-Status   //! response using the info in @[id->get_multi_status()]. - static mapping(string:mixed) move_file(string source, string destination, + protected mapping(string:mixed) move_file(string source, string destination,    PropertyBehavior behavior,    Overwrite overwrite, RequestID id)   {
1828:   //! @note   //! The function must be prepared to recurse to check DAV locks   //! properly. - static mapping(string:mixed) move_collection(string source, string destination, -  PropertyBehavior behavior, + protected mapping(string:mixed) move_collection( +  string source, string destination, PropertyBehavior behavior,    Overwrite overwrite, RequestID id)   {    // Fall back to find_file().
1998:    return compile_string((pre || "") + file->read(), path)[index];   }    - static private mapping __my_tables = ([]); + private mapping __my_tables = ([]);      array(mapping(string:mixed)) sql_query( string query, mixed ... args )   //! Do a SQL-query using @[get_my_sql], the table names in the query
2014:   }      object sql_big_query( string query, mixed ... args ) - //! Identical to @[sql_query], but the @[Sql.sql()->big_query] method - //! will be used instead of the @[Sql.sql()->query] method. + //! Identical to @[sql_query], but the @[Sql.Sql()->big_query] method + //! will be used instead of the @[Sql.Sql()->query] method.   {    return get_my_sql()->big_query( replace( query, __my_tables ), @args );   }
2034:   }      object sql_big_query_ro( string query, mixed ... args ) - //! Identical to @[sql_query_ro], but the @[Sql.sql()->big_query] method - //! will be used instead of the @[Sql.sql()->query] method. + //! Identical to @[sql_query_ro], but the @[Sql.Sql()->big_query] method + //! will be used instead of the @[Sql.Sql()->query] method.   {    return get_my_sql(1)->big_query( replace( query, __my_tables ), @args );   }    - static int create_sql_tables( mapping(string:array(string)) definitions, -  string|void comment, -  int|void no_unique_names ) + protected int create_sql_tables( mapping(string:array(string)) definitions, +  string|void comment, int|void no_unique_names )   //! Create multiple tables in one go. See @[get_my_table]   //! Returns the number of tables that were actually created.   {
2065:    return ddc;   }    - static string sql_table_exists( string name ) + protected string sql_table_exists( string name )   //! Return the real name of the table 'name' if it exists.   {    if(strlen(name))
2078:   }       - static string|int get_my_table( string|array(string) name, + protected string|int get_my_table( string|array(string) name,    void|array(string)|string definition, -  string|void comment, -  int|void flag ) +  string|void comment, int|void flag )   //! @decl string get_my_table( string name, array(string) types )   //! @decl string get_my_table( string name, string definition )   //! @decl string get_my_table( string definition )
2191:    return __my_tables[ "&"+oname+";" ] = res;   }    - static string my_db = "local"; + protected string my_db = "local";    - static void set_my_db( string to ) + protected void set_my_db( string to )   //! Select the database in which tables will be created with   //! get_my_table, and also the one that will be returned by   //! @[get_my_sql]