-
I found three non-localized error messages in espauth-default.inc:
line 101
$error_message = "Incorrect User ID or Password, or your account has been disabled/expired.";
should read
$error_message = _('Incorrect User ID or Password, or your account has been disabled/expired.');
line 138
$error_message = "Your account has been disabled or...
2009-11-21 11:26:20 UTC in phpESP - php Easy Survey Package
-
Solved: when I declare the following inside the function:
global $ESPCONFIG;
all is fine, my previous hacking of the config files is unnecessary.
Maybe update documentation to state that when the include is done inside a function, you have to declare the $ESPCONFIG array as global.
I am including phpESP in a CMS based on CodeIgniter, a MVC framework. In CI, views (templates) don't...
2009-11-21 11:11:52 UTC in phpESP - php Easy Survey Package
-
Moving the phpESP.first.php to the top of the script does not make a difference, please mind that I am including /public/handler.php inside a function. This is indeed a matter of scope, variables that are declared outside the function are not available within it. In your example, if I replace
with
2009-11-21 11:04:21 UTC in phpESP - php Easy Survey Package
-
I would really like a way to loose the dropdown, so the respondents don't get confused. I assumed from the comment that supplying the $lang variable was the proper way to do just that.
Eventually I think a MVC approach would be better (separating presentation logic from business logic) so anyone could switch in their own templates, but that would require a large rewrite.
As a minor point I...
2009-11-17 20:24:53 UTC in phpESP - php Easy Survey Package
-
When including phpESP using /public/handler.php you can specify the language of your survey by supplying the language in a $lang variable. If you specify this variable, the login screen should not show the language chooser dropdown, unfortunately this does not work.
Reason is the fact that the language variable is not available within the function show_login() that is part of...
2009-11-16 20:47:13 UTC in phpESP - php Easy Survey Package
-
Hmm, further investigation showed that this problem only arises when you don't include the handler.php in global space (eg in a function or a class). I would still want to flag this as a bug. Example code below:
...
2009-11-15 19:28:29 UTC in phpESP - php Easy Survey Package
-
On line 94 of php.ini.fixed, a call is made to esp_setlocale_ex() which in turn calls esp_setlocale() (both live in espi18n.inc).
On line 110, 114 and 115 of espi18n.inc, esp_setlocale() accesses $ESPCONFIG as a global variable, which is not initialized yet.
Initialization of $GLOBALS['ESPCONFIG'] happens at the end of php.ini.fixed, so after the part that references esp_setlocale();
As a...
2009-11-15 12:34:58 UTC in phpESP - php Easy Survey Package
-
My proposed fix:
// copy conditions
$sql = "
INSERT INTO ".$GLOBALS['ESPCONFIG']['condition_table']."
(id, survey_id, q1_id, q2_id, cond, cond_value)
SELECT NULL, $new_sid, qnew1.id, qnew2.id, cond, cond_value
FROM ".$GLOBALS['ESPCONFIG']['question_table']." qold1,
".$GLOBALS['ESPCONFIG']['question_table']." qold2...
2009-11-14 22:07:45 UTC in phpESP - php Easy Survey Package
-
I would like to reopen SFID 2669428, but I can't seem to find a way to do that.
The sql statement in survey_aggregate.inc on line 152 to 165 contains hardcoded tablenames which will fail when used together with prefixed tables:
// copy conditions
$sql =
2009-11-14 21:43:07 UTC in phpESP - php Easy Survey Package