Date: 01/04/01
- Next message: max: "[phplib-dev] cvs commit"
- Previous message: Ulf Wendel: "Re: [phplib-dev] Forms"
- Next in thread: max: "[phplib-dev] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: uw
Date: Thu Jan 4 15:51:03 2001
Modified files:
php-lib/php/form/form.inc
Log message:
Made form.inc use the constant FORM_INCLUDE_DIR.
Index: php-lib/php/form/form.inc
diff -u php-lib/php/form/form.inc:1.16 php-lib/php/form/form.inc:1.17
--- php-lib/php/form/form.inc:1.16 Tue Jan 2 16:49:29 2001
+++ php-lib/php/form/form.inc Thu Jan 4 15:51:02 2001
@@ -26,7 +26,7 @@
* - tree (select box with options show as a tree)
*
* <email protected> Ulf Wendel <ulf.wendel <email protected>>
-* <email protected> $Id: form.inc,v 1.16 2001/01/02 15:49:29 uw Exp $
+* <email protected> $Id: form.inc,v 1.17 2001/01/04 14:51:02 uw Exp $
* <email protected> public
* <email protected> Form
*/
@@ -839,7 +839,8 @@
$file = ($complex = count($validators)) ? "form_js_complex.js" : "form_js_simple.js";
// get the code
- $fh = fopen( $file, "r");
+ $file = FORM_INCLUDE_DIR . $file;
+ $fh = fopen($file, "r");
if (!$fh) {
$this->exceptions[] = new form_error("Can't read JavaScript code file: '$file'.", __FILE__, __LINE__);
return "";
@@ -847,7 +848,6 @@
$base_code = fread($fh, filesize($file));
fclose($fh);
- // get JS code from every element of the form
$js = "";
$custom = "";
$get_value = "";
@@ -860,7 +860,7 @@
// all kinds of additional JS code
list($extra_func, $extra_fname) = $el->getExtraJS();
if ($extra_fname && !isset($send_func[$extra_fname])) {
- $base_code .= $extra_func . ";";
+ $base_code = $base_code . "\n" . $extra_func . ";";
$send_func[$extra_fname] = true;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-dev-unsubscribe <email protected>
For additional commands, e-mail: phplib-dev-help <email protected>
- Next message: max: "[phplib-dev] cvs commit"
- Previous message: Ulf Wendel: "Re: [phplib-dev] Forms"
- Next in thread: max: "[phplib-dev] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

