From: Paul L. <pa...@sq...> - 2005-11-23 08:09:16
|
Tomas Kuliavas wrote: > Are you using database backend for user preferences? Are you top posting? ;-) > plain_error_message() function is stored in > functions/display_messages.php. This file is not loaded by default, if > preferences are stored in DB or newmail plugin is not enabled. Nice catch. A couple of things about this for us to consider: - I had taken a quick look at plugin.txt to see if display_messages.php was listed in the inclusion hierarchy, and it was not. Seems like the hierarchy is incomplete, needing something like this: 7. include/load_prefs.php 7.1. include/validate.php 7.2. functions/prefs.php + 7.2.1 One of the following, depending on prefs backend setting and/or prefs_backend hook, which is executed here: + 7.2.1.a <custom prefs backend> + 7.2.1.b functions/db_prefs.php + 7.2.1.c functions/file_prefs.php + 7.2.1.c.1 functions/display_messages.php 7.3. functions/plugin.php 7.3.1. functions/global.php (from 1.4.0 and 1.5.0) 7.3.2. functions/prefs.php (from 1.5.1) 7.4. functions/constants.php 7.5. do_hook('loading_prefs') I used letters as a way to distinguish the alternate (not cumulative) include paths. I did not check if there are other missing includes. - Some includes like this one seem out of place. That is, it is certainly necessary for use in that file, but might serve the project well if we centralized the inclusion. In cases like this one, then there would not be anomalous behavior based on a seemingly unrelated setting for the prefs backend. - I sometimes have to rummage through a bunch of source to find include paths; might be nice to map the whole core (maybe for common entry points) like this (nice list Tomas made in plugin.txt), although that can easily get out of hand... Cheers, -paul >>Using the new version of change_passwd, I get this now when trying to >>bring up the options page for changing the password: >> >>*Fatal error*: Call to undefined function: plain_error_message() in >>*/usr/home/bruce_h/htdocs/squirrelmail/plugins/compatibility/functions.php >>* >>on line *262* >> >>Squirrelmail 1.4.5 >>Compatibility 2.0.4 >> >> >>Bruce >> >> >> >>Paul Lesneiwski wrote: >> >> >> >>>All, >>> >>> >>>Attached is new tentative release of change_passwd. Feedback >>>appreciated. >>> >>>- Paul |