[MKDoc-dev] [BUG] 1.8 Error with UTF-8 in the First_Name or Family_Name field of the Editor table

Chris Croome chris at webarchitects.co.uk
Thu Oct 7 14:12:42 BST 2004


Hi

If a user has a First_Name or Family_Name with non-ascii chars then this
error is generated:

  [PETAL ERROR] Cannot decode string with wide characters at /usr/lib/perl5/5.8.3/i386-linux-thread-multi/Encode.pm line 164.  . Debug info written in /tmp/petal_debug.25309.1097154406.qypnamqawv.  at /usr/lib/perl5/site_perl/5.8.3/Petal.pm line 473.

I have attached the Petal error FWIW.

I came across this error because the testers site has accounts with
UTF-8 in the Family_Name / First_Name.

Chris

-- 
Chris Croome                               <chris at webarchitects.co.uk>
web design                             http://www.webarchitects.co.uk/ 
web content management                               http://mkdoc.com/   
-------------- next part --------------
Error: Cannot decode string with wide characters at /usr/lib/perl5/5.8.3/i386-linux-thread-multi/Encode.pm line 164.


Petal object dump:
==================
$VAR1 = bless( {
                 'language' => 'en-gb',
                 'file' => 'admin/user_modify/en.html'
               }, 'Petal' );


Stack trace:
============
 at /usr/lib/perl5/site_perl/5.8.3/Petal.pm line 373
	Petal::process('Petal=HASH(0xa3f6ba4)','self','flo::plugin::Admin::UserModify=HASH(0xa6e645c)','__output__','XHTML') called at /usr/local/mkdoc-1-8/flo/Plugin.pm line 80
	flo::Plugin::render('flo::plugin::Admin::UserModify=HASH(0xa6e645c)','self','flo::plugin::Admin::UserModify=HASH(0xa6e645c)','__output__','XHTML') called at /usr/lib/perl5/site_perl/5.8.3/MKDoc/Core/Plugin.pm line 455
	MKDoc::Core::Plugin::render_http('flo::plugin::Admin::UserModify=HASH(0xa6e645c)','self','flo::plugin::Admin::UserModify=HASH(0xa6e645c)','__output__','XHTML') called at /usr/local/mkdoc-1-8/flo/plugin/Admin/UserModify.pm line 46
	flo::plugin::Admin::UserModify::http_get('flo::plugin::Admin::UserModify=HASH(0xa6e645c)') called at /usr/local/mkdoc-1-8/flo/plugin/Admin/UserModify.pm line 69
	flo::plugin::Admin::UserModify::http_post('flo::plugin::Admin::UserModify=HASH(0xa6e645c)') called at /usr/lib/perl5/site_perl/5.8.3/MKDoc/Core/Plugin.pm line 230
	MKDoc::Core::Plugin::run('flo::plugin::Admin::UserModify=HASH(0xa6e645c)') called at /usr/lib/perl5/site_perl/5.8.3/MKDoc/Core/Plugin.pm line 182
	MKDoc::Core::Plugin::main('flo::plugin::Admin::UserModify') called at /usr/lib/perl5/site_perl/5.8.3/MKDoc/Core.pm line 119
	MKDoc::Core::main('MKDoc::Core') called at /usr/lib/perl5/site_perl/5.8.3/MKDoc/Core.pm line 102
	MKDoc::Core::process('MKDoc::Core') called at /usr/local/mkdoc-1-8/cgi/mkdoc.cgi line 19
	eval {...} called at /usr/local/mkdoc-1-8/cgi/mkdoc.cgi line 19
	Apache::ROOTmkd2_2ewebarchitects_2eco_2euk::handler('Apache=SCALAR(0xa654248)') called at /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi/Apache/Registry.pm line 149
	eval {...} called at /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi/Apache/Registry.pm line 149
	Apache::Registry::handler('Apache=SCALAR(0xa654248)') called at /dev/null line 0
	eval {...} called at /dev/null line 0


Template perl code dump:
========================
  1. $VAR1 = sub {
  2.     my $hash = shift;
  3.     my $res = "";
  4.     local $^W = 0;
  5.     $res .= "\<\!DOCTYPE\ html\ PUBLIC\
  6. \ \ \"\-\/\/W3C\/\/DTD\ XHTML\ 1\.0\ Transitional\/\/EN\"\
  7. \ \ \"http\:\/\/www\.w3\.org\/TR\/xhtml1\/DTD\/xhtml1\-transitional\.dtd\"\
  8. \>\
  9. \
 10. ";
 11.     $res .= do {
 12.         my $res = $hash->get_encoded ('set: uri                        self/uri');
 13.         (defined $res) ? $res : "";
 14.     };
 15.     $res .= "";
 16.     $res .= do {
 17.         my $res = $hash->get_encoded ('set: title                      string:Edit a User');
 18.         (defined $res) ? $res : "";
 19.     };
 20.     $res .= "";
 21.     $res .= do {
 22.         my $res = $hash->get_encoded ('set: lang                       self/lang');
 23.         (defined $res) ? $res : "";
 24.     };
 25.     $res .= "";
 26.     $res .= do {
 27.         my $res = $hash->get_encoded ('set: dir                        self/direction');
 28.         (defined $res) ? $res : "";
 29.     };
 30.     $res .= "";
 31.     $res .= do {
 32.         my $res = $hash->get_encoded ('set: align                      self/align');
 33.         (defined $res) ? $res : "";
 34.     };
 35.     $res .= "";
 36.     $res .= do {
 37.         my $res = $hash->get_encoded ('set: align_opposite             self/align_opposite');
 38.         (defined $res) ? $res : "";
 39.     };
 40.     $res .= "";
 41.     $res .= do {
 42.         my $res = $hash->get_encoded ('set: document_uri               self/parent/uri');
 43.         (defined $res) ? $res : "";
 44.     };
 45.     $res .= "";
 46.     $res .= do {
 47.         my $res = $hash->get_encoded ('set: document_title             self/parent/title');
 48.         (defined $res) ? $res : "";
 49.     };
 50.     $res .= "";
 51.     $res .= do {
 52.         my $res = $hash->get_encoded ('set: document_lang              self/parent/lang');
 53.         (defined $res) ? $res : "";
 54.     };
 55.     $res .= "";
 56.     $res .= do {
 57.         my $res = $hash->get_encoded ('set: document                   plugin: flo::plugin::Cache::Fake');
 58.         (defined $res) ? $res : "";
 59.     };
 60.     $res .= "";
 61.     $res .= do {
 62.         my $res = $hash->get_encoded ('set: user_list                  plugin: flo::plugin::Admin::UserList');
 63.         (defined $res) ? $res : "";
 64.     };
 65.     $res .= "";
 66.     $res .= do {
 67.         my $res = $hash->get_encoded ('set: user_add                   plugin: flo::plugin::Admin::UserInsert');
 68.         (defined $res) ? $res : "";
 69.     };
 70.     $res .= "";
 71.     $res .= do {
 72.         my $res = $hash->get_encoded ('set: audience_list              plugin: flo::plugin::Admin::AudienceList');
 73.         (defined $res) ? $res : "";
 74.     };
 75.     $res .= "";
 76.     $res .= do {
 77.         my $res = $hash->get_encoded ('set: audience_add               plugin: flo::plugin::Admin::AudienceInsert');
 78.         (defined $res) ? $res : "";
 79.     };
 80.     $res .= "";
 81.     $res .= do {
 82.         my $res = $hash->get_encoded ('set: preferences                plugin: flo::plugin::Account::Preferences');
 83.         (defined $res) ? $res : "";
 84.     };
 85.     $res .= "";
 86.     $res .= do {
 87.         my $res = $hash->get_encoded ('set: edit_preferences_uri       string:./${preferences/name}');
 88.         (defined $res) ? $res : "";
 89.     };
 90.     $res .= "\<html\ xmlns\=\"http\:\/\/www\.w3\.org\/1999\/xhtml\"\ ";
 91.     {
 92.         my $value = $hash->get_encoded ('lang');
 93.         if (defined($value)) {
 94.             $res .= "lang=\"$value\""
 95.         }
 96.     }
 97.     $res .= "\ ";
 98.     {
 99.         my $value = $hash->get_encoded ('lang');
100.         if (defined($value)) {
101.             $res .= "xml:lang=\"$value\""
102.         }
103.     }
104.     $res .= "\ ";
105.     {
106.         my $value = $hash->get_encoded ('dir');
107.         if (defined($value)) {
108.             $res .= "dir=\"$value\""
109.         }
110.     }
111.     $res .= "\>\
112. \
113. \
114. ";
115.     $res .= do {
116.         do {
117.             my $new_hash = $hash->new();
118.             $new_hash->{__included_from__} = 'admin/user_modify/en.html';
119.             my $res = eval { Petal->new (file => '/fragments/head_admin/', lang => 'en-gb')->process ($new_hash) };
120.             $res = "<!--\n$@\n-->" if (defined $@ and $@);
121.             $res;
122.         } || '';
123.     };
124.     $res .= "\
125. \
126. \ \ \<body\>\
127. \
128. \ \ \ \ ";
129.     $res .= do {
130.         do {
131.             my $new_hash = $hash->new();
132.             $new_hash->{__included_from__} = 'admin/user_modify/en.html';
133.             my $res = eval { Petal->new (file => '/fragments/admin/', lang => 'en-gb')->process ($new_hash) };
134.             $res = "<!--\n$@\n-->" if (defined $@ and $@);
135.             $res;
136.         } || '';
137.     };
138.     $res .= "\
139. \
140. \ \ \ \ \<div\ class\=\"admin\-content\"\>\
141. \ \ \ \ \ \ \<h1\ ";
142.     {
143.         my $value = $hash->get_encoded ('align');
144.         if (defined($value)) {
145.             $res .= "align=\"$value\""
146.         }
147.     }
148.     $res .= "\ lang\=\"en\"\ xml\:lang\=\"en\"\ dir\=\"ltr\"\>";
149.     $res .= do {
150.         my $res = $hash->get_encoded ('title');
151.         (defined $res) ? $res : "";
152.     };
153.     $res .= "\<\/h1\>\
154. \
155. \ \ \ \ \ \ ";
156.     $res .= do {
157.         do {
158.             my $new_hash = $hash->new();
159.             $new_hash->{__included_from__} = 'admin/user_modify/en.html';
160.             my $res = eval { Petal->new (file => '/error/', lang => 'en-gb')->process ($new_hash) };
161.             $res = "<!--\n$@\n-->" if (defined $@ and $@);
162.             $res;
163.         } || '';
164.     };
165.     $res .= "\
166. \
167. \ \ \ \ \ \ ";
168.     if ($hash->get ('self/ok')) {
169.         $res .= "\<p\ ";
170.         {
171.             my $value = $hash->get_encoded ('align');
172.             if (defined($value)) {
173.                 $res .= "align=\"$value\""
174.             }
175.         }
176.         $res .= "\ lang\=\"en\"\ xml\:lang\=\"en\"\ dir\=\"ltr\"\>\
177. \ \ \ \ \ \ \ \ User\ details\ have\ been\ successfully\ modified\,\ if\ you\ wish\ to\ modify\ \
178. \ \ \ \ \ \ \ \ another\ user\ please\ return\ to\ the\ \
179. \ \ \ \ \ \ \ \ \<a\ ";
180.         {
181.             my $value = $hash->get_encoded ('user_list/uri');
182.             if (defined($value)) {
183.                 $res .= "href=\"$value\""
184.             }
185.         }
186.         $res .= "\ title\=\"List\,\ edit\,\ add\ and\ delete\ users\.\"\>user\ list\<\/a\>\.\
187. \ \ \ \ \ \ \<\/p\>";
188.     };
189.     $res .= "\
190. \
191. \ \ \ \ \ \ \<p\ ";
192.     {
193.         my $value = $hash->get_encoded ('align');
194.         if (defined($value)) {
195.             $res .= "align=\"$value\""
196.         }
197.     }
198.     $res .= "\ lang\=\"en\"\ xml\:lang\=\"en\"\ dir\=\"ltr\"\>\
199. \ \ \ \ \ \ \ \ Edit\ the\ user\ details\ in\ the\ following\ form\ and\ then\ modify\ the\ user\.\
200. \ \ \ \ \ \ \<\/p\>\
201. \
202. \ \ \ \ \ \ \<form\ accept\-charset\=\"UTF\-8\"\ enctype\=\"application\/x\-www\-form\-urlencoded\"\ ";
203.     {
204.         my $value = $hash->get_encoded ('uri');
205.         if (defined($value)) {
206.             $res .= "action=\"$value\""
207.         }
208.     }
209.     $res .= "\ method\=\"post\"\>\
210. \
211. \ \ \ \ \ \ \<input\ ";
212.     {
213.         my $value = $hash->get_encoded ('self/user_edit/id');
214.         if (defined($value)) {
215.             $res .= "value=\"$value\""
216.         }
217.     }
218.     $res .= "\ name\=\"id\"\ type\=\"hidden\"\ \/\>\
219. \
220. \ \ \ \ \ \ \<fieldset\ class\=\"user\-details\"\>\
221. \
222. \ \ \ \ \ \ \ \ \ \ \<legend\ ";
223.     {
224.         my $value = $hash->get_encoded ('align');
225.         if (defined($value)) {
226.             $res .= "align=\"$value\""
227.         }
228.     }
229.     $res .= "\ lang\=\"en\"\ xml\:lang\=\"en\"\ dir\=\"ltr\"\>\
230. \ \ \ \ \ \ \ \ \ \ \ \ User\ Details\
231. \ \ \ \ \ \ \ \ \ \ \<\/legend\>\
232. \
233. \ \ \ \ \ \ \ \ \ \ \<p\ ";
234.     {
235.         my $value = $hash->get_encoded ('align');
236.         if (defined($value)) {
237.             $res .= "align=\"$value\""
238.         }
239.     }
240.     $res .= "\ lang\=\"en\"\ xml\:lang\=\"en\"\ dir\=\"ltr\"\>\
241. \ \ \ \ \ \ \ \ \ \ \ \ \<em\ class\=\"help\"\>\
242. \ \ \ \ \ \ \ \ \ \ \ \ \ \ You\ can\'t\ edit\ the\ username\.\ If\ you\ want\ a\ different\ username\ you\ will\ need\ to\ create\ a\ new\ user\.\
243. \ \ \ \ \ \ \ \ \ \ \ \ \<\/em\>\
244. \ \ \ \ \ \ \ \ \ \ \ \ \<label\ for\=\"login\"\>Username\<\/label\>\
245. \ \ \ \ \ \ \ \ \ \ \ \ \<br\ \/\>\
246. \ \ \ \ \ \ \ \ \ \ \ \ \<span\>";
247.     $res .= do {
248.         my $res = $hash->get_encoded ('self/cgi/param --login');
249.         (defined $res) ? $res : "";
250.     };
251.     $res .= "\<\/span\>\
252. \ \ \ \ \ \ \ \ \ \ \<\/p\>\
253. \
254. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \<p\ ";
255.     {
256.         my $value = $hash->get_encoded ('align');
257.         if (defined($value)) {
258.             $res .= "align=\"$value\""
259.         }
260.     }
261.     $res .= "\ lang\=\"en\"\ xml\:lang\=\"en\"\ dir\=\"ltr\"\>\
262. \ \ \ \ \ \ \ \ \ \ \ \ \<em\ class\=\"help\"\>\
263. \ \ \ \ \ \ \ \ \ \ \ \ \ \ The\ first\,\ or\ given\ or\ christian\ name\ of\ the\ user\.\
264. \ \ \ \ \ \ \ \ \ \ \ \ \<\/em\>\
265. \ \ \ \ \ \ \ \ \ \ \ \ \<label\ for\=\"first_name\"\>First\ Name\<\/label\>\
266. \ \ \ \ \ \ \ \ \ \ \ \ \<br\ \/\>\
267. \ \ \ \ \ \ \ \ \ \ \ \ \<input\ ";
268.     {
269.         my $value = $hash->get_encoded ('self/cgi/param --first_name');
270.         if (defined($value)) {
271.             $res .= "value=\"$value\""
272.         }
273.     }
274.     $res .= "\ name\=\"first_name\"\ type\=\"text\"\ id\=\"first_name\"\ size\=\"20\"\ \/\>\
275. \ \ \ \ \ \ \ \ \ \ \<\/p\>\
276. \ \
277. \ \ \ \ \ \ \ \ \ \ \<p\ ";
278.     {
279.         my $value = $hash->get_encoded ('align');
280.         if (defined($value)) {
281.             $res .= "align=\"$value\""
282.         }
283.     }
284.     $res .= "\ lang\=\"en\"\ xml\:lang\=\"en\"\ dir\=\"ltr\"\>\
285. \ \ \ \ \ \ \ \ \ \ \ \ \<em\ class\=\"help\"\>\
286. \ \ \ \ \ \ \ \ \ \ \ \ \ \ The\ family\ or\ second\ or\ surname\ of\ the\ user\.\
287. \ \ \ \ \ \ \ \ \ \ \ \ \<\/em\>\
288. \ \ \ \ \ \ \ \ \ \ \ \ \<label\ for\=\"family_name\"\>Family\ Name\<\/label\>\
289. \ \ \ \ \ \ \ \ \ \ \ \ \<br\ \/\>\
290. \ \ \ \ \ \ \ \ \ \ \ \ \<input\ ";
291.     {
292.         my $value = $hash->get_encoded ('self/cgi/param --family_name');
293.         if (defined($value)) {
294.             $res .= "value=\"$value\""
295.         }
296.     }
297.     $res .= "\ name\=\"family_name\"\ type\=\"text\"\ id\=\"family_name\"\ size\=\"20\"\ \/\>\
298. \ \ \ \ \ \ \ \ \ \ \<\/p\>\
299. \ \
300. \ \ \ \ \ \ \ \ \ \ \<p\ ";
301.     {
302.         my $value = $hash->get_encoded ('align');
303.         if (defined($value)) {
304.             $res .= "align=\"$value\""
305.         }
306.     }
307.     $res .= "\ lang\=\"en\"\ xml\:lang\=\"en\"\ dir\=\"ltr\"\>\
308. \ \ \ \ \ \ \ \ \ \ \ \ \<em\ class\=\"help\"\>\
309. \ \ \ \ \ \ \ \ \ \ \ \ \ \ The\ email\ address\ of\ the\ user\,\ please\ double\ check\ that\ this\ is\ correct\.\
310. \ \ \ \ \ \ \ \ \ \ \ \ \<\/em\>\
311. \ \ \ \ \ \ \ \ \ \ \ \ \<label\ for\=\"email\"\>Email\<\/label\>\
312. \ \ \ \ \ \ \ \ \ \ \ \ \<br\ \/\>\
313. \ \ \ \ \ \ \ \ \ \ \ \ \<input\ ";
314.     {
315.         my $value = $hash->get_encoded ('self/cgi/param --email');
316.         if (defined($value)) {
317.             $res .= "value=\"$value\""
318.         }
319.     }
320.     $res .= "\ name\=\"email\"\ type\=\"text\"\ id\=\"email\"\ size\=\"40\"\ \/\>\
321. \ \ \ \ \ \ \ \ \ \ \<\/p\>\
322. \
323. \ \ \ \ \ \ \ \ \ \ \<p\ ";
324.     {
325.         my $value = $hash->get_encoded ('align');
326.         if (defined($value)) {
327.             $res .= "align=\"$value\""
328.         }
329.     }
330.     $res .= "\ lang\=\"en\"\ xml\:lang\=\"en\"\ dir\=\"ltr\"\>\
331. \ \ \ \ \ \ \ \ \ \ \ \ \<em\ class\=\"help\"\>\
332. \ \ \ \ \ \ \ \ \ \ \ \ \ \ The\ password\ for\ the\ user\,\ this\ shouldn\'t\ contain\ any\ spaces\ and\ it\ is\ case\ sensitive\.\
333. \ \ \ \ \ \ \ \ \ \ \ \ \<\/em\>\
334. \ \ \ \ \ \ \ \ \ \ \ \ \<label\ for\=\"password\"\>Password\<\/label\>\
335. \ \ \ \ \ \ \ \ \ \ \ \ \<br\ \/\>\
336. \ \ \ \ \ \ \ \ \ \ \ \ \<input\ ";
337.     {
338.         my $value = $hash->get_encoded ('self/cgi/param --password');
339.         if (defined($value)) {
340.             $res .= "value=\"$value\""
341.         }
342.     }
343.     $res .= "\ name\=\"password\"\ type\=\"password\"\ id\=\"password\"\ size\=\"20\"\ \/\>\
344. \ \ \ \ \ \ \ \ \ \ \<\/p\>\
345. \ \ \ \ \ \ \ \ \<\/fieldset\>\
346. \
347. \ \ \ \ \ \ \ \ \<fieldset\ class\=\"user\-permissions\"\>\
348. \
349. \ \ \ \ \ \ \ \ \ \ \<legend\ ";
350.     {
351.         my $value = $hash->get_encoded ('align');
352.         if (defined($value)) {
353.             $res .= "align=\"$value\""
354.         }
355.     }
356.     $res .= "\ lang\=\"en\"\ xml\:lang\=\"en\"\ dir\=\"ltr\"\>\
357. \ \ \ \ \ \ \ \ \ \ \ \ User\ Permissions\
358. \ \ \ \ \ \ \ \ \ \ \<\/legend\>\
359. \
360. \ \ \ \ \ \ \ \ \ \ \<p\ ";
361.     {
362.         my $value = $hash->get_encoded ('align');
363.         if (defined($value)) {
364.             $res .= "align=\"$value\""
365.         }
366.     }
367.     $res .= "\ lang\=\"en\"\ xml\:lang\=\"en\"\ dir\=\"ltr\"\>\
368. \ \ \ \ \ \ \ \ \ \ \ \ \<em\ class\=\"help\"\>\
369. \ \ \ \ \ \ \ \ \ \ \ \ \ \ The\ base\ document\(s\)\ are\ the\ document\(s\)\ that\ this\ user\ is\ allowed\ to\ edit\.\ \
370. \ \ \ \ \ \ \ \ \ \ \ \ \ \ If\ this\ user\ has\ no\ selected\ based\ document\ then\ they\ will\ not\ be\ allowed\ to\ edit\ any\ \
371. \ \ \ \ \ \ \ \ \ \ \ \ \ \ documents\ on\ this\ site\.\ If\ one\ of\ more\ documents\ are\ selected\ then\ the\ user\ will\ be\ able\ \
372. \ \ \ \ \ \ \ \ \ \ \ \ \ \ edit\ those\ documents\ \<strong\>and\<\/strong\>\ any\ child\ documents\ that\ these\ documents\ might\ \
373. \ \ \ \ \ \ \ \ \ \ \ \ \ \ have\.\ This\ means\ that\ if\ you\ want\ to\ allow\ someone\ to\ edit\ all\ documents\ you\ only\ need\ to\ \
374. \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ \/\ as\ their\ base\ document\.\ To\ select\ multiple\ items\ or\ select\ no\ items\ you\ might\ need\ to\
375. \ \ \ \ \ \ \ \ \ \ \ \ \ \ use\ the\ \<kbd\>Ctrl\<\/kbd\>\ key\.\
376. \ \ \ \ \ \ \ \ \ \ \ \ \<\/em\>\
377. \ \ \ \ \ \ \ \ \ \ \ \ \<label\ for\=\"base_documents\"\>Base\ Document\(s\)\<\/label\>\
378. \ \ \ \ \ \ \ \ \ \ \ \ \<br\ \/\>\
379. \ \ \ \ \ \ \ \ \ \ \ \ \<select\ name\=\"base_documents\"\ id\=\"base_documents\"\ multiple\=\"multiple\"\ size\=\"12\"\>\
380. \ \ \ \ \ \ \ \ \ \ \ \ \ \ ";
381.     my @array = @{$hash->get ('self/documents')};
382.     for (my $i=0; $i < @array; $i++) {
383.         my $hash   = $hash->new();
384.         my $number = $i + 1;
385.         my $odd    = $number % 2;
386.         my $even   = $i % 2;
387.         my $start  = ($i == 0);
388.         my $end    = ($i == $#array);
389.         my $inner  = ($i and $i < @array);
390.         $hash->{__count__}    = $number;
391.         $hash->{__is_first__} = $start;
392.         $hash->{__is_last__}  = $end;
393.         $hash->{__is_inner__} = $inner;
394.         $hash->{__even__}     = $even;
395.         $hash->{__odd__}      = $odd;
396.         $hash->{repeat} = {
397.             index  => $i,
398.             number => $number,
399.             even   => $even,
400.             odd    => $odd,
401.             start  => $start,
402.             end    => $end,
403.             inner  => $inner,
404.             };
405.         $hash->{'document'} = $array[$i];
406.         $res .= "\<option\ ";
407.         {
408.             my $value = $hash->get_encoded ('document/id');
409.             if (defined($value)) {
410.                 $res .= "value=\"$value\""
411.             }
412.         }
413.         $res .= "\ ";
414.         {
415.             my $value = $hash->get_encoded ('self/is_selected $document');
416.             if (defined($value)) {
417.                 $res .= "selected=\"$value\""
418.             }
419.         }
420.         $res .= "\>";
421.         $res .= do {
422.             my $res = $hash->get_encoded ('document/path');
423.             (defined $res) ? $res : "";
424.         };
425.         $res .= "\<\/option\>";
426.     };
427.     $res .= "\
428. \ \ \ \ \ \ \ \ \ \ \ \ \<\/select\>\
429. \ \ \ \ \ \ \ \ \ \ \<\/p\>\
430. \ \ \ \ \ \ \ \ \ \ \ \ \ \
431. \ \ \ \ \ \ \ \ \ \ \<p\ ";
432.     {
433.         my $value = $hash->get_encoded ('align');
434.         if (defined($value)) {
435.             $res .= "align=\"$value\""
436.         }
437.     }
438.     $res .= "\ lang\=\"en\"\ xml\:lang\=\"en\"\ dir\=\"ltr\"\>\
439. \ \ \ \ \ \ \ \ \ \ \ \ \<em\ class\=\"help\"\>\
440. \ \ \ \ \ \ \ \ \ \ \ \ \ \ Accounts\ can\ be\ enabled\,\ which\ means\ that\ they\ can\ be\ used\,\ or\ disabled\ which\ means\ that\
441. \ \ \ \ \ \ \ \ \ \ \ \ \ \ they\ can\'t\ be\ used\.\
442. \ \ \ \ \ \ \ \ \ \ \ \ \<\/em\>\
443. \ \ \ \ \ \ \ \ \ \ \ \ \<label\ for\=\"disabled\"\>Account\ Status\<\/label\>\
444. \ \ \ \ \ \ \ \ \ \ \ \ \<br\ \/\>\
445. \ \ \ \ \ \ \ \ \ \ \ \ \<select\ name\=\"disabled\"\ id\=\"disabled\"\>\
446. \ \ \ \ \ \ \ \ \ \ \ \ \ \ ";
447.     if ($hash->get ('true: self/cgi/param --disabled')) {
448.         $res .= "\<option\ value\=\"1\"\>Disabled\<\/option\>";
449.     };
450.     $res .= "\
451. \ \ \ \ \ \ \ \ \ \ \ \ \ \ ";
452.     if ($hash->get ('true: self/cgi/param --disabled')) {
453.         $res .= "\<option\ value\=\"0\"\>Enabled\<\/option\>";
454.     };
455.  


More information about the MKDoc-dev mailing list