Граф коммитов

356 Коммитов

Автор SHA1 Сообщение Дата
ian%hixie.ch 7497e2844b Add a comment to remind others of what I forgot... (that you probably need a propertyImpliedAccessAllowed to use methodMissing) 2002-09-06 02:01:48 +00:00
ian%hixie.ch b591389b8c Normalise the command argument so that we don't choke if it has a dot in it or something. (We don't always control what the command is, e.g. for XMLRPC.) 2002-09-06 02:00:26 +00:00
ian%hixie.ch 9104a19a97 Silly typo: the constructor arguments don't go on the class, duh 2002-09-06 01:54:14 +00:00
ian%hixie.ch a5c4970a09 A wrapper around LWP::UserAgent and HTTP::Entities. (And maybe other things, in future.) 2002-09-05 21:16:24 +00:00
ian%hixie.ch 333894b4c8 Minor bug fixes: Make anonymous arguments start from 1 not 0; make a zero argument response have a response (a true boolean); make outputs with zero or one arguments be handled as outputs instead of implied property accesses. 2002-09-05 21:15:15 +00:00
ian%hixie.ch 66ae1bdf88 Add a generic output: acknowledge. Used when nothing is particularily required as a response, e.g. for a one-way XMLRPC call. 2002-09-05 21:05:33 +00:00
ian%hixie.ch 0a4acc6c05 XML RPC support. This is all you need to turn a PLIF application into a PLIF application with XML RPC. 2002-09-05 17:04:03 +00:00
ian%hixie.ch 6952ef27f8 Removing a few things which are now done or which will never be done. 2002-09-05 16:52:07 +00:00
ian%hixie.ch b485e51bc4 Missing newline in the output. This was causing some hickups for some UAs (perfectly understandably...) 2002-09-05 16:27:04 +00:00
ian%hixie.ch 8589c27898 Optimisation: move the importing of Template::Context to runtime. 2002-09-05 16:24:58 +00:00
ian%hixie.ch c4f7c3b390 Untaint the statement as well as the values before handing them to the database, because some statements are made from tainted data. This should be made more secure at some point, because currently there's no checking of database statements. 2002-09-05 16:23:38 +00:00
ian%hixie.ch fc4d9d8029 Split the CGI input module into one module per method and Content-Type. In the process, added support for MIME multipart POST, so in theory we now support file upload too. 2002-09-05 16:18:38 +00:00
ian%hixie.ch 600cc07fd8 Adding yet more layers to the output mechanism: now objects con hook in and do whatever they like to the output before it reaches the protocol (or generic) output service instance. Also, move the objects hash reset code to the end of the run loop so that an input device can add an object (before, the earliest you could add an object was the input verifier). 2002-09-05 16:11:25 +00:00
ian%hixie.ch bdc18277af Some minor code fixups with no semantic change. Also, fixed the getArgumentsAsString method to not screw up the output when there are empty arrays in the arguments hash (as can happen when you call createArgument, which happens when getArgument is called and the argument is missing) and when the arguments hash contains scalars. 2002-07-16 15:50:14 +00:00
ian%hixie.ch 1ed8704702 Add support for a command which does nothing but pass its argument to the output system. This is especially useful for templates that want to show other templates without actually doing anything else, and so the command is called 'showTemplate'. 2002-07-16 15:46:28 +00:00
ian%hixie.ch 0893006bfd Let's try a different tactic in a scalar context. If there's no data, return undef. 2002-07-07 15:42:57 +00:00
ian%hixie.ch 87dbc2efe7 Update the string data source to use the new input metadata APIs 2002-07-07 00:13:29 +00:00
ian%hixie.ch a011bb759c Typo: adddress should be address. Doesn't make any particular difference to anything unless someone has already written automated installation scripts... 2002-07-06 17:59:10 +00:00
ian%hixie.ch bd8de7bb3c Change the 'row' method of the ResultsFrame API to return an array in an array context, a hashref in a scalar context, and the value on its own if there is only one returned value. (Controversial change. This could introduce hard to spot regressions, and might be backed out at some point.) 2002-07-06 17:52:21 +00:00
ian%hixie.ch 753dac70cf Introduce the service.uaStringInterpreter.<protocol> service, which takes a UA string and splits it into name, version, manufacturer, platform and comment. This is the HTTP implementation of that service. 2002-07-06 17:49:22 +00:00
ian%hixie.ch af65ef80ba Added the following filters to the Template Toolkit toolbox: htmlcomment, xmlcomment, xml, cdata, htmljs, js, css. Added support for named [% BLOCK %], which had been removed when the template processing code was overridden. 2002-07-06 16:14:58 +00:00
ian%hixie.ch 9f2b625c88 Remove XXX comment about needing an API to enable or disable UI elements, since that need has disappeared now that we use provide that information reliably in the user object. Also split a long line into two for no particular reason. 2002-07-06 16:12:42 +00:00
ian%hixie.ch 3d03ce2061 Changed the default handling of the generic output module. Now, if there's no generic dispatcher for an output command, it'll effectively synthesise one on the fly, using the method name as the string name and the arguments as an array of values for a 'data' variable. This means that applications can skip out on implementing a generic dispatcher now. Anyone using strings with dot separators (i.e. anyone writing libraries) still need to have generic output dispatcher methods though, to map the method call to a string name. 2002-07-06 16:05:48 +00:00
ian%hixie.ch 2b5b3c1b02 Made the SMTP 'timeout' value configurable at setup time (defaults to 5 seconds) 2002-07-06 16:02:07 +00:00
ian%hixie.ch 4c715c89ad Implement getArgumentsTree(), which returns a hash tree representing the first value of each unique argument name in a branch, using dots as the separator. Finally replaced the hardcoded non-extensible meta data stuff with a proper getMetaData() API. Implemented that in the various Input modules. Renamed 'parameter' to 'property' in the CGI Input module. Added '--batch-force-defaults' as an argument handled by the CommandLine Input module. Made CommandLine derive from Default instead of Arguments, so that it can pick up the default handling of metadata and default output protocol. 2002-07-06 15:59:56 +00:00
ian%hixie.ch 8123d134f9 Update to TemplateToolkit format 2002-06-30 21:35:27 +00:00
ian%hixie.ch 6a205caf77 Include character set information in the HTTP headers 2002-06-30 21:34:57 +00:00
ian%hixie.ch cdb07d418c HTTP needs RFC822 dates for its Date: line 2002-06-30 21:33:21 +00:00
ian%hixie.ch 994369276a Primitive POST support (work in progress) 2002-06-30 21:30:43 +00:00
ian%hixie.ch 09f256be3b Oops, wrong repository... 2002-06-30 21:05:35 +00:00
ian%hixie.ch ea23ae8ae4 Initial checkin 2002-06-30 21:02:35 +00:00
ian%hixie.ch ecb34da717 Some versions of the Net::SMTP module handle the timeout by raising a SIG ALRM, so handle this case as well. Also increase the timeout by ten seconds since in the real world, some servers are actually that slow. We might need to make this asynchronous at some point. 2002-05-26 15:08:48 +00:00
ian%hixie.ch 8121837c6b Perl 5.005_03 compatability: the precedence of the not and comma operators changed at some point, so disambiguate this usage. 2002-05-26 15:05:37 +00:00
ian%hixie.ch 76c246b0ac Cache the Term::ReadLine input device. On some systems, it has to be cached, otherwise you end up trying to open too many input handles or something like that. This also means we can have session history where available. 2002-05-26 15:03:48 +00:00
ian%hixie.ch c32fb7e152 Add some null checking -- if the string is undefined, then turn it into the empty string. This avoids many undefined value warnings when the data provided by the user is incomplete. 2002-05-26 15:02:33 +00:00
ian%hixie.ch 772b7331fc Implemented rowsAffected(), which will return the number of database rows that were affected by the last execution of the statement associated with the results frame. 2002-05-26 15:00:56 +00:00
ian%hixie.ch 4a463f0909 Preliminary work in making the user prefs notifications page nicer. 2002-05-07 12:16:24 +00:00
ian%hixie.ch 657323f853 Add the hidden userPrefs.userID fields to the user prefs page so that changes to users other than yourself actually take effect. 2002-05-07 12:16:01 +00:00
ian%hixie.ch 0e76f493c1 pendingCommands.defined doesn't seem to work... Let's try pendingCommands.ref. It's technically more correct anyway. 2002-05-07 03:04:37 +00:00
ian%hixie.ch ab93fd925c Forgot to fully convert the templates to Template Toolkit: nested dots need to be escaped differently now. 2002-05-07 03:03:00 +00:00
ian%hixie.ch 9b40073368 Fix some bugs with the pendingCommand escaping code: First, extra spaces were being inserted (so much for s///x). Second, the escaping was actually modifying the original keys. Third, there were some logic errors that caused underescaping or resulted in the wrong key being escaped. 2002-05-07 01:50:22 +00:00
ian%hixie.ch ed2326560f Lots of tweaks, mainly to make the source look pretty. Also hid the Settings header if there are no important settings. 2002-05-07 01:32:28 +00:00
ian%hixie.ch d8564a2712 Correct a typo: Output is done through the application object, not the user prefs object... 2002-05-06 23:05:08 +00:00
ian%hixie.ch 35c2a5f8f9 Add an additional check that the change ID is valid 2002-05-06 22:59:22 +00:00
ian%hixie.ch f77c869445 Forgot to fully convert the templates to Template Toolkit: nested dots need to be escaped differently now. Also added filters to the URI fragments so that spaces get escaped properly. They'll be stuck together at some point. 2002-05-06 21:15:05 +00:00
ian%hixie.ch d237a6893d Forgot to fully convert the templates to Template Toolkit: nested dots need to be escaped differently now 2002-05-06 21:05:28 +00:00
ian%hixie.ch 840dfd9b87 Add more information to the hash passed to the change of address outputs 2002-05-06 21:01:48 +00:00
ian%hixie.ch db33106a12 Remove the 'html' bit from the filenames. 2002-05-06 21:00:53 +00:00
ian%hixie.ch dae1983fa6 E-mail templates 2002-05-06 12:53:53 +00:00
ian%hixie.ch b3b83cec28 Remove the 'html' bit from the filenames. 2002-05-06 11:03:12 +00:00
ian%hixie.ch 5b777cb386 Ok, handle undef in getArgumentsFromString the same as an empty string. This function sometimes gets called with the result of peekArgument(), which could be undef. 2002-05-06 10:10:57 +00:00
ian%hixie.ch 7cab9b3ac4 There's a bug somewhere which results in the expansion of an undefined string. This assertion should help track it down. 2002-05-06 09:55:19 +00:00
ian%hixie.ch 53d3369e22 Oops, forgot to make the primary key ID an auto_increment column. 2002-05-06 09:53:01 +00:00
ian%hixie.ch d15dc221dc getFields returns an arrayref, so we have to dereference it before using it in a foreach loop. 2002-05-06 05:51:02 +00:00
ian%hixie.ch d15aad7aad Oops, I was stomping on the fieldsByID property by treating it as a function instead of a hash. Also add in an assertion to check that insertField() is always called with a real field. 2002-05-06 05:50:06 +00:00
ian%hixie.ch 8629af8c80 Make user fields all provide the user.field service so that they can be easily recognised. 2002-05-06 05:48:48 +00:00
ian%hixie.ch 36ea0d5d9e Change the expected field category name from 'detail' to 'personal' for consistency 2002-05-06 05:26:00 +00:00
ian%hixie.ch a54b0c4c5f When getting ones password sent without getting a login failed message first, the pending command is the request to send a new password... so you get sent back to that once your password is sent. That's not good. This fixes it by moving the pendingCommands code to the login.failed page and making the login.detailsSent page only show the continue button when appropriate. 2002-05-06 05:17:00 +00:00
ian%hixie.ch 0b62c0b08b User Preferences Screens 2002-05-06 04:55:59 +00:00
ian%hixie.ch b6d076b9ec Fixing the spelling of getRightsForGroups() where it is declared and used. Also fixing one of the SQL statements to use rights.rightID not rights.ID. 2002-05-06 04:36:42 +00:00
ian%hixie.ch df3b41a760 Rename 'setting' to 'settings' throughout to be consistent. Also, make it so that someone with the right to change all groups gets to be the equivalent of an owner even in groups where he is only marked as administrator. 2002-05-06 03:54:14 +00:00
ian%hixie.ch 064976c2f1 Hardcoded constants strike again... Changing the setup code to let the first administrator have the rights to let other people be administrators. 2002-05-06 03:10:50 +00:00
ian%hixie.ch 44c74fd710 comment clarification 2002-05-05 22:43:05 +00:00
ian%hixie.ch c70f40a4aa Change variable names to reflect the fact that objects are instances, not classes. 2002-05-04 01:11:56 +00:00
ian%hixie.ch 264c47a237 Add some debugging info to every page once and for all. 2002-05-04 01:10:38 +00:00
ian%hixie.ch 440666f989 Make the user factory return the same object if the same user is requested multiple times. This means that if the currect user is changed on the fly, the changes actually take effect instead of there being a potential race condition between the change, the access of the currect user, and the objects going out of scope and updating the database. 2002-05-04 01:09:27 +00:00
ian%hixie.ch d1e40eadab Pass the app reference to the user factory. Fix the code that uses argument branches to treat them as arrays instead of scalars. 2002-05-04 01:06:38 +00:00
ian%hixie.ch e9e682b47f Two more things to do: make getSettings return a boolean instead of raising an exception, and add a pass-through command that outputs can use to bring up specific templates 2002-05-04 01:03:48 +00:00
ian%hixie.ch 7b0adca2b4 Add support for converting + signs in URIs back to spaces. 2002-05-04 01:02:19 +00:00
ian%hixie.ch 973f9b15b7 change the default include type from XML to x-auto so that by default we can include other templates without knowing what they are. 2002-04-30 00:24:48 +00:00
ian%hixie.ch 9449d72b31 Make getSettings return a boolean instead of raising an exception. 2002-04-30 00:24:01 +00:00
ian%hixie.ch d07cfad85c Add various FILTERs were required to keep the output valid HTML... 2002-04-30 00:23:07 +00:00
ian%hixie.ch ce9fb14749 Add support for pending commands, so that after getting their password sent users can continue doing what they were doing before. (This requires support on the output side as well, typically the HTTP protocol will use this, and less interactive protocols like e-mail won't.) 2002-04-30 00:18:33 +00:00
ian%hixie.ch d6548b4e15 Add getArgumentsAsString() and getArgumentsFromString() so that the arguments can be flattened and then 'retexturised' a later time and reused. 2002-04-30 00:13:20 +00:00
ian%hixie.ch db64b138e2 Login component output files for the HTTP protocol 2002-04-30 00:11:55 +00:00
ian%hixie.ch 9d907d9eaf If the app name is the same as the page name, only display it once in the page title 2002-04-24 20:31:53 +00:00
ian%hixie.ch 5dd1c005e1 Move from COSES to TemplateToolkit 2002-04-24 20:02:34 +00:00
ian%hixie.ch 47dc9075c5 Add an adminMessage to the default admin user. 2002-04-21 15:03:29 +00:00
ian%hixie.ch 6e56e6b19b Add a (default, very simple) login command so that the standard footer can have a login link. 2002-04-21 14:58:13 +00:00
ian%hixie.ch cf461c1c74 Changing from COSES to TemplateToolkit 2002-04-21 14:53:34 +00:00
ian%hixie.ch 0c0d8214c0 Split the confused getRights API into two, one to get the list of rights, and one to get the list of rights applicable to a set of groups. Make the user's output hash list all rights if the user is an administrator (this mirrors the behaviour of the user hasRight API). 2002-04-21 14:11:41 +00:00
ian%hixie.ch e08e22ae65 add group names to the data passed to templates 2002-04-21 14:08:27 +00:00
ian%hixie.ch 378ec7d89e If a user bookmarks or reloads the logout page, we don't want to show an error. 2002-04-21 14:05:15 +00:00
ian%hixie.ch d33dcc06e3 change the constructor to be a service instance constructor only, so that if descendants are also services, we don't leak the world through having a circular reference to the app. 2002-04-06 21:34:39 +00:00
ian%hixie.ch b3deb9a596 Update the CosesEditor to use the new name for the customised string data source. (used to be dataSource.strings, now dataSource.strings.customised) 2002-04-06 21:30:05 +00:00
ian%hixie.ch 47ddf2043b Correcting inherited method call to call the right method -- serviceInstanceInit(), not init() 2002-04-06 21:27:45 +00:00
ian%hixie.ch 477767b46c Fix the removeObjects() function to ensure it actually removes the objects instead of leaving null pointers about for us to dereference later. Added some extra precautions to make sure that doesn't happen again. This all makes it possible to log out again. 2002-04-06 20:37:31 +00:00
ian%hixie.ch 6a666ab3a6 Fixing warning: 'Use of uninitialized value in concatenation (.) or string at ../PLIF/PLIF/Service/TemplateToolkit.pm line 70.' 2002-04-06 20:19:12 +00:00
ian%hixie.ch fe909d53d5 Use Template::Stash::Context rather than Template::Stash because we need things like .ref 2002-04-06 20:13:44 +00:00
ian%hixie.ch a512fa4e2c Updating built in COSES strings to match the new semantics (no 'data.' prefix required on variables) 2002-04-06 19:29:13 +00:00
ian%hixie.ch 7eecaf72d2 Added support for password-less installations. Also added some comments and made font-lock happier. 2002-04-06 19:23:24 +00:00
ian%hixie.ch 6f3e800392 change the name adminHostname to the more accurate localHostname 2002-04-06 19:16:09 +00:00
ian%hixie.ch 85b0bdb913 Adding Template Toolkit support. See http://www.template-toolkit.org/ for documentation on the template toolkit format. 2002-04-05 22:39:59 +00:00
ian%hixie.ch 11f3b4574e Add getArgumentsBranch() virtual method declaration (for completeness). 2002-04-05 22:13:52 +00:00
ian%hixie.ch 0529f17d7d Update: Yet more things that need doing. 2002-04-05 20:25:11 +00:00
ian%hixie.ch 10e0afc2a5 Make the File string data source capable of looking for file-based templates in two locations, one specific to the app and one relative to the library. This allows PLIF to ship with default templates for various screens and thus makes it easier to bootstrap a simple app. 2002-04-05 20:17:34 +00:00
ian%hixie.ch 20ca856e2e Default error reporting page. 2002-04-05 20:15:27 +00:00
ian%hixie.ch 8cb49c664e Default templates for headers and footers that can be used by other templates. 2002-04-05 20:13:51 +00:00
ian%hixie.ch 072fec1dac Update the parameter list so that the 'type' parameter is explicitly named (although it still isn't used since this expander only supports one type). Also change the semantics of the data hash: no longer replace the data into a one member hash. This is a minor optimisation that eases interaction between expanders but will require changes to all existing templates. 2002-04-05 19:16:14 +00:00
ian%hixie.ch dc771237be Add a 'type' argument to the string expander interface so that string expanders can support multiple types. Also split getExpandedString so that callers can expand strings separately from getting strings, in case that is ever necessary. 2002-04-05 19:13:14 +00:00
ian%hixie.ch 7b650c7e1e Minor typo correction: change 'import New::SMTP' to 'import Net::SMTP' 2002-04-05 19:11:21 +00:00
ian%hixie.ch 21b2f6a62d * Added getGroupMembers() to the User data source.
* Fixed a bug in the MySQL implementation of User data source's getGroupName() method. It treated 'row' as an array ref instead of a normal array.
* Made the MySQL User data source automatically add a group with ID 1, named 'Administrators'.
* Special-cased the group with ID 1 in the user object so that if a user is in that group, he automatically is assumed to have all rights.
* Fixed a bug with the saving of the original groups in the user object (the backup object was simply a reference to the original object, which was later changed in place, causing the backup to change too).
* Fixed the handling of rights in the user object constructor to simply set the rights in one line instead of using indirection.
* Fixed the invalidateRights() method of the user object to correctly re-set the rights (previously it was not turning the generated array into a hashref).
* Added a setup.install implementation to the login component. It now queries the user for an administration username and creates the relevant user and puts it in the magic group 1.
* Fixed a call to checkAddress() in the login component.
2002-02-01 06:48:02 +00:00
ian%hixie.ch 5e999d163f Commented out the call to Net::SMTP's verify() method and replaced it with a generic regexp sanity check. It appears that VRFY is not correctly implemented on all servers. (I may be mistaken on this; it might just be a bug somewhere in the PLIF code that is messing something up, but I couldn't find it if so.) 2002-02-01 06:38:55 +00:00
ian%hixie.ch 42a887f912 Added a check that ensures that the configuration file is not readable or writable by anyone except the user running the script. This closes a potential security hole on shared machines. Changed the umask during the creation of the configuration file so that the permission bits are set that way too. Added a comment to clarify the superficially recursive nature of the configuration database and the configuration data source. 2002-02-01 06:36:27 +00:00
ian%hixie.ch b1cb0fe633 Another change that should be done at some point: Move PLIF/DataSource/*/MySQL.pm to PLIF/DataSource/MySQL/*.pm 2002-02-01 06:32:17 +00:00
ian%hixie.ch 277521049c Removed an erroneous comment, which should be the last traces of the old problem of the lack of a configuration file being a fatal error. 2002-01-31 18:30:21 +00:00
ian%hixie.ch b15921f8f4 Theoretical nit: call inherited constructor just in case at some point in the future it does something useful... 2002-01-31 17:35:52 +00:00
ian%hixie.ch 04f63dc6b2 Fix a minor typo in some SQL code which was causing an error during the creation of the user table. 2002-01-25 03:18:15 +00:00
ian%hixie.ch b32c5bf5db Moved the DBI module over to thew new more generic settings getting/saving API and removed the old DBI-specific one. Fixed an assert() call to check for the values being defined and not non-zero/non-blank. Fixed the password field to allow blank values (by making a blank value the default). Also fixed the calls to getArgument to not ever pass an undefined value as the default. 2002-01-25 03:17:05 +00:00
ian%hixie.ch 3e54c07c84 More things that need doing on the long (and not so long) run. 2002-01-25 03:12:26 +00:00
ian%hixie.ch 797b53c387 getting rid of the last traces of the newFieldXXX stuff 2001-12-31 06:28:59 +00:00
ian%hixie.ch 0da5c94177 abstracted out some common code. Made the flushing of pending text happen after each end tag as well as each start tag. (Not doing this was causing whitespace between sibling elements to be treated as trailing whitespace of the first element, resulting in excessive whitespace -- typically newlines -- in the output stream.) 2001-12-31 06:07:04 +00:00
ian%hixie.ch f1963cb4ad Fixing SQL error (DROP COLUMN not REMOVE COLUMN) 2001-12-31 06:04:30 +00:00
ian%hixie.ch 786cae104d delete() doesn't work with array references in old versions of perl5. 2001-12-31 02:40:49 +00:00
ian%hixie.ch ef2a734b8d Checking in a list of things that still need doing. 2001-12-30 01:03:45 +00:00
ian%hixie.ch 03752da2a2 Changing e-mail address now sends a confirmation mail to the old address too. Implemented by making changing fields a generic mechanism. Also fixed some minor nits. 2001-12-30 00:33:36 +00:00
ian%hixie.ch f4e078e048 * Removed incorrect comments.
* Added some XXX comments.
* Changed the way text nodes are handled so that adjacent text nodes are merged.
* Changed the way original keys are kept so that they work across flattening, rounding, and that there is no 'coses: original keys' hash getting in the way.
* Fixed a bug whereby empty arrays and hashes caused extraneous iterations in <set> elements.
* Removed some redundant scalar()s.
2001-12-26 19:30:16 +00:00
ian%hixie.ch cf04fb2ccf Made debug() be level 6 instead of level 7. Added various comments. 2001-12-26 19:12:57 +00:00
ian%hixie.ch 4adb0e69e5 Removed an unused variable. Made the selecting array always return an array even in scalar context. This makes using it in |if| statements a lot easier. 2001-12-26 19:03:07 +00:00
ian%hixie.ch bdc0b5ca1d Removing debug() calls. 2001-12-26 19:01:07 +00:00
ian%hixie.ch f9ccc64a0a Removing debug() calls, and removed the mention of a user 'logged out' state now that logging our is protocol specific. 2001-12-26 18:52:23 +00:00
ian%hixie.ch a6a2a33ebe Adding some error handling for the case where connecting to the AIM server fails. Also removing an extraneous dump() statement. 2001-12-26 18:35:16 +00:00
ian%hixie.ch bd4f14f4a0 An implementation of a logout service for HTTP. 2001-12-26 18:34:01 +00:00
ian%hixie.ch 93442b2ceb Since User.pm is now calling this object's 'hash' method instead of using 'data' directly, we had better implement 'hash'. Also make setting the property always check that the value being set is valid. 2001-12-26 18:19:15 +00:00
ian%hixie.ch 6ef7a97a60 Since logout is now protocol specific, removing support for logging out from the user object. Also making the 'hash' method more generic by making it call the field 'hash' method instead of assuming it will never pass more than the data of a field. 2001-12-26 18:15:14 +00:00
ian%hixie.ch ffe3cb5b17 Changed the implementation of cmdSetup to store the results of the selecting service lists in an array instead of a scalar. 2001-12-26 17:45:05 +00:00
ian%hixie.ch 4b59654786 Change from a hard-coded logout mechanism to a generic per-protocol logout mechanism. 2001-12-26 17:38:41 +00:00
ian%hixie.ch f42cb77816 A new type of user field for strings that are in the form of integers. 2001-12-26 17:18:00 +00:00
ian%hixie.ch 4e88617485 Removed some |scalar()|s where they were redundant, added some XXX comments, and fixed a couple of logic errors (>2 should have been >=2 and stuff like that -- this code really should use named constants) 2001-12-26 16:46:06 +00:00
ian%hixie.ch a2e1bd085a |not| implies a scalar context, so there's no need for an explicit |scalar()| 2001-12-26 16:10:17 +00:00
ian%hixie.ch b3149e8f04 Removed a redundant |scalar()| -- |if| implies a scalar context anyway. 2001-12-26 16:05:54 +00:00
ian%hixie.ch bbc01db019 Clarified a comment. 2001-12-26 16:03:55 +00:00
ian%hixie.ch e69da33727 A few minor fixes: checked for a reference being defined rather than being true (twice), replaced some double quotes with single quotes, and removed a trailing dot on a call to error(). 2001-12-26 15:45:01 +00:00
ian%hixie.ch 66bd5d3306 Removing a level 10 dump statement that was being hit a lot. 2001-12-26 15:42:21 +00:00
ian%hixie.ch 69ad635969 Removing a bunch of dump(10, ...) calls. It turns out that dump() is actually quite expensive, and calling it 1000+ times just to do nothing isn't that useful. In addition, most of these dump()s were used to debug the core PLIF code which now works pretty well, so they aren't that useful any more. 2001-12-04 18:06:06 +00:00
ian%hixie.ch cd69b89367 PLIF::Service::XML::Char() was the most expensive function in a typical profile. This takes it completely off the radar by not bothering to merge adjacent strings. 2001-12-04 17:51:23 +00:00
ian%hixie.ch febfd7e921 Changed the groupsById and groupsByName hashes of arrays into hashes of hashes to make them friendlier to handle. Also fixed some typos (groupByID instead of groupsByID, and one case of groupsByID where groupsByName was meant) and optimised away a call to dataSource.user's getGroupName method (since we already know the name). 2001-12-04 14:34:54 +00:00
ian%hixie.ch 5461276388 Fixing copy/paste error -- the user prefs object isn't the application object... 2001-12-04 13:40:04 +00:00
ian%hixie.ch e8692c8979 Make '0' and '' be equivalent to 'default' for the 'order' attribute of the <set> element. This makes defaulting actually work (missing attributes seem to get set to ''?). 2001-12-04 13:08:39 +00:00
ian%hixie.ch dc40e1f631 Place a 5 second timeout on the SMTP object -- this makes running setup bearable without an SMTP server (the default timeout is 2 minutes). 2001-12-04 12:53:40 +00:00
ian%hixie.ch d7a697b91b getFieldsHierarchically() will now return an even prettier result. Since it is mainly (currently only?) used for creating the data hash sent to the string expanders, this makes it a lot easier to author the templates. No silly numbers to remember. :-) 2001-12-04 12:51:48 +00:00
ian%hixie.ch 4ac50ff849 Fixed a bug in the main run loop whereby the objects array wasn't freed until shutdown, which sometimes meant objects got destroyed after the application, which is bad when the objects use the application to find services, etc. (This doesn't happen with services since services are not allowed to store references to the application, either directly or indirectly through references to objects or service instances.) Fixed the logout code to wait until the user tries to do something that requires login before clearing the logging out flag. This fixes a bug with HTTP whereby if a user logged out then his UA wouldn't ever be sent a 401 so wouldn't ever lose the authentication info, because browsers send the authentication info regardless of whether a page needs it or not. Also took the opportunity to remove a potential bug in the input validator code: store the admin message instead of a reference to the user object which might end up with a lifetime longer than expected. 2001-12-01 04:37:26 +00:00
ian%hixie.ch 6d68f3ce28 Removed an outdated comment. It is now safe to have a single module be a service, one or more service instances, and one or more objects all at the same time. 2001-12-01 04:29:20 +00:00
ian%hixie.ch 928179724c Made all dependencies load their modules on demand rather than on startup (cuts down the page serving time by about 50%). Also removed some debugging statements in certain high profile areas. 2001-11-30 20:48:36 +00:00
ian%hixie.ch 05b0232a3b Added support for easily getting the original key name of a munged key: added a virtual '.coses: original key' entry to all hashes in COSES (works similar to the virtual '.length' item that all arrays have). Edited the debug string to mention these virtual items. 2001-11-30 16:20:22 +00:00
ian%hixie.ch 223ca141d1 Fixing an inconsistency between getArgument() and peekArgument(). peekArgument() now returns an empty list in an array context if there is no such argument, instead of undef. This makes it act like getArgument(), which just returns the list of values in an array context. Similarly, made the default implementation of peekArgument() whine about not being implemented instead of returning undef, since by design peekArgument() should return the same as getArgument() if the argument is present. 2001-11-30 16:13:00 +00:00
ian%hixie.ch c790c34e51 Adding error handling for the case where the user prefs editor is called with bogus user IDs. 2001-11-30 16:06:45 +00:00
ian%hixie.ch cad0aefadc Implemented logout and explicit new account creation in the login service. Had to add removeObject() to the Controller module (the opposite of the exisiting addObject()). 2001-11-30 13:31:29 +00:00
ian%hixie.ch 0d7332f336 Minor fixes to make the previous checkin actually compile... 2001-11-29 20:23:48 +00:00
ian%hixie.ch 25b1d12a51 * Corrected some inaccurate comments I came across.
* Added support for group membership levels (now you can be a normal member, as before, but also a group op or a group admin) -- this affected the user data source, the mysql data source, and the user service.
* Added a getFieldsHierarchically() method to the user data source.
* Added a getFieldsByCategory() method to the user data source.
* Fixed a typo in some of the SQL in the rights management part of the MySQL user data source.
* Added support in the arguments input module for treating the arguments as dot-delimited trees and returning a specific branch.
* Added support in the passwords service for encrypting a specific password.
* Added a getFieldByID() method to the user service.
* Made the groups in the user service be indexed by both ID and Name.
* Implemented the user preferences component.
2001-11-29 18:03:38 +00:00