Roxen.git
/
server
/
base_server
/
module.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/base_server/module.pike:368:
if(has_value(uri->host, "*") || has_value(uri->host, "?")) if(glob(uri->host, hostname)) uri->host = hostname; else { if(!candidate_uri) { candidate_uri = uri; candidate_uri->host = hostname; } continue; }
-
return (string)
uri + loc[1..];
+
uri
->path
+
=
loc[1..];
+
return (string)uri;
} if(candidate_uri) { report_warning("Warning: Could not find any suitable ports, continuing anyway. " "Please make sure that your Primary Server URL matches " "at least one port. Primary Server URL: %O, URLs: %s.\n", world_url, short_array(urls));
-
return (string)
candidate_uri + loc[1..];
+
candidate_uri
->path
+
=
loc[1..];
+
return (string)candidate_uri;
} return 0; } /* By default, provide nothing. */ multiset(string) query_provides() { return 0; } function(RequestID:int|mapping) query_seclevels() {
Roxen.git/server/base_server/module.pike:2035:
Stdio.File file=Stdio.File(); if(!file->open(path,"r")) return 0; if(has_suffix(index, "()")) index = index[..sizeof(index) - 3]; // Pass path to original file so that include statements for local files // work correctly. return compile_string((pre || "") + file->read(), path)[index]; }
+
#if constant(roxen.FSGarbWrapper)
+
//! Register a filesystem path for automatic garbage collection.
+
//!
+
//! @param path
+
//! Path in the real filesystem to garbage collect.
+
//!
+
//! @param max_age
+
//! Maximum allowed age in seconds for files.
+
//!
+
//! @param max_size
+
//! Maximum total size in bytes for all files under the path.
+
//! Zero to disable the limit.
+
//!
+
//! @param max_files
+
//! Maximum number of files under the path.
+
//! Zero to disable the limit.
+
//!
+
//! @returns
+
//! Returns a roxen.FSGarbWrapper object. The garbage collector
+
//! will be removed when this object is destructed (eg via
+
//! refcount-garb).
+
roxen.FSGarbWrapper register_fsgarb(string path, int max_age,
+
int|void max_size, int|void max_files)
+
{
+
return roxen.register_fsgarb(module_identifier(), path, max_age,
+
max_size, max_files);
+
}
+
#endif
+
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 //! should be written as &table; instead of table. As an example, if //! the tables 'meta' and 'data' have been created with create_tables //! or get_my_table, this query will work: //! //! SELECT &meta;.id AS id, &data;.data as DATA //! FROM &data;, &meta; WHERE &my.meta;.xsize=200
Roxen.git/server/base_server/module.pike:2247:
//! Return a SQL-object for the database set with @[set_my_db], //! defaulting to the 'shared' database. If @[read_only] is specified, //! the database will be opened in read_only mode. @[charset] may be //! used to specify a charset for the connection if the database //! supports it. //! //! See also @[DBManager.get] { return DBManager.cached_get( my_db, _my_configuration, read_only, charset ); }
+
+
// Callback used by the DB browser, if defined, for custom formatting
+
// of database fields.
+
int|string format_db_browser_value (string db_name, string table_name,
+
string column_name, array(string) col_names,
+
array(string) col_types, array(string) row,
+
RequestID id);